Jump to content

Problema con destroyElement


Plate

Recommended Posts

Posted

Hola tengo un problema con el destroyElement me dice badArgument

function destroyblip() 
destroyElement( myBlip ) 
end 
addEventHandler("onBotWasted",getRootElement(),destroyblip) 

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted
local myBlip = createBlipAttachedTo ( slothbot1, 23 ) 

Si

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

Postea todo tu script.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Postea el script entero, faltan cosas.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
local colshape = createColCuboid ( 103.88594818115, 1302.0729980469, 10.5859375, 220, 200, 60 ) 
zombiesMatados = 0 
function zona ( ) 
    if ( isElementWithinColShape ( source, colshape ) ) then 
zombiesMatados = ( zombiesMatados + 1 ) 
if ( zombiesMatados == 1 ) then 
if ( not isElement ( slothbot1 ) ) then 
        slothbot1 = exports [ "slothbot" ]:spawnBot ( 111.79273223877, 1336.3046875, 10.5859375, 90, math.random ( 300, 303 ), 0, 0, ex, 38, "hunting", true ) 
        exports.extra_health:setElementExtraHealth ( slothbot1, 100 ) 
outputChatBox("Boss spawned", getRootElement(), 155, 155, 155) 
onZomieWasted = 1 
local myBlip = createBlipAttachedTo ( slothbot1, 23 ) 
         end 
      end 
   end 
end 
addEvent ( "onZombieWasted", true ) 

function destroyblip() 
destroyElement(myBlip) 
end 
addEventHandler("onBotWasted",getRootElement(),destroyblip) 

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

Como lo suponia, hiciste local a la variable "myBlip".

local colshape = createColCuboid ( 103.88594818115, 1302.0729980469, 10.5859375, 220, 200, 60 ) 
zombiesMatados = 0 
function zona ( ) 
    if ( isElementWithinColShape ( source, colshape ) ) then 
zombiesMatados = ( zombiesMatados + 1 ) 
if ( zombiesMatados == 1 ) then 
if ( not isElement ( slothbot1 ) ) then 
        slothbot1 = exports [ "slothbot" ]:spawnBot ( 111.79273223877, 1336.3046875, 10.5859375, 90, math.random ( 300, 303 ), 0, 0, ex, 38, "hunting", true ) 
        exports.extra_health:setElementExtraHealth ( slothbot1, 100 ) 
outputChatBox("Boss spawned", getRootElement(), 155, 155, 155) 
onZomieWasted = 1 
myBlip = createBlipAttachedTo ( slothbot1, 23 ) 
         end 
      end 
   end 
end 
addEvent ( "onZombieWasted", true ) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Funciona gracias solid otra cosa como puedo hacer para que en el colshape enves de qe tenga solamente esa posicion z tenga todas

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted
local colshape = createColRectangle ( 103.88594818115, 1302.0729980469, 220, 200, 60 ) -- hay? 

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

Borra el "60" al final.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

  • Recently Browsing   0 members

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