mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:08:54 +00:00
refactor(es_extended\client\main.lua): entity check VehicleProperties Statebag handler
This commit is contained in:
@@ -203,8 +203,8 @@ AddStateBagChangeHandler('VehicleProperties', nil, function(bagName, key, value)
|
|||||||
local NetId = value.NetId
|
local NetId = value.NetId
|
||||||
local Vehicle = NetworkGetEntityFromNetworkId(NetId)
|
local Vehicle = NetworkGetEntityFromNetworkId(NetId)
|
||||||
local Tries = 0
|
local Tries = 0
|
||||||
while not DoesEntityExist(Vehicle) do
|
while Vehicle == 0 do
|
||||||
local Vehicle = NetworkGetEntityFromNetworkId(NetId)
|
Vehicle = NetworkGetEntityFromNetworkId(NetId)
|
||||||
Wait(100)
|
Wait(100)
|
||||||
Tries = Tries + 1
|
Tries = Tries + 1
|
||||||
if Tries > 300 then
|
if Tries > 300 then
|
||||||
|
|||||||
Reference in New Issue
Block a user