تم سويتلك ياه
ومجربه علشان لا تقول مب شغال
wnd = guiCreateWindow(119, 103, 782, 569, "Shop System.", false)
guiWindowSetSizable(wnd, false)
guiSetAlpha(wnd, 1.00)
guiSetVisible(wnd,false)
buttontec9 = guiCreateButton(562, 155, 125, 40, "Buy Tec9 42000$", false, wnd)
local font0_Foxes = guiCreateFont(":weaponshopdx/Foxes.ttf", 10)
guiSetFont(buttontec9, font0_Foxes)
guiSetProperty(buttontec9, "NormalTextColour", "FFFE6000")
buttonm4 = guiCreateButton(359, 155, 125, 40, "Buy M4 80000$", false, wnd)
guiSetFont(buttonm4, font0_Foxes)
guiSetProperty(buttonm4, "NormalTextColour", "FFFE6000")
buttonspaz12 = guiCreateButton(191, 155, 125, 40, "Buy Spaz 50000$", false, wnd)
guiSetFont(buttonspaz12, font0_Foxes)
guiSetProperty(buttonspaz12, "NormalTextColour", "FFFE6000")
buttonak47 = guiCreateButton(32, 155, 125, 40, "Buy Ak 47 10000$", false, wnd)
guiSetFont(buttonak47, font0_Foxes)
guiSetProperty(buttonak47, "NormalTextColour", "FFFE6000")
img1 = guiCreateStaticImage(22, 39, 145, 106, "Ak47.png", false, wnd)
img2 = guiCreateStaticImage(190, 58, 132, 89, "Spaz.png", false, wnd)
img3 = guiCreateStaticImage(365, 53, 115, 97, "M4.png", false, wnd)
buttonhealth = guiCreateButton(566, 333, 125, 40, "Buy Health 500$", false, wnd)
guiSetFont(buttonhealth, font0_Foxes)
guiSetProperty(buttonhealth, "NormalTextColour", "FFFE6000")
buttonarmour = guiCreateButton(376, 333, 125, 40, "Buy Armour 100$", false, wnd)
guiSetFont(buttonarmour, font0_Foxes)
guiSetProperty(buttonarmour, "NormalTextColour", "FFFE6000")
buttonuzi = guiCreateButton(25, 332, 125, 40, "Buy Uzi 60000$", false, wnd)
guiSetFont(buttonuzi, font0_Foxes)
guiSetProperty(buttonuzi, "NormalTextColour", "FFFE6000")
img4 = guiCreateStaticImage(35, 214, 95, 108, "Uzi.png", false, wnd)
img5 = guiCreateStaticImage(200, 206, 126, 124, "Recortada.png", false, wnd)
buttonSawedoff = guiCreateButton(200, 332, 125, 40, "Buy Sawed-off 65000$", false, wnd)
guiSetFont(buttonSawedoff, font0_Foxes)
guiSetProperty(buttonSawedoff, "NormalTextColour", "FFFE6000")
img6 = guiCreateStaticImage(387, 206, 104, 112, "yelek.png", false, wnd)
img7 = guiCreateStaticImage(567, 225, 124, 90, "kalp.png", false, wnd)
img8 = guiCreateStaticImage(547, 36, 144, 102, "Tec9.png", false, wnd)
buttonskinvip = guiCreateButton(15, 480, 145, 38, "Skin Vip 150000 $", false, wnd)
guiSetFont(buttonskinvip, font0_Foxes)
guiSetProperty(buttonskinvip, "NormalTextColour", "FFFE6000")
img9 = guiCreateStaticImage(31, 376, 105, 94, "kas.png", false, wnd)
lbl1 = guiCreateLabel(335, 528, 131, 20, "Script By MusiQue", false, wnd)
guiSetFont(lbl1, font0_Foxes)
guiLabelSetColor(lbl1, 0, 239, 253)
lbl2 = guiCreateLabel(739, 26, 33, 47, "*", false, wnd)
guiSetFont(lbl2, "sa-gothic")
guiLabelSetColor(lbl2, 252, 172, 0)
lbl3 = guiCreateLabel(739, 512, 33, 47, "*", false, wnd)
guiSetFont(lbl3, "sa-gothic")
guiLabelSetColor(lbl3, 0, 243, 251)
lbl4 = guiCreateLabel(8, 522, 33, 47, "*", false, wnd)
guiSetFont(lbl4, "sa-gothic")
guiLabelSetColor(lbl4, 6, 236, 244)
x = guiCreateButton(352, 428, 74, 44, "Close", false, wnd)
guiSetFont(x, font0_Foxes)
guiSetProperty(x, "NormalTextColour", "FFF04F00")
bindKey( 'F5', 'down',
function ( )
guiSetVisible( wnd, not guiGetVisible ( wnd ) )
showCursor ( not isCursorShowing ( ) )
end )
function Close ()
if source == x then
showCursor (false)
guiSetVisible (wnd,false)
end
end
addEventHandler ( "onClientGUIClick", root, Close)
addEventHandler ( "onClientGUIClick", root,
function ( )
if source == buttonm4 then
triggerServerEvent ( "M4v", localPlayer )
elseif source == buttonspaz12 then
triggerServerEvent ( "spaz12", localPlayer )
elseif source == buttonak47 then
triggerServerEvent ( "AK47", localPlayer )
elseif source == buttonhealth then
triggerServerEvent ( "health", localPlayer )
elseif source == buttonarmour then
triggerServerEvent ( "armor", localPlayer )
elseif source == buttonuzi then
triggerServerEvent ( "Uzi", localPlayer )
elseif source == buttontec9 then
triggerServerEvent ( "tec9", localPlayer )
end
end
)
addEvent("AK47", true)
addEventHandler("AK47", root,
function()
if ( getPlayerMoney(source) >= 10000 ) then
takePlayerMoney(source,10000)
giveWeapon(source,30,550,true)
outputChatBox('(Weapon Shop): You Bought a AK-47! Costs $8000', source, 0, 255, 0)
else
exports["guimessages"]:outputServer(source,'(Weapon Shop): you don`t have enough momey for a AK-47!', 250,230,0)
end
end
)
addEvent("M4v", true)
addEventHandler("M4v", root,
function()
if ( getPlayerMoney(source) >= 80000 ) then
takePlayerMoney(source,80000)
giveWeapon(source,31,550,true)
exports["guimessages"]:outputServer(source,'(Weapon Shop): You Bought a M4! Costs $8000', 0, 255, 0)
else
exports["guimessages"]:outputServer(source,'(Weapon Shop): you don`t have enough momey for a M4!', 250,230,0)
end
end
)
addEvent("spaz12", true)
addEventHandler("spaz12", root,
function ()
if ( getPlayerMoney(source) >= 5000 ) then
takePlayerMoney(source,5000)
giveWeapon(source,27,550,true)
exports["guimessages"]:outputServer(source,'(Weapon Shop): You Bought a Combat Shotgun ', 0, 255, 0)
else
exports["guimessages"]:outputServer(source,'(Weapon Shop): you don`t have enough momey for a Spaz-12!',250,230,0)
end
end
)
addEvent("Uzi", true)
addEventHandler("Uzi", root,
function ()
if ( getPlayerMoney(source) >= 65000 ) then
takePlayerMoney(source,65000)
giveWeapon(source,28, 500,true)
exports["guimessages"]:outputServer(source,'(Weapon Shop): You Bought a Uzi! ', 0, 255, 0)
else
exports["guimessages"]:outputServer(source,'(Weapon Shop): you don`t have enough momey for a Uzi!', 250,230,0)
end
end
)
addEvent("tec9", true)
addEventHandler("tec9", root,
function ()
if ( getPlayerMoney(source) >= 42000 ) then
takePlayerMoney(source,42000)
giveWeapon(source,32, 580,true)
exports["guimessages"]:outputServer(source,'(Weapon Shop): You Bought a Tec9! C', 0, 255, 0)
else
exports["guimessages"]:outputServer(source,'(Weapon Shop): you don`t have enough momey for a Tec9!', 250,230,0)
end
end
)
addEvent("armor", true)
addEventHandler("armor", root,
function ()
if ( getPlayerMoney(source) >= 100 ) then
takePlayerMoney(source,100)
setPedArmor (source, 100)
exports["guimessages"]:outputServer(source,'(Weapon Shop): You Bought a Armor! Costs $500', 0, 255, 0)
else
exports["guimessages"]:outputServer(source,'(Weapon Shop): you don`t have enough momey for a Armor!', 250,230,0)
end
end
)
addEvent("health", true)
addEventHandler("health", root,
function ()
if ( getPlayerMoney(source) >= 500 ) then
takePlayerMoney(source,500)
setElementHealth(source, 200)
exports["guimessages"]:outputServer(source,'(Weapon Shop): You Bought a health', 0, 255, 0)
else
exports["guimessages"]:outputServer(source,'(Weapon Shop): you don`t have enough momey for a health', 250,230,0)
end
end
)