Jump to content

[Boss] Ayuda


Recommended Posts

Hola Buenas tardes, Quisiera saber que Error tiene este codigo es que Cuando inicio me dice en la console

Bad Argument SetElementHealth y como le pongo la extra healt y un Cuadrado en el radar? osea una zona?

y tbm me dice error de GiveWeapon del slothbot

Nose porq aparecen 2 a la vez

Y yo quieroq cuando muera un boss a los 5 minutos spawnee otro

y

server:

function Nemesisbymanawydan ( )   
       baz = createObject ( 360, -1935.5480957031, 665.44055175781, 48, 0, 0, 0 ) 
       nemesi = exports [ "slothBot" ]:spawnBot ( 2520.1318359375, -953.83752441406, 82.331726074219, 90,  math.random ( 300, 303 ), 0, 0, Nemesis, 38,         "hunting", true ) 
      setElementModel ( nemesi, 107 ) 
      outputChatBox ("#9E0000Nemesis: #0D9905STARS",getRootElement(), 255, 255, 255, true ) 
      local myBlip = (createBlipAttachedTo ( nemesi, 0 )) 
      attachElements ( baz, nemesi, 0.2, 0.1, 0.5, 0, 90, 0 ) 
      triggerClientEvent ( "nsound", root )     
      triggerClientEvent ( "nemesismissel", root ) 
      setTimer( 
      function() 
      setElementHealth ( nemesi, 1000 ) 
      end, 1100, 0) 
 end 
addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan)    
  
addEvent("onBotWasted",true) 
addEventHandler("onBotWasted",getRootElement(), 
function (killer) 
if (source == nemesi) then 
givePlayerMoney(killer,math.random(150000)) -- 4000, 6000 money for kill nemesis-- 
outputChatBox ( getPlayerName ( killer ) .. " #081DBFMato al Nemesis!, Ha Ganado 150.000$",getRootElement(), 255, 255, 255, true ) 
setTimer(Nemesisbymanawydan, 6000, 1) -- 60000 time for nemesis respawn in milliseconds-- 
end 
end) 

Client:

function Skinemesis1()  
  txd = engineLoadTXD("data/107.txd", 107 ) 
  engineImportTXD(txd, 107) 
  dff = engineLoadDFF("data/107.dff", 107 ) 
  engineReplaceModel(dff, 107) 
end  
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), Skinemesis1) 
  
  
addEvent ( "nsound", true ) 
addEventHandler ( "nsound", root, 
    function ( ) 
        playSound ( "data/nemesis.mp3" ) 
    end 
) 
  
  
  
addEvent ( "nemesismissel", true ) 
addEventHandler ( "nemesismissel", root, 
    function ( ) 
        x, y, z = getElementPosition("nemesi") 
createProjectile(getLocalPlayer(), 19, x, y, z) 
setPedAnimation ( nemesi, "ROCKET", "RocketFire") 
    end 
) 

Link to comment

Ok Gracias Pero Nunca entendi como hacer bien un area

Haci?

local hillArea = createColRectangle ( -2171.0678710938, 678.17950439453, 15, 15 ) 
local hillRadar = createRadarArea ( -2183.5678710938, 705.67950439453, 40, -40, 0, 255, 0, 175 ) 
  
function Nemesisbymanawydan ( )   
       baz = createObject ( 360, 2520.1318359375, -953.83752441406, 82.331726074219, 0, 0, 0 ) 
       nemesi = exports [ "slothBot" ]:spawnBot ( 2520.1318359375, -953.83752441406, 82.331726074219, 90,  math.random ( 300, 303 ), 0, 0, Nemesis, 38,         "hunting", true ) 
      setElementModel ( nemesi, 107 ) 
      outputChatBox ("#9E0000Nemesis: #0D9905Dale Perra Ven a Matarme...Si Puedes!",getRootElement(), 255, 255, 255, true ) 
      local myBlip = (createBlipAttachedTo ( nemesi, 0 )) 
      attachElements ( baz, nemesi, 0.2, 0.1, 0.5, 0, 90, 0 ) 
      triggerClientEvent ( "nsound", root )     
      triggerClientEvent ( "nemesismissel", root ) 
     setTimer( 
      function() 
      exports.extra_health:setElementExtraHealth(nemesi, 1000) 
      end, 1100, 0) 
 end 
addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan)    
  
addEvent("onBotWasted",true) 
addEventHandler("onBotWasted",getRootElement(), 
function (killer) 
if (source == nemesi) then 
givePlayerMoney(killer,math.random(150000)) -- 4000, 6000 money for kill nemesis-- 
outputChatBox ( getPlayerName ( killer ) .. " #081DBFMato al Nemesis!, Ha Ganado 150.000$",getRootElement(), 255, 255, 255, true ) 
setTimer(Nemesisbymanawydan, 16000, 1) -- 60000 time for nemesis respawn in milliseconds-- 
end 
end) 

