Ban
From SA-MP Wiki
Ban
This function can be used to ban a player who currently is in your server. The ban will be IP-based, and saved in the samp.ban file in your server's root directory. BanEx allows you to ban with a reason, while you can ban and unban IP's using the RCON banip and unbanip commands.
(playerid)
| playerid | The ID of the player you want to ban. |
This function does not return a specific value.
public OnPlayerCommandText( playerid, cmdtext[] ) { if( strcmp( cmdtext, "/banme", true ) == 0 ) { // Ban the player who types this command. Ban( playerid ); return 1; } }
Related Functions
The following functions might be useful as well, as they're related to this function in one way or another.
- BanEx: Ban a player with a custom reason.
- Kick: Kick a player from the server.
