Plate Posted February 11, 2013 Posted February 11, 2013 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
Castillo Posted February 11, 2013 Posted February 11, 2013 Pone: addEvent ( "onBotWasted", true ) ademas del addEventHandler. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Plate Posted February 11, 2013 Author Posted February 11, 2013 Me sigue diciendo 0 Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Castillo Posted February 11, 2013 Posted February 11, 2013 El primer argumento de "onBotWasted" es el que lo mato, no la municion. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Plate Posted February 11, 2013 Author Posted February 11, 2013 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
Plate Posted February 12, 2013 Author Posted February 12, 2013 Alguien va a contestar esto? Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Alexs Posted February 12, 2013 Posted February 12, 2013 Solo de curiosidad, postea la tabla 'levels'. Developer @ MYVAL
Plate Posted February 12, 2013 Author Posted February 12, 2013 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
Recommended Posts