Jump to content

Please Log in


ABo.R3D

Recommended Posts

https://community.multitheftauto.com/index.php?p= ... ils&id=720

and to add key to open/close - shop

add this in client

function ToggleShop() 
    if guiGetVisible(shopWindow) == true then 
        guiSetVisible(shopWindow,false) 
        showCursor(false) 
    else 
        guiSetVisible(shopWindow,true) 
        showCursor(true) 
    end 
end 
bindKey("F1","down",ToggleShop) 

Link to comment

ابشر ماطلبت شي

لازم تتعلم بنفسك لان الناس تتعب وتسوي

وانت مشالله عليك تبي كل شي بارد مبرد

لازم تتعلم وخذا هذي الاكواد بدون تشفير رح عدل عليها وطورها

الكلنت client

  
    root = getRootElement()
localPlayer = getLocalPlayer()
 
outputChatBox("#ffffff=shop panel by  MOJRM-511  | #00ff00Press F2 To Open it =",0,255,0,true)
shopWindow = guiCreateWindow(170,50,530,510,"shop panel by MOJRM-511 ",false)
guiSetVisible (shopWindow, false)
guiWindowSetSizable(shopWindow,false)
guiWindowSetMovable(shopWindow,true)
tabPanel = guiCreateTabPanel(11,23,599,499,false,shopWindow)
 
 
-------------------------------------------------------------------------------------------------------
 
tab2 = guiCreateTab("buy weapons",tabPanel)
--------- ????? 1 -line 1 ------------------------------------------------------------------------------------
guiCreateStaticImage( 10,10,90,75, "weapon/24.png", false,tab2 )
weapButton_1 = guiCreateButton(10,80,90,30,"$150        deagle",false,tab2)
 
 
guiCreateStaticImage( 110,10,90,75, "weapon/31.png", false,tab2 )
weapButton_2 = guiCreateButton(110,80,90,30,"$250            M4",false,tab2)
---------------------------------
guiCreateStaticImage( 210,10,90,75, "weapon/16.png", false,tab2 )
weapButton_3 = guiCreateButton(210,80,90,30,"$1500           Grenade ",false,tab2)
---------------------------------
guiCreateStaticImage( 310,10,90,75, "weapon/30.png", false,tab2 )
weapButton_4 = guiCreateButton(310,80,90,30,"$200             AK-47",false,tab2)
--------------------------------
guiCreateStaticImage( 410,10,90,75, "weapon/29.png", false,tab2 )
weapButton_5 = guiCreateButton(410,80,90,30,"$150              mp5",false,tab2)
 
-------------------------2 ?????-----------------------------------------------------------------------------------------------------------
guiCreateStaticImage( 10,110,90,80, "weapon/32.png", false,tab2 )
weapButton_6 = guiCreateButton(10,190,90,30,"$450                TEC-9",false,tab2 )
 
guiCreateStaticImage( 110,110,90,80, "weapon/34.png", false,tab2 )
weapButton_7 = guiCreateButton(110,190,90,30,"$250              Sniper",false,tab2)
 
guiCreateStaticImage( 210,110,90,80, "weapon/28.png", false,tab2 )
weapButton_8 = guiCreateButton(210,190,90,30,"$400               Uzi",false,tab2)
 
guiCreateStaticImage( 310,110,90,80, "weapon/46.png", false,tab2 )
weapButton_9 = guiCreateButton(310,190,90,30,"$250           Parachute ",false,tab2)
 
guiCreateStaticImage( 410,110,90,80, "weapon/25.png", false,tab2 )
weapButton_10 = guiCreateButton(410,190,90,30,"$200              ShotGun",false,tab2)
 
 
-------------------------------------------------------------------------- line 3
guiCreateStaticImage( 10,220,90,80, "weapon/26.png", false,tab2 )
weapButton_11 = guiCreateButton(10,300,90,30,"$700                      Sawn-Off",false,tab2 )
 
