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

On player connect it comes up with a message saying they connected
so when some one connect its say "[name] Has Connected" [name] is there name in game
and when some on disconnects it say "[name] Has Disconnected" [name] is there name in game

please help
Reply
#2

Do you want that to happen?
If so go here:

https://sampwiki.blast.hk/wiki/Creating_...Leave_Messages
Reply
#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
#4

thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)