Link to comment

No modificastes esto?

    addEvent("onBotWasted",true) 
    addEventHandler("onBotWasted",getRootElement(), 
    function (theKiller) 
    if (source == nemesi) then 
    givePlayerMoney(theKiller,math.random(150000)) 
    outputChatBox ( getPlayerName ( theKiller ) .. " #081DBFMato al Nemesis!, Ha Ganado 150.000$",getRootElement(), 255, 255, 255, true ) 
    setTimer(Nemesisbymanawydan, 16000, 1) 
    end 
    end) 

PD: ponelo en lua no en Code

A mi me anda bien

Link to comment

Este es el Serverside:

pero me da ese error el del post anterior

dice en la console attemp to conectate a boolean value

local hillArea = createColRectangle ( 2520.1318359375, -953.83752441406, 60, 60 ) 
local hillRadar = createRadarArea ( 2520.1318359375, -953.83752441406, 200, 200, 181, 0, 0, 255 ) 
  
function Nemesisbymanawydan ( )   
       baz = createObject ( 360, 2622.4934082031, -847.33459472656, 75.0484313964, 0, 0, 0 ) 
       nemesi = exports [ "slothBot" ]:spawnBot ( 2622.4934082031, -847.33459472656, 75.048431396484, 90,  math.random ( 300, 303 ), 0, 0, Nemesis, 38,         "hunting", true ) 
      setElementModel ( nemesi, 107 ) 
      outputChatBox ("#9E0000Nemesis: #0D9905Dale Perra Ven a Matarme...Si Puedes!",getRootElement(), 255, 255, 255, true ) 
      local myBlip = (createBlipAttachedTo ( nemesi, 0 )) 
      attachElements ( baz, nemesi, 0.2, 0.1, 0.5, 0, 90, 0 ) 
      triggerClientEvent ( "nsound", root )     
      triggerClientEvent ( "nemesismissel", root ) 
     setTimer( 
      function() 
      exports.extra_health:setElementExtraHealth(nemesi, 1000) 
      end, 1100, 0) 
 end 
addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan)    
  
addEvent("onBotWasted",true) 
addEventHandler("onBotWasted",getRootElement(), 
function (killer) 
if (source == nemesi) then 
givePlayerMoney(killer,math.random(150000)) -- 4000, 6000 money for kill nemesis-- 
outputChatBox ( getPlayerName ( killer ) .. " #081DBFMato al Nemesis!, Ha Ganado 150.000$",getRootElement(), 255, 255, 255, true ) 
setTimer(Nemesisbymanawydan, 6000, 1) -- 60000 time for nemesis respawn in milliseconds-- 
end 
end) 

Link to comment
    local hillRadar = createRadarArea ( -2183.5678710938, 705.67950439453, 40, -40, 0, 255, 0, 175 ) 
      
    function Nemesisbymanawydan ( )   
           baz = createObject ( 360, 2520.1318359375, -953.83752441406, 82.331726074219, 0, 0, 0 ) 
           nemesi = exports [ "slothBot" ]:spawnBot ( 2520.1318359375, -953.83752441406, 82.331726074219, 90,  math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) 
          setElementModel ( nemesi, 107 ) 
          outputChatBox ("#9E0000Nemesis: #0D9905Dale Perra Ven a Matarme...Si Puedes!",getRootElement(), 255, 255, 255, true ) 
          local myBlip = (createBlipAttachedTo ( nemesi, 0 )) 
          attachElements ( baz, nemesi, 0.2, 0.1, 0.5, 0, 90, 0 ) 
          triggerClientEvent ( "nsound", root )     
          triggerClientEvent ( "nemesismissel", root ) 
         setTimer( 
          function() 
          exports.extra_health:setElementExtraHealth(nemesi, 1000) 
          end, 1100, 0) 
     end 
    addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan)   
      
    addEvent("onBotWasted",true) 
    addEventHandler("onBotWasted",getRootElement(), 
    function (theKiller) 
    if (source == nemesi) then 
    givePlayerMoney(theKiller,math.random(150000)) 
    outputChatBox ( getPlayerName ( theKiller ) .. " #081DBFMato al Nemesis!, Ha Ganado 150.000$",getRootElement(), 255, 255, 255, true ) 
    setTimer(Nemesisbymanawydan, 16000, 1) 
    end 
    end) 

