NETWORK_GET_NETWORK_ID_FROM_ENTITY: no net object for entity
no script guid for vehicle 0 in SET_VEHICLE_HANDLING_FIELD
[ 1118703] GetNetworkObject: no object by ID 4610
[ 1118703] GetNetworkObject: no object by ID 4354
[ 1118703] GetNetworkObject: no object by ID 4098
[ 1320906] GetNetworkObject: no object by ID 354
[ 1320906] GetNetworkObject: no object by ID 350
Where are these defined? I might be wrong but, these need to be defined.
This might not work, but you need you just need to define the model, then when you type /test it will spawn in the car and they should be warped into it, im using your natives to idk
RegisterCommand("test", function(source, args, rawCommand)
local x,y,z = table.unpack(GetEntityCoords(GetPlayerPed(-1),true))
local vehiclePlayer = CreateVehicle(model, x + 2, y + 2, z + 1, 0.0, true, false)
local id = VehToNet(vehiclePlayer)
TaskWarpPedIntoVehicle(GetPlayerPed(-1), vehiclePlayer, -1)
SetVehicleHasBeenOwnedByPlayer(vehiclePlayer, true)
SetNetworkIdExistsOnAllMachines(id, true)
SetNetworkIdCanMigrate(id, true)
SetEntityAsMissionEntity(vehiclePlayer,true,true)
end, false)
NOTE THIS WONT WORK BECAUSE YOU HAVE NOT DEFINED THE MODEL!!
if do /car (NAME of car) then that car spawns - can change /cmd and default car
Summary
function ShowNotification( text )
SetNotificationTextEntry(“STRING”)
AddTextComponentSubstringPlayerName(text)
DrawNotification(false, false)
end
RegisterCommand(‘car’, function(source, args, rawCommand)
local x,y,z = table.unpack(GetOffsetFromEntityInWorldCoords(PlayerPedId(), 0.0, 8.0, 0.5))
local veh = args[1]
if veh == nil then veh = “adder” end
vehiclehash = GetHashKey(veh)
RequestModel(vehiclehash)
Citizen.CreateThread(function()
local waiting = 0
while not HasModelLoaded(vehiclehash) do
waiting = waiting + 100
Citizen.Wait(100)
if waiting > 5000 then
ShowNotification("~r~No such Vehicle.")
break
end
end
CreateVehicle(vehiclehash, x, y, z, GetEntityHeading(PlayerPedId())+90, 1, 0)
end)
Ok I found the probleme, It’s not a probleme with my script.
This comes from another script (noCarJack) when I make spawn a vehicle with the isNetwork parameter in false