02.03.2015, 02:10
how to make a condition if the player kills a cop?
I need that i make something..
I need that i make something..
if(gTeam[playerid] == 1 || gTeam[killerid] == 0)
Something like this?
Код:
if(gTeam[playerid] == 1 || gTeam[killerid] == 0) |
|| // that mean or
Try this
If(gTeam[killerid] != TEAM_POLICE) // the ! Sign means not, so it checks if the killer team is not team police . That's what its saying.
{
If(gTeam[playerid] == TEAM_POLICE) // this checks if the player that died is on team police
{
//your code here
}
}
Something like this?
Код:
if(gTeam[playerid] == 1 || gTeam[killerid] == 0) |
if(killerid != INVALID_PLAYER_ID) { // thats pretty important because we don't count suicide
if(gTeam[playerid] == TEAM_POLICE && gTeam[killerid] != TEAM_POLICE) {
print("Player killed cop");
}
}