Steven23 Posted July 31, 2013 Share Posted July 31, 2013 hola castillo , tienes una figura muy respetada en lo que es MTA y tu talento de script biene de tu habilidad y tu dedicacion he tratado de seguir tus pasos , al menos logre algo de princicpiante , en cambiar pocisiones de bosses o de otras cosas, editar huds , poner canciones a un determinado lugar , etc pero tengo un problema , el cual es el sieguiente tengo a un boss nemesis que funciona con slothbot el cual muere muy rapido,( tiene vida 100) en el lua le cambie la vida a 9999999 por ejemplo y sigue con 100 me doy cuenta de eso por lo rapido q lo matan, ademas se queda quieto , cuando ve a un player, osea para que te ataque tienes que golpearlo o dispararle la verdad esto me trae mala fama al sv ,, el nemesis mas lol , quiero que me ayudes a como subirle la vida en otros server he visto que el nemesis es duradero , supongo qe tendra mas de 100 de vida aki te posteo el contenido lua en la carpeta del boss , hay 3 archivos lua ( boss.lua, bosss.lua, bossc.lua ) contenido del bosss lua --------------------------------------------------------------------------------------- local hillRadar = createRadarArea ( 280.75512695313, 1869.296875, 200, 200, 181, 0, 0, 255 ) function Nemesisbymanawydan ( ) baz = createObject ( 360, 280.75512695313, 1869.296875, 8.7578125, 0, 0, 0 ) nemesi = exports [ "slothBot" ]:spawnBot ( 280.75512695313, 1869.296875, 8.7578125, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) setElementModel ( nemesi, 107 ) outputChatBox ("#9E0000Nemesis: #9E0000 moriran STARS!",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, 99999999) end, 999999999, 0) end addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan) addEvent("onBotWasted", true) addEventHandler("onBotWasted", getRootElement) function money (theKiller) if (source == nemesi) then givePlayerMoney(theKiller,math.random(5000)) outputChatBox ( getPlayerName ( theKiller ) .. " #081DBFMato al Boss!, Ha Ganado $5.000 como recompensa",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) ------------------------------------------------------------------------------------- contenido del boss.lua ------------------- local hillRadar = createRadarArea ( 280.75512695313, 1869.296875, 200, 200, 181, 0, 0, 255 ) function Nemesisbymanawydan ( ) baz = createObject ( 360, 280.75512695313, 1869.296875, 8.7578125, 0, 0, 0 ) nemesi = exports [ "slothBot" ]:spawnBot ( 280.75512695313, 1869.296875, 8.7578125, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) setElementModel ( nemesi, 107 ) outputChatBox ("#9E0000Nemesis: #9E0000 Ijos de puta Moriran, STARS!",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, 99999999) end, 999999999, 0) end addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan) addEvent("onBotWasted", true) addEventHandler("onBotWasted", getRootElement) function money (theKiller) if (source == nemesi) then givePlayerMoney(theKiller,math.random(5000)) outputChatBox ( getPlayerName ( theKiller ) .. " #081DBFMato al Boss!, Ha Ganado $5.000 como recompensa",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) -------------------------------------------------------------------------------------------- contenido del bossc.lua ---------------------------------------------- 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 ) ------------------------------------ eso es todo lo que contiene la carpeta boss nemesis ,espero tu comprension y que porfavor me ayudes te lo ruego castillo a resolver este problema gracias Link to comment
Plate Posted July 31, 2013 Share Posted July 31, 2013 El problema es que pusistes el setTimer muy grande y aparte es innesesario PD:Por que siempre le pedis ayuuda a castillo el no es el unico scripter de todo el foro PD2:Estudia un poco de lua https://wiki.multitheftauto.com/wiki/Scripting_Introduction local hillRadar = createRadarArea ( 280.75512695313, 1869.296875, 200, 200, 181, 0, 0, 255 ) function Nemesisbymanawydan ( ) baz = createObject ( 360, 280.75512695313, 1869.296875, 8.7578125, 0, 0, 0 ) nemesi = exports [ "slothBot" ]:spawnBot ( 280.75512695313, 1869.296875, 8.7578125, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) setElementModel ( nemesi, 107 ) outputChatBox ("#9E0000Nemesis: #9E0000 Ijos de puta Moriran, STARS!",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 ) exports.extra_health:setElementExtraHealth(nemesi, 99999999) -- te recomiendo bajarla es demaciada vida end addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan) addEvent("onBotWasted", true) addEventHandler("onBotWasted", getRootElement) function money (theKiller) if (source == nemesi) then givePlayerMoney(theKiller,math.random(5000)) outputChatBox ( getPlayerName ( theKiller ) .. " #081DBFMato al Boss!, Ha Ganado $5.000 como recompensa",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
StanMarsh Posted July 31, 2013 Share Posted July 31, 2013 El problema es que pusistes el setTimer muy grande y aparte es innesesarioPD:Por que siempre le pedis ayuuda a castillo el no es el unico scripter de todo el foro PD2:Estudia un poco de lua https://wiki.multitheftauto.com/wiki/Scripting_Introduction local hillRadar = createRadarArea ( 280.75512695313, 1869.296875, 200, 200, 181, 0, 0, 255 ) function Nemesisbymanawydan ( ) baz = createObject ( 360, 280.75512695313, 1869.296875, 8.7578125, 0, 0, 0 ) nemesi = exports [ "slothBot" ]:spawnBot ( 280.75512695313, 1869.296875, 8.7578125, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) setElementModel ( nemesi, 107 ) outputChatBox ("#9E0000Nemesis: #9E0000 Ijos de puta Moriran, STARS!",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 ) exports.extra_health:setElementExtraHealth(nemesi, 99999999) -- te recomiendo bajarla es demaciada vida end addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan) addEvent("onBotWasted", true) addEventHandler("onBotWasted", getRootElement) function money (theKiller) if (source == nemesi) then givePlayerMoney(theKiller,math.random(5000)) outputChatBox ( getPlayerName ( theKiller ) .. " #081DBFMato al Boss!, Ha Ganado $5.000 como recompensa",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) Sí. y Debes poner el extra_health en (caso que no lo uses) Link to comment
Castillo Posted August 1, 2013 Share Posted August 1, 2013 Cual es el problema exacto? Link to comment
Steven23 Posted August 1, 2013 Author Share Posted August 1, 2013 el problema es que el script boss nemesis , el cual postie el contenido de los lua antes el problema se centra en que el boss tiene poca vida. como puedo hacer para que tenga vida mas elvedada , en otros sv e visto un nemesis ( boos.lua ) que tiene mas hp . en mi caso modifique esta linea de los lua bossc y bosss function() exports.extra_health:setElementExtraHealth(nemesi, 99999999) end, 999999999, 0) probe con varias cifras y nada sigue teniendo 100 hp el nemesis entonces no se como hacer que el nemesis tenga mas hp Link to comment
Rockero Posted August 1, 2013 Share Posted August 1, 2013 el problema es que el script boss nemesis , el cual postie el contenido de los lua antesel problema se centra en que el boss tiene poca vida. como puedo hacer para que tenga vida mas elvedada , en otros sv e visto un nemesis ( boos.lua ) que tiene mas hp . en mi caso modifique esta linea de los lua bossc y bosss function() exports.extra_health:setElementExtraHealth(nemesi, 99999999) end, 999999999, 0) probe con varias cifras y nada sigue teniendo 100 hp el nemesis entonces no se como hacer que el nemesis tenga mas hp Tienes puesto el resource Extra_health? ya que " exports.extra_health" es exportada de ese script.... si no ponlo en tu servidor, inicia el Extra_health y prueba. Extra_health script. https://community.multitheftauto.com/in ... ls&id=5195 Link to comment
AlvareZ_ Posted August 1, 2013 Share Posted August 1, 2013 Si el post es dedicado a "castillo" deberías enviar PM. Link to comment
Recommended Posts