XxRomxX Posted April 25, 2013 Share Posted April 25, 2013 Bueno. Quiero Aprender Como Hacer Un Nemesis Y Que Aparesca Con un Comando Necesito Saber Como Hacerlo D: Link to comment
RekZ Posted April 25, 2013 Share Posted April 25, 2013 (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 April 25, 2013 by Guest Link to comment
Plate Posted April 25, 2013 Share Posted April 25, 2013 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) Link to comment
RekZ Posted April 25, 2013 Share Posted April 25, 2013 para que usar source si se puede usar theplayer ._. solo quiero que coja me informacion Link to comment
Plate Posted April 25, 2013 Share Posted April 25, 2013 Si pero thePlayer lo tenes que agregar como argumto en la funcion encambio source no Link to comment
RekZ Posted April 25, 2013 Share Posted April 25, 2013 y puedes explicar que tiene eso de beneficioso frente a tlePlayer , y por dios no me digas "hay que escribir menos" Link to comment
Plate Posted April 25, 2013 Share Posted April 25, 2013 Hay que escribir menos è aparte el tuyo daria error en el getElementPosition ya que no agregastes thePlayer como argumento en la funcion Link to comment
RekZ Posted April 25, 2013 Share Posted April 25, 2013 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 Link to comment
XxRomxX Posted April 27, 2013 Author Share Posted April 27, 2013 Pero Brad_Vickers Que te de Dinero y Kills Se Podria hacer eso igual? Link to comment
MTA Team 0xCiBeR Posted April 27, 2013 MTA Team Share Posted April 27, 2013 Hola rom 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 Link to comment
XxRomxX Posted April 27, 2013 Author Share Posted April 27, 2013 Gracias Ciber Te Amo:$ okno Cuidate Viejo Link to comment
MTA Team 0xCiBeR Posted April 27, 2013 MTA Team Share Posted April 27, 2013 De nada avisa si anda... Link to comment
MTA Team 0xCiBeR Posted April 27, 2013 MTA Team Share Posted April 27, 2013 Que no te anda?..No te da los kills, no te sale el nemesis que?... Algun error? Link to comment
XxRomxX Posted April 27, 2013 Author Share Posted April 27, 2013 Mira me sale esto Script Error: Nemesis/bosss.lua:12: '>' expected near 'givePlayerMoney y Trato de Sacar el nemesis pero tampoco me sale Link to comment
Plate Posted April 27, 2013 Share Posted April 27, 2013 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) Link to comment
XxRomxX Posted April 27, 2013 Author Share Posted April 27, 2013 No Ahora me sale ERROR: Exports: Call to non-running server resource [string "?"] Link to comment
Plate Posted April 27, 2013 Share Posted April 27, 2013 descarga esto https://community.multitheftauto.com/index.php?p=resources&s=details&id=672 incialo y despues inicia el nemesis Link to comment
XxRomxX Posted April 27, 2013 Author Share Posted April 27, 2013 Listoo Sale pero no el skin que quiero, ademas ERROR: Nemesis\bosss.lua:11: attempt to perfom arithmetic on a nil value Link to comment
NodZen Posted April 27, 2013 Share Posted April 27, 2013 Listoo Sale pero no el skin que quiero, ademas ERROR: Nemesis\bosss.lua:11: attempt to perfom arithmetic on a nil value Si no te anda lo del skin, usa setElementModel Link to comment
XxRomxX Posted April 27, 2013 Author Share Posted April 27, 2013 Tengo Que Hacer Otro Lua No Es Asi? Link to comment
NodZen Posted April 27, 2013 Share Posted April 27, 2013 Tengo Que Hacer Otro Lua No Es Asi? No, añade esto a tu script con el ID del skin que quieres. setElementModel(nemesi, ID) Link to comment
XxRomxX Posted April 27, 2013 Author Share Posted April 27, 2013 Ahora me sale un error WARNING: Nemesis\bosss.lua:20: Bad argument 'SetElementModel' [Expected element at argument 1,got nil] Link to comment
NodZen Posted April 27, 2013 Share Posted April 27, 2013 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? Link to comment
Recommended Posts