Captains-ContextMenu-FiveM

About

A Raytrace & Entity based context menu for GTA V FiveM.
Perform actions based off the Entity you are interacting with in the world. Such as Vehicles, ATMs, Phonebooths, Trashcans, Doors, Cashregisters and all other Entities that the game offers.

NOTE: This is a context menu Shell meaning features such as the Police menu are just an Empty menu buttons that do nothing but they are setup in such a way that you can easily add calls to them such as Exports to actual Police related scripts. It's there as an Example on how YOU can add your own actions to it. It is a system to be build on and have it work how YOU want it to.
READ THE HOW TO MODIFY AT THE BOTTOM

How to Install

  • Clone or Download the contextmenu and hashtomenu folders.
  • Drop the two folders in your FiveM Server Resources folder.
  • Add the Resources to your FiveM server.cfg file. (To be safe start the hashtoname resource BEFORE the contextmenu)

How to Use

  • Toggle NUI via the assigned key (Default: Z(Can be changed))
  • Cursor appears on the screen.
  • Right click on an Entity. (Cars, Peds, obejcts)
  • Select the option/task you want to perform.

Screenshots

Car Menu
Car Menu Car sub Menu
Object Menu
Object Menu
Job Menu
Tow Menu Police Menu
Illegal options
Steal Menu Lockpick Menu
Export Entity
Steal Menu

How to Modify

In the code itself i've written comments on how everything works and how YOU can add your own functionality to the resource.
The code contains Examples on how you can implement your own options as well as some features, such as the Doors menu which is fully operational.
Every action (button) in the menu leads to somewhere. Meaning you can easily add the code you want and the actions you want to happen when X button on the menu is pressed.

Shout outs:

  • Simu, for code related to Screen to world coords.
  • Taso, Frontend assistance with bugs (CSS/JS)
  • VenomXNL, for Object name from Hash -> https://github.com/VenomXNL/ObjectNameFromHash
    (The version of HashToName is a Modified version of VenomXNL's repo to allow for Exports instead of prints)