Kills/Deaths Problem
#8

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.

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;
}
Reply


Messages In This Thread
Kills/Deaths Problem - by geerdinho8 - 21.01.2012, 12:17
Re: Kills/Deaths Problem - by mineralo - 21.01.2012, 13:14
Re: Kills/Deaths Problem - by Bogdan1992 - 21.01.2012, 13:19
Re: Kills/Deaths Problem - by Amel_PAtomAXx - 21.01.2012, 16:41
Re: Kills/Deaths Problem - by geerdinho8 - 21.01.2012, 17:40
Re: Kills/Deaths Problem - by Amel_PAtomAXx - 21.01.2012, 20:33
Re: Kills/Deaths Problem - by Jefff - 21.01.2012, 22:00
Re: Kills/Deaths Problem - by MP2 - 21.01.2012, 23:38
Re: Kills/Deaths Problem - by Gh05t_ - 22.01.2012, 01:13
Re: Kills/Deaths Problem - by DarkScripter - 22.01.2012, 02:19

Forum Jump:


Users browsing this thread: 1 Guest(s)