Jump to content

مشكلة [ onClientGUIClick ]


Recommended Posts

السلام عليكم

فيه مشكلة غريبة واجهتني

في حدث عند الضغط guiSetVisible اني اذا ضفت

ماراح يتنفذ ؟؟؟؟؟ elseif وسويت 

اشوف ان اكوادي صحيحة

addEventHandler("onClientGUIClick",resourceRoot,function()
				if ( source == addserial ) then
			guiSetVisible(wndserial,true)
				guiSetProperty ( wndserial, "AlwaysOnTop", "true" )
	elseif ( source == ok ) then
	guiSetVisible(wndserial,false)
		local aName = guiGetText ( serial )
				if ( ( aName ) and ( aName ~= "" ) ) then
					if ( string.len ( aName ) ~= 32 ) then return end
			triggerServerEvent("serial",localPlayer,aName)
				elseif ( source == removeserial ) then
        selected = guiGridListGetSelectedItem(GridBan)
        if selected ~= -1 then
           	data = guiGridListGetItemText(GridBan, selected,1)
        	triggerServerEvent("removeserial",localPlayer,data)
            guiGridListRemoveRow (GridBan,selected)
				elseif ( source == cancel ) then
					guiSetVisible(wndserial,false)
			end
		end
	end
end)

 

Link to comment
35 minutes ago, Talis said:

السلام عليكم

فيه مشكلة غريبة واجهتني

في حدث عند الضغط guiSetVisible اني اذا ضفت

ماراح يتنفذ ؟؟؟؟؟ elseif وسويت 

اشوف ان اكوادي صحيحة


addEventHandler("onClientGUIClick",resourceRoot,function()
				if ( source == addserial ) then
			guiSetVisible(wndserial,true)
				guiSetProperty ( wndserial, "AlwaysOnTop", "true" )
	elseif ( source == ok ) then
	guiSetVisible(wndserial,false)
		local aName = guiGetText ( serial )
				if ( ( aName ) and ( aName ~= "" ) ) then
					if ( string.len ( aName ) ~= 32 ) then return end
			triggerServerEvent("serial",localPlayer,aName)
				elseif ( source == removeserial ) then
        selected = guiGridListGetSelectedItem(GridBan)
        if selected ~= -1 then
           	data = guiGridListGetItemText(GridBan, selected,1)
        	triggerServerEvent("removeserial",localPlayer,data)
            guiGridListRemoveRow (GridBan,selected)
				elseif ( source == cancel ) then
					guiSetVisible(wndserial,false)
			end
		end
	end
end)

 

جرب ذا

addEventHandler("onClientGUIClick",resourceRoot,function()
				if ( source == addserial ) then
			guiSetVisible(wndserial,true)
				guiSetProperty ( wndserial, "AlwaysOnTop", "true" )
	elseif ( source == ok ) then
	guiSetVisible(wndserial,false)
		local aName = guiGetText ( serial )
				if ( ( aName ) and ( aName ~= "" ) ) then
					if ( string.len ( aName ) ~= 32 ) then return end
			triggerServerEvent("serial",localPlayer,aName)
        end
				elseif ( source == removeserial ) then
        selected = guiGridListGetSelectedItem(GridBan)
        if selected ~= -1 then
           	data = guiGridListGetItemText(GridBan, selected,1)
        	triggerServerEvent("removeserial",localPlayer,data)
            guiGridListRemoveRow (GridBan,selected)
        end
				elseif ( source == cancel ) then
					guiSetVisible(wndserial,false)
			end
end)

 

  • Thanks 1
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...