Hukaeshi Posted January 3, 2018 Share Posted January 3, 2018 (edited) Bueno el problema es que cuando el boss muere, no se desaparece el blip queda ahi, Entonces lo que yo quiero hacer es que al momento de que el boss muera el blip desaparesca. 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 end ) Lo tengo en lado Server Edited January 3, 2018 by Hukaeshi Link to comment
Hukaeshi Posted January 3, 2018 Author Share Posted January 3, 2018 Ya lo puse solucionar pero como puedo hacer para que el Boss que hise mate de un tiro con el sniper, que el solo pueda Link to comment
Melbourne Posted January 3, 2018 Share Posted January 3, 2018 Agrega esto en la función del boss(Nemesisbymanawydan) triggerClientEvent ( root, "onNemesiSpawn", root, nemesi ) Luego en el archivo client agregas esto: addEvent("onNemesiSpawn", true) addEventHandler("onNemesiSpawn", root, function( ped ) addEventHandler("onClientPlayerDamage", root, function( attacker, wep ) if ( attacker and attacker == ped and wep == 34 ) then setElementHealth( source, 0 ) end end ) end ) No estoy seguro de que funcione ya que no lo he probado, pero pruébalo a ver como va. Link to comment
Hukaeshi Posted January 3, 2018 Author Share Posted January 3, 2018 (edited) Funsiono Edited January 3, 2018 by Hukaeshi 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