Jump to content

Abrir cerrar


Julian09123

Recommended Posts

Posted

Hablas de abrir y cerrar un GUI? usa:

bindKey 
guiGetVisible 
guiSetVisible 

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

Perdoname no? pero seria haci? Mira tengo el boton de cerrar que me anda bien pero abrirlo con f2 seria haci?

Lo probe y me dice dos errores al apretar f2

Me dice Bad Argument Line 79 y 82.

function Visible ( )         
        if ( guiGetVisible ( Window ) == true ) then              
                guiSetVisible ( Window, false ) 
        else               
                guiSetVisible ( Window, true ) 
        end 
end 
bindKey ("F2", "down", Visible) 

Skype: Juliang09123

Posted

Postea el resto del codigo.

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

Yo Uso Esto Man, Hace Un Tiempo Cuando Hacia Muchas GUIs Me Lo Dieron No Me Acuerdo Quien xD

bindKey("F2","down",function() 
guiSetVisible(Window,not guiGetVisible(Window) 
showCursor(guiGetVisible(Window) 
end 
) 

Espero Te Sirva :3

elMota/elFoReX De Vuelta En MTA *---------*

Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3

https://www.youtube.com/user/KillersGPs

430x73_FFFFFF_FF9900_000000_000000.png
Posted
Yo Uso Esto Man, Hace Un Tiempo Cuando Hacia Muchas GUIs Me Lo Dieron No Me Acuerdo Quien xD
bindKey("F2","down",function() 
guiSetVisible(Window,not guiGetVisible(Window) 
showCursor(guiGetVisible(Window) 
end 
) 

Espero Te Sirva :3

No me anda me dice Error

Me dice Expected near to close near 80 Linea 79 o algo asi

pongo el codigo entero

pondre una parte

    function win() 
        Window = guiCreateWindow(38, 58, 725, 482, "Weapon Shop", false) 
        guiWindowSetSizable(Window, false) 
  
        btnm4 = guiCreateButton(10, 100, 98, 44, "7500$ x 200", false, Window) 
        guiSetFont(btnm4, "default-bold-small") 
        btnknife = guiCreateButton(617, 379, 98, 44, "100$ x 1", false, Window) 
        guiSetFont(btnknife, "default-bold-small") 
        btnparachute = guiCreateButton(490, 379, 98, 44, "Price: 900$", false, Window) 
        guiSetFont(btnparachute, "default-bold-small") 
        btnsatchel = guiCreateButton(369, 379, 98, 44, "1500$ x 4", false, Window) 
        guiSetFont(btnsatchel, "default-bold-small") 
        btntec = guiCreateButton(613, 245, 98, 44, "5500$ x 200", false, Window) 
        guiSetFont(btntec, "default-bold-small") 
        btnsniper = guiCreateButton(490, 241, 98, 44, "9000$ x 200", false, Window) 
        guiSetFont(btnsniper, "default-bold-small") 
        btnshotgun = guiCreateButton(369, 245, 98, 44, "1400$ x 150", false, Window) 
        guiSetFont(btnshotgun, "default-bold-small") 
        btnsilenced = guiCreateButton(249, 245, 98, 44, "600$ x 80", false, Window) 
        guiSetFont(btnsilenced, "default-bold-small") 
        btndeagle = guiCreateButton(128, 245, 98, 44, "1000$ x 100", false, Window) 
        guiSetFont(btndeagle, "default-bold-small") 
        btnrifle = guiCreateButton(613, 100, 98, 44, "1000$ x 50", false, Window) 
        guiSetFont(btnrifle, "default-bold-small") 
        btndoubleshout = guiCreateButton(490, 100, 98, 44, "4200$ x 150", false, Window) 
        guiSetFont(btndoubleshout, "default-bold-small") 
        btnspaz = guiCreateButton(369, 100, 98, 44, "2900$ x 100", false, Window) 
        guiSetFont(btnspaz, "default-bold-small") 
        btnmp5 = guiCreateButton(249, 100, 98, 44, "3600$ 150", false, Window) 
        guiSetFont(btnmp5, "default-bold-small") 
        btnak = guiCreateButton(128, 100, 98, 44, "6500$ x 200", false, Window) 
        guiSetFont(btnak, "default-bold-small") 
        btnpistol = guiCreateButton(10, 245, 98, 44, "300$ x 50", false, Window) 
        guiSetFont(btnpistol, "default-bold-small") 
        btngranade = guiCreateButton(249, 379, 98, 44, "3000$ x 10", false, Window) 
        guiSetFont(btngranade, "default-bold-small") 
        btnteargas = guiCreateButton(128, 379, 98, 44, "1800$ x 10", false, Window) 
        guiSetFont(btnteargas, "default-bold-small") 
        btnuzi = guiCreateButton(10, 379, 98, 44, "3500$ 150", false, Window) 
        guiSetFont(btnuzi, "default-bold-small") 
        Cerrar = guiCreateButton(321, 444, 122, 28, "Cerrar", false, Window) 
        guiSetFont(Cerrar, "default-bold-small") 
         
        m4 = guiCreateStaticImage(16, 30, 82, 66, ":WeaponShop/img/M4.png", false, Window) 
        Ak = guiCreateStaticImage(134, 32, 86, 64, ":WeaponShop/img/AK-47.png", false, Window) 
        mMp5 = guiCreateStaticImage(255, 33, 86, 57, ":WeaponShop/img/MP5.png", false, Window) 
        Parachute = guiCreateStaticImage(496, 308, 86, 57, ":WeaponShop/img/PARACHUTE.png", false, Window) 
        Spaz = guiCreateStaticImage(372, 33, 85, 62, ":WeaponShop/img/SPAZ-12.png", false, Window) 
        Pistol = guiCreateStaticImage(16, 180, 86, 55, ":WeaponShop/img/pistol.png", false, Window) 
        Rifle = guiCreateStaticImage(617, 42, 89, 53, ":WeaponShop/img/rifle.png", false, Window) 
        Satchel = guiCreateStaticImage(374, 310, 83, 59, ":WeaponShop/img/satchel.png", false, Window) 
        Sawnoff = guiCreateStaticImage(500, 33, 78, 62, ":WeaponShop/img/sawnoff.png", false, Window) 
        Deagle = guiCreateStaticImage(132, 181, 84, 54, ":WeaponShop/img/deagle.png", false, Window) 
        Knife = guiCreateStaticImage(626, 312, 85, 57, ":WeaponShop/img/knife.png", false, Window) 
        Granada = guiCreateStaticImage(252, 312, 85, 57, ":WeaponShop/img/nade.png", false, Window) 
        Tec = guiCreateStaticImage(617, 176, 88, 59, ":WeaponShop/img/tec9.png", false, Window) 
        Sniper = guiCreateStaticImage(495, 176, 87, 55, ":WeaponShop/img/sniper.png", false, Window) 
        Silenced = guiCreateStaticImage(252, 181, 85, 54, ":WeaponShop/img/silenced.png", false, Window) 
        Shoutung = guiCreateStaticImage(379, 184, 82, 57, ":WeaponShop/img/shotgun.png", false, Window) 
        Uzzi = guiCreateStaticImage(20, 319, 78, 50, ":WeaponShop/img/uzi.png", false, Window) 
        Gas = guiCreateStaticImage(137, 318, 79, 51, ":WeaponShop/img/teargas.png", false, Window)  
    end 
  
  
  
addEventHandler("onClientGUIClick", root, 
function() 
if source == Cerrar then 
guiSetVisible(Window,false) 
showCursor(false) 
setElementFrozen( localPlayer, false ) 
end 
end 
) 
  
  
bindKey("F2","down",function() 
guiSetVisible(Window,not guiGetVisible(Window) 
showCursor(guiGetVisible(Window) 
end 
) 

Skype: Juliang09123

Posted
Es Porque Te Falto Un Parentesis En ShowCursor
showCursor(guiGetVisible(Window)) 

Ahi ta

Dice Error en Linea 81 near end

Expected To close ( at line 80 near end

function win() 
        Window = guiCreateWindow(38, 58, 725, 482, "Weapon Shop", false) 
        guiWindowSetSizable(Window, false) 
  
        btnm4 = guiCreateButton(10, 100, 98, 44, "7500$ x 200", false, Window) 
        guiSetFont(btnm4, "default-bold-small") 
        btnknife = guiCreateButton(617, 379, 98, 44, "100$ x 1", false, Window) 
        guiSetFont(btnknife, "default-bold-small") 
        btnparachute = guiCreateButton(490, 379, 98, 44, "Price: 900$", false, Window) 
        guiSetFont(btnparachute, "default-bold-small") 
        btnsatchel = guiCreateButton(369, 379, 98, 44, "1500$ x 4", false, Window) 
        guiSetFont(btnsatchel, "default-bold-small") 
        btntec = guiCreateButton(613, 245, 98, 44, "5500$ x 200", false, Window) 
        guiSetFont(btntec, "default-bold-small") 
        btnsniper = guiCreateButton(490, 241, 98, 44, "9000$ x 200", false, Window) 
        guiSetFont(btnsniper, "default-bold-small") 
        btnshotgun = guiCreateButton(369, 245, 98, 44, "1400$ x 150", false, Window) 
        guiSetFont(btnshotgun, "default-bold-small") 
        btnsilenced = guiCreateButton(249, 245, 98, 44, "600$ x 80", false, Window) 
        guiSetFont(btnsilenced, "default-bold-small") 
        btndeagle = guiCreateButton(128, 245, 98, 44, "1000$ x 100", false, Window) 
        guiSetFont(btndeagle, "default-bold-small") 
        btnrifle = guiCreateButton(613, 100, 98, 44, "1000$ x 50", false, Window) 
        guiSetFont(btnrifle, "default-bold-small") 
        btndoubleshout = guiCreateButton(490, 100, 98, 44, "4200$ x 150", false, Window) 
        guiSetFont(btndoubleshout, "default-bold-small") 
        btnspaz = guiCreateButton(369, 100, 98, 44, "2900$ x 100", false, Window) 
        guiSetFont(btnspaz, "default-bold-small") 
        btnmp5 = guiCreateButton(249, 100, 98, 44, "3600$ 150", false, Window) 
        guiSetFont(btnmp5, "default-bold-small") 
        btnak = guiCreateButton(128, 100, 98, 44, "6500$ x 200", false, Window) 
        guiSetFont(btnak, "default-bold-small") 
        btnpistol = guiCreateButton(10, 245, 98, 44, "300$ x 50", false, Window) 
        guiSetFont(btnpistol, "default-bold-small") 
        btngranade = guiCreateButton(249, 379, 98, 44, "3000$ x 10", false, Window) 
        guiSetFont(btngranade, "default-bold-small") 
        btnteargas = guiCreateButton(128, 379, 98, 44, "1800$ x 10", false, Window) 
        guiSetFont(btnteargas, "default-bold-small") 
        btnuzi = guiCreateButton(10, 379, 98, 44, "3500$ 150", false, Window) 
        guiSetFont(btnuzi, "default-bold-small") 
        Cerrar = guiCreateButton(321, 444, 122, 28, "Cerrar", false, Window) 
        guiSetFont(Cerrar, "default-bold-small") 
         
        m4 = guiCreateStaticImage(16, 30, 82, 66, ":WeaponShop/img/M4.png", false, Window) 
        Ak = guiCreateStaticImage(134, 32, 86, 64, ":WeaponShop/img/AK-47.png", false, Window) 
        mMp5 = guiCreateStaticImage(255, 33, 86, 57, ":WeaponShop/img/MP5.png", false, Window) 
        Parachute = guiCreateStaticImage(496, 308, 86, 57, ":WeaponShop/img/PARACHUTE.png", false, Window) 
        Spaz = guiCreateStaticImage(372, 33, 85, 62, ":WeaponShop/img/SPAZ-12.png", false, Window) 
        Pistol = guiCreateStaticImage(16, 180, 86, 55, ":WeaponShop/img/pistol.png", false, Window) 
        Rifle = guiCreateStaticImage(617, 42, 89, 53, ":WeaponShop/img/rifle.png", false, Window) 
        Satchel = guiCreateStaticImage(374, 310, 83, 59, ":WeaponShop/img/satchel.png", false, Window) 
        Sawnoff = guiCreateStaticImage(500, 33, 78, 62, ":WeaponShop/img/sawnoff.png", false, Window) 
        Deagle = guiCreateStaticImage(132, 181, 84, 54, ":WeaponShop/img/deagle.png", false, Window) 
        Knife = guiCreateStaticImage(626, 312, 85, 57, ":WeaponShop/img/knife.png", false, Window) 
        Granada = guiCreateStaticImage(252, 312, 85, 57, ":WeaponShop/img/nade.png", false, Window) 
        Tec = guiCreateStaticImage(617, 176, 88, 59, ":WeaponShop/img/tec9.png", false, Window) 
        Sniper = guiCreateStaticImage(495, 176, 87, 55, ":WeaponShop/img/sniper.png", false, Window) 
        Silenced = guiCreateStaticImage(252, 181, 85, 54, ":WeaponShop/img/silenced.png", false, Window) 
        Shoutung = guiCreateStaticImage(379, 184, 82, 57, ":WeaponShop/img/shotgun.png", false, Window) 
        Uzzi = guiCreateStaticImage(20, 319, 78, 50, ":WeaponShop/img/uzi.png", false, Window) 
        Gas = guiCreateStaticImage(137, 318, 79, 51, ":WeaponShop/img/teargas.png", false, Window)  
    end 
  
  
  
addEventHandler("onClientGUIClick", root, 
function() 
if source == Cerrar then 
guiSetVisible(Window,false) 
showCursor(false) 
setElementFrozen( localPlayer, false ) 
end 
end 
) 
  
  
bindKey("F2","down",function() 
guiSetVisible(Window,not guiGetVisible(Window)) 
showCursor(guiGetVisible(Window) 
end 
) 
  
addEventHandler ("onClientGUIClick", getRootElement(),  
function(button, state, absoluteX, absoluteY) 
if ( source ==  btnm4 ) then  
triggerServerEvent("btnm4",getLocalPlayer())  
end  
end) 

Skype: Juliang09123

Posted
addEventHandler("onClientResourceStart", resourceRoot, 
    function () 
        Window = guiCreateWindow(38, 58, 725, 482, "Weapon Shop", false) 
        guiWindowSetSizable(Window, false) 
        guiSetVisible(Window, false) 
      
        btnm4 = guiCreateButton(10, 100, 98, 44, "7500$ x 200", false, Window) 
        guiSetFont(btnm4, "default-bold-small") 
        btnknife = guiCreateButton(617, 379, 98, 44, "100$ x 1", false, Window) 
        guiSetFont(btnknife, "default-bold-small") 
        btnparachute = guiCreateButton(490, 379, 98, 44, "Price: 900$", false, Window) 
        guiSetFont(btnparachute, "default-bold-small") 
        btnsatchel = guiCreateButton(369, 379, 98, 44, "1500$ x 4", false, Window) 
        guiSetFont(btnsatchel, "default-bold-small") 
        btntec = guiCreateButton(613, 245, 98, 44, "5500$ x 200", false, Window) 
        guiSetFont(btntec, "default-bold-small") 
        btnsniper = guiCreateButton(490, 241, 98, 44, "9000$ x 200", false, Window) 
        guiSetFont(btnsniper, "default-bold-small") 
        btnshotgun = guiCreateButton(369, 245, 98, 44, "1400$ x 150", false, Window) 
        guiSetFont(btnshotgun, "default-bold-small") 
        btnsilenced = guiCreateButton(249, 245, 98, 44, "600$ x 80", false, Window) 
        guiSetFont(btnsilenced, "default-bold-small") 
        btndeagle = guiCreateButton(128, 245, 98, 44, "1000$ x 100", false, Window) 
        guiSetFont(btndeagle, "default-bold-small") 
        btnrifle = guiCreateButton(613, 100, 98, 44, "1000$ x 50", false, Window) 
        guiSetFont(btnrifle, "default-bold-small") 
        btndoubleshout = guiCreateButton(490, 100, 98, 44, "4200$ x 150", false, Window) 
        guiSetFont(btndoubleshout, "default-bold-small") 
        btnspaz = guiCreateButton(369, 100, 98, 44, "2900$ x 100", false, Window) 
        guiSetFont(btnspaz, "default-bold-small") 
        btnmp5 = guiCreateButton(249, 100, 98, 44, "3600$ 150", false, Window) 
        guiSetFont(btnmp5, "default-bold-small") 
        btnak = guiCreateButton(128, 100, 98, 44, "6500$ x 200", false, Window) 
        guiSetFont(btnak, "default-bold-small") 
        btnpistol = guiCreateButton(10, 245, 98, 44, "300$ x 50", false, Window) 
        guiSetFont(btnpistol, "default-bold-small") 
        btngranade = guiCreateButton(249, 379, 98, 44, "3000$ x 10", false, Window) 
        guiSetFont(btngranade, "default-bold-small") 
        btnteargas = guiCreateButton(128, 379, 98, 44, "1800$ x 10", false, Window) 
        guiSetFont(btnteargas, "default-bold-small") 
        btnuzi = guiCreateButton(10, 379, 98, 44, "3500$ 150", false, Window) 
        guiSetFont(btnuzi, "default-bold-small") 
        Cerrar = guiCreateButton(321, 444, 122, 28, "Cerrar", false, Window) 
        guiSetFont(Cerrar, "default-bold-small") 
         
        m4 = guiCreateStaticImage(16, 30, 82, 66, ":WeaponShop/img/M4.png", false, Window) 
        Ak = guiCreateStaticImage(134, 32, 86, 64, ":WeaponShop/img/AK-47.png", false, Window) 
        mMp5 = guiCreateStaticImage(255, 33, 86, 57, ":WeaponShop/img/MP5.png", false, Window) 
        Parachute = guiCreateStaticImage(496, 308, 86, 57, ":WeaponShop/img/PARACHUTE.png", false, Window) 
        Spaz = guiCreateStaticImage(372, 33, 85, 62, ":WeaponShop/img/SPAZ-12.png", false, Window) 
        Pistol = guiCreateStaticImage(16, 180, 86, 55, ":WeaponShop/img/pistol.png", false, Window) 
        Rifle = guiCreateStaticImage(617, 42, 89, 53, ":WeaponShop/img/rifle.png", false, Window) 
        Satchel = guiCreateStaticImage(374, 310, 83, 59, ":WeaponShop/img/satchel.png", false, Window) 
        Sawnoff = guiCreateStaticImage(500, 33, 78, 62, ":WeaponShop/img/sawnoff.png", false, Window) 
        Deagle = guiCreateStaticImage(132, 181, 84, 54, ":WeaponShop/img/deagle.png", false, Window) 
        Knife = guiCreateStaticImage(626, 312, 85, 57, ":WeaponShop/img/knife.png", false, Window) 
        Granada = guiCreateStaticImage(252, 312, 85, 57, ":WeaponShop/img/nade.png", false, Window) 
        Tec = guiCreateStaticImage(617, 176, 88, 59, ":WeaponShop/img/tec9.png", false, Window) 
        Sniper = guiCreateStaticImage(495, 176, 87, 55, ":WeaponShop/img/sniper.png", false, Window) 
        Silenced = guiCreateStaticImage(252, 181, 85, 54, ":WeaponShop/img/silenced.png", false, Window) 
        Shoutung = guiCreateStaticImage(379, 184, 82, 57, ":WeaponShop/img/shotgun.png", false, Window) 
        Uzzi = guiCreateStaticImage(20, 319, 78, 50, ":WeaponShop/img/uzi.png", false, Window) 
        Gas = guiCreateStaticImage(137, 318, 79, 51, ":WeaponShop/img/teargas.png", false, Window) 
    end 
) 
  
  
  
addEventHandler("onClientGUIClick", root, 
function() 
if source == Cerrar then 
guiSetVisible(Window,false) 
showCursor(false) 
setElementFrozen( localPlayer, false ) 
end 
end 
) 
  
  
bindKey("F2","down",function() 
guiSetVisible(Window,not guiGetVisible(Window)) 
showCursor(guiGetVisible(Window)) 
end 
) 
  

Posted

No es GetVisible es SetVisible...

  
bindKey("F2","down",function() 
guiSetVisible(Window,false) 
showCursor(false) 
end 
) 
  

Lo probé asi y me funciona ;)

Currently developing for International Gaming Community - Join us!

Posted
Me dice Bad Argument GuiGetVisible Linea 81

Yo acabo de probar el script y funciona perfectamente.

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
addEventHandler("onClientResourceStart", resourceRoot, 
    function () 
        Window = guiCreateWindow(38, 58, 725, 482, "Weapon Shop", false) 
        guiWindowSetSizable(Window, false) 
        guiSetVisible(Window, false) 
      
        btnm4 = guiCreateButton(10, 100, 98, 44, "7500$ x 200", false, Window) 
        guiSetFont(btnm4, "default-bold-small") 
        btnknife = guiCreateButton(617, 379, 98, 44, "100$ x 1", false, Window) 
        guiSetFont(btnknife, "default-bold-small") 
        btnparachute = guiCreateButton(490, 379, 98, 44, "Price: 900$", false, Window) 
        guiSetFont(btnparachute, "default-bold-small") 
        btnsatchel = guiCreateButton(369, 379, 98, 44, "1500$ x 4", false, Window) 
        guiSetFont(btnsatchel, "default-bold-small") 
        btntec = guiCreateButton(613, 245, 98, 44, "5500$ x 200", false, Window) 
        guiSetFont(btntec, "default-bold-small") 
        btnsniper = guiCreateButton(490, 241, 98, 44, "9000$ x 200", false, Window) 
        guiSetFont(btnsniper, "default-bold-small") 
        btnshotgun = guiCreateButton(369, 245, 98, 44, "1400$ x 150", false, Window) 
        guiSetFont(btnshotgun, "default-bold-small") 
        btnsilenced = guiCreateButton(249, 245, 98, 44, "600$ x 80", false, Window) 
        guiSetFont(btnsilenced, "default-bold-small") 
        btndeagle = guiCreateButton(128, 245, 98, 44, "1000$ x 100", false, Window) 
        guiSetFont(btndeagle, "default-bold-small") 
        btnrifle = guiCreateButton(613, 100, 98, 44, "1000$ x 50", false, Window) 
        guiSetFont(btnrifle, "default-bold-small") 
        btndoubleshout = guiCreateButton(490, 100, 98, 44, "4200$ x 150", false, Window) 
        guiSetFont(btndoubleshout, "default-bold-small") 
        btnspaz = guiCreateButton(369, 100, 98, 44, "2900$ x 100", false, Window) 
        guiSetFont(btnspaz, "default-bold-small") 
        btnmp5 = guiCreateButton(249, 100, 98, 44, "3600$ 150", false, Window) 
        guiSetFont(btnmp5, "default-bold-small") 
        btnak = guiCreateButton(128, 100, 98, 44, "6500$ x 200", false, Window) 
        guiSetFont(btnak, "default-bold-small") 
        btnpistol = guiCreateButton(10, 245, 98, 44, "300$ x 50", false, Window) 
        guiSetFont(btnpistol, "default-bold-small") 
        btngranade = guiCreateButton(249, 379, 98, 44, "3000$ x 10", false, Window) 
        guiSetFont(btngranade, "default-bold-small") 
        btnteargas = guiCreateButton(128, 379, 98, 44, "1800$ x 10", false, Window) 
        guiSetFont(btnteargas, "default-bold-small") 
        btnuzi = guiCreateButton(10, 379, 98, 44, "3500$ 150", false, Window) 
        guiSetFont(btnuzi, "default-bold-small") 
        Cerrar = guiCreateButton(321, 444, 122, 28, "Cerrar", false, Window) 
        guiSetFont(Cerrar, "default-bold-small") 
         
        m4 = guiCreateStaticImage(16, 30, 82, 66, ":WeaponShop/img/M4.png", false, Window) 
        Ak = guiCreateStaticImage(134, 32, 86, 64, ":WeaponShop/img/AK-47.png", false, Window) 
        mMp5 = guiCreateStaticImage(255, 33, 86, 57, ":WeaponShop/img/MP5.png", false, Window) 
        Parachute = guiCreateStaticImage(496, 308, 86, 57, ":WeaponShop/img/PARACHUTE.png", false, Window) 
        Spaz = guiCreateStaticImage(372, 33, 85, 62, ":WeaponShop/img/SPAZ-12.png", false, Window) 
        Pistol = guiCreateStaticImage(16, 180, 86, 55, ":WeaponShop/img/pistol.png", false, Window) 
        Rifle = guiCreateStaticImage(617, 42, 89, 53, ":WeaponShop/img/rifle.png", false, Window) 
        Satchel = guiCreateStaticImage(374, 310, 83, 59, ":WeaponShop/img/satchel.png", false, Window) 
        Sawnoff = guiCreateStaticImage(500, 33, 78, 62, ":WeaponShop/img/sawnoff.png", false, Window) 
        Deagle = guiCreateStaticImage(132, 181, 84, 54, ":WeaponShop/img/deagle.png", false, Window) 
        Knife = guiCreateStaticImage(626, 312, 85, 57, ":WeaponShop/img/knife.png", false, Window) 
        Granada = guiCreateStaticImage(252, 312, 85, 57, ":WeaponShop/img/nade.png", false, Window) 
        Tec = guiCreateStaticImage(617, 176, 88, 59, ":WeaponShop/img/tec9.png", false, Window) 
        Sniper = guiCreateStaticImage(495, 176, 87, 55, ":WeaponShop/img/sniper.png", false, Window) 
        Silenced = guiCreateStaticImage(252, 181, 85, 54, ":WeaponShop/img/silenced.png", false, Window) 
        Shoutung = guiCreateStaticImage(379, 184, 82, 57, ":WeaponShop/img/shotgun.png", false, Window) 
        Uzzi = guiCreateStaticImage(20, 319, 78, 50, ":WeaponShop/img/uzi.png", false, Window) 
        Gas = guiCreateStaticImage(137, 318, 79, 51, ":WeaponShop/img/teargas.png", false, Window) 
    end 
) 
  
  
  
addEventHandler("onClientGUIClick", root, 
function() 
if source == Cerrar then 
guiSetVisible(Window,false) 
showCursor(false) 
setElementFrozen( localPlayer, false ) 
end 
end 
) 
  
  
bindKey("F2","down",function() 
guiSetVisible(Window,not guiGetVisible(Window)) 
showCursor(guiGetVisible(Window)) 
end 
) 
  

@Julian: Hubieras usado ese script, ya que lo unico que le falta al tuyo es ejecutar la funcion "win".

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 dice Bad Argument GuiGetVisible Linea 81

Yo acabo de probar el script y funciona perfectamente.

A mi también ^^

Currently developing for International Gaming Community - Join us!

  • Recently Browsing   0 members

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