Jump to content

"تصحيح كود ممكن "سريع


Recommended Posts

addEventHandler("onClientGUIClick", root,
function()
    if source == GUIEditor.button[1] then
        local userName = guiGetText(GUIEditor.edit[1])
        local passWord = guiGetText(GUIEditor.edit[2])
        if userName ~= "" and passWord ~= "" then
            triggerServerEvent("Login-Register", localPlayer, "Login", userName, passWord)
            guiSetEnabled(GUIEditor.button[1], false)
            setTimer(function() guiSetEnabled(GUIEditor.button[1], true) end, 3000, 1)
    end
    elseif source == GUIEditor.button[2] then
        local userName = guiGetText(GUIEditor.edit[3])
        local passWord1 = guiGetText(GUIEditor.edit[4])
        local passWord2 = guiGetText(GUIEditor.edit[5])
        if userName ~= "" and passWord1 ~= "" and passWord2 ~= "" then
            if #passWord1 < 4 then
                outputChatBox("The Password should be at least 4 characters long.", 255, 100, 0)
            elseif passWord1 ~= passWord2 then
                outputChatBox("The password does not match.", 255, 0, 0)
            else
                guiSetEnabled(GUIEditor.button[2], false)
                setTimer(function() guiSetEnabled(GUIEditor.button[2], true) end, 3000, 1)
                triggerServerEvent("Login-Register", localPlayer, "Register", userName, passWord1)
                elseif source ==  GUIEditor.button[3]
                guiSetVisible(GUIEditor.window[2],true)
                showCursor(true)
            
                
                end
            end
        end
    end
end)

 

Edited by mr.pop
Link to comment

؟؟

 

addEventHandler("onClientGUIClick", root,
function()
	if source == GUIEditor.button[1] then
		local userName = guiGetText(GUIEditor.edit[1])
		local passWord = guiGetText(GUIEditor.edit[2])
		if userName ~= "" and passWord ~= "" then
			triggerServerEvent("Login-Register", localPlayer, "Login", userName, passWord)
			guiSetEnabled(GUIEditor.button[1], false)
			setTimer(function() guiSetEnabled(GUIEditor.button[1], true) end, 3000, 1)
		end
	elseif source == GUIEditor.button[2] then
		local userName = guiGetText(GUIEditor.edit[3])
		local passWord1 = guiGetText(GUIEditor.edit[4])
		local passWord2 = guiGetText(GUIEditor.edit[5])
		if userName ~= "" and passWord1 ~= "" and passWord2 ~= "" then
			if #passWord1 < 4 then
				outputChatBox("The Password should be at least 4 characters long.", 255, 100, 0)
			elseif passWord1 ~= passWord2 then
				outputChatBox("The password does not match.", 255, 0, 0)
			else
				guiSetEnabled(GUIEditor.button[2], false)
				setTimer(function() guiSetEnabled(GUIEditor.button[2], true) end, 3000, 1)
				triggerServerEvent("Login-Register", localPlayer, "Register", userName, passWord1)
			end
		end
	elseif source ==  GUIEditor.button[3]
			guiSetVisible(GUIEditor.window[2],true)
			showCursor(true)
	end
end
)

 

Link to comment

اه صح ض نستها مشكور راجعت كثير من مرة ونسيت  then

تسلم اخي يسلمك

#Killer Project

#BrosS

نفس المشكل مو حابة تضهر

اللوحة

addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),main)
 function main()
        GUIEditor.window[1] = guiCreateWindow(209, 126, 632, 359, "Panel Login", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
        guiSetAlpha(GUIEditor.window[1], 1.00)

-----------------------------|Login|-----------------------------


         GUIEditor.edit[1] = guiCreateEdit(218, 88, 226, 36, "", false, GUIEditor.window[1])

        GUIEditor.label[1] = guiCreateLabel(-103, 6, 87, 30, "", false, GUIEditor.edit[1])

        GUIEditor.label[2] = guiCreateLabel(14, 82, 204, 42, "UserName :", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[2], "sa-header")
        guiLabelSetVerticalAlign(GUIEditor.label[2], "center")
		
        GUIEditor.label[3] = guiCreateLabel(14, 183, 204, 42, "PassWord :", false, GUIEditor.window[1])
        guiSetFont(GUIEditor.label[3], "sa-header")
        guiLabelSetVerticalAlign(GUIEditor.label[3], "center")
		
        GUIEditor.edit[2] = guiCreateEdit(218, 189, 226, 36, "", false, GUIEditor.window[1])
		
        GUIEditor.button[3] = guiCreateButton(59, 267, 234, 63, "Register", false, GUIEditor.window[1])
		
        GUIEditor.button[1] = guiCreateButton(355, 267, 234, 63, "Login", false, GUIEditor.window[1])



-----------------------------|Register|-----------------------------

        GUIEditor.window[2] = guiCreateWindow(841, 126, 435, 359, "Panel Register", false)
        guiWindowSetSizable(GUIEditor.window[2], false)
        guiSetAlpha(GUIEditor.window[2], 1.00)

        GUIEditor.label[3] = guiCreateLabel(6, 47, 204, 36, "UserName :", false, GUIEditor.window[2])
        guiSetFont(GUIEditor.label[3], "sa-header")
		
        GUIEditor.label[4] = guiCreateLabel(6, 123, 204, 34, "PassWord :", false, GUIEditor.window[2])
        guiSetFont(GUIEditor.label[4], "sa-header")
		
        GUIEditor.label[5] = guiCreateLabel(6, 203, 210, 33, "Confirm PassWord :", false, GUIEditor.window[2])
        guiSetFont(GUIEditor.label[5], "sa-header")
		
        GUIEditor.button[4] = guiCreateButton(10, 296, 196, 47, "Back", false, GUIEditor.window[2])
		
        GUIEditor.button[2] = guiCreateButton(216, 296, 196, 47, "Making an account ", false, GUIEditor.window[2])
------------------------------------------------------------------------------------------------------

 

ممكن كيف اعطي سكين اي باد سلاح ويطلق ؟

:sad::sad::sad::sad::sad::sad::sad::sad::sad::sad::sad::sad::sad::sad::sad::sad::sad::sad::sad::sad::sad::sad::sad::sad::sad::sad:

Edited by mr.pop
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...