Jump to content

Zona de BOT


Plate

Recommended Posts

Lo que te dije que hicieras es:

-- La variable global: 
zombiesMatados = 0 

-- Aumentamos la variable: 
zombiesMatados = ( zombiesMatados + 1 ) 

if ( zombiesMatados >= 30 ) then -- Si el numero de zombies matados es igual o mayor que 30.. 
     -- Creamos el bot 
end 

Link to comment

Creo que esto me servira para todo lo que are futuramente con esto gracias a todos los que me ayudaron otra cosa como creo la tabla de asistencia que me habias dicho

PD: sigue spawneando cuando matas 1 zombie

Edited by Guest
Link to comment

Asi?

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 >= 50 ) then  
if ( not isElement ( slothbot ) ) then 
        slothbot = exports [ "slothbot" ]:spawnBot ( 111.79273223877, 1336.3046875, 10.5859375, 90, math.random ( 300, 303 ), 0, 0, Boss, 38, "hunting", true ) 
        exports.extra_health:setElementExtraHealth ( slothbot, 5000 ) 
outputChatBox("Testing") 
onZomieWasted = 30 
local myBlip = createBlipAttachedTo ( slothbot, 23 ) 
         end 
      end 
   end 
end 
addEvent ( "onZombieWasted", true ) 
addEventHandler ( "onZombieWasted", getRootElement(), zona ) 
  

PD:Mato 50 zombies y si mato 51/52/53 spawnean 4

Link to comment
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 == 50 ) then  
if ( not isElement ( slothbot ) ) then 
        slothbot = exports [ "slothbot" ]:spawnBot ( 111.79273223877, 1336.3046875, 10.5859375, 90, math.random ( 300, 303 ), 0, 0, Boss, 38, "hunting", true ) 
        exports.extra_health:setElementExtraHealth ( slothbot, 5000 ) 
outputChatBox("Testing") 
onZomieWasted = 30 
local myBlip = createBlipAttachedTo ( slothbot, 23 ) 
         end 
      end 
   end 
end 
addEvent ( "onZombieWasted", true ) 
addEventHandler ( "onZombieWasted", getRootElement(), zona ) 

si el PD es un error eso lo resuelve

Link to comment
  • Recently Browsing   0 members

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