On player connect it comes up with a message saying they connected
#3

pawn Код:
//OnPlayerConnect(playerid)
new string[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "%s has joined the server!", pName);
SendClientMessageToAll(color, string);

//OnPlayerDisconnect(playerid, reason)
new string[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
switch(reason)
{
  case 0: format(string, sizeof(string), "%s has left the server. [Timeout]", 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/Banned]", pName);
}
SendClientMessageToAll(color, string);
Just replace the "color" in SendClientMessageToAll to your color
Reply


Messages In This Thread
On player connect it comes up with a message saying they connected - by cssbart - 23.02.2010, 20:01
Re: On player connect it comes up with a message saying they connected - by Torran - 23.02.2010, 20:02
Re: On player connect it comes up with a message saying they connected - by bajskorv123 - 23.02.2010, 20:06
Re: On player connect it comes up with a message saying they connected - by cssbart - 26.02.2010, 15:11

Forum Jump:


Users browsing this thread: 2 Guest(s)