Jump to content

Adminjail


Recommended Posts

Sziasztok ez egy Adminjail script de valami baj lehet vele

Quote
  1.     jailx, jaily, jailz = 1516, -1462, 10 -- You can change to custom cordinates. 
  2.     jailInterior = 0 
  3.     jailDimension = 0 
  4.       
  5.     releaseX, releaseY, releaseZ = 1546, -1675, 14 -- the release cordinates of the jail 
  6.     releaseInterior = 0-- The interior that they will be released to 
  7.     releaseDimension= 0 -- The dimension that they will be released to. 
  8.       
  9.     function onPlayerJail(player,command,player2,timer,reason) 
  10.         timer = timer -- I just do this incase, for the timer function. 
  11.         local chat = outputChatBox -- Lets define "chat" to "outputChatBox" just to save some time 
  12.         prisoner = getPlayerFromName(player2) -- This will get the player who you wan tto jail. 
  13.      if  isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup(""FoAdmin","SzuperAdmin","Fejleszto","Tulajdonos")) then 
  14.             if (timer) then 
  15.                 if (prisoner) then -- if "player2" is a valid player then 
  16.                     --- Here Is Where Most of the coding will take place. --- 
  17.                     setElementPosition(prisoner,jailx, jaily, jailz) -- Take them to jail 
  18.                     setElementInterior(prisoner,jailInterior) -- If they where in an interior, set them to your jails interior 
  19.                     setElementDimension(prisoner,jailDimension) -- set them to the jail dimension (opsional) 
  20.                     chat("#d75959[AdminJail]:#7cc576 "..getPlayerName(player).." #ffffffbebörtönözte#7cc576 "..player2.." #32b3ef"..timer.." #7cc576percre",root,255,0,0) 
  21.                     chat("#d75959[AdminJail] #7cc576Indok:#ffffff"..reason,root,255,0,0) 
  22.                     jailTimer = ( -- Set the timer, of the player to be released. 
  23.                         function () 
  24.                             chat("Jail: "..player2.." has been released from jail.",255,255,0) 
  25.                             setElementPosition(prisoner,releaseX, releaseY, releaseZ)-- Set their position when they get released 
  26.                             SetElementDimension(prisoner,releaseDimension) -- set they dimensioon to the release dimension 
  27.                             setElementInterior(prisoner,releaseInterior) -- set their interior to the defined release interior 
  28.                      *******   end, 1000, 1 ) -- Will convert the timer into miliseconds. 
  29.                     ) -- End the timer function 
  30.                 else 
  31.                     chat("#d75959[AdminJail]:#7cc576 "..player2.."#ffffff Nem érvényes játékos",player,255,0,0) 
  32.                 end 
  33.             else 
  34.                 chat("#d75959[AdminJail]:#ffffff /"..command.." [NÉV] [IDŐ] [INDOK]",player,255,0,0) -- If they didn't enter a time, then outputChatBox that message. 
  35.             end 
  36.         else -- And if their not in the admin ACL 
  37.             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) 
  38.         end 
  39.     end 
  40.     addCommandHandler("ajail",onPlayerJail) 

A piros csillag a hiba

Link to comment
  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...