21.07.2015, 15:49
PHP код:
public OnPlayerConnect(playerid)
{
new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "%s entrou no servidor.", pname);
SendClientMessageToAll(0xAAAAAAAA, string);
return 1;
}
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 saiu do servidor. (Perda de Conexгo)", pname);
case 1: format(string, sizeof(string), "%s saiu do servidor. (Conta Prуpria)", pname);
case 2: format(string, sizeof(string), "%s saiu do servidor. (Kickado)", pname);
}
SendClientMessageToAll(0xAAAAAAAA, string);
return 1;
}