BanEx
From SA-MP Wiki
Ban a player with a reason.
(playerid,reason[])
| playerid | The ID of the player to ban. |
| reason[] | The reason for the ban. |
| Returns | This 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.
