Health & Armor On Disconnect
#1

How do I make the disconnect message say the following incase a player times out:

(_AcE_) has left the server (Lost Connection) (HP: 100) (Armor: 25)

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    First[playerid] = 0;
    new pname[MAX_PLAYER_NAME], string[39 + MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    switch(reason)
    {
        case 0: format(string, sizeof(string), "** %s has left the server. (Lost Connection)", pname);
        case 1: format(string, sizeof(string), "** %s has left the server. (Leaving)", pname);
        case 2: format(string, sizeof(string), "** %s has left the server. (Kicked)", pname);
    }
    SendClientMessageToAll(COLOR_ERROR, string);
    return 1;
}
Reply


Messages In This Thread
Health & Armor On Disconnect - by (_AcE_) - 19.07.2012, 15:55
Re: Health & Armor On Disconnect - by Littlehelper - 19.07.2012, 15:59
Re: Health & Armor On Disconnect - by (_AcE_) - 19.07.2012, 16:14
Re: Health & Armor On Disconnect - by sampreader - 19.07.2012, 16:46
Re: Health & Armor On Disconnect - by (_AcE_) - 19.07.2012, 16:53

Forum Jump:


Users browsing this thread: 1 Guest(s)