04.02.2013, 02:03
How to make Team kill? if a player on the same team can lost health.by team killing.
#include a_samp
new gTeam[MAX_PLAYERS]; ///define 0 and 1 the team
new Kills[MAX_PLAYERS];
public OnPlayerDeath(playerid, killeird, reason)
{
if(gTeam[killeird] == gTeam[playerid] )
{
Kills[killeird]--;
SetPlayerHealth(killerid, 0);
} else { Kills[killeird]++; }
return 1;
}
C:\Users\(967) : error 017: undefined symbol "playerid" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
#include a_samp new gTeam[MAX_PLAYERS]; ///define 0 and 1 the team new Kills[MAX_PLAYERS]; public OnPlayerDeath(playerid, killerid, reason) { if(gTeam[killerid] == gTeam[playerid]){ Kills[killerid]--; SetPlayerHealth(killerid, 0); } else { Kills[killerid]++; } return 1; }