I recently started developing my own FiveM server and am working on making a new vehicle shop that is easily customized. So far, everything has been coming along very nicely. However, I am now at the stage where I need to start and working on the interface.
I’m no stranger to interface design or development, however, I have run into 2 obstacles;
1. GetScreenResolution ALWAYS returns 1280 and 720. No matter what display mode or resolution I play at, am I misusing this method or is it bugged…?
local screenWidth, screenHeight = GetScreenResolution()
2. DisableControlAction does not seem to work. I’m trying to prevent a player from exiting a vehicle. Thus using the INPUT_VEH_EXIT flag with an ID of 75. I tried a few other controls and I haven’t been able to disable any control.
DisableControlAction(0, 75, true)
Edit: Turns out I gotta do DisableControlAction every frame. Pretty sure I tried that before but the client froze, so I guess the most likely scenario is that I forgot to use Citizen.Wait().
Any help or pointers in the right direction would be greatly appreciated.