Jump to content

[Ayuda]Respawn Slothbot


Narutimmy

Recommended Posts

Hola bueno, me pasaron este scrip y lo fucione con el mio, y lo que pasa es que al matar x cantidad que yo ponga de zombis spawnea un boss, se crea un blip y ok todo bien, pero cuando muere el blip no desaparece, y ademas aonque vuelvas a matar zombis... ya no no respawnea :/

local colshape = createColRectangle ( 93, 1789, 300, 300 ) 
zombiesMatados = 50 
function zona ( ) 
    if ( isElementWithinColShape ( source, colshape ) ) then 
zombiesMatados = ( zombiesMatados + 1 ) 
if ( zombiesMatados == 1 ) then -- ACA DONDE DICE =1 pone la cantidad de zombies que tienen que matar para que aparesca 
if ( not isElement ( slothbot1 ) ) then 
        slothbot1 = exports [ "slothbot" ]:spawnBot ( 249.3880, 1827.0281, 8, 90, 33, 0, 0, ex, 38, "hunting", true ) 
        exports.extra_health:setElementExtraHealth ( slothbot1, 7500 ) 
outputChatBox ( "#ff0000Nemesis: #eeff00S.T.A.R.S!!!", getRootElement(), 255, 255, 255, true ) 
triggerClientEvent ( "playTheSound", root ) 
onZomieWasted = 75 
myBlip = createBlipAttachedTo ( slothbot1, 23 ) 
         end 
      end 
   end 
end 
addEvent ( "onZombieWasted", true ) 
addEventHandler ( "onZombieWasted", getRootElement(), zona ) 
  
  
  
     
  
---Dinero 
addEvent ( "onBotWasted", true ) 
addEventHandler ( "onBotWasted", root, 
function( theKiller) 
    exports.exp_system:addPlayerEXP ( theKiller, 5000 ) 
    givePlayerMoney ( theKiller, 100000 ) 
    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
Hay algo que està mal. Ese es el script completo?

justo asi :

local colshape = createColRectangle ( 93, 1789, 300, 300 ) 
zombiesMatados = 0 
function zona ( ) 
    if ( isElementWithinColShape ( source, colshape ) ) then 
zombiesMatados = ( zombiesMatados + 1 ) 
if ( zombiesMatados == 50 ) then -- ACA DONDE DICE =1 pone la cantidad de zombies que tienen que matar para que aparesca 
if ( not isElement ( slothbot1 ) ) then 
        slothbot1 = exports [ "slothbot" ]:spawnBot ( 249.3880, 1827.0281, 8, 90, 33, 0, 0, ex, 38, "hunting", true ) 
        exports.extra_health:setElementExtraHealth ( slothbot1, 7500 ) 
outputChatBox ( "#ff0000Nemesis: #eeff00S.T.A.R.S!!!", getRootElement(), 255, 255, 255, true ) 
triggerClientEvent ( "playTheSound", root ) 
onZomieWasted = 75 
myBlip = createBlipAttachedTo ( slothbot1, 23 ) 
         end 
      end 
   end 
end 
addEvent ( "onZombieWasted", true ) 
addEventHandler ( "onZombieWasted", getRootElement(), zona ) 
  
  
---Dinero 
addEvent ( "onBotWasted", true ) 
addEventHandler ( "onBotWasted", root, 
function( theKiller) 
    exports.exp_system:addPlayerEXP ( theKiller, 5000 ) 
    givePlayerMoney ( theKiller, 100000 ) 
    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 
) 
  

si funciona pero pues solo la primera ves, lo matan y ya no sale mas

Link to comment

Y asi?

local colshape = createColRectangle ( 93, 1789, 300, 300 ) 
zombiesMatados = 50 
function zona ( ) 
    if ( isElementWithinColShape ( source, colshape ) ) then 
zombiesMatados = ( zombiesMatados + 1 ) 
if ( zombiesMatados == 1 ) then -- ACA DONDE DICE =1 pone la cantidad de zombies que tienen que matar para que aparesca 
if ( not isElement ( slothbot1 ) ) then 
        slothbot1 = exports [ "slothbot" ]:spawnBot ( 249.3880, 1827.0281, 8, 90, 33, 0, 0, ex, 38, "hunting", true ) 
        exports.extra_health:setElementExtraHealth ( slothbot1, 7500 ) 
outputChatBox ( "#ff0000Nemesis: #eeff00S.T.A.R.S!!!", getRootElement(), 255, 255, 255, true ) 
triggerClientEvent ( "playTheSound", root ) 
onZomieWasted = 75 
myBlip = createBlipAttachedTo ( slothbot1, 23 ) 
         end 
      end 
   end 
end 
addEvent ( "onZombieWasted", true ) 
addEventHandler ( "onZombieWasted", getRootElement(), zona ) 
  
  
  
    
  
---Dinero 
addEvent ( "onBotWasted", true ) 
addEventHandler ( "onBotWasted", root, 
function( theKiller) 
    exports.exp_system:addPlayerEXP ( theKiller, 5000 ) 
    givePlayerMoney ( theKiller, 100000 ) 
    zombiesMatados = 0 
    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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...