24.02.2012, 01:31
OnPlayerConnect
same for disconnect. and if you want reason when the player disconnects
pawn Код:
if(IsPlayerAdmin(playerid))
{
new str[128], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(str, sizeof(str), "%s(%d) has joined the server", pname, playerid);
SendClientMessage(playerid, -1, str);
}
pawn Код:
switch(reason)
{
case 0: format(str, sizeof(str), "%s(%d) has left the server (Lost Connection)", pname, playerid);
case 1: format(str, sizeof(str), "%s(%d) has left the server (Leaving)", pname, playerid);
case 2: format(str, sizeof(str), "%s(%d) has left the server (Kicked)", pname, playerid);
}