FANDOM


Ovaj callback se poziva kada igrac umre.

Parametri Edit

(playerid, killerid, reason)
playerid - ID igraca koji je preminuo
killerid - ID napadaca
reason - ID razloga igraceve smrti
return Ovaj callback ne zahteva specijalan return

Primer Edit

new PlayerDeaths[MAX_PLAYERS];
new PlayerKills[MAX_PLAYERS];
 
public OnPlayerDeath(playerid, killerid, reason)
{
    SendDeathMessage(killerid, playerid, reason);
 
    // Proverava da li igrac nije naneo sam sebi stetu
    if(killerid != INVALID_PLAYER_ID)
    {
        PlayerKillCount[killerid] ++;
    }
 
    PlayerDeaths[playerid] ++;
    return 1;
}

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.