How to do so when someone...
#9

pawn Код:
new
        sStr[ 64 ], kName[ MAX_PLAYER_NAME ];

public OnPlayerConnect( playerid )
{
   GetPlayerName( playerid, kName, sizeof( kName ) );
   format( sStr, sizeof( sStr ), "%s has joined the server.", kName );
   return SendClientMessageToAll( 0xFFF000AA, sStr ), true;
}

public OnPlayerDisconnect( playerid, reason )
{
    GetPlayerName( playerid, kName, sizeof( kName ) );
    switch( reason )
    {
        case 0: format( sStr, sizeof( sStr ), "%s left the server. (Timed out)", kName );
        case 1: format( sStr, sizeof( sStr ), "%s left the server. (Leaving)", kName );
        case 2: format( sStr, sizeof( sStr ), "%s left the server. (Kicked/Banned)", kName );
    }
    return SendClientMessageToAll( 0xFFF000AA, sStr ), true;
}
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: 1 Guest(s)