Skip to content

Commit

Permalink
refactor: use callback for vehicle spawns
Browse files Browse the repository at this point in the history
  • Loading branch information
solareon committed Jan 13, 2024
1 parent 848b20c commit 989f62a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/lib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ if isServer then
end, 5000)

local netId = NetworkGetNetworkIdFromEntity(veh)
TriggerClientEvent('qbx_core:client:vehicleSpawned', owner, netId, props)
lib.callback.await('qbx_core:client:vehicleSpawned', owner, netId, props)
return netId
end
else
Expand Down
2 changes: 1 addition & 1 deletion modules/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ if isServer then
end, 5000)

local netId = NetworkGetNetworkIdFromEntity(veh)
TriggerClientEvent('qbx_core:client:vehicleSpawned', owner, netId, props)
lib.callback.await('qbx_core:client:vehicleSpawned', owner, netId, props)
return netId
end

Expand Down

0 comments on commit 989f62a

Please sign in to comment.