guiCreateStaticImage( 110,220,90,80, "weapon/27.png", false,tab2 )
weapButton_12 = guiCreateButton(110,300,90,30,"$650                      Combat",false,tab2 )
 
guiCreateStaticImage( 210,220,90,80, "weapon/4.png", false,tab2 )
weapButton_13 = guiCreateButton(210,300,90,30,"$500                    Knif",false,tab2 )
 
guiCreateStaticImage( 310,220,90,80, "weapon/22.png", false,tab2 )
weapButton_14 = guiCreateButton(310,300,90,30,"$200                    Pistol",false,tab2 )
 
guiCreateStaticImage( 410,220,90,80, "weapon/9.png", false,tab2 )
weapButton_15 = guiCreateButton(410,300,90,30,"$400                         Chainsaw",false,tab2 )
 
 
--------------------------------------------------------------------------------------line 4
 
 
 
 
 
 
guiCreateStaticImage( 10,330,90,80, "weapon/17.png", false,tab2 )
weapButton_16 = guiCreateButton(10,410,90,30,"$1200                    Tear Gas",false,tab2 )
 
guiCreateStaticImage( 110,330,90,80, "weapon/42.png", false,tab2 )
weapButton_17 = guiCreateButton(110,410,90,30,"$400                  Fire Extinguisher",false,tab2 )
 
guiCreateStaticImage( 210,330,90,80, "weapon/23.png", false,tab2 )
weapButton_18 = guiCreateButton(210,410,90,30,"$100                       Silenced Pistol",false,tab2 )
 
guiCreateStaticImage( 310,330,90,80, "weapon/39.png", false,tab2 )
weapButton_19 = guiCreateButton(310,410,90,30,"$1800                     Satchel Charges",false,tab2 )
 
guiCreateStaticImage( 410,330,90,80, "weapon/38.png", false,tab2 )
weapButton_20 = guiCreateButton(410,410,90,30,"$3000                     minigun",false,tab2 )
 
 
 
 
 
 
--------------------------------------الشوب-------------------------------------------------3tab
 
tab3 = guiCreateTab("shop",tabPanel)
---------------------------------------------------------------------------------------------------------
 
--------------------------------
 
 
 
 
 
 
 
 
 
 
-----------------------------------------------------------------------------------------------------------
 
bindKey ( "F2" , "down" , function()
 
if ( guiGetVisible ( shopWindow ) == true ) then
 guiSetVisible ( shopWindow ,false )
 showCursor (false )
 guiSetInputEnabled(false)
 
 elseif ( guiGetVisible ( shopWindow ) == false ) then
 guiSetVisible ( shopWindow ,true )
 showCursor (false )
 guiSetInputEnabled(true)
 playSound("MOJRM-511.mp3")
 
 end
 end
 )
 
 
 
 
 
 
------------------------------------------------------------------------------------------------------
 
 
 
 
 
-------------------------------------------------------------------بدايه ربط الازرار بالسيرفر server----------
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  weapButton_1 ) then
 
 
 
 
triggerServerEvent("gived",getLocalPlayer())
 
end
 end
 
 
)
 
 
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  weapButton_2 ) then
 
 
triggerServerEvent("givem4",getLocalPlayer())
 
end
 
end
 
 
)
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  weapButton_3 ) then
 
 
triggerServerEvent("givegrn",getLocalPlayer())
 
end
 
end
 
 
)
 
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  weapButton_4 ) then
 
triggerServerEvent("givemk",getLocalPlayer())
 
end
 
end
 
 
)
 
 
 
 
 
 
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  weapButton_5 ) then
 
triggerServerEvent("givemp5",getLocalPlayer())
 
end
 
end
 
 
)
 
 
 
 
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
function(button, state, absoluteX, absoluteY)
 
if ( source ==  weapButton_6 ) then
 
triggerServerEvent("TEC-9",getLocalPlayer())
 
end
 
end
 
 
)
 
 
 
 
addEventHandler ("onClientGUIClick", getRootElement(),
 
Link to comment

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...