Alexs Posted June 4, 2012 Posted June 4, 2012 (edited) Hola a Todos, ya acabe (casi, me faltan las armas) mi nuevo HUD y al aparecer no funciona el quitar el antiguo HUD, que esta mal? PD: El Debugscript esta vacio y esto esta en el client side function mostrar ( ) guiSetVisible (vidadata, true ) guiSetVisible (armordata, true ) guiSetVisible (dinerodata, true ) guiSetVisible (imgvida, true ) guiSetVisible (imgarmor, true ) showPlayerHudComponent ( "armour", false ) showPlayerHudComponent ( "breath", false ) showPlayerHudComponent ( "clock", false ) showPlayerHudComponent ( "health", false ) showPlayerHudComponent ( "money", false ) end addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), mostrar ) esta junto al guisetVisible, pero esa es toda la linea. Edited June 4, 2012 by Guest
Castillo Posted June 4, 2012 Posted June 4, 2012 Deberia funcionar, vos spawneaste y no se ocultaron?
Alexs Posted June 4, 2012 Author Posted June 4, 2012 Si, y me mate un par de veces y todo, antes lo habia echo con "onClientResourceStart" y se ocultaba cuando empezaba otro recurso y no este
Alexs Posted June 4, 2012 Author Posted June 4, 2012 Probe asi: function ocultact ( source ) showPlayerHudComponent ( source, "health", false ) showPlayerHudComponent ( source, "armor", false ) showPlayerHudComponent ( source, "money", false ) showPlayerHudComponent ( source, "clock", false ) showPlayerHudComponent ( source, "breath", false ) end addEventHandler ( "onPlayerJoin", getRootElement(), ocultact ) y sigue igual, ademas alguien sabe hacer que una variable que consiga con getElementHealth Tenga maximo 3 Digitos?? PD: Perdonen el Bump
Castillo Posted June 4, 2012 Posted June 4, 2012 Queres decir que queres que no tenga los decimales el resultado? si es eso, entonces usa math.floor ( valor ).
Alexs Posted June 4, 2012 Author Posted June 4, 2012 ahh Ok, y respecto al HUD, sigo intentadolo en Server y Client y sigue igual Edit: checke la consola y dice: [2012-06-04 15:59:26] WARNING: ZC-HUD\hud_s.lua:5: Bad argument @ 'showPlayerHudComponent' [Expected element at argument 1, got number '2294.6958007813'] Linea 5: showPlayerHudComponent ( source, "clock", false ) Evento: onPlayerSpawn
Recommended Posts