Narutimmy Posted February 17, 2013 Share Posted February 17, 2013 Hoal lo que pasa es que uso el exp_system pero los niveles estan masl, osea aonque no alcanses la exp necesaria subes de nivel function dxsetText ( ) local text = "" local UP = tonumber ( getElementData ( localPlayer, "level" ) ) or 0 if ( UP == 1 ) then text = " /110" elseif ( UP == 2 ) then text = " /160" elseif ( UP == 3 ) then text = " /250" elseif ( UP == 4 ) then text = " /500" elseif ( UP == 5 ) then text = " /2000" elseif ( UP == 6 ) then text = " /4000" elseif ( UP == 7 ) then text = " /8000" elseif ( UP == 8 ) then text = " /12000" elseif ( UP == 9 ) then text = " /16000" elseif ( UP == 10 ) then text = " /20000" elseif ( UP == 11 ) then text = " /24000" elseif ( UP == 12 ) then text = " /28000" elseif ( UP == 13 ) then text = " /32000" elseif ( UP == 14 ) then text = " /36000" elseif ( UP == 15 ) then text = " /40000" elseif ( UP == 16 ) then text = " /44000" elseif ( UP == 17 ) then text = " /48000" elseif ( UP == 18 ) then text = " /52000" elseif ( UP == 19 ) then text = " /56000" elseif ( UP == 20 ) then text = " /66000" elseif ( UP == 21 ) then text = " /78000" elseif ( UP == 22 ) then text = " /87000" elseif ( UP == 23 ) then text = " /99000" elseif ( UP == 24 ) then text = " /110000" elseif ( UP == 25 ) then text = " /119000" elseif ( UP == 26 ) then text = " /127000" elseif ( UP == 27 ) then text = " /139000" elseif ( UP == 28 ) then text = " /148000" elseif ( UP == 29 ) then text = " /156000" elseif ( UP == 30 ) then text = " /166000" elseif ( UP == 31 ) then text = " /179000" elseif ( UP == 32 ) then text = " /187000" elseif ( UP == 33 ) then text = " /198000" elseif ( UP == 34 ) then -- aca pone el nivel que necesita para que le aparesca el texto text = " /225000" -- aca pone la experiencia que necesita para subir de nivel elseif ( UP == 35 ) then text = " /250000" elseif ( UP == 36 ) then text = " /280000" elseif ( UP == 37 ) then text = " /340000" elseif ( UP == 38 ) then text = " /420000" elseif ( UP == 39 ) then text = " /500000" elseif ( UP == 40 ) then text = " /600000" elseif ( UP == 41 ) then text = " /720000" elseif ( UP == 42 ) then text = " /830000" elseif ( UP == 43 ) then text = " /1000000" elseif ( UP == 44 ) then text = " /1200000" elseif ( UP == 45 ) then text = " /1500000" elseif ( UP == 46 ) then text = " /2000000" elseif ( UP == 47 ) then text = " /2700000" elseif ( UP == 48 ) then text = " /3500000" elseif ( UP == 49 ) then text = " /4000000" elseif ( UP == 50 ) then text = " /7000000" elseif ( UP == 51 ) then text = " /20000000000" end GUIEditor_Label[5] = guiCreateLabel(706,159,63,13,text,false) guiSetFont ( GUIEditor_Label[5], "default-bold-small" ) end addEventHandler ( "onClientResourceStart", resourceRoot, dxsetText ) addEventHandler ( "onClientElementDataChange", localPlayer, function ( dataName ) if ( dataName == "level" ) then dxsetText ( ) end end ) ---2 addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) GUIEditor_Label = { } GUIEditor_Label[1] = guiCreateLabel(624,135,66,14,"Level:",false) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Label[3] = guiCreateLabel(691,138,83,15,"Exp:",false) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Label[2] = guiCreateLabel(625,153,53,43, tostring ( getElementData ( localPlayer, "level" ) ),false) guiSetFont ( GUIEditor_Label[2], "sa-header" ) GUIEditor_Label[4] = guiCreateLabel(679,159,49,14, tostring ( getElementData ( localPlayer, "exp" ) ),false) guiSetFont ( GUIEditor_Label[4], "default-bold-small" ) end ) addEventHandler ( "onClientElementDataChange", localPlayer, function ( dataName ) if ( dataName == "level" ) then guiSetText ( GUIEditor_Label[2], tostring ( getElementData ( localPlayer, "level" ) ) ) elseif ( dataName == "exp" ) then guiSetText ( GUIEditor_Label[4], tostring ( getElementData ( localPlayer, "exp" ) ) ) end end ) setTimer(dataName,60000,0,source, true) function dxsetText ( ) local text = "" local UP = tonumber ( getElementData ( localPlayer, "level" ) ) or 0 if ( UP == 1 ) then text = " /110" elseif ( UP == 2 ) then text = " /160" elseif ( UP == 3 ) then text = " /250" elseif ( UP == 4 ) then text = " /500" elseif ( UP == 5 ) then text = " /2000" elseif ( UP == 6 ) then text = " /4000" elseif ( UP == 7 ) then text = " /8000" elseif ( UP == 8 ) then text = " /12000" elseif ( UP == 9 ) then text = " /16000" elseif ( UP == 10 ) then text = " /20000" elseif ( UP == 11 ) then text = " /24000" elseif ( UP == 12 ) then text = " /28000" elseif ( UP == 13 ) then text = " /32000" elseif ( UP == 14 ) then text = " /36000" elseif ( UP == 15 ) then text = " /40000" elseif ( UP == 16 ) then text = " /44000" elseif ( UP == 17 ) then text = " /48000" elseif ( UP == 18 ) then text = " /52000" elseif ( UP == 19 ) then text = " /56000" elseif ( UP == 20 ) then text = " /66000" elseif ( UP == 21 ) then text = " /78000" elseif ( UP == 22 ) then text = " /87000" elseif ( UP == 23 ) then text = " /99000" elseif ( UP == 24 ) then text = " /110000" elseif ( UP == 25 ) then text = " /119000" elseif ( UP == 26 ) then text = " /127000" elseif ( UP == 27 ) then text = " /139000" elseif ( UP == 28 ) then text = " /148000" elseif ( UP == 29 ) then text = " /156000" elseif ( UP == 30 ) then text = " /166000" elseif ( UP == 31 ) then text = " /179000" elseif ( UP == 32 ) then text = " /187000" elseif ( UP == 33 ) then text = " /198000" elseif ( UP == 34 ) then -- aca pone el nivel que necesita para que le aparesca el texto text = " /225000" -- aca pone la experiencia que necesita para subir de nivel elseif ( UP == 35 ) then text = " /250000" elseif ( UP == 36 ) then text = " /280000" elseif ( UP == 37 ) then text = " /340000" elseif ( UP == 38 ) then text = " /420000" elseif ( UP == 39 ) then text = " /500000" elseif ( UP == 40 ) then text = " /600000" elseif ( UP == 41 ) then text = " /720000" elseif ( UP == 42 ) then text = " /830000" elseif ( UP == 43 ) then text = " /1000000" elseif ( UP == 44 ) then text = " /1200000" elseif ( UP == 45 ) then text = " /1500000" elseif ( UP == 46 ) then text = " /2000000" elseif ( UP == 47 ) then text = " /2700000" elseif ( UP == 48 ) then text = " /3500000" elseif ( UP == 49 ) then text = " /4000000" elseif ( UP == 50 ) then text = " /7000000" elseif ( UP == 51 ) then text = " /20000000000" end GUIEditor_Label[5] = guiCreateLabel(706,159,63,13,text,false) guiSetFont ( GUIEditor_Label[5], "default-bold-small" ) end addEventHandler ( "onClientResourceStart", resourceRoot, dxsetText ) addEventHandler ( "onClientElementDataChange", localPlayer, function ( dataName ) if ( dataName == "level" ) then dxsetText ( ) end end ) ---2 addEventHandler ( "onClientResourceStart", resourceRoot, function ( ) GUIEditor_Label = { } GUIEditor_Label[1] = guiCreateLabel(624,135,66,14,"Level:",false) guiSetFont(GUIEditor_Label[1],"default-bold-small") GUIEditor_Label[3] = guiCreateLabel(691,138,83,15,"Exp:",false) guiSetFont(GUIEditor_Label[3],"default-bold-small") GUIEditor_Label[2] = guiCreateLabel(625,153,53,43, tostring ( getElementData ( localPlayer, "level" ) ),false) guiSetFont ( GUIEditor_Label[2], "sa-header" ) GUIEditor_Label[4] = guiCreateLabel(679,159,49,14, tostring ( getElementData ( localPlayer, "exp" ) ),false) guiSetFont ( GUIEditor_Label[4], "default-bold-small" ) end ) addEventHandler ( "onClientElementDataChange", localPlayer, function ( dataName ) if ( dataName == "level" ) then guiSetText ( GUIEditor_Label[2], tostring ( getElementData ( localPlayer, "level" ) ) ) elseif ( dataName == "exp" ) then guiSetText ( GUIEditor_Label[4], tostring ( getElementData ( localPlayer, "exp" ) ) ) end end ) setTimer(dataName,60000,0,source, true) Link to comment
Narutimmy Posted February 17, 2013 Author Share Posted February 17, 2013 postea tu levels.xml "1" experienceRequired = "5" /> "2" experienceRequired = "110" /> "3" experienceRequired = "160" /> "4" experienceRequired = "250" /> "5" experienceRequired = "500" /> "6" experienceRequired = "2000" /> "7" experienceRequired = "4000" /> "8" experienceRequired = "8000" /> "9" experienceRequired = "12000" /> "10" experienceRequired = "16000" /> "11" experienceRequired = "20000" /> "12" experienceRequired = "24000" /> "13" experienceRequired = "28000" /> "14" experienceRequired = "32000" /> "15" experienceRequired = "36000" /> "16" experienceRequired = "40000" /> "17" experienceRequired = "44000" /> "18" experienceRequired = "48000" /> "19" experienceRequired = "52000" /> "20" experienceRequired = "56000" /> "21" experienceRequired = "66000" /> "22" experienceRequired = "78000" /> "23" experienceRequired = "87000" /> "24" experienceRequired = "99000" /> "25" experienceRequired = "110000" /> "26" experienceRequired = "119000" /> "27" experienceRequired = "127000" /> "28" experienceRequired = "139000" /> "29" experienceRequired = "148000" /> "30" experienceRequired = "156000" /> "31" experienceRequired = "166000" /> "32" experienceRequired = "179000" /> "33" experienceRequired = "187000" /> "34" experienceRequired = "198000" /> "35" experienceRequired = "209000" /> "36" experienceRequired = "225000" /> "37" experienceRequired = "250000" /> "38" experienceRequired = "300000" /> "39" experienceRequired = "380000" /> "40" experienceRequired = "500000" /> "41" experienceRequired = "600000" /> "42" experienceRequired = "720000" /> "43" experienceRequired = "830000" /> "44" experienceRequired = "1000000" /> "45" experienceRequired = "1200000" /> "46" experienceRequired = "1500000" /> "47" experienceRequired = "2000000" /> "48" experienceRequired = "2700000" /> "49" experienceRequired = "3500000" /> "50" experienceRequired = "4000000" /> "51" experienceRequired = "7000000" /> Nose porque pegue lo mismo 2 veces Link to comment
Arsilex Posted February 17, 2013 Share Posted February 17, 2013 yo creo que te equivocaste tu ya que para nivel 1 necesitas 5 de exp no 110 Link to comment
Narutimmy Posted February 17, 2013 Author Share Posted February 17, 2013 yo creo que te equivocaste tu ya que para nivel 1 necesitas 5 de exp no 110 Ok, voy a intentar como dices, esque segun yo asi en el primero esra solo para mostrar cuanto te falta Link to comment
Narutimmy Posted February 18, 2013 Author Share Posted February 18, 2013 yo creo que te equivocaste tu ya que para nivel 1 necesitas 5 de exp no 110 Gracias ya funciona bien jeje >.< Link to comment
Recommended Posts