Hi! I want to make a reference when the key is pressed. It turns out but instantly disappears.
Here’s the code.
function drawTxt(text,font,centre,x,y,scale,r,g,b,a)
SetTextFont(font)
SetTextProportional(0)
SetTextScale(scale, scale)
SetTextColour(r, g, b, a)
SetTextDropShadow(0, 0, 0, 0,255)
SetTextEdge(1, 0, 0, 0, 255)
SetTextDropShadow()
SetTextOutline()
SetTextCentre(centre)
SetTextEntry("STRING")
AddTextComponentString(text)
DrawText(x , y)
end
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if IsControlJustPressed(0, 57) then drawTxt("~r~Please wait...",4,1,0.5,0.8,1.0,255,255,255,255)
end
end
end)