BanEx

From SA-MP Wiki

Revision as of 15:27, 20 June 2012; view current revision
←Older revision | Newer revision→
Jump to: navigation, search


Ban a player with a reason.


Parameters:
(playerid,reason[])
playeridThe ID of the player to ban.
reason[]The reason for the ban.


ReturnsThis function doesn't return a specific value


public OnPlayerCommandText( playerid, cmdtext[] )
{
    if( strcmp( cmdtext, "/banme", true ) == 0 )
    {
        // Bans the player who executed this command and includes a reason ("Request")
        BanEx( playerid, "Request" );
        return 1;
    }
}

For example, this code would add this line to samp.ban:

127.0.0.1 [15/01/09 | 13:05:23] Name - Request

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

  • Ban: Ban a player from playing on the server.
  • Kick: Kick a player from the server.
Personal tools
In other languages