Jump to content

[Ayuda] Actualizar label


DuFraN

Recommended Posts

Hola, cree un label para que me especifique cuanto ping tengo, como hago para que se actualice el ping que tengo?, que debo usar.

function F_Ping() 
    local miping = getPlayerPing(getLocalPlayer()) 
        L_Ping = guiCreateLabel(0.80, 0.29, 0.18, 0.07, "Ping:"..miping, true) 
        guiSetFont(L_Ping, "sa-gothic") 
        guiLabelSetColor(L_Ping, 30, 135, 224)     
    end 
addEventHandler("onClientResourceStart",resourceRoot,F_Ping) 
  

Link to comment

Podrías usar esto también:

miping = getPlayerPing(getLocalPlayer()) 
        L_Ping = guiCreateLabel(0.80, 0.29, 0.18, 0.07, "Ping:"..miping, true) 
        guiSetFont(L_Ping, "sa-gothic") 
        guiLabelSetColor(L_Ping, 30, 135, 224)     
  
        setTimer( guiSetText, 100, 0, L_Ping, miping ) 
  

Link to comment
Podrías usar esto también:
miping = getPlayerPing(getLocalPlayer()) 
        L_Ping = guiCreateLabel(0.80, 0.29, 0.18, 0.07, "Ping:"..miping, true) 
        guiSetFont(L_Ping, "sa-gothic") 
        guiLabelSetColor(L_Ping, 30, 135, 224)     
  
        setTimer( guiSetText, 100, 0, L_Ping, miping ) 
  

Defines 'miping' una vez y luego no varia, es decir, el Label siempre tendrá el mismo texto.

Link to comment
  • Recently Browsing   0 members

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