Skip to content

zTiromX/fivem-key-pressed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Why should I use the resource? FiveM uses natives like IsControlPressed, but they take a lot performance, so you don't need a loop to bind actions on a key.

How to use the resource?

AddEventHandler("keyup:KEYCODE", function()
  print("KEYCODE was pressed")
end)

Code example:

CreateThread(function()
  AddEventHandler("keyup:PageUp", function()
    SetEntityHealth(PlayerPedId(), 200) -- Refills the health of the player if he pressed page up
  end)
end)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published