Link to comment
    local hillRadar = createRadarArea ( -2183.5678710938, 705.67950439453, 40, -40, 0, 255, 0, 175 ) 
      
    function Nemesisbymanawydan ( )   
           baz = createObject ( 360, 2520.1318359375, -953.83752441406, 82.331726074219, 0, 0, 0 ) 
           nemesi = exports [ "slothBot" ]:spawnBot ( 2520.1318359375, -953.83752441406, 82.331726074219, 90,  math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) 
          setElementModel ( nemesi, 107 ) 
          outputChatBox ("#9E0000Nemesis: #0D9905Dale Perra Ven a Matarme...Si Puedes!",getRootElement(), 255, 255, 255, true ) 
          local myBlip = (createBlipAttachedTo ( nemesi, 0 )) 
          attachElements ( baz, nemesi, 0.2, 0.1, 0.5, 0, 90, 0 ) 
          triggerClientEvent ( "nsound", root )     
          triggerClientEvent ( "nemesismissel", root ) 
         setTimer( 
          function() 
          exports.extra_health:setElementExtraHealth(nemesi, 1000) 
          end, 1100, 0) 
     end 
    addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan)   
      
    addEvent("onBotWasted",true) 
    addEventHandler("onBotWasted",getRootElement(), 
    function (theKiller) 
    if (source == nemesi) then 
    givePlayerMoney(theKiller,math.random(150000)) 
    outputChatBox ( getPlayerName ( theKiller ) .. " #081DBFMato al Nemesis!, Ha Ganado 150.000$",getRootElement(), 255, 255, 255, true ) 
    setTimer(Nemesisbymanawydan, 16000, 1) 
    end 
    end) 

Ahora si Pero otro Problema es Que no me aparece el Skin Modificado me aparece el normal.. y el otro es cuando muere el boss osea lo matan Se queda el triangulito y no se va. osea como q sigue vivo pero no esta solo esta el triangulito en el radar

y se guardan cada vez q mato al boss

Link to comment

Intenta esto Para destruir el blip

   local hillRadar = createRadarArea ( -2183.5678710938, 705.67950439453, 40, -40, 0, 255, 0, 175 ) 
      
    function Nemesisbymanawydan ( )   
           baz = createObject ( 360, 2520.1318359375, -953.83752441406, 82.331726074219, 0, 0, 0 ) 
           nemesi = exports [ "slothBot" ]:spawnBot ( 2520.1318359375, -953.83752441406, 82.331726074219, 90,  math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) 
          setElementModel ( nemesi, 107 ) 
          outputChatBox ("#9E0000Nemesis: #0D9905Dale Perra Ven a Matarme...Si Puedes!",getRootElement(), 255, 255, 255, true ) 
          local myBlip = (createBlipAttachedTo ( nemesi, 0 )) 
          attachElements ( baz, nemesi, 0.2, 0.1, 0.5, 0, 90, 0 ) 
          triggerClientEvent ( "nsound", root )     
          triggerClientEvent ( "nemesismissel", root ) 
         setTimer( 
          function() 
          exports.extra_health:setElementExtraHealth(nemesi, 1000) 
          end, 1100, 0) 
     end 
    addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan)   
      
    addEvent("onBotWasted",true) 
    addEventHandler("onBotWasted",getRootElement(), 
    function (theKiller) 
    if (source == nemesi) then 
    givePlayerMoney(theKiller,math.random(150000)) 
    destroyElement(myBlip) 
    outputChatBox ( getPlayerName ( theKiller ) .. " #081DBFMato al Nemesis!, Ha Ganado 150.000$",getRootElement(), 255, 255, 255, true ) 
    setTimer(Nemesisbymanawydan, 16000, 1) 
    end 
    end) 

Link to comment

Ahora No me aparece el Area y el Skin Modificado tampoco. Pueden Arreglarmelo?

y me dice Failed el Script wtf me lo pueden arreglar y Poner En Destroy Blip plz

local hillRadar = createRadarArea ( 2520.1318359375, -953.83752441406, 200, 200, 181, 0, 0, 255 ) 
    function Nemesisbymanawydan ( )   
           baz = createObject ( 360, 622.4934082031, -847.33459472656, 75.0484313964, 0, 0, 0 ) 
           nemesi = exports [ "slothBot" ]:spawnBot ( 2622.4934082031, -847.33459472656, 75.048431396484, 90,  math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) 
          setElementModel ( nemesi, 107 ) 
          outputChatBox ("#9E0000Nemesis: #0D9905Dale Perra Ven a Matarme...Si Puedes!",getRootElement(), 255, 255, 255, true ) 
          local myBlip = (createBlipAttachedTo ( nemesi, 0 )) 
          attachElements ( baz, nemesi, 0.2, 0.1, 0.5, 0, 90, 0 ) 
          triggerClientEvent ( "nsound", root )     
          triggerClientEvent ( "nemesismissel", root ) 
         setTimer( 
          function() 
          exports.extra_health:setElementExtraHealth(nemesi, 1000) 
          end, 1100, 0) 
     end 
    addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan)   
   addEvent("onBotWasted", true) 
