XxRomxX Posted April 25, 2013 Posted April 25, 2013 Bueno. Quiero Aprender Como Hacer Un Nemesis Y Que Aparesca Con un Comando Necesito Saber Como Hacerlo D:
RekZ Posted April 25, 2013 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 Admin and Owner of the Pro Chile Community :3
Plate Posted April 25, 2013 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) Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
RekZ Posted April 25, 2013 Posted April 25, 2013 para que usar source si se puede usar theplayer ._. solo quiero que coja me informacion Admin and Owner of the Pro Chile Community :3
Plate Posted April 25, 2013 Posted April 25, 2013 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
RekZ Posted April 25, 2013 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" Admin and Owner of the Pro Chile Community :3
Plate Posted April 25, 2013 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 Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
RekZ Posted April 25, 2013 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 Admin and Owner of the Pro Chile Community :3
Plate Posted April 25, 2013 Posted April 25, 2013 Si Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
XxRomxX Posted April 27, 2013 Author Posted April 27, 2013 Pero Brad_Vickers Que te de Dinero y Kills Se Podria hacer eso igual?
MTA Team 0xCiBeR Posted April 27, 2013 MTA Team 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 DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
MTA Team 0xCiBeR Posted April 27, 2013 MTA Team Posted April 27, 2013 De nada avisa si anda... DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
MTA Team 0xCiBeR Posted April 27, 2013 MTA Team Posted April 27, 2013 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
XxRomxX Posted April 27, 2013 Author 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
Plate Posted April 27, 2013 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) Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
XxRomxX Posted April 27, 2013 Author Posted April 27, 2013 No Ahora me sale ERROR: Exports: Call to non-running server resource [string "?"]
Plate Posted April 27, 2013 Posted April 27, 2013 descarga esto https://community.multitheftauto.com/index.php?p=resources&s=details&id=672 incialo y despues inicia el nemesis Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
XxRomxX Posted April 27, 2013 Author 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
NodZen Posted April 27, 2013 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 ------------------------------------------------------------------------------------------ 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
NodZen Posted April 27, 2013 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) ------------------------------------------------------------------------------------------ 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
XxRomxX Posted April 27, 2013 Author Posted April 27, 2013 Ahora me sale un error WARNING: Nemesis\bosss.lua:20: Bad argument 'SetElementModel' [Expected element at argument 1,got nil]
NodZen Posted April 27, 2013 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? ------------------------------------------------------------------------------------------ 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
Recommended Posts