should it be called in the loop?
According to my tests yes it is necessary after I am not a professional I could be mistaken in my code so simply it takes 1 min to try it out of the loop it’s only a native try it from your side.
Thank you!
nice work but i have the problem that i can no one helmet anymore at clotheshop i need a solution that allow own helemts
Did You Fix IT ?
Citizen.CreateThread( function()
while true do
REVEL = 1000
if IsPedInAnyVehicle(PlayerPedId(), false) then
REVEL = 1
SetPedConfigFlag(PlayerPedId(), 35, false)
end
Citizen.Wait(REVEL)
end
end)
this one its better otimizated the loop will only repeat 1 ms when only the ped is on the vehicle … else will 1000 ms
Made one that does not use a looping function instead it will use a player spawned function! works ESX V1 final. Not fancy code pretty basic but it works!
works flawlessly nice job!
works perfect thank you so much reveldev
no problem <3
I made this and it works fine :
AddEventHandler(“esx:onPlayerSpawn”, function()
Citizen.CreateThread(function()
local playerPed = PlayerPedId()
local wait = 1000
while true do
if IsPedOnAnyBike(playerPed) then
wait = 1
SetPedConfigFlag(playerPed, 35, false)
end
Citizen.Wait(wait)
end
end)
end)