21.01.2012, 23:38
What Jefff tried to say was:
You need to check whether killerid is valid before you set an array using it, otherwise it will crash/stop.
You need to check whether killerid is valid before you set an array using it, otherwise it will crash/stop.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID) // Valid killer
{
pInfo[killerid][Kills]++;
if(pInfo[killerid][VIP] > 0) SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
}
pInfo[playerid][Deaths]++;
return 1;
}