View difference between Paste ID: 0THLiWW1 and U7weK0dy
SHOW: | | - or go back to the newest paste.
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 
7+
  		     		outputChatBox("Staff Mode is now off.",thePlayer,255,255,255)
8-
8+
9-
off.",thePlayer,255,255,255)
9+
10
			        outputChatBox("Staff Mode is now on.",thePlayer,255,255,255)
11
		        end
12
		end
13
	end
14
end
15
addCommandHandler("gostaff",toggleStaffMode)