Jump to content

Ayuda BOSS


Plate

Recommended Posts

Hola tengo un problema es que esto no me anda estoy mejorando mi boss- system (gracias Solid) y necesito ayuda con esto

local colshape = createColRectangle ( 103.88594818115, 1302.0729980469, 220, 200 ) -- estas son las coordenadas donde se va a crear el boss para cambiarlas solamente copien la posicion x e y de su admin panel 
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 ) 
myBlip = createBlipAttachedTo ( slothbot1, 23 ) 
         end 
      end 
   end 
end 
addEvent ( "onZombieWasted", true ) 
addEventHandler ( "onZombieWasted", getRootElement(), zona ) 
function restartear ( ) 
    if ( isElementWithinColShape ( source, colshape ) ) then 
        zombiesMatados = 0 
   end 
end 
addEvent ( "onBotWasted", true ) 
addEventHandler ( "onBotWasted",getRootElement(), restartear ) 
function high() 
model = getElementModel(slothbot1) 
if (model == 300 ) then 
exports.extra_health:setElementExtraHealth(solthbot1, 1000) 
outputChatBox("[bOSS]:Boss high spawned", 155, 155, 155) 
end 
end 
addEvent("onBotSpawn", true) 
addEventHandler("onBotSpawn",getRootElement(),high) 
function medium() 
model2 = getElementModel(slothbot1) 
if ( model2 == 301) then 
exports.extra_health:setElementExtraHealth(solthbot1, 7500) 
outputChatBox("[bOSS]:Boos medium spawned", 155, 155, 155) 
end 
end 
addEvent("onBotSpawn", true) 
addEventHandler("onBotSpawn",getRootElement(),medium) 
 function low() 
model3 = getElementModel(slothbot1) 
if ( model3 == 303) then 
exports.extra_health:setElementExtraHealth(solthbot1, 5000) 
outputChatBox("[bOSS]:Boos low spawned", 155, 155, 155) 
end 
end 
addEvent("onBotSpawn", true) 
addEventHandler("onBotSpawn",getRootElement(),low) 

Link to comment

Prueba Así

local colshape = createColRectangle ( 103.88594818115, 1302.0729980469, 220, 200 ) -- estas son las coordenadas donde se va a crear el boss para cambiarlas solamente copien la posicion x e y de su admin panel 
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 ) 
myBlip = createBlipAttachedTo ( slothbot1, 23 ) 
         end 
      end 
   end 
end 
addEvent ( "onZombieWasted", true ) 
addEventHandler ( "onZombieWasted", getRootElement(), zona ) 
function restartear ( ) 
    if ( isElementWithinColShape ( source, colshape ) ) then 
        zombiesMatados = 0 
   end 
end 
addEvent ( "onBotWasted", true ) 
addEventHandler ( "onBotWasted",getRootElement(), restartear ) 
function high() 
local model = getElementModel(slothbot1) 
if setElementModel(model, 300 ) then 
exports.extra_health:setElementExtraHealth(solthbot1, 1000) 
outputChatBox("[bOSS]:Boss high spawned", 155, 155, 155) 
end 
end 
addEvent("onBotSpawn", true) 
addEventHandler("onBotSpawn",getRootElement(),high) 
function medium() 
local model2 = getElementModel(slothbot1) 
if setElementModel(model2, 301) then 
exports.extra_health:setElementExtraHealth(solthbot1, 7500) 
outputChatBox("[bOSS]:Boos medium spawned", 155, 155, 155) 
end 
end 
addEvent("onBotSpawn", true) 
addEventHandler("onBotSpawn",getRootElement(),medium) 
 function low()  
local model3 = getElementModel(slothbot1) 
if setElementModel(model3, 303) then 
exports.extra_health:setElementExtraHealth(solthbot1, 5000) 
outputChatBox("[bOSS]:Boos low spawned", 155, 155, 155) 
end 
end 
addEvent("onBotSpawn", true) 
addEventHandler("onBotSpawn",getRootElement(),low) 

Link to comment

Probalo asi haber.

function high ( ) 
local id = getElementModel ( slothbot1 ) 
if id == 300 then 
exports.extra_health:setElementExtraHealth(solthbot1, 1000) 
outputChatBox("[bOSS]:Boss high spawned", getRootElement(), 155, 155, 155, false) 
end 
end 
addEvent("onBotSpawn", true) 
addEventHandler("onBotSpawn",getRootElement(),high) 

Link to comment
  • Recently Browsing   0 members

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