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

Admin and Owner of the Pro Chile Community :3

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) 

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

para que usar source si se puede usar theplayer ._. solo quiero que coja me informacion

Admin and Owner of the Pro Chile Community :3

Posted

Si pero thePlayer lo tenes que agregar como argumto en la funcion encambio source no

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

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

Admin and Owner of the Pro Chile Community :3

Posted

Hay que escribir menos xDè

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

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

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

Admin and Owner of the Pro Chile Community :3

  • 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

DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp

 
  • MTA Team
Posted

De nada avisa si anda...

DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp

 
  • MTA Team
Posted

Que no te anda?..No te da los kills, no te sale el nemesis que?... Algun error?

DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp

 
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) 

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

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?

------------------------------------------------------------------------------------------

My scripts

http://community.multitheftauto.com/index.php?p=resources&s=details&id=6977

http://community.multitheftauto.com/index.php?p=resources&s=details&id=7740

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...