Mateo_Strahm Posted January 12, 2013 Share Posted January 12, 2013 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
MR.S3D Posted January 12, 2013 Share Posted January 12, 2013 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now