Jump to content

Level


Plate

Recommended Posts

Posted

Hola me podrian decir si esto esta bien? porfavor

client :

  
local lvl = tiggerServerEvent("Lvl",getLocalPlayer()) 
  
  
  
addEventHandler("onClientRender",root, 
    function() 
        dxDrawText(""..lvl.."",636.0,148.0,696.0,183.0,tocolor(255,255,255,255),1.0,"default","left","top",false,false,false) 
        dxDrawRectangle(633.0,142.0,67.0,46.0,tocolor(255,255,255,255),false) 
    end 
) 

Server:

addEvent("Lvl",true) 
addEventHandler("Lvl",getRootElement(), 
function (thePlayer) 
exports.exp_system:getPlayerLevel ( thePlayer ) 
end) 

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

Esta mal, triggerServerEvent no devuelve el resultado, solo ejecuta el evento.

addEventHandler("onClientRender",root, 
    function() 
        dxDrawText( tostring ( getElementData ( localPlayer, "level" ) ),636.0,148.0,696.0,183.0,tocolor(255,255,255,255),1.0,"default","left","top",false,false,false) 
        dxDrawRectangle(633.0,142.0,67.0,46.0,tocolor(255,255,255,255),false) 
    end 
) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

no se ve solid u.u que tengo que hacer para que se vea?

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

Deberia funcionar, estas usando la ultima version de "exp_system"?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

si la que vos me dijistes no se ve nada inicio el recurso y se ve comun la pantalla ( no aparece el cuadrado con el level)

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

Prueba asi

addEventHandler("onClientRender",root, 
    function() 
        dxDrawText( tostring ( getElementData ( localPlayer, "lvl" ) ),636.0,148.0,696.0,183.0,tocolor(255,255,255,255),1.0,"default","left","top",false,false,false) 
        dxDrawRectangle(633.0,142.0,67.0,46.0,tocolor(255,255,255,255),false) 
    end 
) 

rsilex.png.0e6ad382b3fdc3cbe6390e3e847572c9.png
Posted
si la que vos me dijistes no se ve nada inicio el recurso y se ve comun la pantalla ( no aparece el cuadrado con el level)

Entonces quiere decir que no esta funcionando el script, hay algun error?

@pekio: El "exp_system" lo cree yo, se que dataNames use y es "level", no "lvl".

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

sigo sin poder ver el cuadradito con el level yo pienso que es el dxDrawText no el script

cuando lo inicio no me da ningun error puede ser que necesite descargar la ultima version de guieditor

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

Acabo de probar tu codigo, y lo unico que hace es crear un rectangulo blanco en la pantalla, te aconsejo crearlo de nuevo con guieditor.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

use la ultima version de guieditor que vi y lo hize haci pero me da error

addEventHandler("onClientRender",root, 
    function() 
        dxDrawText("tostring ( getElementData ( localPlayer, "level" "),628.0,141.0,674.0,177.0,tocolor(255,255,255,255),1.0,"default","left","top",false,false,false) 
        dxDrawRectangle(625.0,135.0,53.0,48.0,tocolor(255,255,255,255),false) 
    end 
) 

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

Quita las comillas de aca ( no las de "level" ):

"tostring ( getElementData ( localPlayer, "level" " 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Solid creo que es el dxDrawRectangle lo que hace el cuadrado blanco

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted
addEventHandler("onClientRender",root, 
    function ( ) 
        dxDrawRectangle(625.0,135.0,53.0,48.0,tocolor(0,0,255,155),false) 
        dxDrawText( tostring ( getElementData ( localPlayer, "level" ),628.0,141.0,674.0,177.0,tocolor(255,255,255,255),1.0,"default","left","top",false,false,false) 
    end 
) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

tostring ( getElementData ( localPlayer, "level" ))),

Tiene un parentesis de mas.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Me funciono de 10 gracias solid solo le agregue un ) y listo

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

De nada.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Solid y hay que esta mal

  
-- Direct X Drawing 
addEventHandler("onClientRender",root, 
    function() 
        dxDrawRectangle(620.0,134.0,113.0,46.0,tocolor(0,0,255,255),false) 
        dxDrawText( tostring ( getElementData ( localPlayer, "level" )",680.0,156.0,742.0,167.0,tocolor(255,255,255,255),1.0,"default","left","top",false,false,false) 
        dxDrawText("exp",685.0,136.0,739.0,147.0,tocolor(255,255,255,255),1.0,"default","left","top",false,false,false) 
        dxDrawText("tostring ( getElementData ( localPlayer, "exp" )",628.0,153.0,641.0,168.0,tocolor(255,255,255,255),1.0,"default","left","top",false,false,false) 
        dxDrawText("Level",626.0,136.0,681.0,151.0,tocolor(255,255,255,255),1.0,"default","left","top",false,false,false) 
    end 
) 
 

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

Otra ves las comillas.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

pero me dice

level/main_c.lua ")"expected near "default" 

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted
-- Direct X Drawing 
addEventHandler("onClientRender",root, 
    function() 
        dxDrawRectangle(620.0,134.0,113.0,46.0,tocolor(0,0,255,255),false) 
        dxDrawText( tostring ( getElementData ( localPlayer, "level" ) ),680.0,156.0,742.0,167.0,tocolor(255,255,255,255),1.0,"default","left","top",false,false,false) 
        dxDrawText("exp",685.0,136.0,739.0,147.0,tocolor(255,255,255,255),1.0,"default","left","top",false,false,false) 
        dxDrawText(tostring ( getElementData ( localPlayer, "exp" ) ),628.0,153.0,641.0,168.0,tocolor(255,255,255,255),1.0,"default","left","top",false,false,false) 
        dxDrawText("Level",626.0,136.0,681.0,151.0,tocolor(255,255,255,255),1.0,"default","left","top",false,false,false) 
   end 
) 
  

Tenias que poner otro parentesis.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Solid se podria hacer para que se vea la exp que te falta para subir de level?

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

Eso ya es otra cosa, ya que mi recurso no lo guarda como element data, lo calcula en el momento.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Seria algo mas complicado osea que tendria que poner que tome la exp de un xml y despues lo ponga en un dxDrawText no?

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

Algo asi.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

  • Recently Browsing   0 members

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