Can't get some natives to work right

local vehicle = GetVehiclePedIsIn(PlayerPedId(), false) -- Grabs the vehicle the player is in
		if GetIsVehicleStopped(vehicle) then -- checks if vehicle is stopped
	  --  while true do -- enables a loop when true
        Citizen.Wait(0) -- waits 0 ms
	SetTextComponentFormat("STRING") -- Sets Text Component Format To String
	AddTextComponentString("Press ~INPUT_THROW_GRENADE~ To Turn Off Your Engine") -- Displays the text in the notif
	DisplayHelpTextFromStringLabel(10, 20, 0, -1) -- displays it on screen!
		end -- end the function
	end -- end the function 
end) -- officially end the function!

it’s supposed to show a notification to press G when your vehicle is on and stopped but it’s not working any idea?

Probably because its spamming it every frame?

Isn’t it DisplayHelpTextFromStringLabel(0, 0, 1, -1) ? Rather than what you use

thanks it showed the msg but now it stays on forever.

Disable your loop and it should disappear after a moment

that worked but now it won’t appear again when i stop.