este es un scrip que cree para k genere una torre pero el problema es que cuando genero la segunda torre la primera no desaparese, que tendria que hacer para que el primero desaparesaca ?? miren esto es lo que llevo
script
function CreateVisor ( thePlayer, commandName )
if ( thePlayer ) then
local x, y, z = getElementPosition ( thePlayer ) -- get the player's position
-- create a Object next to the player:
local theObject = createObject ( 3279, x + 5, y + 0, z + -1, 0, 0, 0 )
if ( theObject ) then -- check if the Obeject was created successfully
outputConsole ( "Visor puesto", thePlayer )
else
outputConsole ( "Visor no puesto", thePlayer )
end
end
end
addCommandHandler ( "visor", CreateVisor )