How to detect
#1

Im making a leaving server message,
How would i get it to detect if the player left due to

[b]Leaving, Crashed or Kicked/Banned?
Reply
#2

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
  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(0xAAAAAAAA, string);
  return 1;
}
Use Wiki...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)