Hi
I want to script to change the team, provided that does not have the health less than 50
tests
function dramex()
if (getElementHealth(getLocalPlayer()) == -30) then
outputChatBox ( " Erorr " )
else
local team =getTeamFromName("Spectator")
setPlayerTeam(player, team)
end
end
addCommandHandler ( "spec", dramex)