Plate Posted July 17, 2012 Posted July 17, 2012 Holas! como se podria hacer para que un blip siga a un slothbot Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Plate Posted July 17, 2012 Author Posted July 17, 2012 Gracias ya lo termine y funciona Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Plate Posted July 18, 2012 Author Posted July 18, 2012 Y estoy tratando de crear un systema de Rangos que me pidieron los usuarios de mi server esto esta bien? exports.["scoreboard"]:addScoreboardColumn('Rango') function rango() local lvl = exports.exp_system:getPlayerLevel(source) if lvl >= 1 then setElementData("Rango","nuevo") local lvl2 = exports.exp_system:getPlayerLevel(source) if lvl2 >= 4 then setElementData("Rango","Killer") end end end addEvent("onPlayerChangeLevel") addEventHandler("onPlayerChangeLevel",getRootElement(),rango) me podrias decir que esta mal? Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Alexs Posted July 18, 2012 Posted July 18, 2012 exports.["scoreboard"]:addScoreboardColumn('Rango') function rango(antes, ahora) if ahora >= 1 then setElementData(source,"Rango","nuevo") elseif ahora >= 4 then setElementData(source,"Rango","Killer") end end addEventHandler("onPlayerChangeLevel",getRootElement(),rango) Developer @ MYVAL
Plate Posted July 18, 2012 Author Posted July 18, 2012 Funciona pero siempre queda en nuevo Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
JuanM27 Posted July 18, 2012 Posted July 18, 2012 Funciona pero siempre queda en nuevo por que estas comprobando mal exports.["scoreboard"]:addScoreboardColumn('Rango') function rango(antes, ahora) if ahora >= 1 then setElementData(source,"Rango","nuevo") elseif ahora >= 4 then setElementData(source,"Rango","Killer") end end addEventHandler("onPlayerChangeLevel",getRootElement(),rango) por exports.["scoreboard"]:addScoreboardColumn('Rango') function rango(antes, ahora) if ahora <= 3 then -- menor o igual a 3 setElementData(source,"Rango","nuevo") elseif ahora >= 4 then -- igual o mayor a 4 setElementData(source,"Rango","Killer") end end addEventHandler("onPlayerChangeLevel",getRootElement(),rango)
Plate Posted July 18, 2012 Author Posted July 18, 2012 Si pero no obtiene el nivel del jugador osea con el getPlayerLevel Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Alexs Posted July 18, 2012 Posted July 18, 2012 antes y ahora son los argumentos del nivel anterior y el actual, estan en el evento Developer @ MYVAL
Plate Posted July 18, 2012 Author Posted July 18, 2012 Todabia no funciona Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
JuanM27 Posted July 18, 2012 Posted July 18, 2012 Si pero no obtiene el nivel del jugador osea con el getPlayerLevel segun la wiki Exp_system dice addCommandHandler ( "mylevel", function ( thePlayer ) local myExp = exports.exp_system:getPlayerLevel ( thePlayer ) outputChatBox ( "Your level is: ".. myLevel, thePlayer ) end ) por lo tanto a tu scrip le tenes que agregar getPlayerLevel proba asi exports.["scoreboard"]:addScoreboardColumn('Rango') function rango() local ahora = exports.exp_system:getPlayerLevel ( source ) if ahora <= 3 then -- menor o igual a 3 setElementData(source,"Rango","nuevo") elseif ahora >= 4 then -- igual o mayor a 4 setElementData(source,"Rango","Killer") end end addEventHandler("onPlayerChangeLevel",getRootElement(),rango)
Plate Posted July 18, 2012 Author Posted July 18, 2012 si justo habia agregado eso y despues de poner el post :B perdon Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Recommended Posts