Ban
From SA-MP Wiki
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. |
| Returns | This function doesn't 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 may be useful, as they are related to this function in one way or another.
- BanEx: Ban a player with a custom reason.
- Kick: Kick a player from the server.
