Szerző Téma: Adminjail  (Megtekintve 1231 alkalommal)

Adminjail
« Dátum: 2019. Június 10. - 18:05:37 »
0
Adminjail
Sziasztok, probálgatok egy jail scriptet, de valahogy nem sikerül
 
megjelöltem egy csillagot, ott van valami gubanc
 

                        function () 
                            chat(\"Jail: \"..player2..\" has been released from jail.\",255,255,0) 
                            setElementPosition(prisoner,releaseX, releaseY, releaseZ)-- Set their position when they get released 
                            SetElementDimension(prisoner,releaseDimension) -- set they dimensioon to the release dimension 
                            setElementInterior(prisoner,releaseInterior) -- set their interior to the defined release interior 
                   ***     end  1000 ) -- Will convert the timer into miliseconds. 
                else 
 
 
Vagyis a csillag sorába
 

Nem elérhető gbr333

  • 670
    • Profil megtekintése
Adminjail
« Válasz #1 Dátum: 2019. Június 10. - 19:33:51 »
0
vessző?

Adminjail
« Válasz #2 Dátum: 2019. Június 10. - 19:35:46 »
0
A chat() egy custom függvény? illetve az az end 1000 mi? Csak mert nem látok Timer-t. 

Adminjail
« Válasz #3 Dátum: 2019. Június 11. - 12:57:31 »
0
itt az egész script
 



   
          jailx, jaily, jailz = 1516, -1462, 10 -- You can change to custom cordinates. 
          jailInterior = 0 
          jailDimension = 0 
            
          releaseX, releaseY, releaseZ = 1546, -1675, 14 -- the release cordinates of the jail 
          releaseInterior = 0-- The interior that they will be released to 
          releaseDimension= 0 -- The dimension that they will be released to. 
            
          function onPlayerJail(player,command,player2,timer,reason) 
              timer = timer -- I just do this incase, for the timer function. 
              local chat = outputChatBox -- Lets define \"chat\" to \"outputChatBox\" just to save some time 
              prisoner = getPlayerFromName(player2) -- This will get the player who you wan tto jail. 
              if isObjectInACLGroup(\"user.\"..getAccountName, getPlayerAccount( player ),aclGetGroup(\"Admin\")) then -- Check if the player is in the Admin ACL group. 
                  if (timer) then 
                      if (prisoner) then -- if \"player2\" is a valid player then 
                          --- Here Is Where Most of the coding will take place. --- 
                          setElementPosition(prisoner,jailx, jaily, jailz) -- Take them to jail 
                          setElementInterior(prisoner,jailInterior) -- If they where in an interior, set them to your jails interior 
                          setElementDimension(prisoner,jailDimension) -- set them to the jail dimension (opsional) 
                          chat(\"Jail   :#7cc576 \"..getPlayerName(player)..\" #ffffffbebörtönözte#7cc576 \"..player2..\" #32b3ef\"..timer..\" percre\",root,255,0,0) 
                          chat(\"Jail] #7cc576Indok:#ffffff\"..reason,root,255,0,0) 
                          jailTimer = ( -- Set the timer, of the player to be released. 
                              function ( 
                                  chat(\"Jail: \"..player2..\" has been released from jail.\",255,255,0) 
                                  setElementPosition(prisoner,releaseX, releaseY, releaseZ)-- Set their position when they get released 
                                  SetElementDimension(prisoner,releaseDimension) -- set they dimensioon to the release dimension 
                                  setElementInterior(prisoner,releaseInterior) -- set their interior to the defined release interior 
                              end, jailTimer 1000, 1  -- Will convert the timer into miliseconds. 
                              )      
                      else 
                          chat(\"Jail:    \"..player2..\"Nem érvényes játékos\",player,255,0,0) 
                      end 
                  else 
                      chat(\"[Jail]:#ffffff /\"..command..\" [NÉV] [IDŐ] [INDOK]\",player,255,0,0) -- If they didn\'t enter a time, then outputChatBox that message. 
                  end 
              else -- And if their not in the admin ACL 
                  chat(\"#d75959[AdminJail]:#ffffffTe nem vagy Admin!.\",player,255,0,0) -- this is really going to do: outputChatBox(\"Jail: Your not an admin.\",player,255,0,0) 
              end 
          end 
          addCommandHandler(\"ajail\",onPlayerJail) 
       
   

[/quote]
 
 
« Utoljára szerkesztve: 2019. Június 11. - 13:10:22 írta Killerke23 »

Adminjail
« Válasz #4 Dátum: 2019. Június 11. - 17:55:28 »
0
end, jailTimer 1000, 1
 

end, jailTimer 1000, 1

 
Nem kell a jailTimer oda. 
 

end, 1000, 1

 
 

Adminjail
« Válasz #5 Dátum: 2019. Június 11. - 20:41:11 »
0
az jó lett, de most ez a baj, valahol itt
 
   chat(\"Jail: \"..player2..\" has been released from jail.\",255,255,0) 
 
ERROR \"(\"   \")\"  
 
a két zárojellel van valami
« Utoljára szerkesztve: 2019. Június 11. - 20:42:04 írta Killerke23 »

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal