Help me with this
#3

OnPlayerConnect
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);
}
same for disconnect. and if you want reason when the player disconnects
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);
}
Reply


Messages In This Thread
Help me with this - by Eljayar - 24.02.2012, 01:07
Re: Help me with this - by ArmyOps - 24.02.2012, 01:13
Re: Help me with this - by emokidx - 24.02.2012, 01:31
Re: Help me with this - by Eljayar - 24.02.2012, 02:08

Forum Jump:


Users browsing this thread: 1 Guest(s)