
i want script good mood for CT only For Exmple When someone hits me, I do not die !
Thank you

gm={}
addhook("serveraction","_serveraction")
addhook("join","_join")
addhook("hit","_hit")
function _join(id)
gm[id]=false
end
function _serveraction(id,action)
if action==3 then
if player(id,"team")==2 then
if gm[id]==true then
msg2(id,"\169255000000God Mode Disabled")
gm[id]=false
else
gm[id]=true
msg2(id,"\169000255000God Mode Enabled")
end
end
end
end
function _hit(id)
if gm[id]==true then
return 1
end
end
addhook('minute','loop')
function loop()
msg('©255255255CTs are in a good mood!!!')
parse('sv_sound "/fun/thats_the_way.wav"')
end
good_mood=false
toggle_mood = function(id, b)
good_mood = good_mood == false and true or false
local text = good_mood and "\169255255255CTs are in a good mood!!! :D" or "\169200200200CTs are no longer in a good mood... :("
msg(text)
end
function loop()
if good_mood then
msg("CTs are in a good mood, yay!! ")
parse("sv_sound /"fun/thats_the_way/"")
end
timer(60000,"loop")
end
addhook("serveraction","toggle_mood")
loop()
addhook("hit","hit_mood")
function hit_mood(vic,kil,wpn,hpdmg)
if good_mood then if player(vic,"team")==2 then
if (hpdmg > player(vic,"health")) then
msg2(vic,"Im so happy <3")
msg2(kil,player(vic,"name").."is in a too good mood")
return 1
end
end end
end