Jump to content

help


Apo

Recommended Posts

hi please help me for show and delet

hillArea = { 
{1436.6826171875, -2940.1494140625, 13.546875, 500,500,500}, 
{1436.6826171875, -2640.1494140625, 13.546875, 500,500,500}, 
{1436.6826171875, -2340.1494140625, 13.546875, 500,500,500}, 
{1436.6826171875, -640.1494140625,  13.546875, 500,500,500} 
  
} 
hillRadar = { 
{1262.2802734375, -2769.48828125, 300, 300, 171, 175, 174, 80}, 
{1262.2802734375, -2469.48828125, 300, 300, 92, 46, 2, 80}, 
{2762.2802734375, -2169.48828125, 200, 300, 255, 0, 143, 80} 
  
} 
turfCol = nil 
hillRadars = nil 
  
function maketurf (thePlayer) 
if turfcol == nil and hillRadars == nil then 
for i,v2 in ipairs(hillArea) do 
         
         turfCol = createColCuboid(unpack(v2)) 
         
        end 
        for i,v1 in ipairs(hillRadar) do 
         
         hillRadars = createRadarArea(unpack(v1)) 
        end 
         
        else 
        destroyElement(turfcol) 
        destroyElement(hillRadars) 
        turfCol = nil 
        hillRadars = nil 
        end 
  
end 
addCommandHandler("show",maketurf) 
  

Link to comment

This will destroy every colshape and radar area.

hillArea = { 
{1436.6826171875, -2940.1494140625, 13.546875, 500,500,500}, 
{1436.6826171875, -2640.1494140625, 13.546875, 500,500,500}, 
{1436.6826171875, -2340.1494140625, 13.546875, 500,500,500}, 
{1436.6826171875, -640.1494140625,  13.546875, 500,500,500} 
  
} 
hillRadar = { 
{1262.2802734375, -2769.48828125, 300, 300, 171, 175, 174, 80}, 
{1262.2802734375, -2469.48828125, 300, 300, 92, 46, 2, 80}, 
{2762.2802734375, -2169.48828125, 200, 300, 255, 0, 143, 80} 
  
} 
turfCol = nil 
hillRadars = nil 
  
function maketurf (thePlayer) 
    if turfcol == nil and hillRadars == nil then 
        for i,v2 in ipairs(hillArea) do 
            turfCol = createColCuboid(unpack(v2)) 
        end 
        for i,v1 in ipairs(hillRadar) do 
            hill = createRadarArea(unpack(v1)) 
        end 
            turfCol = true 
            hillRadars = true 
        else 
            local allturfs = getElementsByType("radararea") 
            local allcols = getElementsByType("colshape") 
        for i, v2 in ipairs(allturfs) do 
            destroyElement(v2) 
        end 
        for i, v1 in ipairs(allcols) do 
            destroyElement(v1) 
        end 
            turfCol = nil 
            hillRadars = nil 
    end 
end 
addCommandHandler("show", maketurf) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...