Look the other scripts. IsControlJustPressed say yes or no basically, so here you are verifying just once, then the script go to next line… Here you need to make a loop as @mraes suggest.
so :
Citizen.CreateThread(function()
while true do (and always a Wait(0) after that)
Wait(0)
if IsControlJustPressed(1, 86) then
-- Clear task stuff here
end
end
end)
The CreateThread is called when a fram is generated (more or less, correct me if I’m wrong)
So it’s called, then you put that in a loop and that’s all.
I can’t suggest you more and more to get a look on the other scripts, this will learn you the basics, the things you always need
Good luck !
@Izio_Romain
Got it working finally, tried the createthread function before, but never got it working…
Changed your ‘Keys’ to ‘86’ instead and it worked like a charm! (Y)