Quick question
#4

if you arent saving stuff
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new string[64], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,MAX_PLAYER_NAME);
    switch(reason)
    {
        case 0: format(string,sizeof string,"%s left the server. (Timed out)",name);
        case 1: format(string,sizeof string,"%s left the server. (Leaving)",name);
        case 2: format(string,sizeof string,"%s left the server. (Kicked/Banned)",name);
    }
    SendClientMessageToAll(0xFFFFFFAA,string);
    return 1;
}
else
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new
        string[64],
        name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,MAX_PLAYER_NAME);
    switch(reason)
    {
        case 0: // crashed
        }
                  // save stuff here and etc.
        {
        case 1: // disconnected
        }
             // stuff here
        {
        case 2: // kicked or banned
        }
             // stuff
        {
        SendClientMessageToAll(0xFFFFFFAA,string);
        }
    }
    return 1;
}
that's basic (quote if any error)
Reply


Messages In This Thread
Quick question - by Anthonyx3' - 29.12.2010, 02:09
Re: Quick question - by _rAped - 29.12.2010, 03:21
Re: Quick question - by Anthonyx3' - 29.12.2010, 04:10
Re: Quick question - by Marricio - 29.12.2010, 04:20
Re: Quick question - by Anthonyx3' - 29.12.2010, 04:32
Re: Quick question - by Anthonyx3' - 29.12.2010, 18:54
Re: Quick question - by Mean - 29.12.2010, 20:00

Forum Jump:


Users browsing this thread: 2 Guest(s)