I've been trying to learn a little lua in order to make a real simple mod for 'jail/prison' servers. The idea with this script would be to mark the player from the terrorist team that attacks a CT opponent. I have the actual 'marking' technique done, but I just can't figure out how it will determine if it was a terrorist attacking a ct member. I have been trying to test the mechanism using just a simple message in this code:
1
2
3
4
5
2
3
4
5
addhook("hit","Hit") function Hit(victim,id,wpn,hpdmg,apdmg,rawdmg) if player(id,"team") ~= player(victim,"team") then 		msg("Potato") end
Yeah so basically line 3 is absolutely screwed. Could someone with a little more knowledge help me out? I would be forever in your debt.
Thank you for your time,
Grimm