0 Üye ve 1 Ziyaretçi konuyu incelemekte.
function CreateShopWindow() ShopWindow = guiCreateWindow(350,250,450,320,"Ammunation",false) guiCreateLabel(35,35,250,60,"Silah alabilmek için ruhsat al:lua0.000",false,ShopWindow) btn_buy_license = guiCreateButton(270,33,135,20,"Ruhsat Al",false,ShopWindow) -- Below, not original price. It's just strings to the buttons. If you must change the weapon price, go to server-side script. -- 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. local price_porrete = "1 TL" local price_m4 = "1 TL" local price_ak = "1 TL" local price_tec9 = "1 TL" local price_mp5 = "1 TL" local price_knife = "1 TL" local price_uzi = "1 TL" local price_sniper = "1 TL" local price_shotgun = "1 TL" local price_spaz12 = "1TL" local price_pistol = "1 TL" local price_teargas = "1 TL" local price_rifle = "1 TL" local price_satchel = "1 TL" local price_grenade = "1 TL" btn_buy_porrete = guiCreateButton(29,140,60,15,price_porrete,false,ShopWindow) btn_buy_m4 = guiCreateButton(109,140,60,15,price_m4,false,ShopWindow) btn_buy_ak = guiCreateButton(189,140,60,15,price_ak,false,ShopWindow) btn_buy_tec9 = guiCreateButton(269,140,60,15,price_tec9,false,ShopWindow) btn_buy_mp5 = guiCreateButton(349,140,60,15,price_mp5,false,ShopWindow) btn_buy_knife = guiCreateButton(29,220,60,15,price_knife,false,ShopWindow) btn_buy_uzi = guiCreateButton(109,220,60,15,price_uzi,false,ShopWindow) btn_buy_sniper = guiCreateButton(189,220,60,15,price_sniper,false,ShopWindow) btn_buy_shotgun = guiCreateButton(269,220,60,15,price_shotgun,false,ShopWindow) btn_buy_spaz12 = guiCreateButton(349,220,60,15,price_spaz12,false,ShopWindow) btn_buy_pistol = guiCreateButton(29,295,60,15,price_pistol,false,ShopWindow) btn_buy_teargas = guiCreateButton(109,295,60,15,price_teargas,false,ShopWindow) btn_buy_rifle = guiCreateButton(189,295,60,15,price_rifle,false,ShopWindow) btn_buy_satchel = guiCreateButton(269,295,60,15,price_satchel,false,ShopWindow) btn_buy_grenade = guiCreateButton(349,295,60,15,price_grenade,false,ShopWindow) addEventHandler("onClientGUIClick", btn_buy_porrete, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_m4, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_ak, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_tec9, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_mp5, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_knife, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_uzi, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_sniper, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_shotgun, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_spaz12, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_pistol, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_teargas, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_rifle, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_satchel, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_grenade, BuyWeapon) addEventHandler("onClientGUIClick", btn_buy_license, BuyLicense) guiCreateMemo(25,60,405,15," ",false,ShopWindow) guiCreateStaticImage(30,80,60,60,"imagens/3.png", false,ShopWindow ) guiCreateStaticImage(110,80,60,60,"imagens/31.png", false,ShopWindow ) guiCreateStaticImage(190,80,60,60,"imagens/30.png", false,ShopWindow ) guiCreateStaticImage(270,80,60,60,"imagens/32.png", false,ShopWindow ) guiCreateStaticImage(350,80,60,60,"imagens/33.png", false,ShopWindow ) guiCreateStaticImage(30,160,60,60,"imagens/1.png", false,ShopWindow ) guiCreateStaticImage(110,160,60,60,"imagens/20.png", false,ShopWindow ) guiCreateStaticImage(270,160,60,60,"imagens/27.png", false,ShopWindow ) guiCreateStaticImage(350,160,60,60,"imagens/28.png", false,ShopWindow ) guiCreateStaticImage(190,160,60,60,"imagens/29.png", false,ShopWindow ) guiCreateStaticImage(30,240,60,60,"imagens/2.png", false,ShopWindow ) guiCreateStaticImage(110,240,60,60,"imagens/26.png", false,ShopWindow ) guiCreateStaticImage(190,240,60,60,"imagens/25.png", false,ShopWindow ) guiCreateStaticImage(270,240,60,60,"imagens/4.png", false,ShopWindow ) guiCreateStaticImage(350,240,60,60,"imagens/5.png", false,ShopWindow ) guiWindowSetSizable(ShopWindow,false) guiSetVisible(ShopWindow,false)endaddEventHandler("onClientResourceStart", getRootElement(), CreateShopWindow)function BuyWeapon(button, state) if (button == "left") then if(source == btn_buy_porrete) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_porrete") elseif(source == btn_buy_m4) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_m4") elseif(source == btn_buy_ak) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_ak") elseif(source == btn_buy_tec9) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_tec9") elseif(source == btn_buy_mp5) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_mp5") elseif(source == btn_buy_knife) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_knife") elseif(source == btn_buy_uzi) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_uzi") elseif(source == btn_buy_sniper) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_sniper") elseif(source == btn_buy_shotgun) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_shotgun") elseif(source == btn_buy_spaz12) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_spaz12") elseif(source == btn_buy_pistol) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_pistol") elseif(source == btn_buy_teargas) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_teargas") elseif(source == btn_buy_rifle) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_rifle") elseif(source == btn_buy_satchel) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_satchel") elseif(source == btn_buy_grenade) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_grenade") end endend function BuyLicense(button) if(button == "left" and source == btn_buy_license) then triggerServerEvent("onClientBuyLicense", localPlayer) endend function ShowGUI ( ) guiSetVisible ( ShopWindow, not guiGetVisible ( ShopWindow ) ) showCursor ( not isCursorShowing( ) )endbindKey ( "F7","down", ShowGUI )
function createPanel() panelOlustur(350,250,450,320,"Ammunation",0,255,170,true) -- Below, not original price. It's just strings to the buttons. If you must change the weapon price, go to server-side script. -- 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. local price_porrete = "1 TL" local price_m4 = "1 TL" local price_ak = "1 TL" local price_tec9 = "1 TL" local price_mp5 = "1 TL" local price_knife = "1 TL" local price_uzi = "1 TL" local price_sniper = "1 TL" local price_shotgun = "1 TL" local price_spaz12 = "1 TL" local price_pistol = "1 TL" local price_teargas = "1 TL" local price_rifle = "1 TL" local price_satchel = "1 TL" local price_grenade = "1 TL" butonOlustur(29,140,60,15,price_porrete,250,0,250,pxLib.panel[1]) butonOlustur(109,140,60,15,price_m4,250,0,250,pxLib.panel[1]) butonOlustur(189,140,60,15,price_ak,250,0,250,pxLib.panel[1]) butonOlustur(269,140,60,15,price_tec9,250,0,250,pxLib.panel[1]) butonOlustur(349,140,60,15,price_mp5,250,0,250,pxLib.panel[1]) butonOlustur(29,220,60,15,price_knife,250,0,250,pxLib.panel[1]) butonOlustur(109,220,60,15,price_uzi,250,0,250,pxLib.panel[1]) butonOlustur(189,220,60,15,price_sniper,250,0,250,pxLib.panel[1]) butonOlustur(269,220,60,15,price_shotgun,250,0,250,pxLib.panel[1]) butonOlustur(349,220,60,15,price_spaz12,250,0,250,pxLib.panel[1]) butonOlustur(29,295,60,15,price_pistol,250,0,250,pxLib.panel[1]) butonOlustur(109,295,60,15,price_teargas,250,0,250,pxLib.panel[1]) butonOlustur(189,295,60,15,price_rifle,250,0,250,pxLib.panel[1]) butonOlustur(269,295,60,15,price_satchel,250,0,250,pxLib.panel[1]) butonOlustur(349,295,60,15,price_grenade,250,0,250,pxLib.panel[1]) butonOlustur(270,33,135,20,"Ruhsat Al",250,0,250,pxLib.panel[1]) guiCreateLabel(35,35,250,60,"Silah alabilmek için ruhsat al:lua0.000",false,pxLib.panel[1]) addEventHandler("onClientGUIClick", pxLib.buton[1], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[2], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[3], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[4], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[5], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[6], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[7], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[8], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[9], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[10], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[11], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[12], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[13], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[14], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[15], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[16], BuyLicense) guiCreateMemo(25,60,405,15," ",false,pxLib.panel[1]) guiCreateStaticImage(30,80,60,60,"imagens/3.png", false,pxLib.panel[1] ) guiCreateStaticImage(110,80,60,60,"imagens/31.png", false,pxLib.panel[1] ) guiCreateStaticImage(190,80,60,60,"imagens/30.png", false,pxLib.panel[1] ) guiCreateStaticImage(270,80,60,60,"imagens/32.png", false,pxLib.panel[1] ) guiCreateStaticImage(350,80,60,60,"imagens/33.png", false,pxLib.panel[1] ) guiCreateStaticImage(30,160,60,60,"imagens/1.png", false,pxLib.panel[1] ) guiCreateStaticImage(110,160,60,60,"imagens/20.png", false,pxLib.panel[1] ) guiCreateStaticImage(270,160,60,60,"imagens/27.png", false,pxLib.panel[1] ) guiCreateStaticImage(350,160,60,60,"imagens/28.png", false,pxLib.panel[1] ) guiCreateStaticImage(190,160,60,60,"imagens/29.png", false,pxLib.panel[1] ) guiCreateStaticImage(30,240,60,60,"imagens/2.png", false,pxLib.panel[1] ) guiCreateStaticImage(110,240,60,60,"imagens/26.png", false,pxLib.panel[1] ) guiCreateStaticImage(190,240,60,60,"imagens/25.png", false,pxLib.panel[1] ) guiCreateStaticImage(270,240,60,60,"imagens/4.png", false,pxLib.panel[1] ) guiCreateStaticImage(350,240,60,60,"imagens/5.png", false,pxLib.panel[1] ) guiSetVisible(pxLib.panel[1],false)endaddEventHandler("onClientResourceStart", getRootElement(), createPanel) function BuyWeapon(button, state) if (button == "left") then if(source == pxLib.buton[1]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_porrete") elseif(source == pxLib.buton[2]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_m4") elseif(source == pxLib.buton[3]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_ak") elseif(source == pxLib.buton[4]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_tec9") elseif(source == pxLib.buton[5]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_mp5") elseif(source == pxLib.buton[6]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_knife") elseif(source == pxLib.buton[7]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_uzi") elseif(source == pxLib.buton[8]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_sniper") elseif(source == pxLib.buton[9]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_shotgun") elseif(source == pxLib.buton[10]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_spaz12") elseif(source == pxLib.buton[11]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_pistol") elseif(source == pxLib.buton[12]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_teargas") elseif(source == pxLib.buton[13]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_rifle") elseif(source == pxLib.buton[14]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_satchel") elseif(source == pxLib.buton[15]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_grenade") end endend function BuyLicense(button) if(button == "left" and source == pxLib.buton[16]) then triggerServerEvent("onClientBuyLicense", localPlayer) end end function ShowGUI ( ) guiSetVisible ( pxLib.panel[1], not guiGetVisible ( pxLib.panel[1] ) ) showCursor ( not isCursorShowing( ) )endbindKey ( "F7","down", ShowGUI )
Buyur ayarladım.Kod: luafunction createPanel() panelOlustur(350,250,450,320,"Ammunation",0,255,170,true) -- Below, not original price. It's just strings to the buttons. If you must change the weapon price, go to server-side script. -- 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. local price_porrete = "1 TL" local price_m4 = "1 TL" local price_ak = "1 TL" local price_tec9 = "1 TL" local price_mp5 = "1 TL" local price_knife = "1 TL" local price_uzi = "1 TL" local price_sniper = "1 TL" local price_shotgun = "1 TL" local price_spaz12 = "1 TL" local price_pistol = "1 TL" local price_teargas = "1 TL" local price_rifle = "1 TL" local price_satchel = "1 TL" local price_grenade = "1 TL" butonOlustur(29,140,60,15,price_porrete,250,0,250,pxLib.panel[1]) butonOlustur(109,140,60,15,price_m4,250,0,250,pxLib.panel[1]) butonOlustur(189,140,60,15,price_ak,250,0,250,pxLib.panel[1]) butonOlustur(269,140,60,15,price_tec9,250,0,250,pxLib.panel[1]) butonOlustur(349,140,60,15,price_mp5,250,0,250,pxLib.panel[1]) butonOlustur(29,220,60,15,price_knife,250,0,250,pxLib.panel[1]) butonOlustur(109,220,60,15,price_uzi,250,0,250,pxLib.panel[1]) butonOlustur(189,220,60,15,price_sniper,250,0,250,pxLib.panel[1]) butonOlustur(269,220,60,15,price_shotgun,250,0,250,pxLib.panel[1]) butonOlustur(349,220,60,15,price_spaz12,250,0,250,pxLib.panel[1]) butonOlustur(29,295,60,15,price_pistol,250,0,250,pxLib.panel[1]) butonOlustur(109,295,60,15,price_teargas,250,0,250,pxLib.panel[1]) butonOlustur(189,295,60,15,price_rifle,250,0,250,pxLib.panel[1]) butonOlustur(269,295,60,15,price_satchel,250,0,250,pxLib.panel[1]) butonOlustur(349,295,60,15,price_grenade,250,0,250,pxLib.panel[1]) butonOlustur(270,33,135,20,"Ruhsat Al",250,0,250,pxLib.panel[1]) guiCreateLabel(35,35,250,60,"Silah alabilmek için ruhsat al:lua0.000",false,pxLib.panel[1]) addEventHandler("onClientGUIClick", pxLib.buton[1], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[2], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[3], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[4], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[5], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[6], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[7], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[8], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[9], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[10], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[11], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[12], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[13], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[14], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[15], BuyWeapon) addEventHandler("onClientGUIClick", pxLib.buton[16], BuyLicense) guiCreateMemo(25,60,405,15," ",false,pxLib.panel[1]) guiCreateStaticImage(30,80,60,60,"imagens/3.png", false,pxLib.panel[1] ) guiCreateStaticImage(110,80,60,60,"imagens/31.png", false,pxLib.panel[1] ) guiCreateStaticImage(190,80,60,60,"imagens/30.png", false,pxLib.panel[1] ) guiCreateStaticImage(270,80,60,60,"imagens/32.png", false,pxLib.panel[1] ) guiCreateStaticImage(350,80,60,60,"imagens/33.png", false,pxLib.panel[1] ) guiCreateStaticImage(30,160,60,60,"imagens/1.png", false,pxLib.panel[1] ) guiCreateStaticImage(110,160,60,60,"imagens/20.png", false,pxLib.panel[1] ) guiCreateStaticImage(270,160,60,60,"imagens/27.png", false,pxLib.panel[1] ) guiCreateStaticImage(350,160,60,60,"imagens/28.png", false,pxLib.panel[1] ) guiCreateStaticImage(190,160,60,60,"imagens/29.png", false,pxLib.panel[1] ) guiCreateStaticImage(30,240,60,60,"imagens/2.png", false,pxLib.panel[1] ) guiCreateStaticImage(110,240,60,60,"imagens/26.png", false,pxLib.panel[1] ) guiCreateStaticImage(190,240,60,60,"imagens/25.png", false,pxLib.panel[1] ) guiCreateStaticImage(270,240,60,60,"imagens/4.png", false,pxLib.panel[1] ) guiCreateStaticImage(350,240,60,60,"imagens/5.png", false,pxLib.panel[1] ) guiSetVisible(pxLib.panel[1],false)endaddEventHandler("onClientResourceStart", getRootElement(), createPanel) function BuyWeapon(button, state) if (button == "left") then if(source == pxLib.buton[1]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_porrete") elseif(source == pxLib.buton[2]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_m4") elseif(source == pxLib.buton[3]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_ak") elseif(source == pxLib.buton[4]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_tec9") elseif(source == pxLib.buton[5]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_mp5") elseif(source == pxLib.buton[6]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_knife") elseif(source == pxLib.buton[7]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_uzi") elseif(source == pxLib.buton[8]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_sniper") elseif(source == pxLib.buton[9]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_shotgun") elseif(source == pxLib.buton[10]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_spaz12") elseif(source == pxLib.buton[11]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_pistol") elseif(source == pxLib.buton[12]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_teargas") elseif(source == pxLib.buton[13]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_rifle") elseif(source == pxLib.buton[14]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_satchel") elseif(source == pxLib.buton[15]) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_grenade") end endend function BuyLicense(button) if(button == "left" and source == pxLib.buton[16]) then triggerServerEvent("onClientBuyLicense", localPlayer) end end function ShowGUI ( ) guiSetVisible ( pxLib.panel[1], not guiGetVisible ( pxLib.panel[1] ) ) showCursor ( not isCursorShowing( ) )endbindKey ( "F7","down", ShowGUI )
Calısmadı