Jump to content

ممكن تعليم


Recommended Posts

قصدي مثل ذا

  
GUIEditor = { 
    gridlist = {}, 
    button = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.button[1] = guiCreateButton(295, 375, 160, 58, "", false) 
        guiSetAlpha(GUIEditor.button[1], 0.00) 
  
  
        GUIEditor.gridlist[1] = guiCreateGridList(269, 133, 222, 236, false) 
        guiGridListAddColumn(GUIEditor.gridlist[1], "Weapons", 0.9) 
        for i = 1, 11 do 
            guiGridListAddRow(GUIEditor.gridlist[1]) 
        end 
        guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "WEAPON_SNIPER", false, false) 
        guiGridListSetItemColor(GUIEditor.gridlist[1], 0, 1, 196, 3, 3, 231) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "WEAPON_SHOTGSPA", false, false) 
        guiGridListSetItemColor(GUIEditor.gridlist[1], 1, 1, 147, 19, 179, 231) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "WEAPON_SAWEDOFF", false, false) 
        guiGridListSetItemColor(GUIEditor.gridlist[1], 2, 1, 8, 189, 166, 231) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "WEAPON_MP5", false, false) 
        guiGridListSetItemColor(GUIEditor.gridlist[1], 3, 1, 241, 245, 135, 231) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 4, 1, "WEAPON_MINIGUN", false, false) 
        guiGridListSetItemColor(GUIEditor.gridlist[1], 4, 1, 187, 232, 147, 231) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 5, 1, "WEAPON_M4", false, false) 
        guiGridListSetItemColor(GUIEditor.gridlist[1], 5, 1, 250, 128, 168, 231) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 6, 1, "WEAPON_HEATSEEKER", false, false) 
        guiGridListSetItemColor(GUIEditor.gridlist[1], 6, 1, 204, 173, 173, 231) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 7, 1, "WEAPON_GRENADE", false, false) 
        guiGridListSetItemColor(GUIEditor.gridlist[1], 7, 1, 160, 70, 70, 231) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 8, 1, "WEAPON_FLAMETHROWER", false, false) 
        guiGridListSetItemColor(GUIEditor.gridlist[1], 8, 1, 10, 219, 212, 231) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 9, 1, "WEAPON_COLT45", false, false) 
        guiGridListSetItemColor(GUIEditor.gridlist[1], 9, 1, 227, 1, 1, 231) 
        guiGridListSetItemText(GUIEditor.gridlist[1], 10, 1, "WEAPON_AK47", false, false) 
        guiGridListSetItemColor(GUIEditor.gridlist[1], 10, 1, 0, 227, 37, 231)     
    end 
) 
  
addEventHandler("onClientRender", root, 
    function() 
        dxDrawLine(264 - 1, 90 - 1, 264 - 1, 444, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(500, 90 - 1, 264 - 1, 90 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(264 - 1, 444, 500, 444, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(500, 444, 500, 90 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawRectangle(264, 90, 236, 354, tocolor(248, 106, 129, 100), false) 
        dxDrawText("Shop Weapon By Hassan Server Iraqi", 274, 97, 491, 129, tocolor(136, 187, 15, 231), 1.00, "default-bold", "center", "center", false, false, false, false, false) 
        dxDrawLine(296 - 1, 375 - 1, 296 - 1, 434, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(455, 375 - 1, 296 - 1, 375 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(296 - 1, 434, 455, 434, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawLine(455, 434, 455, 375 - 1, tocolor(0, 0, 0, 255), 1, false) 
        dxDrawRectangle(296, 375, 159, 59, tocolor(34, 200, 1, 231), false) 
        dxDrawText("Take", 295, 374, 455, 435, tocolor(193, 7, 7, 231), 1.00, "pricedown", "center", "center", false, false, false, false, false) 
    end 
) 

ابي لما يحدد على الخلاط ويحط على البوتون يعطيه لو سمحتو علموني كيف

Link to comment

Client :

addEventHandler("onClientGUIClick",root, --- حدث الضغط على الزر 
function ( )  
 -- نجيب التكست الي اخترناه في القريد لست 
local weapName = guiGridListGetItemText (  GUIEditor.gridlist[1], guiGridListGetSelectedItem ( GUIEditor.gridlist[1]) , 1 )  
--WEAPON_MINIGUN == نتحقق اذا ضغط على الزر و التكست الي حدده في القريد لست  
if ( source == GUIEditor.button[1] and weapName == "WEAPON_MINIGUN"  ) then  
 -- تريقر لسيرفر حق نعطيه الخلاط لان الوظيفة حقت اعطاء سلاح فقط سيرفر 
triggerServerEvent("MINIGUN",localPlayer) 
        end 
end  
) 

Server :

addEvent("MINIGUN",true) 
addEventHandler("MINIGUN",root, 
function() 
giveWeapon(source,38,300) -- نعطيه خلاط فيه 300 طلقة 
end 
) 

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