18 Haziran 2018, 06:46:04

Gönderen Konu: [YARDIM] Silah Panel  (Okunma sayısı 492 defa)

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

Prose

  • Deneyimli Üye
  • *
  • İleti: 471
  • Gökhan Türkoglu
[YARDIM] Silah Panel
« : 13 Mayıs 2017, 21:21:05 »
Merhaba Beyler Bişe Soracam Size
Bnde Silah Paneli Var Ruhsatlı
Panel Gui Linkleri Görebilmek İçin Kayıt Olun veya Giriş Yapın'un Anlattı Konu Var Panele Renk Veriyor Yazı Bölümüne Onu Yapacaktım Fakat Olmadı Birde Panel Renkli Yerinden Sonra Resim Nasıl Koyabilrim Arkaplana ?
Client.Lua
Kod: Lua
  1. function CreateShopWindow()
  2.         ShopWindow = guiCreateWindow(350,250,450,320,"Ammunation",false)
  3.         guiCreateLabel(35,35,250,60,"Silah alabilmek için ruhsat al:$20.000",false,ShopWindow)
  4.         btn_buy_license = guiCreateButton(270,33,135,20,"Ruhsat Al",false,ShopWindow)
  5.  
  6.                 -- Below, not original price. It's just strings to the buttons. If you must change the weapon price, go to server-side script.
  7.                 -- Abaixo, as variáveis não são o preço real das armas. É apenas as strings para serem escritas nos botões. Se quer mudar o preço, mude no arquivo server-side.
  8.                 local price_porrete     = "1 TL"
  9.                 local price_m4          = "1 TL"
  10.                 local price_ak          = "1 TL"
  11.                 local price_tec9        = "1 TL"
  12.                 local price_mp5         = "1 TL"
  13.                 local price_knife       = "1 TL"
  14.                 local price_uzi         = "1 TL"
  15.                 local price_sniper      = "1 TL"
  16.                 local price_shotgun     = "1 TL"
  17.                 local price_spaz12      = "1TL"
  18.                 local price_pistol      = "1 TL"
  19.                 local price_teargas     = "1 TL"
  20.                 local price_rifle       = "1 TL"
  21.                 local price_satchel     = "1 TL"
  22.                 local price_grenade     = "1 TL"
  23.  
  24.                 btn_buy_porrete   = guiCreateButton(29,140,60,15,price_porrete,false,ShopWindow)
  25.                 btn_buy_m4        = guiCreateButton(109,140,60,15,price_m4,false,ShopWindow)
  26.                 btn_buy_ak        = guiCreateButton(189,140,60,15,price_ak,false,ShopWindow)
  27.                 btn_buy_tec9      = guiCreateButton(269,140,60,15,price_tec9,false,ShopWindow)
  28.                 btn_buy_mp5       = guiCreateButton(349,140,60,15,price_mp5,false,ShopWindow)
  29.                 btn_buy_knife     = guiCreateButton(29,220,60,15,price_knife,false,ShopWindow)
  30.                 btn_buy_uzi       = guiCreateButton(109,220,60,15,price_uzi,false,ShopWindow)
  31.                 btn_buy_sniper    = guiCreateButton(189,220,60,15,price_sniper,false,ShopWindow)
  32.                 btn_buy_shotgun   = guiCreateButton(269,220,60,15,price_shotgun,false,ShopWindow)
  33.                 btn_buy_spaz12    = guiCreateButton(349,220,60,15,price_spaz12,false,ShopWindow)
  34.                 btn_buy_pistol    = guiCreateButton(29,295,60,15,price_pistol,false,ShopWindow)
  35.                 btn_buy_teargas   = guiCreateButton(109,295,60,15,price_teargas,false,ShopWindow)
  36.                 btn_buy_rifle     = guiCreateButton(189,295,60,15,price_rifle,false,ShopWindow)
  37.                 btn_buy_satchel   = guiCreateButton(269,295,60,15,price_satchel,false,ShopWindow)
  38.                 btn_buy_grenade   = guiCreateButton(349,295,60,15,price_grenade,false,ShopWindow)
  39.                
  40.                 addEventHandler("onClientGUIClick", btn_buy_porrete, BuyWeapon)
  41.                 addEventHandler("onClientGUIClick", btn_buy_m4, BuyWeapon)
  42.                 addEventHandler("onClientGUIClick", btn_buy_ak, BuyWeapon)
  43.                 addEventHandler("onClientGUIClick", btn_buy_tec9, BuyWeapon)
  44.                 addEventHandler("onClientGUIClick", btn_buy_mp5, BuyWeapon)
  45.                 addEventHandler("onClientGUIClick", btn_buy_knife, BuyWeapon)
  46.                 addEventHandler("onClientGUIClick", btn_buy_uzi, BuyWeapon)
  47.                 addEventHandler("onClientGUIClick", btn_buy_sniper, BuyWeapon)
  48.                 addEventHandler("onClientGUIClick", btn_buy_shotgun, BuyWeapon)
  49.                 addEventHandler("onClientGUIClick", btn_buy_spaz12, BuyWeapon)
  50.                 addEventHandler("onClientGUIClick", btn_buy_pistol, BuyWeapon)
  51.                 addEventHandler("onClientGUIClick", btn_buy_teargas, BuyWeapon)
  52.                 addEventHandler("onClientGUIClick", btn_buy_rifle, BuyWeapon)
  53.                 addEventHandler("onClientGUIClick", btn_buy_satchel, BuyWeapon)
  54.                 addEventHandler("onClientGUIClick", btn_buy_grenade, BuyWeapon)
  55.                 addEventHandler("onClientGUIClick", btn_buy_license, BuyLicense)
  56.                
  57.                 guiCreateMemo(25,60,405,15,"                                                         ",false,ShopWindow)
  58.                 guiCreateStaticImage(30,80,60,60,"imagens/3.png", false,ShopWindow )
  59.                 guiCreateStaticImage(110,80,60,60,"imagens/31.png", false,ShopWindow )
  60.                 guiCreateStaticImage(190,80,60,60,"imagens/30.png", false,ShopWindow )
  61.                 guiCreateStaticImage(270,80,60,60,"imagens/32.png", false,ShopWindow )
  62.                 guiCreateStaticImage(350,80,60,60,"imagens/33.png", false,ShopWindow )
  63.                 guiCreateStaticImage(30,160,60,60,"imagens/1.png", false,ShopWindow )
  64.                 guiCreateStaticImage(110,160,60,60,"imagens/20.png", false,ShopWindow )
  65.                 guiCreateStaticImage(270,160,60,60,"imagens/27.png", false,ShopWindow )
  66.                 guiCreateStaticImage(350,160,60,60,"imagens/28.png", false,ShopWindow )
  67.                 guiCreateStaticImage(190,160,60,60,"imagens/29.png", false,ShopWindow )
  68.                 guiCreateStaticImage(30,240,60,60,"imagens/2.png", false,ShopWindow )
  69.                 guiCreateStaticImage(110,240,60,60,"imagens/26.png", false,ShopWindow )
  70.                 guiCreateStaticImage(190,240,60,60,"imagens/25.png", false,ShopWindow )
  71.                 guiCreateStaticImage(270,240,60,60,"imagens/4.png", false,ShopWindow )
  72.                 guiCreateStaticImage(350,240,60,60,"imagens/5.png", false,ShopWindow )
  73.  
  74.         guiWindowSetSizable(ShopWindow,false)
  75.         guiSetVisible(ShopWindow,false)
  76. end
  77. addEventHandler("onClientResourceStart", getRootElement(), CreateShopWindow)
  78.  
  79.  
  80.  
  81.  
  82. function BuyWeapon(button, state)
  83.  
  84.         if (button == "left") then
  85.        
  86.                 if(source == btn_buy_porrete) then
  87.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_porrete")
  88.                 elseif(source == btn_buy_m4) then
  89.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_m4")      
  90.                 elseif(source == btn_buy_ak) then
  91.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_ak")
  92.                 elseif(source == btn_buy_tec9) then
  93.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_tec9")
  94.                 elseif(source == btn_buy_mp5) then
  95.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_mp5")
  96.                 elseif(source == btn_buy_knife) then
  97.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_knife")
  98.                 elseif(source == btn_buy_uzi) then
  99.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_uzi")
  100.                 elseif(source == btn_buy_sniper) then
  101.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_sniper")
  102.                 elseif(source == btn_buy_shotgun) then
  103.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_shotgun")
  104.                 elseif(source == btn_buy_spaz12) then
  105.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_spaz12")
  106.                 elseif(source == btn_buy_pistol) then
  107.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_pistol")
  108.                 elseif(source == btn_buy_teargas) then
  109.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_teargas")
  110.                 elseif(source == btn_buy_rifle) then
  111.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_rifle")
  112.                 elseif(source == btn_buy_satchel) then
  113.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_satchel")
  114.                 elseif(source == btn_buy_grenade) then
  115.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_grenade") 
  116.                 end
  117.        
  118.         end
  119. end
  120.  
  121.  
  122. function BuyLicense(button)
  123.  
  124.         if(button == "left" and source == btn_buy_license) then
  125.                 triggerServerEvent("onClientBuyLicense", localPlayer)
  126.         end
  127.  
  128. end
  129.  
  130.  
  131. function ShowGUI ( )
  132.     guiSetVisible ( ShopWindow, not guiGetVisible ( ShopWindow ) )
  133.     showCursor ( not isCursorShowing( ) )
  134. end
  135. bindKey ( "F7","down", ShowGUI )

