Hukaeshi Posted November 5, 2018 Share Posted November 5, 2018 Hola mi problema es que no puedo usar la funcion de createexplosion, quiero que cuando muera mi bot, aparesca una explosion. local hillRadar = createRadarArea ( 1666.548828125, -1057.265625, 0, 0, 0, 0, 0, 255 ) function Nemesisbymanawydan ( ) nemesi = exports [ "slothBot" ]:spawnBot ( 1666.548828125, -1057.265625, 23.8984375, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 34, "hunting", true ) setElementModel ( nemesi, 310 ) outputChatBox ("#FF0000BOSS: #00FF22El Boss Sniper ha vuelto a la vida. en la Ciudad #FF0000 Los Santos",getRootElement(), 255, 255, 255, true ) outputChatBox ("#F7FF00$15.000 como recompenza al matarlo!",getRootElement(), 255, 255, 255, true ) local myBlip = (createBlipAttachedTo ( nemesi, 23 )) attachElements ( baz, nemesi, 0.2, 0.1, 0.5, 0, 90, 0 ) triggerClientEvent ( "nsound", root ) setElementData(Nemesisbymanawydan, "nemesi",true) setTimer( function() exports.extra_health:setElementExtraHealth(nemesi, 500) end, 100, 100) end addEventHandler("onResourceStart", resourceRoot, Nemesisbymanawydan) addEvent("onBotWasted", true) addEventHandler("onBotWasted", getRootElement) function money (theKiller) if (source == nemesi) then givePlayerMoney(theKiller,math.random(1500)) outputChatBox("#FF0000BOSS: #F7FF00".. getPlayerName ( theKiller ) .." #00FF22ha matado al #FF0000Boss Sniper, #00FF22ha ganado $15.000 como recompenza.",player,255, 255, 255, true) setTimer(Nemesisbymanawydan, 16000, 1) end end addEvent("onBotWasted", true) addEventHandler("onBotWasted", getRootElement(), money) addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(), function () if (source == nemesi) then destroyElement(myBlip) end Link to comment
root. Posted January 24, 2019 Share Posted January 24, 2019 (edited) explosiontype = 6 createExplosion (x,y,z, explosiontype, elemento) https://wiki.multitheftauto.com/wiki/CreateExplosion 0: Grenade 1: Molotov 2: Rocket 3: Rocket Weak 4: Car 5: Car Quick 6: Boat 7: Heli 8: Mine 9: Object 10: Tank Grenade 11: Small 12: Tiny Edited January 24, 2019 by Rut Link to comment
Alexs Posted January 25, 2019 Share Posted January 25, 2019 (edited) Prueba con reemplazar las líneas 30 a la 35 con esto: addEventHandler("onBotWasted", root, function () if (source == nemesi) then local x, y, z = getElementPosition(source) createExplosion(x, y, z, 9) destroyElement(myBlip) end end ) Edited January 25, 2019 by Alexs Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now