pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new
szString[64],
name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
switch(reason)
{
case 0: format(szString, sizeof szString, "%s Deixou o servidor. (Tempo esgotado/Crash)", name);
case 1: format(szString, sizeof szString, "%s Deixou o servidor. (Saindo)", name);
case 2: format(szString, sizeof szString, "%s Deixou o servidor. (Kickado/Banido)", name);
}
SendClientMessageToAll(0xC4C4C4FF, szString);
return 1;
}
pawn Код:
public OnPlayerConnect(playerid)
{
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof string,"%s has joined the server. Welcome!",pName);
SendClientMessageToAll(0xFFFFFFAA,string);
return 1;
}