Last active
December 31, 2022 10:10
-
-
Save tony0x59/cb32df6a91477f5f19e0253af16287f5 to your computer and use it in GitHub Desktop.
Revisions
-
tony0x59 revised this gist
Dec 31, 2022 . 1 changed file with 4 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,10 +2,10 @@ function doAgroMapZones() --do nothing, remove this end function doAgrotsarMapZones() -- print("doAgroMapZones") local file = 'media/mapszones/Muldraugh, KY/agrozones.lua' if fileExists(file) then -- print("doAgroMapZones fileExists") agrozones = {} reloadLuaFile(file) @@ -40,6 +40,5 @@ function doAquaMapZones() end getWorld():checkVehiclesZones(); end Events.OnLoadMapZones.Remove(doAgroMapZones); Events.OnLoadMapZones.Add(doAgrotsarMapZones); -
tony0x59 revised this gist
Dec 11, 2022 . No changes.There are no files selected for viewing
-
tony0x59 revised this gist
Dec 11, 2022 . No changes.There are no files selected for viewing
-
tony0x59 created this gist
Dec 11, 2022 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,45 @@ function doAgroMapZones() --do nothing, remove this end function doAquaMapZones() -- print("doAgroMapZones") local file = 'media/mapszones/Muldraugh, KY/aquazones.lua' if fileExists(file) then -- print("doAgroMapZones fileExists") agrozones = {} reloadLuaFile(file) for k,v in ipairs(agrozones) do if v.type == "Mannequin" then handleMannequinZone(file, v) elseif v.type == "SpawnOrigin" then handleSpawnOrigin(file, v) elseif v.type == "WaterFlow" then handleWaterFlow(file, v) elseif v.type == "WaterZone" then handleWaterZone(file, v) elseif v.geometry ~= nil then if tonumber(v.lineWidth) then v.properties = v.properties or {} v.properties.LineWidth = v.lineWidth end getWorld():getMetaGrid():registerGeometryZone(v.name, v.type, v.z, v.geometry, v.points, v.properties) else local vzone = getWorld():registerVehiclesZone(v.name, v.type, v.x, v.y, v.z, v.width, v.height, v.properties) -- print("doAgroMapZones vzone") -- print(vzone) if vzone == nil then getWorld():registerZone(v.name, v.type, v.x, v.y, v.z, v.width, v.height) end end table.wipe(v) end table.wipe(agrozones) else print('can\'t find map agrozones file: '..file) end getWorld():checkVehiclesZones(); end Events.OnLoadMapZones.Remove(doAgroMapZones); Events.OnLoadMapZones.Add(doAquaMapZones);