Hitman Problem
#2

Are you checking that killerid is a valid player before using it? From the wiki (https://sampwiki.blast.hk/wiki/OnPlayerDeath)
Quote:

You MUST check whether 'killerid' is valid (not INVALID_PLAYER_ID) before using it in an array (or really anywhere), as it will cause the OnPlayerDeath script to crash (not the entire script). This is because INVALID_PLAYER_ID is defined as 65535, and if an array only has 'MAX_PLAYERS' elements, e.g. 500, you're trying to access an index that is above 499, which is out of bounds.

Код:
if(killerid != INVALID_PLAYER_ID)
{
// code here
}
Reply


Messages In This Thread
Hitman Problem - by Markoni990 - 18.08.2016, 22:52
Re: Hitman Problem - by MEW273 - 19.08.2016, 01:15

Forum Jump:


Users browsing this thread: 2 Guest(s)