mob
proc
Death(mob/M)
if(teamkill==1)//if its 1 means teamkill is off, 0 means its on
if(src.team==M.team)//my team is your team
return //do nothing
Problem description:
I have turn team kill on and off and when its off, When I kill someone from other team, they dont die, but I can kill my own team mates. I dont get whats wrong with the code please help
Well, that's a problem right there; that should be if(teamkill), not if(teamkill==1). Whenever your var can be either true or false, don't restrict it to using particular values. This way is not only shorter, it's more robust.
The proc should work as-is, so it's apparently not being called correctly. Show us the whole Death() proc, not just this small snippet of it (obviously there's more to it), and show us how it's being called.
Lummox JR