Helloo everyone , so i was trying to make a script which allows you to see the vehicle's name you entered , but i got a problem , when i get in a vehicle , it shows it's name , but for less than 1 second then it disappears , i searched hard in mtasa's wiki , but i still didn't find any , so what should i add so it can appear for an amount of time (more than a second) , here's the cod :
function carName ()
local player = getLocalPlayer()
local vehicleName = getVehicleName ( getPedOccupiedVehicle ( player ) )
dxDrawText ( vehicleName , 320, 380+115, 2500, 150, tocolor ( 255, 255, 255, 255 ), 1.5, "bankgothic" )
end
addEventHandler( "onClientVehicleEnter", getRootElement(), carName )