Jump to content

مشكلة ^


Guest

Recommended Posts

Posted

السلام عليكم ورحمة الله تعالى وبركاته

اليوم سويت سكربت..
تعبت فيه ،
:3 ولما اكون اضغط ع زر حق شراء

ميجي شيء ,, @; 
يريت تلقولي حل 

كلنت
 



GUIEditor = {
    button = {},
    window = {},
    staticimage = {},
    label = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        GUIEditor.window[1] = guiCreateWindow(119, 103, 782, 569, "Shop System.", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
        guiSetAlpha(GUIEditor.window[1], 1.00)
        guiSetVisible(GUIEditor.window[1],false)
        buttontec9 = guiCreateButton(562, 155, 125, 40, "Buy Tec9 42000$", false, GUIEditor.window[1])
        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, GUIEditor.window[1])
        guiSetFont(buttonM4, font0_Foxes)
        guiSetProperty(buttonM4, "NormalTextColour", "FFFE6000")
        buttonspaz12 = guiCreateButton(191, 155, 125, 40, "Buy Spaz 50000$", false, GUIEditor.window[1])
        guiSetFont(buttonspaz, font0_Foxes)
        guiSetProperty(buttonspaz, "NormalTextColour", "FFFE6000")
        buttonak47 = guiCreateButton(32, 155, 125, 40, "Buy Ak 47 10000$", false, GUIEditor.window[1])
        guiSetFont(buttonak47, font0_Foxes)
        guiSetProperty(buttonak47, "NormalTextColour", "FFFE6000")
        GUIEditor.staticimage[1] = guiCreateStaticImage(22, 39, 145, 106, "Ak47.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[2] = guiCreateStaticImage(190, 58, 132, 89, "Spaz.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[3] = guiCreateStaticImage(365, 53, 115, 97, "M4.png", false, GUIEditor.window[1])
        buttonhealth = guiCreateButton(566, 333, 125, 40, "Buy Health 500$", false, GUIEditor.window[1])
        guiSetFont(buttonhealth, font0_Foxes)
        guiSetProperty(buttonhealth, "NormalTextColour", "FFFE6000")
        buttonarmour = guiCreateButton(376, 333, 125, 40, "Buy Armour 100$", false, GUIEditor.window[1])
        guiSetFont(buttonarmour, font0_Foxes)
        guiSetProperty(buttonarmour, "NormalTextColour", "FFFE6000")
        buttonuzi = guiCreateButton(25, 332, 125, 40, "Buy Uzi 60000$", false, GUIEditor.window[1])
        guiSetFont(buttonuzi, font0_Foxes)
        guiSetProperty(buttonuzi, "NormalTextColour", "FFFE6000")
        GUIEditor.staticimage[4] = guiCreateStaticImage(35, 214, 95, 108, "Uzi.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[5] = guiCreateStaticImage(200, 206, 126, 124, "Recortada.png", false, GUIEditor.window[1])
        buttonSawedoff = guiCreateButton(200, 332, 125, 40, "Buy Sawed-off 65000$", false, GUIEditor.window[1])
        guiSetFont(buttonSawedoff, font0_Foxes)
        guiSetProperty(buttonSawedoff, "NormalTextColour", "FFFE6000")
        GUIEditor.staticimage[6] = guiCreateStaticImage(387, 206, 104, 112, "yelek.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[7] = guiCreateStaticImage(567, 225, 124, 90, "kalp.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[8] = guiCreateStaticImage(547, 36, 144, 102, ":Tec9.png", false, GUIEditor.window[1])
        buttonskinvip = guiCreateButton(15, 480, 145, 38, "Skin Vip 150000 $", false, GUIEditor.window[1])
        guiSetFont(buttonskinvip, font0_Foxes)
        guiSetProperty(buttonskinvip, "NormalTextColour", "FFFE6000")
        GUIEditor.staticimage[9] = guiCreateStaticImage(31, 376, 105, 94, "kas.png", false, GUIEditor.window[1])
        GUIEditor.label[1] = guiCreateLabel(335, 528, 131, 20, "Script By MusiQue", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[1], font0_Foxes)
        guiLabelSetColor(GUIEditor.label[1], 0, 239, 253)
        GUIEditor.label[2] = guiCreateLabel(739, 26, 33, 47, "*", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[2], "sa-gothic")
        guiLabelSetColor(GUIEditor.label[2], 252, 172, 0)
        GUIEditor.label[3] = guiCreateLabel(739, 512, 33, 47, "*", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[3], "sa-gothic")
        guiLabelSetColor(GUIEditor.label[3], 0, 243, 251)
        GUIEditor.label[4] = guiCreateLabel(8, 522, 33, 47, "*", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[4], "sa-gothic")
        guiLabelSetColor(GUIEditor.label[4], 6, 236, 244)
        x = guiCreateButton(352, 428, 74, 44, "Close", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.button[1], font0_Foxes)
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFF04F00")    
    end
)
bindKey( 'F5', 'down',
function ( )
guiSetVisible( GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) )
showCursor ( not isCursorShowing ( ) )
end )
function Close ()
    if source == x then
        showCursor (false)
        guiSetVisible (GUIEditor.window[1],false)
    end
end
addEventHandler ("onClientGUIClick", root, Close)

function AK47()
    triggerServerEvent("AK47", localPlayer)
    hide()
end
addEventHandler("onClientGUIClick", buttonak47, AK47, false)

function M4v()
    triggerServerEvent("M4v", localPlayer)
    hide()
end
addEventHandler("onClientGUIClick", buttonm4, M4v, false)

function MP5()
    triggerServerEvent("MP5", localPlayer)
    hide()
end
addEventHandler("onClientGUIClick", buttonmp5, MP5, false)



function spaz12()
    triggerServerEvent("spaz12", localPlayer)
    hide()
end
addEventHandler("onClientGUIClick", buttonspaz12, spaz12, false)

function Uzi()
    triggerServerEvent("Uzi", localPlayer)
    hide()
end
addEventHandler("onClientGUIClick", buttonuzi, Uzi, false)

function tec9()
    triggerServerEvent("tec9", localPlayer)
    hide()
end
addEventHandler("onClientGUIClick", buttontec9, tec9, false)


function armor()
    triggerServerEvent("armor", localPlayer)
    hide()
end
addEventHandler("onClientGUIClick", buttonarmor, armor, false)
function health()
    triggerServerEvent("health", localPlayer)
    hide()
end
addEventHandler("onClientGUIClick", buttonhealth, health, false)

السيرفر
 



function AK47()
 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("AK47", true)
addEventHandler("AK47", root, AK47)

function M4v()
 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("M4v", true)
addEventHandler("M4v", root, M4v)

function spaz12()
 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("spaz12", true)
addEventHandler("spaz12", root, spaz12)

function Uzi()
 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("Uzi", true)
addEventHandler("Uzi", root, Uzi)

function tec9()
 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("tec9", true)
addEventHandler("tec9", root, tec9)

function armor()
 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, health)
function health()
 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
addEvent("health", true)
addEventHandler("health", root, health)

معلش اذا في تبخيصص 3: لسه رجعت من البرمجة ,!

Posted (edited)
Server Side -- 

addEvent("AK47", true)
addEventHandler("AK47", root, 
function AK47()
 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 M4v()
 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 spaz12()
 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 Uzi()
 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 tec9()
 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 armor()
 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 health()
 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

)




-- Client Side

GUIEditor = {
    button = {},
    window = {},
    staticimage = {},
    label = {}
}

        GUIEditor.window[1] = guiCreateWindow(119, 103, 782, 569, "Shop System.", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
        guiSetAlpha(GUIEditor.window[1], 1.00)
        guiSetVisible(GUIEditor.window[1],false)
        buttontec9 = guiCreateButton(562, 155, 125, 40, "Buy Tec9 42000$", false, GUIEditor.window[1])
        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, GUIEditor.window[1])
        guiSetFont(buttonM4, font0_Foxes)
        guiSetProperty(buttonM4, "NormalTextColour", "FFFE6000")
        buttonspaz12 = guiCreateButton(191, 155, 125, 40, "Buy Spaz 50000$", false, GUIEditor.window[1])
        guiSetFont(buttonspaz, font0_Foxes)
        guiSetProperty(buttonspaz, "NormalTextColour", "FFFE6000")
        buttonak47 = guiCreateButton(32, 155, 125, 40, "Buy Ak 47 10000$", false, GUIEditor.window[1])
        guiSetFont(buttonak47, font0_Foxes)
        guiSetProperty(buttonak47, "NormalTextColour", "FFFE6000")
        GUIEditor.staticimage[1] = guiCreateStaticImage(22, 39, 145, 106, "Ak47.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[2] = guiCreateStaticImage(190, 58, 132, 89, "Spaz.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[3] = guiCreateStaticImage(365, 53, 115, 97, "M4.png", false, GUIEditor.window[1])
        buttonhealth = guiCreateButton(566, 333, 125, 40, "Buy Health 500$", false, GUIEditor.window[1])
        guiSetFont(buttonhealth, font0_Foxes)
        guiSetProperty(buttonhealth, "NormalTextColour", "FFFE6000")
        buttonarmour = guiCreateButton(376, 333, 125, 40, "Buy Armour 100$", false, GUIEditor.window[1])
        guiSetFont(buttonarmour, font0_Foxes)
        guiSetProperty(buttonarmour, "NormalTextColour", "FFFE6000")
        buttonuzi = guiCreateButton(25, 332, 125, 40, "Buy Uzi 60000$", false, GUIEditor.window[1])
        guiSetFont(buttonuzi, font0_Foxes)
        guiSetProperty(buttonuzi, "NormalTextColour", "FFFE6000")
        GUIEditor.staticimage[4] = guiCreateStaticImage(35, 214, 95, 108, "Uzi.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[5] = guiCreateStaticImage(200, 206, 126, 124, "Recortada.png", false, GUIEditor.window[1])
        buttonSawedoff = guiCreateButton(200, 332, 125, 40, "Buy Sawed-off 65000$", false, GUIEditor.window[1])
        guiSetFont(buttonSawedoff, font0_Foxes)
        guiSetProperty(buttonSawedoff, "NormalTextColour", "FFFE6000")
        GUIEditor.staticimage[6] = guiCreateStaticImage(387, 206, 104, 112, "yelek.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[7] = guiCreateStaticImage(567, 225, 124, 90, "kalp.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[8] = guiCreateStaticImage(547, 36, 144, 102, ":Tec9.png", false, GUIEditor.window[1])
        buttonskinvip = guiCreateButton(15, 480, 145, 38, "Skin Vip 150000 $", false, GUIEditor.window[1])
        guiSetFont(buttonskinvip, font0_Foxes)
        guiSetProperty(buttonskinvip, "NormalTextColour", "FFFE6000")
        GUIEditor.staticimage[9] = guiCreateStaticImage(31, 376, 105, 94, "kas.png", false, GUIEditor.window[1])
        GUIEditor.label[1] = guiCreateLabel(335, 528, 131, 20, "Script By MusiQue", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[1], font0_Foxes)
        guiLabelSetColor(GUIEditor.label[1], 0, 239, 253)
        GUIEditor.label[2] = guiCreateLabel(739, 26, 33, 47, "*", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[2], "sa-gothic")
        guiLabelSetColor(GUIEditor.label[2], 252, 172, 0)
        GUIEditor.label[3] = guiCreateLabel(739, 512, 33, 47, "*", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[3], "sa-gothic")
        guiLabelSetColor(GUIEditor.label[3], 0, 243, 251)
        GUIEditor.label[4] = guiCreateLabel(8, 522, 33, 47, "*", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[4], "sa-gothic")
        guiLabelSetColor(GUIEditor.label[4], 6, 236, 244)
        x = guiCreateButton(352, 428, 74, 44, "Close", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.button[1], font0_Foxes)
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFF04F00")    

bindKey( 'F5', 'down',
function ( )
guiSetVisible( GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) )
showCursor ( not isCursorShowing ( ) )
end )
function Close ()
    if source == x then
        showCursor (false)
        guiSetVisible (GUIEditor.window[1],false)
    end
end
addEventHandler ("onClientGUIClick", root, Close)

function AK47()
    triggerServerEvent("AK47", localPlayer)
    hide()
end
addEventHandler ( "onClientGUIClick", root, AK47 )

function M4v()
    triggerServerEvent("M4v", localPlayer)
    hide()
end
addEventHandler ( "onClientGUIClick", root, M4v )

function MP5()
    triggerServerEvent("MP5", localPlayer)
    hide()
end
addEventHandler ( "onClientGUIClick", root, MP5 ) 



function spaz12()
    triggerServerEvent("spaz12", localPlayer)
    hide()
end
addEventHandler ( "onClientGUIClick", root, spaz12 ) 

function Uzi()
    triggerServerEvent("Uzi", localPlayer)
    hide()
end
addEventHandler ( "onClientGUIClick", root, Uzi ) 

function tec9()
    triggerServerEvent("tec9", localPlayer)
    hide()
end
addEventHandler ( "onClientGUIClick", root, tec9 ) 


function armor()
    triggerServerEvent("armor", localPlayer)
    hide()
end
addEventHandler ( "onClientGUIClick", root, armor ) 
function health()
    triggerServerEvent("health", localPlayer)
    hide()
end
addEventHandler ( "onClientGUIClick", root, health ) 

جرب ورد لي خبر

وشوف الديبق , 

debugscript 3  -- استخددم هاذي في اف8 حق تطلع الأخطاء الى فل سكربت 

#

Edited by +1HidroNex
Posted (edited)
7 minutes ago, +1HidroNex said:

Server Side -- 

addEvent("AK47", true)
addEventHandler("AK47", root, 
function AK47()
 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 M4v()
 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 spaz12()
 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 Uzi()
 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 tec9()
 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 armor()
 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 health()
 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

)


-- Client Side

GUIEditor = {
    button = {},
    window = {},
    staticimage = {},
    label = {}
}

        GUIEditor.window[1] = guiCreateWindow(119, 103, 782, 569, "Shop System.", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
        guiSetAlpha(GUIEditor.window[1], 1.00)
        guiSetVisible(GUIEditor.window[1],false)
        buttontec9 = guiCreateButton(562, 155, 125, 40, "Buy Tec9 42000$", false, GUIEditor.window[1])
        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, GUIEditor.window[1])
        guiSetFont(buttonM4, font0_Foxes)
        guiSetProperty(buttonM4, "NormalTextColour", "FFFE6000")
        buttonspaz12 = guiCreateButton(191, 155, 125, 40, "Buy Spaz 50000$", false, GUIEditor.window[1])
        guiSetFont(buttonspaz, font0_Foxes)
        guiSetProperty(buttonspaz, "NormalTextColour", "FFFE6000")
        buttonak47 = guiCreateButton(32, 155, 125, 40, "Buy Ak 47 10000$", false, GUIEditor.window[1])
        guiSetFont(buttonak47, font0_Foxes)
        guiSetProperty(buttonak47, "NormalTextColour", "FFFE6000")
        GUIEditor.staticimage[1] = guiCreateStaticImage(22, 39, 145, 106, "Ak47.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[2] = guiCreateStaticImage(190, 58, 132, 89, "Spaz.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[3] = guiCreateStaticImage(365, 53, 115, 97, "M4.png", false, GUIEditor.window[1])
        buttonhealth = guiCreateButton(566, 333, 125, 40, "Buy Health 500$", false, GUIEditor.window[1])
        guiSetFont(buttonhealth, font0_Foxes)
        guiSetProperty(buttonhealth, "NormalTextColour", "FFFE6000")
        buttonarmour = guiCreateButton(376, 333, 125, 40, "Buy Armour 100$", false, GUIEditor.window[1])
        guiSetFont(buttonarmour, font0_Foxes)
        guiSetProperty(buttonarmour, "NormalTextColour", "FFFE6000")
        buttonuzi = guiCreateButton(25, 332, 125, 40, "Buy Uzi 60000$", false, GUIEditor.window[1])
        guiSetFont(buttonuzi, font0_Foxes)
        guiSetProperty(buttonuzi, "NormalTextColour", "FFFE6000")
        GUIEditor.staticimage[4] = guiCreateStaticImage(35, 214, 95, 108, "Uzi.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[5] = guiCreateStaticImage(200, 206, 126, 124, "Recortada.png", false, GUIEditor.window[1])
        buttonSawedoff = guiCreateButton(200, 332, 125, 40, "Buy Sawed-off 65000$", false, GUIEditor.window[1])
        guiSetFont(buttonSawedoff, font0_Foxes)
        guiSetProperty(buttonSawedoff, "NormalTextColour", "FFFE6000")
        GUIEditor.staticimage[6] = guiCreateStaticImage(387, 206, 104, 112, "yelek.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[7] = guiCreateStaticImage(567, 225, 124, 90, "kalp.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[8] = guiCreateStaticImage(547, 36, 144, 102, ":Tec9.png", false, GUIEditor.window[1])
        buttonskinvip = guiCreateButton(15, 480, 145, 38, "Skin Vip 150000 $", false, GUIEditor.window[1])
        guiSetFont(buttonskinvip, font0_Foxes)
        guiSetProperty(buttonskinvip, "NormalTextColour", "FFFE6000")
        GUIEditor.staticimage[9] = guiCreateStaticImage(31, 376, 105, 94, "kas.png", false, GUIEditor.window[1])
        GUIEditor.label[1] = guiCreateLabel(335, 528, 131, 20, "Script By MusiQue", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[1], font0_Foxes)
        guiLabelSetColor(GUIEditor.label[1], 0, 239, 253)
        GUIEditor.label[2] = guiCreateLabel(739, 26, 33, 47, "*", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[2], "sa-gothic")
        guiLabelSetColor(GUIEditor.label[2], 252, 172, 0)
        GUIEditor.label[3] = guiCreateLabel(739, 512, 33, 47, "*", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[3], "sa-gothic")
        guiLabelSetColor(GUIEditor.label[3], 0, 243, 251)
        GUIEditor.label[4] = guiCreateLabel(8, 522, 33, 47, "*", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[4], "sa-gothic")
        guiLabelSetColor(GUIEditor.label[4], 6, 236, 244)
        x = guiCreateButton(352, 428, 74, 44, "Close", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.button[1], font0_Foxes)
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFF04F00")    

bindKey( 'F5', 'down',
function ( )
guiSetVisible( GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) )
showCursor ( not isCursorShowing ( ) )
end )
function Close ()
    if source == x then
        showCursor (false)
        guiSetVisible (GUIEditor.window[1],false)
    end
end
addEventHandler ("onClientGUIClick", root, Close)

function AK47()
    triggerServerEvent("AK47", localPlayer)
    hide()
end
addEventHandler ( "onClientGUIClick", root, AK47 )

function M4v()
    triggerServerEvent("M4v", localPlayer)
    hide()
end
addEventHandler ( "onClientGUIClick", root, M4v )

function MP5()
    triggerServerEvent("MP5", localPlayer)
    hide()
end
addEventHandler ( "onClientGUIClick", root, MP5 ) 



function spaz12()
    triggerServerEvent("spaz12", localPlayer)
    hide()
end
addEventHandler ( "onClientGUIClick", root, spaz12 ) 

function Uzi()
    triggerServerEvent("Uzi", localPlayer)
    hide()
end
addEventHandler ( "onClientGUIClick", root, Uzi ) 

function tec9()
    triggerServerEvent("tec9", localPlayer)
    hide()
end
addEventHandler ( "onClientGUIClick", root, tec9 ) 


function armor()
    triggerServerEvent("armor", localPlayer)
    hide()
end
addEventHandler ( "onClientGUIClick", root, armor ) 
function health()
    triggerServerEvent("health", localPlayer)
    hide()
end
addEventHandler ( "onClientGUIClick", root, health ) 

جرب ورد لي خبر

وشوف الديبق , 

debugscript 3  -- استخددم هاذي في اف8 حق تطلع الأخطاء الى فل سكربت 

#

وش تتعاطي انت ؟

طيب وين الزر الي هو ضغط عليه ؟

حاطلي حدث بدون تعريف للزر الي ضغطه ؟

function spaz12()
    triggerServerEvent("spaz12", localPlayer)
    hide()
end
addEventHandler ( "onClientGUIClick", root, spaz12 ) 

ايش ذا باله ؟

لا يكفيك عن التخبيص الي بباقي الكلنت

+ حتي الفنكشن حق

hide

مب معرف اصلا ولا هو موجود حتي

Edited by #DesTroeyR
Posted (edited)
12 minutes ago, *AnGeL said:

تسلم ع رد خويي :]
مجاني شيء احمر في دي بق ..

هذي صورة
https://c.top4top.net/p_9408dr8n1.png


GUIEditor = {
    button = {},
    window = {},
    staticimage = {},
    label = {}
}

        GUIEditor.window[1] = guiCreateWindow(119, 103, 782, 569, "Shop System.", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
        guiSetAlpha(GUIEditor.window[1], 1.00)
        guiSetVisible(GUIEditor.window[1],false)
        buttontec9 = guiCreateButton(562, 155, 125, 40, "Buy Tec9 42000$", false, GUIEditor.window[1])
        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, GUIEditor.window[1])
        guiSetFont(buttonM4, font0_Foxes)
        guiSetProperty(buttonM4, "NormalTextColour", "FFFE6000")
        buttonspaz12 = guiCreateButton(191, 155, 125, 40, "Buy Spaz 50000$", false, GUIEditor.window[1])
        guiSetFont(buttonspaz, font0_Foxes)
        guiSetProperty(buttonspaz, "NormalTextColour", "FFFE6000")
        buttonak47 = guiCreateButton(32, 155, 125, 40, "Buy Ak 47 10000$", false, GUIEditor.window[1])
        guiSetFont(buttonak47, font0_Foxes)
        guiSetProperty(buttonak47, "NormalTextColour", "FFFE6000")
        GUIEditor.staticimage[1] = guiCreateStaticImage(22, 39, 145, 106, "Ak47.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[2] = guiCreateStaticImage(190, 58, 132, 89, "Spaz.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[3] = guiCreateStaticImage(365, 53, 115, 97, "M4.png", false, GUIEditor.window[1])
        buttonhealth = guiCreateButton(566, 333, 125, 40, "Buy Health 500$", false, GUIEditor.window[1])
        guiSetFont(buttonhealth, font0_Foxes)
        guiSetProperty(buttonhealth, "NormalTextColour", "FFFE6000")
        buttonarmour = guiCreateButton(376, 333, 125, 40, "Buy Armour 100$", false, GUIEditor.window[1])
        guiSetFont(buttonarmour, font0_Foxes)
        guiSetProperty(buttonarmour, "NormalTextColour", "FFFE6000")
        buttonuzi = guiCreateButton(25, 332, 125, 40, "Buy Uzi 60000$", false, GUIEditor.window[1])
        guiSetFont(buttonuzi, font0_Foxes)
        guiSetProperty(buttonuzi, "NormalTextColour", "FFFE6000")
        GUIEditor.staticimage[4] = guiCreateStaticImage(35, 214, 95, 108, "Uzi.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[5] = guiCreateStaticImage(200, 206, 126, 124, "Recortada.png", false, GUIEditor.window[1])
        buttonSawedoff = guiCreateButton(200, 332, 125, 40, "Buy Sawed-off 65000$", false, GUIEditor.window[1])
        guiSetFont(buttonSawedoff, font0_Foxes)
        guiSetProperty(buttonSawedoff, "NormalTextColour", "FFFE6000")
        GUIEditor.staticimage[6] = guiCreateStaticImage(387, 206, 104, 112, "yelek.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[7] = guiCreateStaticImage(567, 225, 124, 90, "kalp.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[8] = guiCreateStaticImage(547, 36, 144, 102, ":Tec9.png", false, GUIEditor.window[1])
        buttonskinvip = guiCreateButton(15, 480, 145, 38, "Skin Vip 150000 $", false, GUIEditor.window[1])
        guiSetFont(buttonskinvip, font0_Foxes)
        guiSetProperty(buttonskinvip, "NormalTextColour", "FFFE6000")
        GUIEditor.staticimage[9] = guiCreateStaticImage(31, 376, 105, 94, "kas.png", false, GUIEditor.window[1])
        GUIEditor.label[1] = guiCreateLabel(335, 528, 131, 20, "Script By MusiQue", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[1], font0_Foxes)
        guiLabelSetColor(GUIEditor.label[1], 0, 239, 253)
        GUIEditor.label[2] = guiCreateLabel(739, 26, 33, 47, "*", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[2], "sa-gothic")
        guiLabelSetColor(GUIEditor.label[2], 252, 172, 0)
        GUIEditor.label[3] = guiCreateLabel(739, 512, 33, 47, "*", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[3], "sa-gothic")
        guiLabelSetColor(GUIEditor.label[3], 0, 243, 251)
        GUIEditor.label[4] = guiCreateLabel(8, 522, 33, 47, "*", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[4], "sa-gothic")
        guiLabelSetColor(GUIEditor.label[4], 6, 236, 244)
        x = guiCreateButton(352, 428, 74, 44, "Close", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.button[1], font0_Foxes)
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFF04F00")    

bindKey( 'F5', 'down',
function ( )
guiSetVisible( GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) )
showCursor ( not isCursorShowing ( ) )
end )
function Close ()
    if source == x then
        showCursor (false)
        guiSetVisible (GUIEditor.window[1],false)
    end
end

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
)

 

Edited by +1HidroNex
Posted

ولا زبط 
الزر الوحيد الي اشوفه يشتغل هو ..حق الإغلاق !!

Posted
2 minutes ago, +1HidroNex said:

GUIEditor = {
    button = {},
    window = {},
    staticimage = {},
    label = {}
}

        GUIEditor.window[1] = guiCreateWindow(119, 103, 782, 569, "Shop System.", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
        guiSetAlpha(GUIEditor.window[1], 1.00)
        guiSetVisible(GUIEditor.window[1],false)
        buttontec9 = guiCreateButton(562, 155, 125, 40, "Buy Tec9 42000$", false, GUIEditor.window[1])
        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, GUIEditor.window[1])
        guiSetFont(buttonM4, font0_Foxes)
        guiSetProperty(buttonM4, "NormalTextColour", "FFFE6000")
        buttonspaz12 = guiCreateButton(191, 155, 125, 40, "Buy Spaz 50000$", false, GUIEditor.window[1])
        guiSetFont(buttonspaz, font0_Foxes)
        guiSetProperty(buttonspaz, "NormalTextColour", "FFFE6000")
        buttonak47 = guiCreateButton(32, 155, 125, 40, "Buy Ak 47 10000$", false, GUIEditor.window[1])
        guiSetFont(buttonak47, font0_Foxes)
        guiSetProperty(buttonak47, "NormalTextColour", "FFFE6000")
        GUIEditor.staticimage[1] = guiCreateStaticImage(22, 39, 145, 106, "Ak47.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[2] = guiCreateStaticImage(190, 58, 132, 89, "Spaz.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[3] = guiCreateStaticImage(365, 53, 115, 97, "M4.png", false, GUIEditor.window[1])
        buttonhealth = guiCreateButton(566, 333, 125, 40, "Buy Health 500$", false, GUIEditor.window[1])
        guiSetFont(buttonhealth, font0_Foxes)
        guiSetProperty(buttonhealth, "NormalTextColour", "FFFE6000")
        buttonarmour = guiCreateButton(376, 333, 125, 40, "Buy Armour 100$", false, GUIEditor.window[1])
        guiSetFont(buttonarmour, font0_Foxes)
        guiSetProperty(buttonarmour, "NormalTextColour", "FFFE6000")
        buttonuzi = guiCreateButton(25, 332, 125, 40, "Buy Uzi 60000$", false, GUIEditor.window[1])
        guiSetFont(buttonuzi, font0_Foxes)
        guiSetProperty(buttonuzi, "NormalTextColour", "FFFE6000")
        GUIEditor.staticimage[4] = guiCreateStaticImage(35, 214, 95, 108, "Uzi.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[5] = guiCreateStaticImage(200, 206, 126, 124, "Recortada.png", false, GUIEditor.window[1])
        buttonSawedoff = guiCreateButton(200, 332, 125, 40, "Buy Sawed-off 65000$", false, GUIEditor.window[1])
        guiSetFont(buttonSawedoff, font0_Foxes)
        guiSetProperty(buttonSawedoff, "NormalTextColour", "FFFE6000")
        GUIEditor.staticimage[6] = guiCreateStaticImage(387, 206, 104, 112, "yelek.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[7] = guiCreateStaticImage(567, 225, 124, 90, "kalp.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[8] = guiCreateStaticImage(547, 36, 144, 102, ":Tec9.png", false, GUIEditor.window[1])
        buttonskinvip = guiCreateButton(15, 480, 145, 38, "Skin Vip 150000 $", false, GUIEditor.window[1])
        guiSetFont(buttonskinvip, font0_Foxes)
        guiSetProperty(buttonskinvip, "NormalTextColour", "FFFE6000")
        GUIEditor.staticimage[9] = guiCreateStaticImage(31, 376, 105, 94, "kas.png", false, GUIEditor.window[1])
        GUIEditor.label[1] = guiCreateLabel(335, 528, 131, 20, "Script By MusiQue", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[1], font0_Foxes)
        guiLabelSetColor(GUIEditor.label[1], 0, 239, 253)
        GUIEditor.label[2] = guiCreateLabel(739, 26, 33, 47, "*", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[2], "sa-gothic")
        guiLabelSetColor(GUIEditor.label[2], 252, 172, 0)
        GUIEditor.label[3] = guiCreateLabel(739, 512, 33, 47, "*", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[3], "sa-gothic")
        guiLabelSetColor(GUIEditor.label[3], 0, 243, 251)
        GUIEditor.label[4] = guiCreateLabel(8, 522, 33, 47, "*", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[4], "sa-gothic")
        guiLabelSetColor(GUIEditor.label[4], 6, 236, 244)
        x = guiCreateButton(352, 428, 74, 44, "Close", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.button[1], font0_Foxes)
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFF04F00")    

bindKey( 'F5', 'down',
function ( )
guiSetVisible( GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) )
showCursor ( not isCursorShowing ( ) )
end )
function Close ()
    if source == x then
        showCursor (false)
        guiSetVisible (GUIEditor.window[1],false)
    end
end

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
)

 

يا حبك للتفلسف

1 minute ago, *AnGeL said:

ولا زبط 
الزر الوحيد الي اشوفه يشتغل هو ..حق الإغلاق !!

تأكد من ملف السيرفر ._. انه معرف سيرفر بالميتا

Posted

meta .:

 

<meta>
<info author="Music" name="F9_Silah_Market_2018" version="0.0.1" type="script"/>

<script src="client.lua" type="client" cache="false"/>
<script src="server.lua" type="server" cache="false"/>
    <file src="Foxes.ttf" />
    <file src="Imagenes/Recortada.png" />
    <file src="Imagenes/Spaz.png" />
    <file src="Imagenes/Tec9.png" />
    <file src="Imagenes/Uzi.png" />
    <file src="Imagenes/MP5.png" />
    <file src="Imagenes/Ak47.png" />
    <file src="Imagenes/M4.png" />
</meta>

;) طبعا ضايف صور !! 
ملاحظة :.
لما سويت كودك يا الطيب 
راحو الصور !!

Posted

لان صارت معك من قبل

Just now, *AnGeL said:

meta .:

 

<meta>
<info author="Music" name="F9_Silah_Market_2018" version="0.0.1" type="script"/>

<script src="client.lua" type="client" cache="false"/>
<script src="server.lua" type="server" cache="false"/>
    <file src="Foxes.ttf" />
    <file src="Imagenes/Recortada.png" />
    <file src="Imagenes/Spaz.png" />
    <file src="Imagenes/Tec9.png" />
    <file src="Imagenes/Uzi.png" />
    <file src="Imagenes/MP5.png" />
    <file src="Imagenes/Ak47.png" />
    <file src="Imagenes/M4.png" />
</meta>

;) طبعا ضايف صور !! 
ملاحظة :.
لما سويت كودك يا الطيب 
راحو الصور !!

خلي الميتا كذا

<meta>
<info author="Music" name="F9_Silah_Market_2018" version="0.0.1" type="script"/>

<script src="client.lua" type="client" cache="false"/>
<script src="server.lua" type="server" />
    <file src="Foxes.ttf" />
    <file src="Imagenes/Recortada.png" />
    <file src="Imagenes/Spaz.png" />
    <file src="Imagenes/Tec9.png" />
    <file src="Imagenes/Uzi.png" />
    <file src="Imagenes/MP5.png" />
    <file src="Imagenes/Ak47.png" />
    <file src="Imagenes/M4.png" />
</meta>

Posted

ما زبطت @;

 

ملفات
client.lua

server.lua

.

;D 

Posted
1 minute ago, *AnGeL said:

ما زبطت @;

 

ملفات
client.lua

server.lua

.

;D 

خلاص انتظر لين ارجع

Posted
3 minutes ago, +1HidroNex said:

الكود الى عطيتك إياه مايشتغل فيه شي ؟ 

يب

Posted
3 minutes ago, *AnGeL said:

يب

تم سويتلك ياه

ومجربه علشان لا تقول مب شغال :)

        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

)

 

Posted

يسسعدلي جوك يا بطل
لكن صور الاسلحة مب ظاهرة ,
ممكن تقلي من وين كان الخطأ ;) <3 

Posted
Just now, *AnGeL said:

يسسعدلي جوك يا بطل
لكن صور الاسلحة مب ظاهرة ,
ممكن تقلي من وين كان الخطأ ;) <3 

