19.07.2012, 15:55
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)
(_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;
}