Scripting/Squirrel/Functions/Misc/UnbindKey
From VC-MP Wiki
This will unbind a previously bound key.
Syntax
bool UnbindKey( int key )
Arguments
- key This is the ID of the key which will be unbound
Example
This example will unbind the fire key, which was bound in an earlier example, when the server owner types 'unbindfire' to the console.
function onConsoleInput( command, text ) { if ( command == "unbindfire" ) { local unbind = UnbindKey( KEY_ONFOOT_FIRE ); if ( unbind ) print( "Fire-key successfully unbound." ); else print( "Fire-key has not been bound earlier!" ); } }
Notes
The call onConsoleInput was used in in this example. More info about it in its page.
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
