Created
July 25, 2023 21:03
-
-
Save DemmyDemon/4ca05ab016f9693c6f44574cbfca065d to your computer and use it in GitHub Desktop.
When you really need to frob some dumpsters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local dumpsterModels = { | |
218085040, | |
} | |
function Frob(dumpster) | |
end | |
function MaybeFrob(candidate) | |
if not DoesEntityExist(candidate) then return end | |
local model = GetEntityModel(candidate) | |
for _, dumpster in ipairs(dumpsterModels) do | |
if model == dumpster then | |
Frob(candidate) | |
return | |
end | |
end | |
end | |
Citizen.CreateThread(function() | |
while true do | |
Citizen.Wait(100) | |
local handle, obj = FindFirstObject() | |
MaybeFrob(obj) | |
local continue = true | |
while continue do | |
Citizen.Wait(0) | |
continue, obj = FindNextObject(handle) | |
MaybeFrob(obj) | |
end | |
EndFindObject(handle) | |
end | |
end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment