Narutimmy Posted February 3, 2013 Share Posted February 3, 2013 Hola lo que pasa esque tengo este scrip, y los usuarios se quejan de que aonque el boss no este si saltan de un lugar mueren, alex me dijo que faltaba agregar una linea que compruebe si lo ataco o no pero nose como Otra cosa, yo tengo 2 Sloth Bot pero quiero que den diferente recompensa (Dinero, Exp) comoago eso? Sv --Tyrant local colshape2 = createColRectangle ( -1986.3155, 639.1424, 100, 100 ) zombiesMatados = 0 function zona2 ( ) if ( isElementWithinColShape ( source, colshape2 ) ) then zombiesMatados = ( zombiesMatados + 1 ) if ( zombiesMatados == 300 ) then -- ACA DONDE DICE =1 pone la cantidad de zombies que tienen que matar para que aparesca if ( not isElement ( tyrant ) ) then tyrant = exports [ "slothbot" ]:spawnBot ( -2000, 730, 46, 90, 146, 0, 0, ex, 0, "hunting", true ) exports.extra_health:setElementExtraHealth ( tyrant, 50000 ) setGameSpeed ( tyrant, 5) outputChatBox ( "#ff0000Tyrant a Spawneado, Corre!", getRootElement(), 255, 255, 255, true ) onZomieWasted = 75 myBlip2 = createBlipAttachedTo ( tyrant, 23 ) end end end end addEvent ( "onZombieWasted", true ) addEventHandler ( "onZombieWasted", getRootElement(), zona2 ) function bot ( attacker ) if attacker == tyrant then --Creo que 'tyrant' es la variable de tu 'BOSS' killPed ( source, attacker ) end end addEventHandler("onPlayerDamage", getRootElement(), bot) ---Dinero addEvent ( "onBotWasted", true ) addEventHandler ( "onBotWasted", root, function( theKiller) exports.exp_system:addPlayerEXP ( theKiller, 50000 ) destroyElement(myBlip2) givePlayerMoney ( theKiller, 1000000 ) local r,g,b = getPlayerNametagColor ( theKiller ) --get the player's nametag colour local chatterName = getPlayerName ( theKiller ) outputChatBox ( chatterName.." #FF0000ha matado a un BOSS!!! *", getRootElement(), r, g, b, true ) end ) Link to comment
NodZen Posted February 3, 2013 Share Posted February 3, 2013 function boss ( attacker ) if ( getElementType ( attacker ) == "ped" ) then Agrega eso, es para saber que si te atacò un ped , entonces haces lo otro. Link to comment
Plate Posted February 4, 2013 Share Posted February 4, 2013 Depende narutimmy si lo queres hacer por skin o por otra cosa Link to comment
Narutimmy Posted February 4, 2013 Author Share Posted February 4, 2013 Depende narutimmy si lo queres hacer por skin o por otra cosa como por skin? Link to comment
Plate Posted February 4, 2013 Share Posted February 4, 2013 creo que era local colshape = createColRectangle ( 103.88594818115, 1302.0729980469, 220, 200 ) -- estas son las coordenadas donde se va a crear el boss para cambiarlas solamente copien la posicion x e y de su admin panel zombiesMatados = 0 function zona ( ) if ( isElementWithinColShape ( source, colshape ) ) then zombiesMatados = ( zombiesMatados + 1 ) if ( zombiesMatados == 1 ) then if ( not isElement ( slothbot1 ) ) then slothbot1 = exports [ "slothbot" ]:spawnBot ( 111.79273223877, 1336.3046875, 10.5859375, 90, math.random(300, 302), 0, 0, ex, 38, "hunting", true ) myBlip = createBlipAttachedTo ( slothbot1, 23 ) local id = getElementModel ( slothbot1 ) if id == 300 then exports.extra_health:setElementExtraHealth(solthbot1, 400) outputChatBox("[bOSS]:Boss high spawned", getRootElement(), 155, 155, 155, false) elseif id == 301 then exports.extra_health:setElementExtraHealth(slothbot1, 7500) outputChatBox("[bOSS]:Boss medium spawned", getRootElement(), 155, 155, 155, false) elseif id == 302 then exports.extra_health:setElementExtraHealth(slothbot1, 5000) outputChatBox("[bOSS]:Boss low spawned", getRootElement(), 155, 155, 155, false) end end end end end addEventHandler ( "onZombieWasted", getRootElement(), zona ) addEventHandler("onBotSpawn",getRootElement(),zona) fijate los models y cambialos a tu gusto Link to comment
Recommended Posts