Resimler:

Yapmak İstedigim:(Birde Siyah Yere Resim Koyacagım



Benim Panelim:

« Son Düzenleme: 13 Mayıs 2017, 21:39:28 Gönderen: Narkoz »
 

MTASA-TURK | Türkiye'nin En Güncel MTA Platformu

[YARDIM] Silah Panel
« : 13 Mayıs 2017, 21:21:05 »

MarkeloF

  • Moderatör
  • *
  • İleti: 600
  • Just do it.
Ynt: [Yardım]Silah Panel
« Yanıtla #1 : 13 Mayıs 2017, 21:29:19 »
Konuyu dikkatlice okursan anlarsın.
Gayet anlaşılır bir anlatım.
                                                 
 

Rüzgar

  • Acemi Üye
  • *
  • İleti: 158
Ynt: [Yardım]Silah Panel
« Yanıtla #2 : 13 Mayıs 2017, 21:31:43 »
pxLib'in geliştirilmesi lazım, eğer ki sıfırdan bir lib olacaksa şarttır editbox vs eksik olduğu için kod yazman lazım ek olarak
 

Paradox

  • Kurucu
  • *
  • İleti: 638
  • SH Gaming
Ynt: [YARDIM] Silah Panel
« Yanıtla #3 : 13 Mayıs 2017, 22:07:49 »
Buyur ayarladım.
Kod: Lua
  1. function createPanel()
  2.         panelOlustur(350,250,450,320,"Ammunation",0,255,170,true)
  3.  
  4.  
  5.                 -- Below, not original price. It's just strings to the buttons. If you must change the weapon price, go to server-side script.
  6.                 -- Abaixo, as variáveis não são o preço real das armas. É apenas as strings para serem escritas nos botões. Se quer mudar o preço, mude no arquivo server-side.
  7.                 local price_porrete     = "1 TL"
  8.                 local price_m4          = "1 TL"
  9.                 local price_ak          = "1 TL"
  10.                 local price_tec9        = "1 TL"
  11.                 local price_mp5         = "1 TL"
  12.                 local price_knife       = "1 TL"
  13.                 local price_uzi         = "1 TL"
  14.                 local price_sniper      = "1 TL"
  15.                 local price_shotgun     = "1 TL"
  16.                 local price_spaz12      = "1 TL"
  17.                 local price_pistol      = "1 TL"
  18.                 local price_teargas     = "1 TL"
  19.                 local price_rifle       = "1 TL"
  20.                 local price_satchel     = "1 TL"
  21.                 local price_grenade     = "1 TL"
  22.  
  23.                 butonOlustur(29,140,60,15,price_porrete,250,0,250,pxLib.panel[1])
  24.                 butonOlustur(109,140,60,15,price_m4,250,0,250,pxLib.panel[1])
  25.                 butonOlustur(189,140,60,15,price_ak,250,0,250,pxLib.panel[1])
  26.                 butonOlustur(269,140,60,15,price_tec9,250,0,250,pxLib.panel[1])
  27.                 butonOlustur(349,140,60,15,price_mp5,250,0,250,pxLib.panel[1])
  28.                 butonOlustur(29,220,60,15,price_knife,250,0,250,pxLib.panel[1])
  29.                 butonOlustur(109,220,60,15,price_uzi,250,0,250,pxLib.panel[1])                         
  30.                 butonOlustur(189,220,60,15,price_sniper,250,0,250,pxLib.panel[1])
  31.                 butonOlustur(269,220,60,15,price_shotgun,250,0,250,pxLib.panel[1])
  32.                 butonOlustur(349,220,60,15,price_spaz12,250,0,250,pxLib.panel[1])
  33.                 butonOlustur(29,295,60,15,price_pistol,250,0,250,pxLib.panel[1])
  34.                 butonOlustur(109,295,60,15,price_teargas,250,0,250,pxLib.panel[1])
  35.                 butonOlustur(189,295,60,15,price_rifle,250,0,250,pxLib.panel[1])                               
  36.                 butonOlustur(269,295,60,15,price_satchel,250,0,250,pxLib.panel[1])
  37.                 butonOlustur(349,295,60,15,price_grenade,250,0,250,pxLib.panel[1])
  38.                                
  39.                 butonOlustur(270,33,135,20,"Ruhsat Al",250,0,250,pxLib.panel[1])                                                       
  40.                 guiCreateLabel(35,35,250,60,"Silah alabilmek için ruhsat al:$20.000",false,pxLib.panel[1])
  41.                        
  42.                
  43.                 addEventHandler("onClientGUIClick", pxLib.buton[1], BuyWeapon)
  44.                 addEventHandler("onClientGUIClick", pxLib.buton[2], BuyWeapon)
  45.                 addEventHandler("onClientGUIClick", pxLib.buton[3], BuyWeapon)
  46.                 addEventHandler("onClientGUIClick", pxLib.buton[4], BuyWeapon)
  47.                 addEventHandler("onClientGUIClick", pxLib.buton[5], BuyWeapon)
  48.                 addEventHandler("onClientGUIClick", pxLib.buton[6], BuyWeapon)
  49.                 addEventHandler("onClientGUIClick", pxLib.buton[7], BuyWeapon)
  50.                 addEventHandler("onClientGUIClick", pxLib.buton[8], BuyWeapon)
  51.                 addEventHandler("onClientGUIClick", pxLib.buton[9], BuyWeapon)
  52.                 addEventHandler("onClientGUIClick", pxLib.buton[10], BuyWeapon)
  53.                 addEventHandler("onClientGUIClick", pxLib.buton[11], BuyWeapon)
  54.                 addEventHandler("onClientGUIClick", pxLib.buton[12], BuyWeapon)
  55.                 addEventHandler("onClientGUIClick", pxLib.buton[13], BuyWeapon)
  56.                 addEventHandler("onClientGUIClick", pxLib.buton[14], BuyWeapon)
  57.                 addEventHandler("onClientGUIClick", pxLib.buton[15], BuyWeapon)
  58.                 addEventHandler("onClientGUIClick", pxLib.buton[16], BuyLicense)
  59.                
  60.                 guiCreateMemo(25,60,405,15,"                                                         ",false,pxLib.panel[1])
  61.                 guiCreateStaticImage(30,80,60,60,"imagens/3.png", false,pxLib.panel[1] )
  62.                 guiCreateStaticImage(110,80,60,60,"imagens/31.png", false,pxLib.panel[1] )
  63.                 guiCreateStaticImage(190,80,60,60,"imagens/30.png", false,pxLib.panel[1] )
  64.                 guiCreateStaticImage(270,80,60,60,"imagens/32.png", false,pxLib.panel[1] )
  65.                 guiCreateStaticImage(350,80,60,60,"imagens/33.png", false,pxLib.panel[1] )
  66.                 guiCreateStaticImage(30,160,60,60,"imagens/1.png", false,pxLib.panel[1] )
  67.                 guiCreateStaticImage(110,160,60,60,"imagens/20.png", false,pxLib.panel[1] )
  68.                 guiCreateStaticImage(270,160,60,60,"imagens/27.png", false,pxLib.panel[1] )
  69.                 guiCreateStaticImage(350,160,60,60,"imagens/28.png", false,pxLib.panel[1] )
  70.                 guiCreateStaticImage(190,160,60,60,"imagens/29.png", false,pxLib.panel[1] )
  71.                 guiCreateStaticImage(30,240,60,60,"imagens/2.png", false,pxLib.panel[1] )
  72.                 guiCreateStaticImage(110,240,60,60,"imagens/26.png", false,pxLib.panel[1] )
  73.                 guiCreateStaticImage(190,240,60,60,"imagens/25.png", false,pxLib.panel[1] )
  74.                 guiCreateStaticImage(270,240,60,60,"imagens/4.png", false,pxLib.panel[1] )
  75.                 guiCreateStaticImage(350,240,60,60,"imagens/5.png", false,pxLib.panel[1] )
  76.  
  77.         guiSetVisible(pxLib.panel[1],false)
  78. end
  79. addEventHandler("onClientResourceStart", getRootElement(), createPanel)
  80.  
  81.  
  82.  
  83.  
  84. function BuyWeapon(button, state)
  85.  
  86.         if (button == "left") then
  87.        
  88.                 if(source == pxLib.buton[1]) then
  89.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_porrete")
  90.                 elseif(source == pxLib.buton[2]) then
  91.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_m4")      
  92.                 elseif(source == pxLib.buton[3]) then
  93.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_ak")
  94.                 elseif(source == pxLib.buton[4]) then
  95.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_tec9")
  96.                 elseif(source == pxLib.buton[5]) then
  97.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_mp5")
  98.                 elseif(source == pxLib.buton[6]) then
  99.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_knife")
  100.                 elseif(source == pxLib.buton[7]) then
  101.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_uzi")
  102.                 elseif(source == pxLib.buton[8]) then
  103.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_sniper")
  104.                 elseif(source == pxLib.buton[9]) then
  105.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_shotgun")
  106.                 elseif(source == pxLib.buton[10]) then
  107.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_spaz12")
  108.                 elseif(source == pxLib.buton[11]) then
  109.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_pistol")
  110.                 elseif(source == pxLib.buton[12]) then
  111.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_teargas")
  112.                 elseif(source == pxLib.buton[13]) then
  113.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_rifle")
  114.                 elseif(source == pxLib.buton[14]) then
  115.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_satchel")
  116.                 elseif(source == pxLib.buton[15]) then
  117.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_grenade")  
  118.                 end
  119.        
  120.         end
  121. end
  122.  
  123.  
  124. function BuyLicense(button)
  125.  
  126.         if(button == "left" and source == pxLib.buton[16]) then
  127.                 triggerServerEvent("onClientBuyLicense", localPlayer)
  128.         end
  129.  
  130. end
  131.  
  132.  
  133. function ShowGUI ( )
  134.     guiSetVisible ( pxLib.panel[1], not guiGetVisible ( pxLib.panel[1] ) )
  135.     showCursor ( not isCursorShowing( ) )
  136. end
  137. bindKey ( "F7","down", ShowGUI )
 

Prose

  • Deneyimli Üye
  • *
  • İleti: 471
  • Gökhan Türkoglu
Ynt: [YARDIM] Silah Panel
« Yanıtla #4 : 13 Mayıs 2017, 23:17:46 »
Linkleri Görebilmek İçin Kayıt Olun veya Giriş Yapın
Buyur ayarladım.
Kod: Lua
  1. function createPanel()
  2.         panelOlustur(350,250,450,320,"Ammunation",0,255,170,true)
  3.  
  4.  
  5.                 -- Below, not original price. It's just strings to the buttons. If you must change the weapon price, go to server-side script.
  6.                 -- Abaixo, as variáveis não são o preço real das armas. É apenas as strings para serem escritas nos botões. Se quer mudar o preço, mude no arquivo server-side.
  7.                 local price_porrete     = "1 TL"
  8.                 local price_m4          = "1 TL"
  9.                 local price_ak          = "1 TL"
  10.                 local price_tec9        = "1 TL"
  11.                 local price_mp5         = "1 TL"
  12.                 local price_knife       = "1 TL"
  13.                 local price_uzi         = "1 TL"
  14.                 local price_sniper      = "1 TL"
  15.                 local price_shotgun     = "1 TL"
  16.                 local price_spaz12      = "1 TL"
  17.                 local price_pistol      = "1 TL"
  18.                 local price_teargas     = "1 TL"
  19.                 local price_rifle       = "1 TL"
  20.                 local price_satchel     = "1 TL"
  21.                 local price_grenade     = "1 TL"
  22.  
  23.                 butonOlustur(29,140,60,15,price_porrete,250,0,250,pxLib.panel[1])
  24.                 butonOlustur(109,140,60,15,price_m4,250,0,250,pxLib.panel[1])
  25.                 butonOlustur(189,140,60,15,price_ak,250,0,250,pxLib.panel[1])
  26.                 butonOlustur(269,140,60,15,price_tec9,250,0,250,pxLib.panel[1])
  27.                 butonOlustur(349,140,60,15,price_mp5,250,0,250,pxLib.panel[1])
  28.                 butonOlustur(29,220,60,15,price_knife,250,0,250,pxLib.panel[1])
  29.                 butonOlustur(109,220,60,15,price_uzi,250,0,250,pxLib.panel[1])                         
  30.                 butonOlustur(189,220,60,15,price_sniper,250,0,250,pxLib.panel[1])
  31.                 butonOlustur(269,220,60,15,price_shotgun,250,0,250,pxLib.panel[1])
  32.                 butonOlustur(349,220,60,15,price_spaz12,250,0,250,pxLib.panel[1])
  33.                 butonOlustur(29,295,60,15,price_pistol,250,0,250,pxLib.panel[1])
  34.                 butonOlustur(109,295,60,15,price_teargas,250,0,250,pxLib.panel[1])
  35.                 butonOlustur(189,295,60,15,price_rifle,250,0,250,pxLib.panel[1])                               
  36.                 butonOlustur(269,295,60,15,price_satchel,250,0,250,pxLib.panel[1])
  37.                 butonOlustur(349,295,60,15,price_grenade,250,0,250,pxLib.panel[1])
  38.                                
  39.                 butonOlustur(270,33,135,20,"Ruhsat Al",250,0,250,pxLib.panel[1])                                                       
  40.                 guiCreateLabel(35,35,250,60,"Silah alabilmek için ruhsat al:$20.000",false,pxLib.panel[1])
  41.                        
  42.                
  43.                 addEventHandler("onClientGUIClick", pxLib.buton[1], BuyWeapon)
  44.                 addEventHandler("onClientGUIClick", pxLib.buton[2], BuyWeapon)
  45.                 addEventHandler("onClientGUIClick", pxLib.buton[3], BuyWeapon)
  46.                 addEventHandler("onClientGUIClick", pxLib.buton[4], BuyWeapon)
  47.                 addEventHandler("onClientGUIClick", pxLib.buton[5], BuyWeapon)
  48.                 addEventHandler("onClientGUIClick", pxLib.buton[6], BuyWeapon)
  49.                 addEventHandler("onClientGUIClick", pxLib.buton[7], BuyWeapon)
  50.                 addEventHandler("onClientGUIClick", pxLib.buton[8], BuyWeapon)
  51.                 addEventHandler("onClientGUIClick", pxLib.buton[9], BuyWeapon)
  52.                 addEventHandler("onClientGUIClick", pxLib.buton[10], BuyWeapon)
  53.                 addEventHandler("onClientGUIClick", pxLib.buton[11], BuyWeapon)
  54.                 addEventHandler("onClientGUIClick", pxLib.buton[12], BuyWeapon)
  55.                 addEventHandler("onClientGUIClick", pxLib.buton[13], BuyWeapon)
  56.                 addEventHandler("onClientGUIClick", pxLib.buton[14], BuyWeapon)
  57.                 addEventHandler("onClientGUIClick", pxLib.buton[15], BuyWeapon)
  58.                 addEventHandler("onClientGUIClick", pxLib.buton[16], BuyLicense)
  59.                
  60.                 guiCreateMemo(25,60,405,15,"                                                         ",false,pxLib.panel[1])
  61.                 guiCreateStaticImage(30,80,60,60,"imagens/3.png", false,pxLib.panel[1] )
  62.                 guiCreateStaticImage(110,80,60,60,"imagens/31.png", false,pxLib.panel[1] )
  63.                 guiCreateStaticImage(190,80,60,60,"imagens/30.png", false,pxLib.panel[1] )
  64.                 guiCreateStaticImage(270,80,60,60,"imagens/32.png", false,pxLib.panel[1] )
  65.                 guiCreateStaticImage(350,80,60,60,"imagens/33.png", false,pxLib.panel[1] )
  66.                 guiCreateStaticImage(30,160,60,60,"imagens/1.png", false,pxLib.panel[1] )
  67.                 guiCreateStaticImage(110,160,60,60,"imagens/20.png", false,pxLib.panel[1] )
  68.                 guiCreateStaticImage(270,160,60,60,"imagens/27.png", false,pxLib.panel[1] )
  69.                 guiCreateStaticImage(350,160,60,60,"imagens/28.png", false,pxLib.panel[1] )
  70.                 guiCreateStaticImage(190,160,60,60,"imagens/29.png", false,pxLib.panel[1] )
  71.                 guiCreateStaticImage(30,240,60,60,"imagens/2.png", false,pxLib.panel[1] )
  72.                 guiCreateStaticImage(110,240,60,60,"imagens/26.png", false,pxLib.panel[1] )
  73.                 guiCreateStaticImage(190,240,60,60,"imagens/25.png", false,pxLib.panel[1] )
  74.                 guiCreateStaticImage(270,240,60,60,"imagens/4.png", false,pxLib.panel[1] )
  75.                 guiCreateStaticImage(350,240,60,60,"imagens/5.png", false,pxLib.panel[1] )
  76.  
  77.         guiSetVisible(pxLib.panel[1],false)
  78. end
  79. addEventHandler("onClientResourceStart", getRootElement(), createPanel)
  80.  
  81.  
  82.  
  83.  
  84. function BuyWeapon(button, state)
  85.  
  86.         if (button == "left") then
  87.        
  88.                 if(source == pxLib.buton[1]) then
  89.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_porrete")
  90.                 elseif(source == pxLib.buton[2]) then
  91.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_m4")      
  92.                 elseif(source == pxLib.buton[3]) then
  93.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_ak")
  94.                 elseif(source == pxLib.buton[4]) then
  95.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_tec9")
  96.                 elseif(source == pxLib.buton[5]) then
  97.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_mp5")
  98.                 elseif(source == pxLib.buton[6]) then
  99.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_knife")
  100.                 elseif(source == pxLib.buton[7]) then
  101.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_uzi")
  102.                 elseif(source == pxLib.buton[8]) then
  103.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_sniper")
  104.                 elseif(source == pxLib.buton[9]) then
  105.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_shotgun")
  106.                 elseif(source == pxLib.buton[10]) then
  107.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_spaz12")
  108.                 elseif(source == pxLib.buton[11]) then
  109.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_pistol")
  110.                 elseif(source == pxLib.buton[12]) then
  111.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_teargas")
  112.                 elseif(source == pxLib.buton[13]) then
  113.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_rifle")
  114.                 elseif(source == pxLib.buton[14]) then
  115.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_satchel")
  116.                 elseif(source == pxLib.buton[15]) then
  117.                         triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_grenade")  
  118.                 end
  119.        
  120.         end
  121. end
  122.  
  123.  
  124. function BuyLicense(button)
  125.  
  126.         if(button == "left" and source == pxLib.buton[16]) then
  127.                 triggerServerEvent("onClientBuyLicense", localPlayer)
  128.         end
  129.  
  130. end
  131.  
  132.  
  133. function ShowGUI ( )
  134.     guiSetVisible ( pxLib.panel[1], not guiGetVisible ( pxLib.panel[1] ) )
  135.     showCursor ( not isCursorShowing( ) )
  136. end
  137. bindKey ( "F7","down", ShowGUI )
Calısmadı
 

Paradox

  • Kurucu
  • *
  • İleti: 638
  • SH Gaming
Ynt: [YARDIM] Silah Panel
« Yanıtla #5 : 13 Mayıs 2017, 23:22:50 »
Linkleri Görebilmek İçin Kayıt Olun veya Giriş Yapın
Calısmadı

Çalışmadı değil, çalıştıramadın.
Linkleri Görebilmek İçin Kayıt Olun veya Giriş Yapın


 

MTASA-TURK | Türkiye'nin En Güncel MTA Platformu

Ynt: [YARDIM] Silah Panel
« Yanıtla #5 : 13 Mayıs 2017, 23:22:50 »

Prose

  • Deneyimli Üye
  • *
  • İleti: 471
  • Gökhan Türkoglu
Ynt: [YARDIM] Silah Panel
« Yanıtla #6 : 13 Mayıs 2017, 23:31:13 »
Eyw Sagolasın :)  <3 :o
@Konu Kilit
 

ByCash

  • Süper Moderatör
  • *
  • İleti: 933
  • LS Gaming
    • MTASA-TURK
Ynt: [YARDIM] Silah Panel
« Yanıtla #7 : 13 Mayıs 2017, 23:34:42 »
Konu sahibinin isteği üzerine konu kilitlenmiştir.