-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Open
Labels
bugtriageNeeds a preliminary assessment to determine the urgency and required actionNeeds a preliminary assessment to determine the urgency and required action
Description
What happened?
I created an ambient pickup on the client. I listened to the entityCreating event on the server.
The creation triggered the event, but when I run GetEntityModel(entity) it returns 0.
Expected result
GetEntityModel(entity) should return the pickup hash
Reproduction steps
- Create this client command and run it:
RegisterCommand('test_pickup', function()
local pickupCoords = GetEntityCoords(PlayerPedId())
local weaponModel = GetHashKey("weapon_pistol")
local pickupHash = GetHashKey("PICKUP_WEAPON_PISTOL")
Citizen.CreateThread(function()
local pickup = CreateAmbientPickup(pickupHash, pickupCoords.x, pickupCoords.y, pickupCoords.z + 2.0, 0, 100, weaponModel, true, true)
end)
end)
- Listen to the entityCreating event on the server and fetch the entity model:
on('entityCreating', (entity) => {
console.log(GetEntityModel(entity))
})
- It should return the same pickup hash when the command is ran, but it returns 0.
Importancy
Unknown
Area(s)
FiveM, FXServer, Natives
Specific version(s)
Client 10939 / FXServer 10367 Windows
Additional information
No response
Metadata
Metadata
Assignees
Labels
bugtriageNeeds a preliminary assessment to determine the urgency and required actionNeeds a preliminary assessment to determine the urgency and required action