Chique

Untitled

Mar 30th, 2012
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function toggleStaffMode(thePlayer)
  2.     if (getPlayerAccount(thePlayer)) then
  3.         local accName = getAccountName ( getPlayerAccount ( thePlayer ) )
  4.             if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then
  5.             if (getElementData(thePlayer,"invincible")) then
  6.                     setElementData(thePlayer,"invincible",false)
  7.                     outputChatBox("Staff Mode is now off.",thePlayer,255,255,255)
  8.             else
  9.                 setElementData(thePlayer,"invincible",true)
  10.                     outputChatBox("Staff Mode is now on.",thePlayer,255,255,255)
  11.                 end
  12.         end
  13.     end
  14. end
  15. addCommandHandler("gostaff",toggleStaffMode)
Add Comment
Please, Sign In to add comment