Jump to content

[Ayuda] No Level UP


Narutimmy

Recommended Posts

Hola bueno me pasaron este scrip, es de @plata me parece pero... me marca la exp y un nivel pero ejemplo me pone Nivel 13 Exp: 161000/28000

function dxsetText ( ) 
    local text = "" 
    local UP = tonumber ( getElementData ( localPlayer, "level" ) ) or 0 
    if ( UP == 1 ) then 
        text = "  /60" 
    elseif ( UP == 2 ) then 
        text = "  /110" 
    elseif ( UP == 3 ) then 
        text = "  /160" 
    elseif ( UP == 4 ) then 
        text = "  /250" 
    elseif ( UP == 5 ) then 
        text = "  /500" 
    elseif ( UP == 6 ) then 
        text = "  /2000" 
    elseif ( UP == 7 ) then 
        text = "  /4000" 
    elseif ( UP == 8 ) then 
        text = "  /8000" 
    elseif ( UP == 9 ) then 
        text = "  /12000" 
    elseif ( UP == 10 ) then 
        text = "  /16000" 
    elseif ( UP == 11 ) then 
        text = "  /20000" 
    elseif ( UP == 12 ) then 
        text = "  /24000" 
    elseif ( UP == 13 ) then 
        text = "  /28000" 
    elseif ( UP == 14 ) then 
        text = "  /32000" 
    elseif ( UP == 15 ) then 
        text = "  /36000" 
    elseif ( UP == 16 ) then 
        text = "  /40000" 
    elseif ( UP == 17 ) then 
        text = "  /44000" 
    elseif ( UP == 18 ) then 
        text = "  /48000" 
    elseif ( UP == 19 ) then 
        text = "  /52000" 
    elseif ( UP == 20 ) then 
        text = "  /56000" 
    elseif ( UP == 21 ) then 
        text = " /66000" 
    elseif ( UP == 22 ) then 
        text = " /78000" 
    elseif ( UP == 23 ) then 
        text = "  /87000" 
    elseif ( UP == 24 ) then 
        text = "  /99000" 
    elseif ( UP == 25 ) then 
         text = "    /110000" 
    elseif ( UP == 26 ) then 
        text = "    /119000" 
    elseif ( UP == 27 ) then 
        text = "    /127000" 
    elseif ( UP == 28 ) then 
        text = "    /139000" 
    elseif ( UP == 29 ) then 
        text = "    /148000" 
    elseif ( UP == 30 ) then 
        text = "    /156000" 
    elseif ( UP == 31 ) then 
        text = "    /166000" 
    elseif ( UP == 32 ) then 
        text = "    /179000" 
    elseif ( UP == 33 ) then 
        text = "    /187000" 
    elseif ( UP == 34 ) then -- aca pone el nivel que necesita para que le aparesca el texto 
        text = "    /198000" -- aca pone la experiencia que necesita para subir de nivel 
    elseif ( UP == 35 ) then 
        text = "    /209000" 
    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 
) 

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 
) 
  

Y Asi tenga mas o la junte o cambie no sube... segun yo falta un SetData o algo asi

Link to comment

Es algo del scrip, segun yo uso esto para guardar el nivel:

addEventHandler ( "onClientElementDataChange", localPlayer, 
    function ( dataName ) 
        if ( dataName == "level" ) then 
            dxsetText ( ) 
        end 
    end 
) 

por ahi me aye otro similar pero que is solid y ese sianda y cambia de nivel...

Link to comment
  • Recently Browsing   0 members

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