Hi, I wonder how can I take an entity that was created on the client side.
I’m using the NetworkGetEntityFromNetworkId()
option but it doesn’t return anything anyone knows the solution?
CLIENT
peds = CreatePed(1, ped_hash, coords.x+3, coords.y, coords.z-0.5, 0, true, true)
netID = PedToNet(peds)
SetNetworkIdCanMigrate(netID, true)
Citizen.Wait(3000)
TriggerServerEvent('test', netID)
SERVER
RegisterServerEvent('test')
AddEventHandler('test', function(id)
ped = NetworkGetEntityFromNetworkId(id)
print(ped)
print(DoesEntityExist(ped))
DeleteEntity(ped)
end)
But the console returns that the ped has not been downloaded and does not exist