removed OnPlayerLoad and Resource Start from prop drugs to functions file to condense repeatable code
This commit is contained in:
1 parent
24877e6447
commit
99d0ae58be
6 files changed
+46
-117
No files matched your search
@@ -36,19 +36,6 @@ RegisterNetEvent("coke:init", function()
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStart', function(resource)
|
||||
if resource == GetCurrentResourceName() then
|
||||
LoadModel('prop_plant_01a')
|
||||
TriggerEvent('coke:init')
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
|
||||
Wait(3000)
|
||||
LoadModel('prop_plant_01a')
|
||||
TriggerEvent('coke:init')
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStop', function(resourceName)
|
||||
if GetCurrentResourceName() == resourceName then
|
||||
SetModelAsNoLongerNeeded(GetHashKey('prop_plant_01a'))
|
||||
|
||||
Reference in new issue
Block a user