where should i put this code? Could you make a release real quick?
put it in a client.lua file
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if currentWeaponHash ~= -1569615261 then
SetPlayerLockon(PlayerId(), false)
else
SetPlayerLockon(PlayerId(), true)
end
end
end)
works best thx for sharing this native with me
Keep in mind that doing so breaks this native:
IsPlayerFreeAiming
Where do I find this
I am still having the issue of not being able to melee attack. We can’t focus on locals or each other for melee attacks. Are there any solutions?
How so?
I’ve had issues w/ core-evidence. When aiming my flash light I couldn’t see shell casings anymore or destroy evidence. The dev who created core-evidence had to make it so shell casings would show whenever I’m holding a flashlight instead of aiming it. IsPlayerFreeAiming has definitely be affected
wont lock on melee attacks now
Is this done in any script? like police job or qb-weapon?
This is the code you want. Make sure to add it to a client.lua and you should be good.
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
SetPlayerTargetingMode(2)
end
end)
I think u actually want to use SetPlayerTargetingMode(3)
, not 2
What I have set works for me so I don’t.
where?
where did you put this?
I’m going to assume anywhere you have free space.
as long as it’s not inside a function or method you will be fine.
client sided. so any client.lua. If on qbcore, i suggest the ignore.lua at the bottom
Anyone know if this still works?