27.10.2012, 18:49
You're problem seems to be that you're using your "killerid" variables/functions while "killerid" equals INVALID_PLAYER_ID.
This is how it should be:
This is how it should be:
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);
if(killerid != INVALID_PLAYER_ID) {
GivePlayerMoney(killerid, 1000);
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
pInfo[killerid][Kills]++;
}
SetPlayerScore(playerid,GetPlayerScore(playerid)-1);
pInfo[playerid][Deaths]++;
return 1;
}