Scripting/Squirrel/Functions/Misc/BanPlayer
From VC-MP Wiki
This function kicks a player from the server and bans their IP address.
Syntax
bool BanPlayer( player plr )
Arguments
- plr - This is the pointer of the player to be banned
Example
This will ban a player on join if his name is not 'Bob'
function onPlayerJoin( player ) { if ( player.name != "Bob" ) { MessagePlayer( "Your name still isn't Bob! Be bant", player ); BanPlayer( player ); } }
Notes
The functions player.Name, MessagePlayer and call onPlayerJoin were used in in this example. More info about there in the corresponding pages.
Related Functions
- Message
- MessagePlayer
- MessageAllExcept
- PrivMessage
- PrivMessageAll
- ClientMessage
- ClientMessageToAll
- Announce
- AnnounceAll
- SendPlayerMessage
- KickPlayer
- BanPlayer
- BanIP
- UnbanIP
- GetWeaponName
- GetWeaponID
- GetDistrictName
- GetSkinName
- GetTickCount
- GetTime
- GetFullTime
- IsNum
- BindKey
- UnbindKey
- CallFunc
- InPoly
- DistanceFromPoint
- ReloadScripts
