iFoReX Posted June 28, 2012 Share Posted June 28, 2012 aqui los codigos GUIEditor_Image = {} GUIEditor_Image[1] = guiCreateStaticImage(550,258,47,53,"images/cal.png",false) GUIEditor_Image[2] = guiCreateStaticImage(603,258,44,53,"images/calc-icon.png",false) GUIEditor_Image[3] = guiCreateStaticImage(653,258,44,55,"images/clock-icon.png",false) GUIEditor_Image[4] = guiCreateStaticImage(704,259,42,55,"images/graph-icon.png",false) GUIEditor_Image[5] = guiCreateStaticImage(555,463,42,52,"images/SMS-icon.png",false) GUIEditor_Image[6] = guiCreateStaticImage(603,463,47,51,"images/phone-icon.png",false) GUIEditor_Image[7] = guiCreateStaticImage(656,463,41,51,"images/ipod-icon.png",false) GUIEditor_Image[8] = guiCreateStaticImage(704,461,46,56,"images/photo-icon.png",false) guiSetVisible(GUIEditor_Image[1],false) guiSetVisible(GUIEditor_Image[2],false) guiSetVisible(GUIEditor_Image[3],false) guiSetVisible(GUIEditor_Image[4],false) guiSetVisible(GUIEditor_Image[5],false) guiSetVisible(GUIEditor_Image[6],false) guiSetVisible(GUIEditor_Image[7],false) guiSetVisible(GUIEditor_Image[8],false) showCursor(false) function elIphone() dxDrawImage(516.0,157.0,283.0,442.0,"images/blank-iphone.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) end bindKey("B","down",function() guiSetVisible(GUIEditor_Image[1],not guiGetVisible(GUIEditor_Image[1])) guiSetVisible(GUIEditor_Image[2],not guiGetVisible(GUIEditor_Image[2])) guiSetVisible(GUIEditor_Image[3],not guiGetVisible(GUIEditor_Image[3])) guiSetVisible(GUIEditor_Image[4],not guiGetVisible(GUIEditor_Image[4])) guiSetVisible(GUIEditor_Image[5],not guiGetVisible(GUIEditor_Image[5])) guiSetVisible(GUIEditor_Image[6],not guiGetVisible(GUIEditor_Image[6])) guiSetVisible(GUIEditor_Image[7],not guiGetVisible(GUIEditor_Image[7])) guiSetVisible(GUIEditor_Image[8],not guiGetVisible(GUIEditor_Image[8])) showCursor(guiGetVisible(GUIEditor_Image[1])) addEventHandler("onClientRender",root,elIphone) if addEventHandler("onClientRender",root,elIphone) then removeEventHandler("onClientRender",root,elIphone) elseif not addEventHandler("onClientRender",root,elIphone) then addEventHandler("onClientRender",root,elIphone) end end) Link to comment
Castillo Posted June 28, 2012 Share Posted June 28, 2012 Eso es porque addEventHandler no se puede usar para saber si ya existe. Link to comment
iFoReX Posted June 28, 2012 Author Share Posted June 28, 2012 hize esto solid pero sigue sin funcionar GUIEditor_Image = {} GUIEditor_Image[1] = guiCreateStaticImage(550,258,47,53,"images/cal.png",false) GUIEditor_Image[2] = guiCreateStaticImage(603,258,44,53,"images/calc-icon.png",false) GUIEditor_Image[3] = guiCreateStaticImage(653,258,44,55,"images/clock-icon.png",false) GUIEditor_Image[4] = guiCreateStaticImage(704,259,42,55,"images/graph-icon.png",false) GUIEditor_Image[5] = guiCreateStaticImage(555,463,42,52,"images/SMS-icon.png",false) GUIEditor_Image[6] = guiCreateStaticImage(603,463,47,51,"images/phone-icon.png",false) GUIEditor_Image[7] = guiCreateStaticImage(656,463,41,51,"images/ipod-icon.png",false) GUIEditor_Image[8] = guiCreateStaticImage(704,461,46,56,"images/photo-icon.png",false) guiSetVisible(GUIEditor_Image[1],false) guiSetVisible(GUIEditor_Image[2],false) guiSetVisible(GUIEditor_Image[3],false) guiSetVisible(GUIEditor_Image[4],false) guiSetVisible(GUIEditor_Image[5],false) guiSetVisible(GUIEditor_Image[6],false) guiSetVisible(GUIEditor_Image[7],false) guiSetVisible(GUIEditor_Image[8],false) showCursor(false) function elIphone() dxDrawImage(516.0,157.0,283.0,442.0,"images/blank-iphone.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) setElementData(getLocalPlayer(),"visible",viendose) end function remover() removeEventHandler("onClientRender",root,elIphone) setElementData(getLocalPlayer(),"visible",invisible) end bindKey("B","down",function() guiSetVisible(GUIEditor_Image[1],not guiGetVisible(GUIEditor_Image[1])) guiSetVisible(GUIEditor_Image[2],not guiGetVisible(GUIEditor_Image[2])) guiSetVisible(GUIEditor_Image[3],not guiGetVisible(GUIEditor_Image[3])) guiSetVisible(GUIEditor_Image[4],not guiGetVisible(GUIEditor_Image[4])) guiSetVisible(GUIEditor_Image[5],not guiGetVisible(GUIEditor_Image[5])) guiSetVisible(GUIEditor_Image[6],not guiGetVisible(GUIEditor_Image[6])) guiSetVisible(GUIEditor_Image[7],not guiGetVisible(GUIEditor_Image[7])) guiSetVisible(GUIEditor_Image[8],not guiGetVisible(GUIEditor_Image[8])) showCursor(guiGetVisible(GUIEditor_Image[1])) if getElementData(getLocalPlayer(),"visible") == viendose then addEventHandler("onClientRender",root,remover) elseif getElementData(getLocalPlayer(),"visible") == invisible then addEventHandler("onClientRender",root,elIphone) end end) Link to comment
Recommended Posts