How to do so when someone...
#4

Quote:
Originally Posted by grand.Theft.Otto
Посмотреть сообщение
pawn Код:
// under OnPlayerConnect

new string[128], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
format(string,sizeof(string),"%s (%d) Has Joined The Server.",pname,playerid);
SendClientMessageToAll(grey,string);

//under OnPlayerDisconnect

new string[128], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));

switch(reason)
{
        case 0: format(string,sizeof(string),"%s (%d) Has Left The Server. (Timeout)",pname,playerid);
        case 1: format(string,sizeof(string),"%s (%d) Has Left The Server. (Quit)",pname,playerid);
        case 2: format(string,sizeof(string),"%s (%d) Has Left The Server. (Kicked)",pname,playerid);
        case 3: format(string,sizeof(string),"%s (%d) Has Left The Server. (Banned)",pname,playerid);
        SendClientMessageToAll(grey,string);
        return 1;
}
That will work 100%. Just change some stuff in the messages to what you desire.
There is no reason 3, only 0 1 and 2 which is both for kick and bans.
Reply


Messages In This Thread
How to do so when someone... - by Join7 - 08.05.2011, 21:20
Re: How to do so when someone... - by grand.Theft.Otto - 08.05.2011, 21:29
Re: How to do so when someone... - by Laronic - 08.05.2011, 21:29
Re: How to do so when someone... - by admantis - 08.05.2011, 21:54
Re: How to do so when someone... - by grand.Theft.Otto - 08.05.2011, 22:49
Re: How to do so when someone... - by lowrida018 - 08.05.2011, 22:52
Re: How to do so when someone... - by grand.Theft.Otto - 08.05.2011, 22:54
Re: How to do so when someone... - by lowrida018 - 08.05.2011, 22:57
Re: How to do so when someone... - by The Knight - 08.05.2011, 22:59
Re: How to do so when someone... - by lowrida018 - 08.05.2011, 23:04

Forum Jump:


Users browsing this thread: 2 Guest(s)