Quote:
Originally Posted by drekes
Connor made a typo. Should be cs_get_user_team(id).
|
Thanks for notifying, I already wondered why it looked like that

Also you could confirm this would be better / more efficient, right? (the way I posted it). Since it also contains get_user_team(attacker) I would say you should cache the get_user_team part instead of also the id.
Edit:
I've now done it like this:
PHP Code:
new Team = cs_get_user_team(id)
new TeamA = cs_get_user_team(attacker)
if( is_user_alive(id)){
if(TeamA!=Team)
set_user_frags(attacker,get_user_frags(attacker) +1); // The line where to error comes
if(TeamA==Team)
set_user_frags(attacker,get_user_frags(attacker) -1);
However upon compiling I get the error tag mismatched, I assume this is because of this: UTIL_Kill(attacker,id,weapon[]) (that's what I think it is since as I stated I'm trying to learn PAWN all by myself by looking at other people their work).