Plate Posted June 24, 2013 Posted June 24, 2013 Pero para que no te reinicie los kills Por que no lo probas
XxRomxX Posted June 25, 2013 Author Posted June 25, 2013 me sale de error: ERROR: Nemesis\boss.lua:13: attempt to perform arithmetic on local 'kills'
XxRomxX Posted June 25, 2013 Author Posted June 25, 2013 unction BossNemesis ( thePlayer ) x,y,z = getElementPosition( thePlayer ) nemesi = exports [ "slothBot" ]:spawnBot ( x+1,y+1,z+0.5, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) exports.extra_health:setElementExtraHealth(nemesi, 150) setElementModel(nemesi, 107) end addCommandHandler("nemesis",BossNemesis) function money (theKiller) if (source == nemesi) then local kills = getElementData ( theKiller, "Zombie kills" ) setElementData ( theKiller, "Zombie kills", kills +25) givePlayerMoney( theKiller, 10000) end end addEvent("onBotWasted", true) addEventHandler("onBotWasted", getRootElement(), money)
StanMarsh Posted June 25, 2013 Posted June 25, 2013 unction BossNemesis ( thePlayer ) x,y,z = getElementPosition( thePlayer ) nemesi = exports [ "slothBot" ]:spawnBot ( x+1,y+1,z+0.5, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) exports.extra_health:setElementExtraHealth(nemesi, 150) setElementModel(nemesi, 107) end addCommandHandler("nemesis",BossNemesis) function money (theKiller) if (source == nemesi) then local kills = getElementData ( theKiller, "Zombie kills" ) setElementData ( theKiller, "Zombie kills", kills +25) givePlayerMoney( theKiller, 10000) end end addEvent("onBotWasted", true) addEventHandler("onBotWasted", getRootElement(), money) te equivocaste en la linea 1 unction BossNemesis ( thePlayer ) te falto una "F"
Castillo Posted June 25, 2013 Posted June 25, 2013 function BossNemesis ( thePlayer ) local x, y, z = getElementPosition ( thePlayer ) nemesi = exports [ "slothBot" ]:spawnBot ( x+1,y+1,z+0.5, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) exports.extra_health:setElementExtraHealth ( nemesi, 150 ) setElementModel ( nemesi, 107 ) end addCommandHandler ( "nemesis",BossNemesis ) function money ( theKiller ) if ( source == nemesi ) then if ( getElementType ( theKiller ) == "player" ) then local kills = tonumber ( getElementData ( theKiller, "Zombie kills" ) ) or 0 setElementData ( theKiller, "Zombie kills", ( kills + 25 ) ) givePlayerMoney ( theKiller, 10000 ) end end end addEvent ( "onBotWasted", true ) addEventHandler ( "onBotWasted", getRootElement(), money )
StanMarsh Posted June 25, 2013 Posted June 25, 2013 Me Sigue Saliendo ese Error ._. function BossNemesis ( thePlayer ) x,y,z = getElementPosition( thePlayer ) nemesi = exports [ "slothBot" ]:spawnBot ( x+1,y+1,z+0.5, 90, math.random ( 300, 303 ), 0, 0, Nemesis, 38, "hunting", true ) exports.extra_health:setElementExtraHealth(nemesi, 150) setElementModel(nemesi, 107) end addCommandHandler("nemesis",BossNemesis) function money (theKiller) if (source == nemesi) then local kills = getElementData ( theKiller, "Zombie kills" ) setElementData ( theKiller, "Zombie kills", kills + 25) givePlayerMoney( theKiller, 10000) outputChatBox ( getPlayerName ( theKiller ) .. " #081DBFHa Matado Ha Nemesis :3 , Se Cree Muy Prah!",getRootElement(), 255, 255, 255, true ) end end addEvent("onBotWasted", true) addEventHandler("onBotWasted", getRootElement(), money) me sale el error pero me sirve me da las kills extra
Recommended Posts