I have two problems
#1

Hello,

On my chat log of server-samp see debug error:

#0 000e1698 in public OnPlayerDeath (playerid=6, killerid=65535, reason=255)

And i have an other problem: my gamemode has used 100% usage CPU, what's problem?

Please, help me, thank you.
Reply
#2

In OnPlayerDeath, check if issuerid is not INVALID_PLAYER_ID before using it in arrays. If you don't understand, see the example in the wiki: https://sampwiki.blast.hk/wiki/OnPlayerDeath
It increases the kills for the killer ONLY if the player is valid.

and u kept playerid=6, why do u want that > instead just try playerid,
Reply
#3

killerid=65535 = invalid killer id

PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    if(
killerid != INVALID_PLAYER_ID
    
{
        
// do stuff
    
}
    return 
1;

100% cpu could result in a lot of things..
timers, unoptimized code, etc

or something running on background on your server?
Reply
#4

Thanks, on my gamemode i use sevent timers in OnGameModeInit whith include fixes2.inc
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)