Plate Posted July 6, 2012 Posted July 6, 2012 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
Castillo Posted July 6, 2012 Posted July 6, 2012 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. Education is the most powerful weapon which you can use to change the world.
Plate Posted July 6, 2012 Author Posted July 6, 2012 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
Castillo Posted July 6, 2012 Posted July 6, 2012 Deberia funcionar, estas usando la ultima version de "exp_system"? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Plate Posted July 6, 2012 Author Posted July 6, 2012 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
Arsilex Posted July 6, 2012 Posted July 6, 2012 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 )
Castillo Posted July 6, 2012 Posted July 6, 2012 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. Education is the most powerful weapon which you can use to change the world.
Plate Posted July 6, 2012 Author Posted July 6, 2012 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
Castillo Posted July 6, 2012 Posted July 6, 2012 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. Education is the most powerful weapon which you can use to change the world.
Plate Posted July 6, 2012 Author Posted July 6, 2012 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
Castillo Posted July 6, 2012 Posted July 6, 2012 Quita las comillas de aca ( no las de "level" ): "tostring ( getElementData ( localPlayer, "level" " San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Plate Posted July 6, 2012 Author Posted July 6, 2012 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
Castillo Posted July 6, 2012 Posted July 6, 2012 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. Education is the most powerful weapon which you can use to change the world.
Castillo Posted July 6, 2012 Posted July 6, 2012 tostring ( getElementData ( localPlayer, "level" ))), Tiene un parentesis de mas. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Plate Posted July 6, 2012 Author Posted July 6, 2012 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
Castillo Posted July 6, 2012 Posted July 6, 2012 De nada. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Plate Posted July 6, 2012 Author Posted July 6, 2012 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
Castillo Posted July 6, 2012 Posted July 6, 2012 Otra ves las comillas. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Plate Posted July 6, 2012 Author Posted July 6, 2012 pero me dice level/main_c.lua ")"expected near "default" Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Castillo Posted July 6, 2012 Posted July 6, 2012 -- 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. Education is the most powerful weapon which you can use to change the world.
Plate Posted July 6, 2012 Author Posted July 6, 2012 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
Castillo Posted July 6, 2012 Posted July 6, 2012 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. Education is the most powerful weapon which you can use to change the world.
Plate Posted July 6, 2012 Author Posted July 6, 2012 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
Castillo Posted July 6, 2012 Posted July 6, 2012 Algo asi. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Plate Posted July 6, 2012 Author Posted July 6, 2012 que eventos uso? Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Recommended Posts