It appears that lines 621 to 624 and lines 674 to 683 of client.lua interfere with other scripts. The DisableControlAction native needs to be run each frame, so running EnableControlAction in an else statement may not even be necessary.
As an example, the following block of code in another resource is rendered useless by the above mentioned lines of code.
Citizen.CreateThread(function()
while true do
DisablePlayerFiring(GetPlayerPed(-1), true)
DisablePlayerFiring(PlayerId(), true)
DisablePlayerFiring(GetPlayerServerId(PlayerId()), true)
DisableControlAction(0, 24, true)
Citizen.Wait(0)
end
end)
The above code works perfectly after entering stop police in the server console to stop the Cops FiveM resource.
It appears that lines 621 to 624 and lines 674 to 683 of
client.lua
interfere with other scripts. TheDisableControlAction
native needs to be run each frame, so runningEnableControlAction
in anelse
statement may not even be necessary.As an example, the following block of code in another resource is rendered useless by the above mentioned lines of code.
The above code works perfectly after entering
stop police
in the server console to stop the Cops FiveM resource.