hi how can i disable weapon wheel or car radio when im opening radio or other menu?
You can use the DisableHudComponent native I believe
where should i put this ? and how? just the line and it works or how?
CreateThread(function ()
while true do
Wait(0)
BlockWeaponWheelThisFrame()
end
end)
put this on client.lua and you will see that the wheel is disabled.
put a if condition to blockweaponwheel in this when the inventory is open.
DisableControlAction(padIndex --[[ integer ]],
control --[[ integer ]],
disable --[[ boolean ]]
)
IsDisabledControlJustPressed(
padIndex --[[ integer ]],
control --[[ integer ]]
)
When adding some functionalities to buttons, I always disable this control for the frame.
I am new to this and have no idea on how to do this
The wheel in my server is bugging me
I know its old but seeing people using loops for this is making me crazy the correct way is to set ped config flag:
SetPedConfigFlag - FiveM Natives @ Cfx.re Docs
the flag 48 is blocking the ped from switching weapons or at other words disable the weapon wheel.
make sure you apply this everytime your player switches peds (multicharacters).
SetPedConfigFlag(ped, 48, true)