Jump to content

BOSS Ayudenmen


Plate

Recommended Posts

server side:

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, 302), 0, 0, ex, 38, "hunting", true ) 
          myBlip = createBlipAttachedTo ( slothbot1, 23 ) 
       end 
    end 
 end 
end 
addEventHandler ( "onZombieWasted", getRootElement(), zona ) 
addEventHandler("onBotSpawn",getRootElement(),zona) 
function restartear ( ) 
    if ( isElementWithinColShape ( source, colshape ) ) then 
        zombiesMatados = 0 
   end 
end 
addEvent ( "onBotWasted", true ) 
addEventHandler ( "onBotWasted",getRootElement(), restartear ) 
addEvent ( "onBotWasted", true ) 
function alto() 
setElementData(colshape,"zona",high) 
end 
addEventHandler("onResourceStart",getRootElement(),alto) 
  
function setzonerage() 
setElementData(colshape,"zona",medium) 
if getElementData(colshape,"zona",medium) then 
setElemntData(colshape,"zona",low) 
end 
end 
addEventHandler("onBotWasted",getRootElement(),setzonerage) 
function sethealth() 
if getElementData(colshape,"zona",high) then 
exports.extra_health:setElemntExtraHealth(slothbot1, 10000) 
elseif getElementData(colshape,"zona",medium) then 
exports.extra_health:setElementExtraHealth(slothbot1, 7500) 
elseif getElementData(colshape,"zona",low) then 
exports.extra_health:setElementExtraHealth(slothbot1, 5000) 
end 
end 
addEventHandler("onBotSpawn",getRootElement(),sethealth) 

clientside:

  
GUIEditor_Label = {} 
  
GUIEditor_Label[1] = guiCreateLabel(562,513,146,30,"Nivel de zona :",false) 
guiSetFont(GUIEditor_Label[1],"sa-header") 
  
GUIEditor_Label[2] = guiCreateLabel(709,516,90,32, getElementData(colshape,"zona"),false) 
guiSetFont(GUIEditor_Label[2],"sa-header") 
  

Link to comment
  • Recently Browsing   0 members

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