Wiki

Clone wiki

EFLC-MP LUA / setPlayerKeyHook

Description

Once this function is used the player will signnal the server every time they press a Key.

Parameters

Int playerId, Int virtualKey, Bool status
Int playerId

Int virtualKey: Virtual Key Codes can be found here https://docs.microsoft.com/en-us/windows/desktop/inputdev/virtual-key-codes.

Bool status: True = adds the hook, False = removes the hook

Return values


The event "onPlayerKeyPress" will be called when the player uses this key

Example

#!lua
--Adding a hook for the ENTER (RETURN) key
setPlayerKeyHook(playerid, 0x0D, true)

Updated