mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
fix(client/requestModel): model validation and streaming request (#610)
This commit is contained in:
@@ -6,11 +6,11 @@ function lib.requestModel(model, timeout)
|
||||
if type(model) ~= 'number' then model = joaat(model) end
|
||||
if HasModelLoaded(model) then return model end
|
||||
|
||||
if not IsModelValid(model) then
|
||||
if not IsModelValid(model) and not IsModelInCdimage(model) then
|
||||
error(("attempted to load invalid model '%s'"):format(model))
|
||||
end
|
||||
|
||||
return lib.streamingRequest(IsModelInCdimage, HasModelLoaded, 'model', model, timeout)
|
||||
return lib.streamingRequest(RequestModel, HasModelLoaded, 'model', model, timeout)
|
||||
end
|
||||
|
||||
return lib.requestModel
|
||||
|
||||
Reference in New Issue
Block a user