OnPlayerChangedTeam

Hello all! I have a problem with this code:



function ignite ( ply )
local job = DarkRP.getPhrase( "job", ply)
if job == TEAM_060 then
ply:Ignite(0)
ply:GodEnable()
end
end
hook.Add("OnPlayerChangedTeam", "on", ignite)

function unignite ( ply )
local job = DarkRP.getPhrase( "job", ply)
if not job == TEAM_060 then
ply:Extinguish()
ply:GodDisable()
end
end
hook.Add("OnPlayerChangedTeam", "off", unignite)


What i want?
When someone changing the job to TEAM_060 he need to be ignited with godemode and when he leaving this job it’s need to off.
The problem:
No lua errors but it isn’t working…
Thx for help!

[lua]function ignite ( ply, oldteam, newteam )
if newteam == TEAM_060 then
ply:Ignite(0)
ply:GodEnable()
elseif oldteam == TEAM_060 then
ply:Extinguish()
ply:GodDisable()
end
end
hook.Add(“OnPlayerChangedTeam”, “onoff”, ignite)[/lua]

typed on my android, but should work.

ok