FANDOM


Ovaj callback se poziva kada igrac napusti server

Parametri Edit

(playerid, reason)
playerid - ID igraca koji napusta server
reason - razlog izlaska
Return - Ovaj callback ne zahteva specifican return

Razlozi Edit

0 - Timed Out (Igubio konekciju ili crashovao server)
1 - Izasao normalno (/quit (/q) ili ESC pa Exit)
2 - Kikovan ili Banovan (server zatvorio konekciju)

Primer Edit

public OnPlayerDisconnect(playerid, reason)
{
    new
        szString[64],
        name[MAX_PLAYER_NAME];
 
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
 
    switch(reason)
    {
        case 0: format(szString, sizeof szString, "%s je napustio server. (Timed Out/Crashed)", name);
        case 1: format(szString, sizeof szString, "%s je napustio server. (Napusta)", name);
        case 2: format(szString, sizeof szString, "%s je napustio server. (Kikovan / Banovan)", name);
    }
 
    SendClientMessageToAll(0xC4C4C4FF, szString);
    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.