Ban
From SA-MP Wiki
(Difference between revisions)
Revision as of 14:11, 19 June 2011 Belfador (Talk | contribs) ← Previous diff |
Revision as of 00:03, 6 January 2013 Connor Mead (Talk | contribs) Next diff → |
||
Line 1: | Line 1: | ||
- | {{Scripting}} | + | {{ScriptingFR}} |
{{Title}} | {{Title}} | ||
- | {{Description|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.}} | + | {{Description|Banni un joueur du serveur}} |
+ | |||
+ | {{Parameters|playerid,reason[]}} | ||
+ | {{Param|playerid|L'ID du joueur à bannir.}} | ||
- | {{Parameters|playerid}} | ||
- | {{Param|playerid|The ID of the player you want to ban.}} | ||
{{NoReturn}} | {{NoReturn}} | ||
- | <!-- Example of Ban --> | ||
<pawn> | <pawn> | ||
- | public OnPlayerCommandText(playerid, cmdtext[]) | + | public OnPlayerCommandText( playerid, cmdtext[] ) |
{ | { | ||
- | if(strcmp(cmdtext, "/banme", true) == 0) | + | if( strcmp( cmdtext, "/banme", true ) == 0 ) |
{ | { | ||
- | // Ban the player who types this command. | + | //Banni un joueur quand il écrit "/banme" |
Ban(playerid); | Ban(playerid); | ||
return 1; | return 1; | ||
Line 22: | Line 22: | ||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
- | {{BanEx}} | + | *[[BanEx_FR|BanEx:]] Banni un Joueur du serveur avec une raison personnalisée |
- | {{Kick}} | + | *[[Kick_FR|Kick:]] Exclu un Joueur du serveur |
- | + | ||
- | [[Category:Scripting Functions]] | + | |
- | [[it:Ban]] | + | [[Category:Scripting Functions FR]] |
- | [[nl:Ban]] | + |
Revision as of 00:03, 6 January 2013
Page d'Accueil | Les Fonctions | Les Callbacks | Les bases du Scripting | Plugins de Serveur | Tutoriaux
Ne prenez pas en compte les FR dans les noms
Description:
Banni un joueur du serveur
(playerid,reason[])
playerid | L'ID du joueur à bannir. |
Return Values:
This function does not return any specific values.
public OnPlayerCommandText( playerid, cmdtext[] ) { if( strcmp( cmdtext, "/banme", true ) == 0 ) { //Banni un joueur quand il écrit "/banme" Ban(playerid); return 1; } }
Related Functions
The following functions may be useful, as they are related to this function in one way or another.