Jump to content

Ayuda con esto


Plate

Recommended Posts

Posted

Hola tengo un problema con esto lo que pasa es que yo mato a un bot y la columna "EXP" queda en 0 y la otra cosa es que tampoco sube el level

function LVL(ammo, killer, weapon, bodypart) 
        local exp = getElementData(killer, "EXP") 
        local lvl = getElementData(killer, "Level") 
        setElementData(killer, "EXP", tonumber(exp)+10) 
        triggerClientEvent ( killer, "playSound" , killer ) 
        if levels[tonumber(exp)] then 
            setElementData(killer, "Level", "Level ".. levels[tonumber(exp)] .." !") 
            triggerClientEvent ( killer, "LevelUP" , killer ) 
        end 
    end 
end 
addEventHandler( "onBotWasted", getRootElement(), LvL) 
 function respawn ( ) 
    setElementData ( source, "Level", 0 ) 
    setElementData ( source, "EXP", 0 ) 
end 
addEventHandler ( "onPlayerJoin", getRootElement(), respawn ) 

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

Pone:

addEvent ( "onBotWasted", true ) 

ademas del addEventHandler.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

El primer argumento de "onBotWasted" es el que lo mato, no la municion.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Lo puse asi

  
function LVL(killer, ammo, weapon, bodypart) 

y sigue sin andar

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted
local levels = {[250] = 1, [400] = 2, [1000] = 3, [1250] = 4, [1750] = 5, [2518] = 6, [3000] = 7, [3740] = 8, [4000] = 9, [4315] = 10, [4980] = 11, [5318] = 12} 

me faltan muchos mas

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

  • Recently Browsing   0 members

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