10.02.2018, 15:50
OnPlayerDeath have to arguments - "playerid" and "killerid".
So i assume you are not using SetPlayerTeam, otherwise there is no way a team member can kill another team member.
So you can just compare the way you checked the team in loop:
And if this statement is true, you continue your loop inside it. About your loop, you need to modify it to this (you only want to give score to connected gang members right?):
So i assume you are not using SetPlayerTeam, otherwise there is no way a team member can kill another team member.
So you can just compare the way you checked the team in loop:
PHP код:
if (PlayerInfo[playerid][pJob] != PlayerInfo[killerid][pJob]) {}
PHP код:
for (new i = 0, j = GetPlayerPoolSize(); i <= j; i++) {
if (IsPlayerConnected(i)) {
// do your if statements here
}
}