Jump to content

مشكله بسيطه


Recommended Posts

انا عملت مود

في 3 شيك بوكس

 

ابي لما يحدد  واحد منه ويضرب زر تتنحط في كولمن في قريد ليست

 

القريد ليست فيه 3 كولمن

كل شيك بوكس له كولمن مخصص 

مثل انا حدد على شيك بكوس رقم 3

لما اضرب ارسل يجي الكلام الي بي الشيك بوكس في كولمن 3 لكن مازبط مايترسل الا اول  شيك بوكس الباقي لا

 

الكود

 



		addEventHandler ( "onClientGUIClick", root,
			function ()
 
			if source == GUIEditor.button[2] then
 
 
			if (guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == false and guiCheckBoxGetSelected(GUIEditor.checkbox[2]) == false  and guiCheckBoxGetSelected(GUIEditor.checkbox[3]) == false)  then
			outputChatBox(' يجب عليك تحديد شيء قبل الارسال ', 255, 0, 0, true) return end
		
			if (guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == true ) then
			
			TS1 = guiGetText(GUIEditor.checkbox[1])
			
			
			triggerServerEvent( "T3", localPlayer,TS1)
		
	   
			if (guiCheckBoxGetSelected(GUIEditor.checkbox[2]) == true ) then  
	
			TS2 = guiGetText(GUIEditor.checkbox[2])
	
			triggerServerEvent( "T3", localPlayer,TS2)
 
			if (guiCheckBoxGetSelected(GUIEditor.checkbox[3]) == true ) then
	
			TS3 = guiGetText(GUIEditor.checkbox[3])
			
			triggerServerEvent( "T3", localPlayer,TS3)
	  
	  
				end
			end
		end
	end
 end
 )
 
 
 
 addEvent("T4",true)
