Jump to content

حل مشكلة بكود


Recommended Posts

السلام عليكم

سويت مود يفتح كذا مود باللوحة واحدة

مثلا مود الشوب يفتح بزر 1 بس للأسف مايبي يفتح لما اضغط

ياريت تشوفو وين المشكل

الكلنت


GUIEditor = {
    edit = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        sam = guiCreateWindow(165, 40, 452, 535, "Player Control Panel|HarD", false)
        guiWindowSetSizable(sam, false)

        bsam2 = guiCreateButton(0.06, 0.10, 0.32, 0.09, "تـحويل الفلوس", true, sam)
        guiSetFont(bsam2, "default-bold-small")
        guiSetProperty(bsam2, "NormalTextColour", "FF6CFF00")
        bsam1 = guiCreateButton(277, 56, 145, 50, "نظآم الشـوب", false, sam)
        guiSetFont(bsam1, "default-bold-small")
        guiSetProperty(bsam1, "NormalTextColour", "FFFF0000")
        bsam3 = guiCreateButton(27, 170, 145, 50, "نظام الحركآت", false, sam)
        guiSetFont(bsam3, "default-bold-small")
        guiSetProperty(bsam3, "NormalTextColour", "FF00FEA7")
        bsam4 = guiCreateButton(277, 170, 145, 50, "القرآن الكريم", false, sam)
        guiSetFont(bsam4, "default-bold-small")
        guiSetProperty(bsam4, "NormalTextColour", "FFFCFF00")
        bsam5 = guiCreateButton(27, 273, 145, 50, "نظام المشي", false, sam)
        guiSetFont(bsam5, "default-bold-small")
        guiSetProperty(bsam5, "NormalTextColour", "FF008FFD")
        bsam6 = guiCreateButton(277, 273, 145, 50, "معلومآت الاعـب", false, sam)
        guiSetFont(bsam6, "default-bold-small")
        guiSetProperty(bsam6, "NormalTextColour", "FF2300FC")
        bsam7 = guiCreateButton(27, 378, 145, 50, "اسـئلة شاآئعة", false, sam)
        guiSetFont(bsam7, "default-bold-small")
        guiSetProperty(bsam7, "NormalTextColour", "FFF900FB")
        bsam8 = guiCreateButton(277, 378, 145, 50, "القوانين ونظآم الـرتب", false, sam)
        guiSetFont(bsam8, "default-bold-small")
        guiSetProperty(bsam8, "NormalTextColour", "FFFEFEFE")
        GUIEditor.edit[1] = guiCreateEdit(17, 495, 421, 25, "|Player Control Panel|        | V1.00|       |HarD Server|        |By:SAM|", false, sam)
        guiSetProperty(GUIEditor.edit[1], "NormalTextColour", "FFFF0707")
        guiEditSetReadOnly(GUIEditor.edit[1], true)
        bsam9 = guiCreateButton(42, 438, 355, 37, "~~~اغلآق اللوحة~~~", false, sam)
        guiSetFont(bsam9, "default-bold-small")
        guiSetProperty(bsam9, "NormalTextColour", "FFFE077B")    
    end
)


 bindKey("/","down",
function ()
    guiSetVisible(sam,not guiGetVisible(sam))
    showCursor(guiGetVisible(GUIEditor.sam))
end)
ddEventHandler ("onClientGUIClick", root,
        function()
        if (source == bsam1) then
         guiSetVisible(sam, false)
         showCursor(false)
         guiSetInputEnabled(false)
        end
    end
)


addEventHandler ("onClientGUIClick", root,
        function()
        if (source == GUIEditor.button[2]) then
         guiSetVisible(Control, false)
         showCursor(false)
         guiSetInputEnabled(false)
        end
    end
)


addEventHandler ("onClientGUIClick", root,
        function()
        if (source == GUIEditor.button[3]) then
         guiSetVisible(Control, false)
         showCursor(false)
         guiSetInputEnabled(false)
        end
    end
)


addEventHandler ("onClientGUIClick", root,
        function()
        if (source == GUIEditor.button[4]) then
         guiSetVisible(Control, false)
         showCursor(false)
         guiSetInputEnabled(false)
        end
    end
)


addEventHandler ("onClientGUIClick", root,
        function()
        if (source == GUIEditor.button[5]) then
         guiSetVisible(Control, false)
         showCursor(false)
         guiSetInputEnabled(false)
        end
    end
)


addEventHandler ("onClientGUIClick", root,
        function()
        if (source == GUIEditor.button[6]) then
         guiSetVisible(Control, false)
         showCursor(false)
         guiSetInputEnabled(false)
        end
    end
)


