0 Üye ve 1 Ziyaretçi konuyu incelemekte.
local hillArea = createColRectangle ( -2171.0678710938, 678.17950439453, 15, 15 ) -- Koordinatlar function hill_Enter ( thePlayer, matchingDimension ) if getElementType ( thePlayer ) == "player" then takeWeapon( thePlayer, 9 ) takeWeapon( thePlayer, 16 ) endendaddEventHandler ( "onColShapeHit", hillArea, hill_Enter )
Koordinat tablosu: {x = 0, y = 0, z = 0, width = 0, depth = 0, height = 0},local vZones = { {x = 60.47028, y = 1000.55469, z = 13, width = 120, depth = 135, height = 500}, -- random example location located in Bone County {x = -1970.00708, y = 400.96341, z = -4, width = 70, depth = 70, height = 500},}-- initialize all zones on resource startlocal z = {}function initvZones() if vZones and #vZones ~= 0 then for _,v in ipairs (vZones) do if v then if v.x and v.y and v.z and v.width and v.depth and v.height then local c = createColCuboid (v.x, v.y, v.z, v.width, v.depth, v.height) if c then z[c] = true for _,v in ipairs (getElementsByType("vehicle")) do if isElementWithinColShape (v, c) then destroyElement(v) end end addEventHandler ("onElementDestroy", c, function() if z[source] then z[source] = nil end end ) addEventHandler ("onColShapeHit", c, function (h, d) if h and d and isElement(h) and getElementType (h) == "vehicle" then destroyElement (h) end end ) end end end end endendaddEventHandler ("onResourceStart", resourceRoot, initvZones)