Anyelberth Posted May 2, 2013 Posted May 2, 2013 ok Chicos. Quisiera saver Si ustedes me pueden ayudar aca, para que esta imagen salga en la pantalla cada determinado tiempo, por ejemplo: Que salga cada 5 Minutos y desaparesca... lo demas esta bien.. la hubicacion etc... addEventHandler("onClientResourceStart",resourceRoot, function() Logo = guiCreateStaticImage(218,513,384,82,"images/logo1.png",false) end )
Arsilex Posted May 2, 2013 Posted May 2, 2013 function Nomnre() Logo = guiCreateStaticImage(218,513,384,82,"images/logo1.png",false) end setTimer(destroyElement, 8000, 0, Logo) setTimer(Nomnre, 3000, 0 ) No lo comprobé pero es mas o menos asi
Anyelberth Posted May 2, 2013 Author Posted May 2, 2013 Me Funciono la aparicion de la imagen. Pero el destroyElement no me funciono. . . Dice ( Bad Argument @" DestroyElement" )
AlvareZ_ Posted May 2, 2013 Posted May 2, 2013 function Nomnre() Logo = guiCreateStaticImage(218,513,384,82,"images/logo1.png",false) end setTimer ( function() destroyElement(Logo) end, 8000, 1 ) setTimer(Nomnre, 3000, 0 )
Sasu Posted May 2, 2013 Posted May 2, 2013 Y sino intenta asi: function Nomnre() Logo = guiCreateStaticImage(218,513,384,82,"images/logo1.png",false) end setTimer ( function() guiSetVisible(Logo, true) setTimer(guiSetVisible, 3000, 1, Logo, false) end, 8000, 0 )
Anyelberth Posted May 4, 2013 Author Posted May 4, 2013 Nada aun... Sigue Diciendo " Bad Argument @ " DestroyElement"
MTA Team 0xCiBeR Posted May 4, 2013 MTA Team Posted May 4, 2013 Usa el que te dio sasuke...Ese no usa destroyElement... (reemplaza todo por eso) Y sino intenta asi: function Nomnre() Logo = guiCreateStaticImage(218,513,384,82,"images/logo1.png",false) end setTimer ( function() guiSetVisible(Logo, true) setTimer(guiSetVisible, 3000, 1, Logo, false) end, 8000, 0 )
Sasu Posted May 5, 2013 Posted May 5, 2013 Eso es porque nunca creaste la imagen. Intenta asi: function Nomnre() Logo = guiCreateStaticImage(218,513,384,82,"images/logo1.png",false) guiSetVisible(Logo, false) end addEventHandler("onClientResourceStart", resourceRoot, Nomnre) setTimer ( function() guiSetVisible(Logo, true) setTimer(guiSetVisible, 3000, 1, Logo, false) end, 8000, 0 )
Bc# Posted May 24, 2013 Posted May 24, 2013 (edited) Solo reemplazas el evento "onClientResourceStart" por este "onClientPlayerWasted" , te quedaría así: function Nomnre(killer, weapon, bodypart) Logo = guiCreateStaticImage(218,513,384,82,"images/logo1.png",false) guiSetVisible(Logo, false) end addEventHandler("onClientPlayerWasted", getLocalPlayer(), Nomnre) setTimer ( function() guiSetVisible(Logo, true) setTimer(guiSetVisible, 3000, 1, Logo, false) end, 8000, 0 ) Edited May 24, 2013 by Guest
Castillo Posted May 24, 2013 Posted May 24, 2013 Si lo dejas con: "resourceRoot", entonces se creara la imagen al morir cualquier jugador, no solo el cliente.
Bc# Posted May 24, 2013 Posted May 24, 2013 Si lo dejas con: "resourceRoot", entonces se creara la imagen al morir cualquier jugador, no solo el cliente. No havia notado eso gracias por la correccion solid. @Anyelberth edité el comentario prueba con eso
Anyelberth Posted May 24, 2013 Author Posted May 24, 2013 Lo ise apenas Solidsnake Lo dijo. y eso es lo que me dice . . . Bad Argument @ guiSetVisible
Bc# Posted May 25, 2013 Posted May 25, 2013 Mira en gui yo no soy el mejor de los expertos pero te hice el mismo script pero en dx espero te funcione. function Nomnre(killer, weapon, bodypart) addEventHandler("onClientRender", getLocalPlayer(), drawImage) setTimer ( function() removeEventHandler ( "onClientRender", getLocalPlayer(), drawImage ) end, 8000, 0 ) end addEventHandler("onClientPlayerWasted", getLocalPlayer(), Nomnre) function drawImage() dxDrawImage ( 218,513,384,82,"images/logo1.png") end
MTA Team 0xCiBeR Posted May 26, 2013 MTA Team Posted May 26, 2013 No Me Funciona Lo has puesto client-side no?
Recommended Posts