addEventHandler("onBotWasted", getRootElement)   
    function (theKiller) 
    if (source == nemesi) then 
    givePlayerMoney(theKiller,math.random(150000)) 
    outputChatBox ( getPlayerName ( theKiller ) .. " #081DBFMato al Nemesis!, Ha Ganado 150.000$",getRootElement(), 255, 255, 255, true ) 
    setTimer(Nemesisbymanawydan, 16000, 1) 
    function destroyMyBlip() 
if isElement(myBlip) then 
destroyElement(myBlip) 
end 
end() 

Link to comment
    local hillRadar = createRadarArea ( 2520.1318359375, -953.83752441406, 200, 200, 181, 0, 0, 255 ) 
        function Nemesisbymanawydan ( )   
               baz = createObject ( 360, 622.4934082031, -847.33459472656, 75.0484313964, 0, 0, 0 ) 
               nemesi = exports [ "slothBot" ]:spawnBot ( 2622.4934082031, -847.33459472656, 75.048431396484, 90,  math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) 
              setElementModel ( nemesi, 107 ) 
              outputChatBox ("#9E0000Nemesis: #0D9905Dale Perra Ven a Matarme...Si Puedes!",getRootElement(), 255, 255, 255, true ) 
              local myBlip = (createBlipAttachedTo ( nemesi, 0 )) 
              attachElements ( baz, nemesi, 0.2, 0.1, 0.5, 0, 90, 0 ) 
              triggerClientEvent ( "nsound", root )     
              triggerClientEvent ( "nemesismissel", root ) 
             setTimer( 
              function() 
              exports.extra_health:setElementExtraHealth(nemesi, 1000) 
              end, 1100, 0) 
         end 
        addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan)   
       addEvent("onBotWasted", true) 
    addEventHandler("onBotWasted", getRootElement)   
        function (theKiller) 
        if (source == nemesi) then 
        givePlayerMoney(theKiller,math.random(150000)) 
        outputChatBox ( getPlayerName ( theKiller ) .. " #081DBFMato al Nemesis!, Ha Ganado 150.000$",getRootElement(), 255, 255, 255, true ) 
        setTimer(Nemesisbymanawydan, 16000, 1) 
  
function destroy () 
     if ( not isElement ( nemesi ) ) then 
     destroyElement(myBlip) 
     end 
 end 
addEvent("onBotWasted", true) 
addEventHandler("onBotWasted", getRootElement(), destroy) 

Link to comment
        local hillRadar = createRadarArea ( 2520.1318359375, -953.83752441406, 200, 200, 181, 0, 0, 255 ) 
            function Nemesisbymanawydan ( )   
                   baz = createObject ( 360, 622.4934082031, -847.33459472656, 75.0484313964, 0, 0, 0 ) 
                   nemesi = exports [ "slothBot" ]:spawnBot ( 2622.4934082031, -847.33459472656, 75.048431396484, 90,  math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) 
                  setElementModel ( nemesi, 107 ) 
                  outputChatBox ("#9E0000Nemesis: #0D9905Dale Perra Ven a Matarme...Si Puedes!",getRootElement(), 255, 255, 255, true ) 
                  local myBlip = (createBlipAttachedTo ( nemesi, 0 )) 
                  attachElements ( baz, nemesi, 0.2, 0.1, 0.5, 0, 90, 0 ) 
                  triggerClientEvent ( "nsound", root )     
                  triggerClientEvent ( "nemesismissel", root ) 
                 setTimer( 
                  function() 
                  exports.extra_health:setElementExtraHealth(nemesi, 1000) 
                  end, 1100, 0) 
             end 
            addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan)   
           addEvent("onBotWasted", true) 
        addEventHandler("onBotWasted", getRootElement)   
  
function money (theKiller) 
if (source == nemesi) then 
givePlayerMoney(theKiller,math.random(150000)) 
outputChatBox ( getPlayerName ( theKiller ) .. " #081DBFMato al Nemesis!, Ha Ganado 150.000$",getRootElement(), 255, 255, 255, true ) 
setTimer(Nemesisbymanawydan, 16000, 1) 
end 
end 
addEvent("onBotWasted", true) 
addEventHandler("onBotWasted", getRootElement(), money) 
      
function destroy () 
     if ( not isElement ( nemesi ) ) then 
     destroyElement(myBlip) 
     end 
end 
addEvent("onBotWasted", true) 
addEventHandler("onBotWasted", getRootElement(), destroy) 

Link to comment
  • Recently Browsing   0 members

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