Julian09123 Posted March 8, 2013 Posted March 8, 2013 Hola Buenas tardes, Quisiera saber que Error tiene este codigo es que Cuando inicio me dice en la console Bad Argument SetElementHealth y como le pongo la extra healt y un Cuadrado en el radar? osea una zona? y tbm me dice error de GiveWeapon del slothbot Nose porq aparecen 2 a la vez Y yo quieroq cuando muera un boss a los 5 minutos spawnee otro y server: function Nemesisbymanawydan ( ) baz = createObject ( 360, -1935.5480957031, 665.44055175781, 48, 0, 0, 0 ) nemesi = exports [ "slothBot" ]:spawnBot ( 2520.1318359375, -953.83752441406, 82.331726074219, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) setElementModel ( nemesi, 107 ) outputChatBox ("#9E0000Nemesis: #0D9905STARS",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() setElementHealth ( nemesi, 1000 ) end, 1100, 0) end addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan) addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(), function (killer) if (source == nemesi) then givePlayerMoney(killer,math.random(150000)) -- 4000, 6000 money for kill nemesis-- outputChatBox ( getPlayerName ( killer ) .. " #081DBFMato al Nemesis!, Ha Ganado 150.000$",getRootElement(), 255, 255, 255, true ) setTimer(Nemesisbymanawydan, 6000, 1) -- 60000 time for nemesis respawn in milliseconds-- end end) Client: 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 ) Skype: Juliang09123
Plate Posted March 8, 2013 Posted March 8, 2013 setTimer( function() exports.extra_health:setElementExtraHealth(nemesi, 1000) end, 1100, 0) end createRadarArea Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Castillo Posted March 8, 2013 Posted March 8, 2013 La vida maxima que puede tener un ped/jugador es 200% con la stat de vida activada, para tener 1000% usa el extra_health mio. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Julian09123 Posted March 8, 2013 Author Posted March 8, 2013 Ok Gracias Pero Nunca entendi como hacer bien un area Haci? local hillArea = createColRectangle ( -2171.0678710938, 678.17950439453, 15, 15 ) local hillRadar = createRadarArea ( -2183.5678710938, 705.67950439453, 40, -40, 0, 255, 0, 175 ) function Nemesisbymanawydan ( ) baz = createObject ( 360, 2520.1318359375, -953.83752441406, 82.331726074219, 0, 0, 0 ) nemesi = exports [ "slothBot" ]:spawnBot ( 2520.1318359375, -953.83752441406, 82.331726074219, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) setElementModel ( nemesi, 107 ) outputChatBox ("#9E0000Nemesis: #0D9905Dale Perra Ven a Matarme...Si Puedes!",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, 1000) end, 1100, 0) end addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan) addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(), function (killer) if (source == nemesi) then givePlayerMoney(killer,math.random(150000)) -- 4000, 6000 money for kill nemesis-- outputChatBox ( getPlayerName ( killer ) .. " #081DBFMato al Nemesis!, Ha Ganado 150.000$",getRootElement(), 255, 255, 255, true ) setTimer(Nemesisbymanawydan, 16000, 1) -- 60000 time for nemesis respawn in milliseconds-- end end) Skype: Juliang09123
Plate Posted March 8, 2013 Posted March 8, 2013 Para que el local hillArea = createColRectangle ( -2171.0678710938, 678.17950439453, 15, 15 ) Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Julian09123 Posted March 8, 2013 Author Posted March 8, 2013 Plate ahora Cuando lo mato No me da ni el dinero y no me dice El OuputChatbox que hago? Me dice Nemesis1/nemesis1.lua oser el serverside dice en la console attemp to conectate a boolean value Skype: Juliang09123
Plate Posted March 9, 2013 Posted March 9, 2013 No modificastes esto? addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(), function (theKiller) if (source == nemesi) then givePlayerMoney(theKiller,math.random(150000)) outputChatBox ( getPlayerName ( theKiller ) .. " #081DBFMato al Nemesis!, Ha Ganado 150.000$",getRootElement(), 255, 255, 255, true ) setTimer(Nemesisbymanawydan, 16000, 1) end end) PD: ponelo en lua no en Code A mi me anda bien Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Julian09123 Posted March 9, 2013 Author Posted March 9, 2013 Este es el Serverside: pero me da ese error el del post anterior dice en la console attemp to conectate a boolean value local hillArea = createColRectangle ( 2520.1318359375, -953.83752441406, 60, 60 ) local hillRadar = createRadarArea ( 2520.1318359375, -953.83752441406, 200, 200, 181, 0, 0, 255 ) function Nemesisbymanawydan ( ) baz = createObject ( 360, 2622.4934082031, -847.33459472656, 75.0484313964, 0, 0, 0 ) nemesi = exports [ "slothBot" ]:spawnBot ( 2622.4934082031, -847.33459472656, 75.048431396484, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) setElementModel ( nemesi, 107 ) outputChatBox ("#9E0000Nemesis: #0D9905Dale Perra Ven a Matarme...Si Puedes!",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, 1000) end, 1100, 0) end addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan) addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(), function (killer) if (source == nemesi) then givePlayerMoney(killer,math.random(150000)) -- 4000, 6000 money for kill nemesis-- outputChatBox ( getPlayerName ( killer ) .. " #081DBFMato al Nemesis!, Ha Ganado 150.000$",getRootElement(), 255, 255, 255, true ) setTimer(Nemesisbymanawydan, 6000, 1) -- 60000 time for nemesis respawn in milliseconds-- end end) Skype: Juliang09123
Plate Posted March 9, 2013 Posted March 9, 2013 local hillRadar = createRadarArea ( -2183.5678710938, 705.67950439453, 40, -40, 0, 255, 0, 175 ) function Nemesisbymanawydan ( ) baz = createObject ( 360, 2520.1318359375, -953.83752441406, 82.331726074219, 0, 0, 0 ) nemesi = exports [ "slothBot" ]:spawnBot ( 2520.1318359375, -953.83752441406, 82.331726074219, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) setElementModel ( nemesi, 107 ) outputChatBox ("#9E0000Nemesis: #0D9905Dale Perra Ven a Matarme...Si Puedes!",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, 1000) end, 1100, 0) end addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan) addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(), function (theKiller) if (source == nemesi) then givePlayerMoney(theKiller,math.random(150000)) outputChatBox ( getPlayerName ( theKiller ) .. " #081DBFMato al Nemesis!, Ha Ganado 150.000$",getRootElement(), 255, 255, 255, true ) setTimer(Nemesisbymanawydan, 16000, 1) end end) Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Julian09123 Posted March 9, 2013 Author Posted March 9, 2013 local hillRadar = createRadarArea ( -2183.5678710938, 705.67950439453, 40, -40, 0, 255, 0, 175 ) function Nemesisbymanawydan ( ) baz = createObject ( 360, 2520.1318359375, -953.83752441406, 82.331726074219, 0, 0, 0 ) nemesi = exports [ "slothBot" ]:spawnBot ( 2520.1318359375, -953.83752441406, 82.331726074219, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) setElementModel ( nemesi, 107 ) outputChatBox ("#9E0000Nemesis: #0D9905Dale Perra Ven a Matarme...Si Puedes!",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, 1000) end, 1100, 0) end addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan) addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(), function (theKiller) if (source == nemesi) then givePlayerMoney(theKiller,math.random(150000)) outputChatBox ( getPlayerName ( theKiller ) .. " #081DBFMato al Nemesis!, Ha Ganado 150.000$",getRootElement(), 255, 255, 255, true ) setTimer(Nemesisbymanawydan, 16000, 1) end end) Ahora si Pero otro Problema es Que no me aparece el Skin Modificado me aparece el normal.. y el otro es cuando muere el boss osea lo matan Se queda el triangulito y no se va. osea como q sigue vivo pero no esta solo esta el triangulito en el radar y se guardan cada vez q mato al boss Skype: Juliang09123
Plate Posted March 9, 2013 Posted March 9, 2013 function destroyMyBlip() if isElement(myBlip) then destroyElement(myBlip) end end addEvent("onBotWasted", true) addEventHandler("onBotWasted", getRootElement(), destroyMyBlip) Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
AlvareZ_ Posted March 9, 2013 Posted March 9, 2013 Intenta esto Para destruir el blip local hillRadar = createRadarArea ( -2183.5678710938, 705.67950439453, 40, -40, 0, 255, 0, 175 ) function Nemesisbymanawydan ( ) baz = createObject ( 360, 2520.1318359375, -953.83752441406, 82.331726074219, 0, 0, 0 ) nemesi = exports [ "slothBot" ]:spawnBot ( 2520.1318359375, -953.83752441406, 82.331726074219, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) setElementModel ( nemesi, 107 ) outputChatBox ("#9E0000Nemesis: #0D9905Dale Perra Ven a Matarme...Si Puedes!",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, 1000) end, 1100, 0) end addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan) addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(), function (theKiller) if (source == nemesi) then givePlayerMoney(theKiller,math.random(150000)) destroyElement(myBlip) outputChatBox ( getPlayerName ( theKiller ) .. " #081DBFMato al Nemesis!, Ha Ganado 150.000$",getRootElement(), 255, 255, 255, true ) setTimer(Nemesisbymanawydan, 16000, 1) end end)
Plate Posted March 9, 2013 Posted March 9, 2013 Es lo mismo men Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
NodZen Posted March 9, 2013 Posted March 9, 2013 Tienes que saber si no está el Boss entonces destruyes el blip. function otra () if ( not isElement ( nemesi ) ) then destroyElement( myBlip ) end end Algo asi. ------------------------------------------------------------------------------------------ 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
Julian09123 Posted March 9, 2013 Author Posted March 9, 2013 Ahora No me aparece el Area y el Skin Modificado tampoco. Pueden Arreglarmelo? y me dice Failed el Script wtf me lo pueden arreglar y Poner En Destroy Blip plz local hillRadar = createRadarArea ( 2520.1318359375, -953.83752441406, 200, 200, 181, 0, 0, 255 ) function Nemesisbymanawydan ( ) baz = createObject ( 360, 622.4934082031, -847.33459472656, 75.0484313964, 0, 0, 0 ) nemesi = exports [ "slothBot" ]:spawnBot ( 2622.4934082031, -847.33459472656, 75.048431396484, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) setElementModel ( nemesi, 107 ) outputChatBox ("#9E0000Nemesis: #0D9905Dale Perra Ven a Matarme...Si Puedes!",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, 1000) end, 1100, 0) end addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan) addEvent("onBotWasted", true) addEventHandler("onBotWasted", getRootElement) function (theKiller) if (source == nemesi) then givePlayerMoney(theKiller,math.random(150000)) outputChatBox ( getPlayerName ( theKiller ) .. " #081DBFMato al Nemesis!, Ha Ganado 150.000$",getRootElement(), 255, 255, 255, true ) setTimer(Nemesisbymanawydan, 16000, 1) function destroyMyBlip() if isElement(myBlip) then destroyElement(myBlip) end end() Skype: Juliang09123
NodZen Posted March 9, 2013 Posted March 9, 2013 local hillRadar = createRadarArea ( 2520.1318359375, -953.83752441406, 200, 200, 181, 0, 0, 255 ) function Nemesisbymanawydan ( ) baz = createObject ( 360, 622.4934082031, -847.33459472656, 75.0484313964, 0, 0, 0 ) nemesi = exports [ "slothBot" ]:spawnBot ( 2622.4934082031, -847.33459472656, 75.048431396484, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) setElementModel ( nemesi, 107 ) outputChatBox ("#9E0000Nemesis: #0D9905Dale Perra Ven a Matarme...Si Puedes!",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, 1000) end, 1100, 0) end addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan) addEvent("onBotWasted", true) addEventHandler("onBotWasted", getRootElement) function (theKiller) if (source == nemesi) then givePlayerMoney(theKiller,math.random(150000)) outputChatBox ( getPlayerName ( theKiller ) .. " #081DBFMato al Nemesis!, Ha Ganado 150.000$",getRootElement(), 255, 255, 255, true ) setTimer(Nemesisbymanawydan, 16000, 1) function destroy () if ( not isElement ( nemesi ) ) then destroyElement(myBlip) end end addEvent("onBotWasted", true) addEventHandler("onBotWasted", getRootElement(), destroy) ------------------------------------------------------------------------------------------ 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
Julian09123 Posted March 9, 2013 Author Posted March 9, 2013 NoD ahora me dice en la console ERROR: nemesi1/nemesi1.lua:19: "" expected near `<` Skype: Juliang09123
NodZen Posted March 9, 2013 Posted March 9, 2013 NoD ahora me dice en la console ERROR: nemesi1/nemesi1.lua:19: "" expected near `<` Si , porque no terminaste la funcion de la linea 19. ------------------------------------------------------------------------------------------ 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
Julian09123 Posted March 9, 2013 Author Posted March 9, 2013 NoD ahora me dice en la console ERROR: nemesi1/nemesi1.lua:19: "" expected near `<` Si , porque no terminaste la funcion de la linea 19. y que le tengo q hacer? Skype: Juliang09123
NodZen Posted March 9, 2013 Posted March 9, 2013 NoD ahora me dice en la console ERROR: nemesi1/nemesi1.lua:19: "" expected near `<` Si , porque no terminaste la funcion de la linea 19. y que le tengo q hacer? Agregale un evento como "onBotWasted". ------------------------------------------------------------------------------------------ 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
Julian09123 Posted March 9, 2013 Author Posted March 9, 2013 un Evento? o como nose Skype: Juliang09123
NodZen Posted March 9, 2013 Posted March 9, 2013 local hillRadar = createRadarArea ( 2520.1318359375, -953.83752441406, 200, 200, 181, 0, 0, 255 ) function Nemesisbymanawydan ( ) baz = createObject ( 360, 622.4934082031, -847.33459472656, 75.0484313964, 0, 0, 0 ) nemesi = exports [ "slothBot" ]:spawnBot ( 2622.4934082031, -847.33459472656, 75.048431396484, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) setElementModel ( nemesi, 107 ) outputChatBox ("#9E0000Nemesis: #0D9905Dale Perra Ven a Matarme...Si Puedes!",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, 1000) end, 1100, 0) end addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan) addEvent("onBotWasted", true) addEventHandler("onBotWasted", getRootElement) function money (theKiller) if (source == nemesi) then givePlayerMoney(theKiller,math.random(150000)) outputChatBox ( getPlayerName ( theKiller ) .. " #081DBFMato al Nemesis!, Ha Ganado 150.000$",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) ------------------------------------------------------------------------------------------ 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
Julian09123 Posted March 9, 2013 Author Posted March 9, 2013 No saco el Blip Sigue hay bueh no importa pero mira El mismo script hay un skin Y No sale en el server el boss con el skin Skype: Juliang09123
NodZen Posted March 9, 2013 Posted March 9, 2013 No saco el Blip Sigue hay bueh no importa pero miraEl mismo script hay un skin Y No sale en el server el boss con el skin Deberia funcionar. El tema del skin, es que este script es server y el engineLoad es client. ------------------------------------------------------------------------------------------ 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