addEventHandler("T4",root,
function(TS1,TS2,TS3)

	 
	      local Row1 = guiGridListAddRow (GUIEditor.gridlist[1])
		guiGridListSetItemText (GUIEditor.gridlist[1],Row1,1,TS1,false,false)
        guiGridListSetItemText (GUIEditor.gridlist[1],Row1,2,TS2,false,false)
		guiGridListSetItemText (GUIEditor.gridlist[1],Row1,3,TS3,false,false)		
        guiGridListSetItemColor ( GUIEditor.gridlist[1],Row1,1, 222, 200, 22 )
        guiGridListSetItemColor ( GUIEditor.gridlist[1],Row1,2, 222, 200, 22 )
		guiGridListSetItemColor ( GUIEditor.gridlist[1],Row1,3, 222, 200, 22 )

end

سيرفر

addEvent("T3",true)
addEventHandler("T3",root,
function(TS1,TS2,TS3)

    triggerClientEvent ( root, "T4", root,TS1,TS2,TS3)
end
)

 

Link to comment
addEventHandler ( "onClientGUIClick", root,
function ()
	if source == GUIEditor.button[2] then
		if (guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == false and guiCheckBoxGetSelected(GUIEditor.checkbox[2]) == false  and guiCheckBoxGetSelected(GUIEditor.checkbox[3]) == false)  then
		outputChatBox(' يجب عليك تحديد شيء قبل الارسال ', 255, 0, 0, true) return end
		local TS1 = guiGetText(GUIEditor.checkbox[1])
		local TS2 = guiGetText(GUIEditor.checkbox[2])
		local TS3 = guiGetText(GUIEditor.checkbox[3])
		triggerServerEvent( "T3", localPlayer,TS1,TS2,TS3)
	end
end
)

 

Link to comment
Just now, NssoR said:

addEventHandler ( "onClientGUIClick", root,
function ()
	if source == GUIEditor.button[2] then
		if (guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == false and guiCheckBoxGetSelected(GUIEditor.checkbox[2]) == false  and guiCheckBoxGetSelected(GUIEditor.checkbox[3]) == false)  then
		outputChatBox(' يجب عليك تحديد شيء قبل الارسال ', 255, 0, 0, true) return end
		local TS1 = guiGetText(GUIEditor.checkbox[1])
		local TS2 = guiGetText(GUIEditor.checkbox[2])
		local TS3 = guiGetText(GUIEditor.checkbox[3])
		triggerServerEvent( "T3", localPlayer,TS1,TS2,TS3)
	end
end
)

 

مشكور اخوي لكن آخوي

الان لما احدد على شيك بوكس و اضرب زر الارسال ترسل كله تجي ^^

انا بس ابي الي حددته من الشيك بوكس يجي

Link to comment
addEventHandler ( "onClientGUIClick", root,
function ()
	if source == GUIEditor.button[2] then
		if (guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == false and guiCheckBoxGetSelected(GUIEditor.checkbox[2]) == false  and guiCheckBoxGetSelected(GUIEditor.checkbox[3]) == false)  then
		outputChatBox(' يجب عليك تحديد شيء قبل الارسال ', 255, 0, 0, true) return end
		if ( guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == true ) then
			local TS1 = guiGetText(GUIEditor.checkbox[1])
			triggerServerEvent( "T3", localPlayer,TS1)
		elseif ( guiCheckBoxGetSelected(GUIEditor.checkbox[2]) == true ) then  
			local TS2 = guiGetText(GUIEditor.checkbox[2])
			triggerServerEvent( "T3", localPlayer,TS2)
		elseif (guiCheckBoxGetSelected(GUIEditor.checkbox[3]) == true ) then
			local TS3 = guiGetText(GUIEditor.checkbox[3])	
			triggerServerEvent( "T3", localPlayer,TS3)
		end
	end
end
)

 

Link to comment
Just now, NssoR said:

addEventHandler ( "onClientGUIClick", root,function ()
	if source == GUIEditor.button[2] then
		if (guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == false and guiCheckBoxGetSelected(GUIEditor.checkbox[2]) == false  and guiCheckBoxGetSelected(GUIEditor.checkbox[3]) == false)  then
		outputChatBox(' يجب عليك تحديد شيء قبل الارسال ', 255, 0, 0, true) return end
		if ( guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == true ) then
			local TS1 = guiGetText(GUIEditor.checkbox[1])
			triggerServerEvent( "T3", localPlayer,TS1)
		elseif ( guiCheckBoxGetSelected(GUIEditor.checkbox[2]) == true ) then  
			local TS2 = guiGetText(GUIEditor.checkbox[2])
			triggerServerEvent( "T3", localPlayer,TS2)
		elseif (guiCheckBoxGetSelected(GUIEditor.checkbox[3]) == true ) then
			local TS3 = guiGetText(GUIEditor.checkbox[3])	
			triggerServerEvent( "T3", localPlayer,TS3)
		end
	end
end
)

 

مشكور اخوي يعطيك العافيه 

اخي لو احد رسل مثل الخيار الاول

ابي مثل متغير قيمته 0 يصير +1

كل ما احد ضاف الخيار الاول يزيد + احطه كذا

 


n = 0

addEventHandler ( "onClientGUIClick", root,
function ()
	if source == GUIEditor.button[2] then
		if (guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == false and guiCheckBoxGetSelected(GUIEditor.checkbox[2]) == false  and guiCheckBoxGetSelected(GUIEditor.checkbox[3]) == false)  then
		outputChatBox(' يجب عليك تحديد شيء قبل الارسال ', 255, 0, 0, true) return end
		if ( guiCheckBoxGetSelected(GUIEditor.checkbox[1]) == true ) then
			local TS1 = guiGetText(GUIEditor.checkbox[1])
			n = n + 1
			triggerServerEvent( "T3", localPlayer,TS1,TS2,TS3)
		elseif ( guiCheckBoxGetSelected(GUIEditor.checkbox[2]) == true ) then  
			local TS2 = guiGetText(GUIEditor.checkbox[2])
			triggerServerEvent( "T3", localPlayer,TS1,TS2,TS3)
		elseif (guiCheckBoxGetSelected(GUIEditor.checkbox[3]) == true ) then
			local TS3 = guiGetText(GUIEditor.checkbox[3])	
			triggerServerEvent( "T3", localPlayer,TS1,TS2,TS3)
		end
	end
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...