Plate Posted August 4, 2012 Posted August 4, 2012 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
Plate Posted August 4, 2012 Author Posted August 4, 2012 local myBlip = createBlipAttachedTo ( slothbot1, 23 ) Si Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Castillo Posted August 4, 2012 Posted August 4, 2012 Postea todo tu script. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Plate Posted August 4, 2012 Author Posted August 4, 2012 eso es todo solid Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Castillo Posted August 4, 2012 Posted August 4, 2012 Postea el script entero, faltan cosas. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Plate Posted August 4, 2012 Author Posted August 4, 2012 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
Castillo Posted August 4, 2012 Posted August 4, 2012 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. Education is the most powerful weapon which you can use to change the world.
Plate Posted August 4, 2012 Author Posted August 4, 2012 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
Castillo Posted August 4, 2012 Posted August 4, 2012 Si el colshape tiene que ser un rectangulo, usa createColRectangle. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Plate Posted August 4, 2012 Author Posted August 4, 2012 local colshape = createColRectangle ( 103.88594818115, 1302.0729980469, 220, 200, 60 ) -- hay? Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Castillo Posted August 4, 2012 Posted August 4, 2012 Borra el "60" al final. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Recommended Posts