Siemka, mam problem z podzia?em pojazd?w na l?dowe i powietrzne i dopisanie go do skryptu na limity pojazd?w w danej strefie (cuboidzie) i nie wiem jak to zrobi?.
[lua]cuboid = createColCuboid (-3462.6999511719, 832.69995117188, -6.8000001907349, 39, 228, 45 )[/lua]
Moje pr?by:
[lua]function amountvehicle ( element )
if getElementType(element) == "vehicle" then
local id = getElementModel(element)
if id == 593 or id ~= 417 or id ~= 563 or id ~= 519 or id ~= 487 or id ~= 497 then
local vehicleamount = getElementsWithinColShape(cuboid,"vehicle")
if #vehicleamount and tonumber(#vehicleamount) > 15 then
if id == 593 or id == 417 or id == 563 or id == 519 or id == 487 or id == 497 then return end
local gracz=getVehicleController(element)
setTimer ( setElementPosition, 500, 1, element, -2796.8, 767.7, 50.2 )
setTimer ( setElementFrozen, 500, 1, element, false)
setTimer ( setVehicleDamageProof, 500, 1, element, false)
setTimer ( outputChatBox, 500, 1, "#FF0000Osi?gni?to maksimum pojazd?w w bazie!",gracz, 255, 255, 255, true)
else
outputChatBox( "Posiadasz aktualnie "..#vehicleamount.."#FFFFFF / 16 pojazd?w w strefie",gracz, 255, 255, 255, true)
end
end
end
end
--end
addEventHandler("onColShapeHit", cuboid, amountvehicle)
function amountvehiclelot ( element )
if getElementType(element) == "vehicle" then
local id = getElementModel... |