gta-rest-in-peace / esx_hifi

Get some music in your party
GNU General Public License v3.0
18 stars 19 forks source link

We would like to have it in working in a vehicle. #8

Open RuisSoftware opened 4 years ago

RuisSoftware commented 4 years ago
RegisterCommand('radio', function(source, args, raw)
local ped = GetPlayerPed(-1)
local veh = GetVehiclePedIsUsing(ped)
    if IsPedInVehicle(ped, veh, false) then
        OpenhifiMenu()
    else
        ESX.ShowNotification("You're not in a vehicle") 
    end
end)

But this is not moving with the players coords. Can somebody fix this?