team = createTeam ( "Staff", 255, 255, 255 )
function teamSet ( thePlayer )
local team = getTeamFromName ( "Staff" )
local account = getPlayerAccount ( thePlayer )
if ( not account or isGuestAccount ( account ) ) then
return
end
local accountName = getAccountName(account )
if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "L5" ) ) ) then
if ( not getElementData ( thePlayer, "invincible" ) ) then
setElementData ( thePlayer, "invincible", true )
setElementModel ( thePlayer, 217 )
setPlayerTeam ( thePlayer, team )
setPlayerNametagColor ( thePlayer, 255, 255, 255 )
outputChatBox ( "#00FF00GodMode Enabled", thePlayer, 0, 255, 0, true )
else
outputChatBox ( "#FF0000GodMode Disabled", thePlayer, 255, 0, 0, true )
setElementData ( thePlayer, "invincible", false )
end
end
end
addEvent ( "sTeame", true )
addEventHandler ( "sTeame", root, teamSet )
addCommandHandler ( "staff", teamSet )