02.06.2017, 22:33
Try this:
P.S:
- You were adding the kills to the one died not the killer.
- You don't need to check if the one died is connected, should do for the killer only.
Код:
public OnPlayerDeath(playerid, killerid, reason) { if(IsPlayerConnected(killerid) && killerid != INVALID_PLAYER_ID) { ZombieTeam(playerid); pInfo[killerid][Kills]++; if(pInfo[killerid][Human] == 1) { if(pInfo[playerid][Human] == 1) { new str[100]; format(str, sizeof(str),"[LOG]: %s has been killed by %s",GetName(playerid), GetName(killerid)); ResetPlayerWeapons(playerid); SendAdminsMessage(1, -1, str); ZombieTeam(playerid); printf("[LOG]: %s has been killed by %s",GetName(playerid), GetName(killerid)); } else if(pInfo[playerid][Zombie] == 1) { pInfo[killerid][Tokens] += 250; } } } return 1; }
- You were adding the kills to the one died not the killer.
- You don't need to check if the one died is connected, should do for the killer only.