As the title says I would like to disable the “auto aiming” for the player who’s playing with a controller, anyone have a clue?
SET_PLAYER_TARGETING_MODE(int targetMode);
Maybe that will help
Sets your targeting mode.
0 = Traditional GTA
1 = Assisted Aiming
2 = Free Aim
Maybe with that native ? https://runtime.fivem.net/doc/natives/#_0xB1906895227793F3
Like if you do
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
SetPlayerTargetingMode(2)
end
end)
I tried by setting to 0 (Traditional GTA) but won’t work and the 2 work
Nope don’t work
EDIT: I tried all of the parameters on my controller
// 0x29961D490E5814FD 0x74D42C03
// SetPlayerLockonRangeOverride
void SET_PLAYER_LOCKON_RANGE_OVERRIDE(Player player, float range);
Set the range to 0.0?
Gonna try it on lua wait…
I will try it too thanks guys
Seems to work
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
SetPlayerLockonRangeOverride(PlayerId(), 0.0)
end
end)
Sweet.
I found a better way just do
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
SetPlayerLockon(PlayerId(), false)
end
end)
Or just do that. What if you spam the aim button? Does it move the aim at all?
Nope it don’t move aim it work men i tried multiple time by restarting resource
Great I love you guys
Awesome.
Guys you just shared an incredible native
thx men
The natives people overlook are always the ones needed.
RIP you can’t hit AI with melee attack because of the lock on i modified it so when you have no weapon selected it reactivate lock on.
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if currentWeaponHash ~= -1569615261 then
SetPlayerLockon(PlayerId(), false)
else
SetPlayerLockon(PlayerId(), true)
end
end
end)
where do I put this script sir?
I badly needed this on my server. I dont want my player to use any auto aiminng to be fair to other players
did you solved? i need this too