So is this running in a loop ?
Because i use esx_kashacters and they have a DisplayRadar(false) on start.
This is because you did not picked a char yet to play with.
As soon as a land on the ground with the car i picked it doesnt show my Radar even when i have it in my inventory.
Hey @renaiku is there anyway to make the gps an usable item instead of detecting if the player has one gps? it would make him use the gps to show the minimap and if he used the item again it would go off, is there anyway to make this? If so, would you be able to help me? xD
IDK much about coding, but i managed to make it a usable item to show the map instead of dropping it just add these in the corresponding scripts. (next to figure out how to make it usable again to remove the radar) Edit: am thinking an if statement of some sort
server\main.lua
ESX.RegisterUsableItem(âgpsâ, function(source)
local _source = source
TriggerClientEvent(âgps:showradarâ, _source)
end)
I Wanted that the Blip is dissapearing , if ur distance to the GPS is too far. Like you lost the signal if u reached a specifical distance. How can i code this
startAnim(âamb@prop_human_bum_bin@idle_aâ,âidle_aâ)
Citizen.Wait(2000)
ClearPedTasks(PlayerPedId())
TriggerServerEvent(âesx_cichygps:zabierzâ)
ESX.ShowNotification(â~g~Das GPS wurde angebracht. ~y~Die Verbindung wird aufgebautâŚâ)
Citizen.Wait(2000)
SetEntityAsMissionEntity(vehicle)
local oznaczenie = AddBlipForEntity(vehicle)
SetBlipSprite(oznaczenie, 458)
SetBlipColour(oznaczenie, 1)
BeginTextCommandSetBlipName(âSTRINGâ)
AddTextComponentString(âGPS Signalâ)
EndTextCommandSetBlipName(oznaczenie)
PlaySoundFrontend(-1, âBACKâ, âHUD_AMMO_SHOP_SOUNDSETâ, false)
ESX.ShowNotification(â~g~Das GPS Signal wurde aufgebaut. Es hält jetzt fĂźr ~y~5 Minutenâ)
Citizen.Wait(300000)
RemoveBlip(oznaczenie)
else
ESX.ShowHelpNotification(âKein Fahrzeug in der Näheâ)
end
end)
Its not working with legacy if still suport available i am using chezzaâs inventory the server side function onAddinventoryitem is not working donât know why if someone can help