12.07.2013, 18:13
pawn Код:
public OnPlayerConnect(playerid)
{
new sStr[128];
format(sStr, sizeof(sStr), "%s acabou de se conectar ao servidor.", nome(playerid));
SendClientMessageToAll(0xFFFFFFAA, sStr);
}
public OnPlayerDisconnect(playerid, reason)
{
new sStr[128];
switch(reason)
{
case 0: format(sStr,sizeof(sStr),"%s saiu do servidor. (Problemas de conexгo)",nome(playerid));
case 1: format(sStr,sizeof(sStr),"%s saiu do servidor. (Vontade prуpria)",nome(playerid));
case 2: format(sStr,sizeof(sStr),"%s saiu do servidor. (Kikado/banido)",nome(playerid));
}
SendClientMessageToAll(0xFFFFFFAA, sStr);
return 1;
}
stock nome(playerid)
{
new sNome [ MAX_PLAYER_NAME ] ;
GetPlayerName(playerid, sNome, MAX_PLAYER_NAME);
}