:) 

تأكد من اسماء الصور بالميتا وصيغهم

الخطأ انك كنت حاط اسم الفنكشن مع انك حاط الحدث بطريقة اخرى عشان كذا ما رح تزبط الا

لو مسويها بهي الطريقة

addEventHandler("AK47",root,functionName)

 

Posted

الله يسعدك

بس غريبة والله ، يوم حطيت كوداتكم راحت الصور @; ~

Posted
Just now, *AnGeL said:

الله يسعدك

بس غريبة والله ، يوم حطيت كوداتكم راحت الصور @; ~

تأكد من اسماء الصور اكرر #

حطيت صورة الحين وجربت وشغالة #

Posted

ماجا ولا شيء وتأكدت من اسماءهم ^@

Posted
Just now, *AnGeL said:

ماجا ولا شيء وتأكدت من اسماءهم ^@

اكتب في اف 8 debugscript 3

وورني وش يطلعلك :) 

Posted

مافي اي شيء يقول عن الـ "الصور"ء بس يقول باد ارقمنت ..
في حقت الخط !!

 

Posted
3 minutes ago, *AnGeL said:

مافي اي شيء يقول عن الـ "الصور"ء بس يقول باد ارقمنت ..
في حقت الخط !!

 

طيب تأكد من مسار الفونت حقك..

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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