Scripting/Squirrel/Client Events/KeyBind::OnUp: Difference between revisions
Jump to navigation
Jump to search
![Caution icon Caution icon](http://static.vc-mp.org/caution-icon.webp)
This wiki is using an old backup from 2020
Some information may be old/missing
(Created page with "__NOTOC__ This function allows the server to inform the player, that he dropped the key and and the key works like a command. == Syntax == <pre>function KeyBind::OnUp()</pre...") |
(No difference)
|
Revision as of 15:28, 27 January 2017
This function allows the server to inform the player, that he dropped the key and and the key works like a command.
Syntax
function KeyBind::OnUp()
Parameters
- key - The key player presses.
Example
In this function I have chosen key "ENTER". When a player will dropped the key/button 'enter' it will inform the server that the player dropped the key. And the server will perform the work like a Command.
local enter = KeyBind(0x0D); // The Key Code of enter is 0x0D. We will use KeyBind function to set the key. And it is required.
function KeyBind::OnUp(key)
{
if ( key == enter )
{
Console.Print("You successfully dropped the Key Enter.");
}
}