Ban

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 16:28, 28 October 2013
Badio12 (Talk | contribs)

← Previous diff
Revision as of 04:43, 5 February 2014
Connor Mead (Talk | contribs)

Next diff →
Line 24: Line 24:
[[Category:Scripting Functions]] [[Category:Scripting Functions]]
-[[pt:Ban]]+ 
[[de:Ban]] [[de:Ban]]
 +[[fr:Ban]]
[[it:Ban]] [[it:Ban]]
[[nl:Ban]] [[nl:Ban]]
 +[[pt:Ban]]

Revision as of 04:43, 5 February 2014



Description:

Ban a player who currently in the server. The ban will be IP-based, and be saved in the samp.ban file in the server's root directory. BanEx allows you to ban with a reason, while you can ban and unban IPs using the RCON banip and unbanip commands.


Parameters:
(playerid)
playeridThe ID of the player to ban.

Return Values:

This function does not return any specific values.


public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/banme", true) == 0)
    {
        // Ban the player that 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.