addEventHandler ("onClientGUIClick", root,
        function()
        if (source == GUIEditor.button[7]) then
         guiSetVisible(Control, false)
         showCursor(false)
         guiSetInputEnabled(false)
        end
    end
)


addEventHandler ("onClientGUIClick", root,
        function()
        if (source == GUIEditor.button[8]) then
         guiSetVisible(Control, false)
         showCursor(false)
         guiSetInputEnabled(false)
        end
    end
)
--

addEventHandler("onClientGUIClick",root, 
function () 
if source == bsam1 then 
if ( guiGetVisible(GUIEditor.window[1]) == false ) then 
            guiSetVisible(sam,false)
			showCursor(false)
			guiSetInputEnabled(false)
	end
	guiSetVisible(Control,not guiGetVisible(sam))
	showCursor(guiGetVisible(sam)) 	
	guiSetInputEnabled(guiGetVisible(sam)) 
end 
end 
) 
--

المود الي حطيتة فيها ليفتح

مسمية sshop

الكلنت حق الشوب الي ابية يفتح من اللوحة الي مسويها

GUIEditor = {
    staticimage = {},
    edit = {},
    button = {},
    window = {},
    label = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        GUIEditor.window[1] = guiCreateWindow(82, 21, 569, 497, "HarD|Shop System", false)
   guiSetVisible ( GUIEditor.window[1], false ) -- wnd
        guiWindowSetSizable(GUIEditor.window[1], false)
        guiSetAlpha(GUIEditor.window[1], 0.87)

        GUIEditor.staticimage[1] = guiCreateStaticImage(28, 43, 91, 82, ":player_control_panel/images/16.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[2] = guiCreateStaticImage(159, 43, 96, 75, ":player_control_panel/images/22.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[3] = guiCreateStaticImage(307, 40, 100, 75, ":player_control_panel/images/23.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[4] = guiCreateStaticImage(434, 35, 80, 80, ":player_control_panel/images/24.png", false, GUIEditor.window[1])
        GUIEditor.button[1] = guiCreateButton(28, 136, 84, 45, "1000000$", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.button[1], "default-bold-small")
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000")
        GUIEditor.button[2] = guiCreateButton(167, 136, 92, 45, "20000$", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.button[2], "default-bold-small")
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFEEF00")
        GUIEditor.button[3] = guiCreateButton(304, 135, 96, 46, "10000$", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.button[3], "default-bold-small")
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF3BFD00")
        GUIEditor.button[4] = guiCreateButton(430, 135, 104, 46, "50000$", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.button[4], "default-bold-small")
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FF00FCE8")
        GUIEditor.staticimage[5] = guiCreateStaticImage(30, 201, 92, 69, ":player_control_panel/images/25.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[6] = guiCreateStaticImage(169, 196, 91, 73, ":player_control_panel/images/26.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[7] = guiCreateStaticImage(304, 202, 86, 67, ":player_control_panel/images/28.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[8] = guiCreateStaticImage(448, 196, 74, 63, "player_control_panel/images/29.png", false, GUIEditor.window[1])
        GUIEditor.button[5] = guiCreateButton(28, 269, 96, 45, "300000$", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.button[5], "default-bold-small")
        guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FF0011FB")
        GUIEditor.button[6] = guiCreateButton(162, 270, 98, 45, "400000$", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.button[6], "default-bold-small")
        guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FFFA00F2")
        GUIEditor.button[7] = guiCreateButton(304, 269, 86, 46, "30000$", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.button[7], "default-bold-small")
        guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FFF90000")
        GUIEditor.button[8] = guiCreateButton(442, 265, 82, 50, "100000$", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.button[8], "default-bold-small")
        guiSetProperty(GUIEditor.button[8], "NormalTextColour", "FFF8CD00")
        GUIEditor.staticimage[9] = guiCreateStaticImage(32, 329, 80, 73, ":player_control_panel/images/90.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[10] = guiCreateStaticImage(172, 339, 82, 63, ":player_control_panel/images/80.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[11] = guiCreateStaticImage(304, 340, 82, 62, ":player_control_panel/images/100.png", false, GUIEditor.window[1])
        GUIEditor.staticimage[12] = guiCreateStaticImage(434, 332, 71, 70, ":player_control_panel/images/30.png", false, GUIEditor.window[1])
        GUIEditor.button[9] = guiCreateButton(35, 591, 120, 0, "150000$", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.button[9], "default-bold-small")
        guiSetProperty(GUIEditor.button[9], "NormalTextColour", "FF849C5B")
        GUIEditor.button[10] = guiCreateButton(242, 591, 120, 0, "500000$", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.button[10], "default-bold-small")
        guiSetProperty(GUIEditor.button[10], "NormalTextColour", "FF606D96")
        GUIEditor.button[11] = guiCreateButton(491, 591, 120, 0, "200000$", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.button[11], "default-bold-small")
        guiSetProperty(GUIEditor.button[11], "NormalTextColour", "FF3B7ABA")
        GUIEditor.button[12] = guiCreateButton(709, 591, 82, 0, "250000$", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.button[12], "default-bold-small")
        guiSetProperty(GUIEditor.button[12], "NormalTextColour", "FF51D81C")
        GUIEditor.label[1] = guiCreateLabel(29, 25, 93, 15, "Grenade | ID:16", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[1], "default-bold-small")
        GUIEditor.label[2] = guiCreateLabel(169, 25, 93, 15, "Colt 45 | ID: 22", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[2], "default-bold-small")
        GUIEditor.label[3] = guiCreateLabel(28, 645, 204, 22, "HarD|Shop System By SAM | V 1.0.0", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[3], "default-small")
        guiLabelSetColor(GUIEditor.label[3], 255, 0, 0)
        GUIEditor.label[4] = guiCreateLabel(307, 25, 93, 15, "Silenced | ID: 23", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[4], "default-bold-small")
        GUIEditor.label[5] = guiCreateLabel(434, 25, 93, 15, "Deagle | ID: 24", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[5], "default-bold-small")
        GUIEditor.label[6] = guiCreateLabel(23, 186, 106, 15, "Combat SG | ID:27", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[6], "default-bold-small")
        GUIEditor.label[7] = guiCreateLabel(161, 181, 106, 15, "Sawed-off | ID:26", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[7], "default-bold-small")
        GUIEditor.label[8] = guiCreateLabel(318, 181, 106, 15, "UZI | ID:28", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[8], "default-bold-small")
        GUIEditor.label[9] = guiCreateLabel(438, 181, 106, 15, "MP5 | ID:29", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[9], "default-bold-small")
        GUIEditor.label[10] = guiCreateLabel(23, 314, 106, 15, "Nightvision| ID:44", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[10], "default-bold-small")
        GUIEditor.label[11] = guiCreateLabel(434, 315, 106, 15, "M4| ID:31", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[11], "default-bold-small")
        GUIEditor.label[12] = guiCreateLabel(299, 315, 106, 15, "Hide Skin: UA", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[12], "default-bold-small")
        GUIEditor.label[13] = guiCreateLabel(162, 314, 106, 15, "Super Jump: UA", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[13], "default-bold-small")
        GUIEditor.button[13] = guiCreateButton(30, 402, 84, 45, "100000$", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.button[13], "default-bold-small")
        guiSetProperty(GUIEditor.button[13], "NormalTextColour", "FFAD6A4F")
        GUIEditor.button[14] = guiCreateButton(172, 402, 84, 45, "Free", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.button[14], "default-bold-small")
        guiSetProperty(GUIEditor.button[14], "NormalTextColour", "FF7C639B")
        GUIEditor.button[15] = guiCreateButton(299, 402, 84, 45, "250000$", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.button[15], "default-bold-small")
        guiSetProperty(GUIEditor.button[15], "NormalTextColour", "FF7EA357")
        GUIEditor.button[16] = guiCreateButton(428, 402, 84, 45, "250000$", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.button[16], "default-bold-small")
        guiSetProperty(GUIEditor.button[16], "NormalTextColour", "FF42B7B0")
        GUIEditor.label[14] = guiCreateLabel(11, 463, 123, 15, "HarD|Shop System | V 2.0.0", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[14], "default-small")
        guiLabelSetColor(GUIEditor.label[14], 255, 0, 0)
        GUIEditor.edit[1] = guiCreateEdit(428, 453, 128, 25, "By:SAM|V2.0.0|HarD", false, GUIEditor.window[1])
        guiSetProperty(GUIEditor.edit[1], "NormalTextColour", "FFF70000")
        guiEditSetReadOnly(GUIEditor.edit[1], true)    
    end
)

bindKey("", "down", open)
      
	addEventHandler('onClientGUIClick', root, 
	
	function ( ) 
	   
	if ( source == GUIEditor.button[1] ) then
		
	triggerServerEvent('giveWeapon_', localPlayer , 1000000 , 16, 3 , "Grenade " )

		
	elseif ( source == GUIEditor.button[2] ) then 
		
	triggerServerEvent('giveWeapon_', localPlayer , 20000 , 22, 99999 , "Colt 45" )
		
		
	elseif ( source == GUIEditor.button[3] ) then  
		
	triggerServerEvent('giveWeapon_', localPlayer , 10000 , 23, 99999 , "Silenced" )
		
	elseif ( source == GUIEditor.button[4] ) then  
		
	triggerServerEvent('giveWeapon_', localPlayer , 50000 , 24, 9999 , "Deagle" ) 
		
	elseif ( source == GUIEditor.button[5] ) then  
		
	triggerServerEvent('giveWeapon_', localPlayer , 300000 , 27, 9999 , "Combat SG" ) 
		
	elseif ( source == GUIEditor.button[6] ) then  
		
	triggerServerEvent('giveWeapon_', localPlayer , 400000 , 26, 9999 , "Sawed-off" )
		
	elseif ( source == GUIEditor.button[7] ) then  
		
	triggerServerEvent('giveWeapon_', localPlayer , 30000 , 28, 9999 , "Uzi") 
		
	elseif ( source == GUIEditor.button[8] ) then  
		
	triggerServerEvent('giveWeapon_', localPlayer , 100000 , 29, 9999 , "MP5") 

	elseif ( source == GUIEditor.button[13] ) then  
		
	triggerServerEvent('giveWeapon_', localPlayer , 150000 , 44, 9999 , "Nightvision") 

	elseif ( source == GUIEditor.button[16] ) then  
		
	triggerServerEvent('giveWeapon_', localPlayer , 250000 , 31, 9999 , "M4") 


	



elseif ( source ==  GUIEditor.button[14] ) then  
  
setWorldSpecialPropertyEnabled ( "extrajump", true )


		end
	end
	) ;
   addEventHandler ("onClientGUIClick", getRootElement(), 
  
function(button, state, absoluteX, absoluteY) 
  
if ( source ==  GUIEditor.button[15] ) then  
  
triggerServerEvent("buyInvisible",getLocalPlayer())  
  
end  
  
end  
) 

السيرفر حق الشوب الي ابية يفتح من اللوحة الي مسويها

addEvent('giveWeapon_', true)   
addEventHandler('giveWeapon_', root, 
	function ( arg1 , arg2 , arg3 , arg4 ) 
	
	local PlayerMoney = getPlayerMoney ( source ) 
	
	if ( PlayerMoney >= arg1 ) then
	
	takePlayerMoney ( source , arg1 ) 
	
	giveWeapon( source, arg2 , arg3 ) 
	
	outputChatBox('[HarD]تم اعطائك السلآح بنجآح'..arg4, source, 255, 0 ,0 , true ) 
	
	else
	
	outputChatBox("حدث خطأ[HarD]", source, 255, 0, 0, true) 
	
		end
    end 
    ) 
addEvent ( "buyInvisible", true) 
addEventHandler ( "buyInvisible", root, function (    ) 
    local check = getElementAlpha ( source ) == 255 
            if ( getPlayerMoney ( source ) >= 200000 ) then
        takePlayerMoney ( source, check and 200000 or 200000 )
        outputChatBox ( check and "انت الان مختفى" or "انت الان غير مختفي", source, 0, 255, 0, true ) 
            setElementAlpha ( source, check and 0 or 255 ) 
        setPlayerNametagShowing ( source, not check ) 
	outputChatBox('تم اعطائك السلآح بنجآح'..arg4, source, 255, 0 ,0 , true ) 
	
	else
	
	outputChatBox("حدث خطأأ[HarD]!", source, 255, 0, 0, true) 
    end
end ) 

ياليت تصلحو لي الاكواد الخطأ وتعرفوني وين الخطأ حتي لا اقع فية تاني 

مشككورين

Link to comment

اخي صعب جدآ ان المبرمج يبص في الكود دا كلو

انت لازم تشغل الدي بق

اكتب كدا في اف 8 debugscript 3

وبعدين تشغل المود وتقول للمبرمجين ايه الي ينكتب فيه

بس تذكر تشغل الدي بق الأول وبعدين تشغل المودين مود الشوب ومود اللوحة الي تجمع اللوح

+ تجيب الأخطاء الي تحتوي في اولها علي اسم من المودين دول

Link to comment

يلخوي كودات الكلنت حقتك مخبصة :D + شكلك انت موب الي مسوي الشوب لانك لو كنت مسويه ماكانت هذي صعبة عليك + علعموم اكتب debugscript 3
في اف 8

وجبلي الاخطاء كلها وبعلمك وينها o.O

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