Jump to content

[HELP]-Remove barrier


Mateo_Strahm

Recommended Posts

Please can somebody tell me how I can remove barrier what i spawn with this script:

function consoleCreateObject ( thePlayer, commandName ) 
   if ( thePlayer ) then 
      local x, y, z = getElementPosition ( thePlayer ) 
      local rx,ry,rz = getElementRotation ( thePlayer ) 
      local barrier = createObject ( 981, x + 10, y, z, rx, ry, rz ) 
      if ( theObject ) then 
     
      else 
          
      end 
   end 
end 
addCommandHandler ( "b", consoleCreateObject ) 

Thanks everyone

Link to comment
  
local barrier = nil 
  
function consoleCreateObject ( thePlayer, commandName ) 
   if ( thePlayer ) then 
      local x, y, z = getElementPosition ( thePlayer ) 
      local rx,ry,rz = getElementRotation ( thePlayer ) 
      barrier = createObject ( 981, x + 10, y, z, rx, ry, rz ) 
      if (  barrier ) then 
    
      else 
          
      end 
   end 
end 
addCommandHandler ( "b", consoleCreateObject ) 

if you need destroy

just use

  
  
 if isElement(barrier) then 
    destroyElement(barrier) 
    barrier = nil 
  end 
  
  

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...