Jump to content

Como hacer Nemesis y Que Aparesca Con Un Comando


XxRomxX

Recommended Posts

  • Replies 59
  • Created
  • Last Reply

Top Posters In This Topic

Posted (edited)

no lo e revisado , supongo que funcionara , cuando uses el comando el nemesis aparecera en tu posicion

            function BossNemesis ( thePlayer )   
                  x,y,z = getElementPosition( thePlayer ) 
                   nemesi = exports [ "slothBot" ]:spawnBot ( x+1,y+1,z+0.5, 90,  math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) 
                   end 
      addCommandHandler("nemesis",BossNemesis) 
         
  
function money (theKiller) 
if (source == nemesi) then 
givePlayerMoney(theKiller,math.random(20000)) 
outputChatBox ( getPlayerName ( theKiller ) .. " #081DBFHa Matado Ha Nemesis :3 , Se Cree Muy Prah!",getRootElement(), 255, 255, 255, true ) 
setTimer( BossNemesis , 16000, 1) 
end 
end 
addEvent("onBotWasted", true) 
addEventHandler("onBotWasted", getRootElement(), money) 
    

Edited by Guest
Posted
no lo e revisado , supongo que funcionara , cuando uses el comando el nemesis aparecera en tu posicion
            function BossNemesis ( )   
                  x,y,z = getElementPosition( thePlayer ) 
                   nemesi = exports [ "slothBot" ]:spawnBot ( x+1,y+1,z+0.5, 90,  math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) 
                   end 
      addCommandHandler("nemesis",BossNemesis) 
         
  
function money (theKiller) 
if (source == nemesi) then 
givePlayerMoney(theKiller,math.random(20000)) 
outputChatBox ( getPlayerName ( theKiller ) .. " #081DBFHa Matado Ha Nemesis :3 , Se Cree Muy Prah!",getRootElement(), 255, 255, 255, true ) 
setTimer( BossNemesis , 16000, 1) 
end 
end 
addEvent("onBotWasted", true) 
addEventHandler("onBotWasted", getRootElement(), money) 
    

te falto thePlayer en la primera funcion(function BossNemesis(thePlayer) es mejor asi

[lua]            function BossNemesis ( )   
                  x,y,z = getElementPosition( source ) 
                   nemesi = exports [ "slothBot" ]:spawnBot ( x+1,y+1,z+0.5, 90,  math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) 
                   end 
      addCommandHandler("nemesis",BossNemesis) 

Posted

y puedes explicar que tiene eso de beneficioso frente a tlePlayer , y por dios no me digas "hay que escribir menos"

Posted

Hay que escribir menos xDè

aparte el tuyo daria error en el getElementPosition ya que no agregastes thePlayer como argumento en la funcion

Posted
-_- eso ya lo digiste , s.s bueno dejemos lo hay es lo mismo usar una cosa ke otra ademas ya corregi el codigo hace rato xD
  • MTA Team
Posted

Hola rom xD para que te de dinero ya esta..Para los kills ponlo asi:

           function BossNemesis ( thePlayer )   
                  x,y,z = getElementPosition( thePlayer ) 
                   nemesi = exports [ "slothBot" ]:spawnBot ( x+1,y+1,z+0.5, 90,  math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) 
                   end 
      addCommandHandler("nemesis",BossNemesis) 
        
  
function money (theKiller) 
if (source == nemesi) then 
local kills = getElementData ( theKiller, "Zombie kills" ) 
setElementData ( theKiller, "Zombie kills", tonumber(kills)+25 
givePlayerMoney(theKiller,math.random(20000)) 
outputChatBox ( getPlayerName ( theKiller ) .. " #081DBFHa Matado Ha Nemesis :3 , Se Cree Muy Prah!",getRootElement(), 255, 255, 255, true ) 
setTimer( BossNemesis , 16000, 1) 
end 
end 
addEvent("onBotWasted", true) 
addEventHandler("onBotWasted", getRootElement(), money) 
    

Fijate si anda lo postie del cel xD

Posted

Mira me sale esto Script Error: Nemesis/bosss.lua:12: '>' expected near 'givePlayerMoney y Trato de Sacar el nemesis pero tampoco me sale

Posted

el math.random esta mal usado hay y falto cerrar un parentesis

           function BossNemesis ( thePlayer )   
                  x,y,z = getElementPosition( thePlayer ) 
                   nemesi = exports [ "slothBot" ]:spawnBot ( x+1,y+1,z+0.5, 90,  math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) 
                   end 
      addCommandHandler("nemesis",BossNemesis) 
        
  
function money (theKiller) 
if (source == nemesi) then 
local kills = getElementData ( theKiller, "Zombie kills" ) 
setElementData ( theKiller, "Zombie kills", tonumber(kills)+25) 
givePlayerMoney(theKiller, math.random(10000, 20000)) 
outputChatBox ( getPlayerName ( theKiller ) .. " #081DBFHa Matado Ha Nemesis :3 , Se Cree Muy Prah!",getRootElement(), 255, 255, 255, true ) 
setTimer( BossNemesis , 16000, 1) 
end 
end 
addEvent("onBotWasted", true) 
addEventHandler("onBotWasted", getRootElement(), money) 

Posted
Ahora me sale un error WARNING: Nemesis\bosss.lua:20: Bad argument 'SetElementModel' [Expected element at argument 1,got nil]

Pusiste el numero del skin? O lo pusiste tal cual te lo dí? Aparte, en que linea lo pusiste?

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...