Jump to content

x[ مشكلة ]x في مود لوحة الدخول


Recommended Posts

السلام عليكم ,
كيف الحال؟
#عيد_سعيد

شباب اريد مساعدةة في لوحة تسجيل الدخول
لوحة تشتغل تمام ! مشكلة
T,Yاذا انت اسم حسابك بة حرف
تكتب اسم حسابك تشوف نفسك تكتب في شات
اذا انت مسوي كلمة سر ارقام !
و مسوي الارقام بيها اختصار !! = من تكتب كلمة السر >> الاختصارات تطلع في شات ويصير تخريب


سـيـرفـر

-- My  Login Panel :D
function interfaz( )
	local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "radar" }

	for _, component in ipairs( components ) do
		setPlayerHudComponentVisible( component, false )
	end

	local x, y = guiGetScreenSize( )

	showCursor( true )

	main = guiCreateWindow( x/3.8, y/3.8, x/2.02, y/2, "Login Panel", false )
	guiWindowSetMovable( main, false)
	guiWindowSetSizable( main, false)

	guiCreateLabel( x/10, y/8, x/4, y/4, "Username:", false, main)
	guiCreateLabel( x/10, y/5, x/4, y/4, "Password:", false, main)

	loginU = guiCreateEdit( x/8, y/6.8, x/5, y/24, "", false, main)
	loginP = guiCreateEdit( x/8, y/4.5, x/5, y/24, "", false, main)
guiEditSetMasked( loginP, true )
guiEditSetMaxLength( loginU, 10 )
guiEditSetMaxLength( loginP, 10 )

	btnL = guiCreateButton( x/8, y/3.5, x/10, x/20, "Login", false, main)
	btnR = guiCreateButton( x/4, y/3.5, x/10, x/20, "Register", false, main)

	addEventHandler ("onClientGUIClick", btnL,
		function (us, pa)
			local us = guiGetText (loginU)
			local pa = guiGetText (loginP)
			triggerServerEvent ("loggin", getRootElement(), getLocalPlayer(), us, pa)
		end, false
	)

	addEventHandler ("onClientGUIClick", btnR,
		function (us, pa)
			local us = guiGetText (loginU)
			local pa = guiGetText (loginP)
			triggerServerEvent ("register", getRootElement(), getLocalPlayer(), us, pa)
		end, false
	)
end
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), interfaz )


function hideW ()
	local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "radar" }
	for _, component in ipairs( components ) do
		setPlayerHudComponentVisible( component, true )
	end
	showCursor (false)
	guiSetVisible (main, false)
end
addEvent ("Succes", true)
addEventHandler ("Succes", getRootElement(), hideW)



كـلـيـنـت

function submitLogin (source, user, pass)
	if (user ~= "") then
		if (pass ~= "") then
			local acc = getAccount (user, pass)
			if (acc ~= false) then
				logIn (source, acc, pass)
				outputChatBox ("You logged in successfully.")
				triggerClientEvent (source, "Succes", source)
			else
				outputChatBox ("Wrong username or password, please try again!", getRootElement(), 255, 255, 255, false)
			end
		else
			outputChatBox ("Password can not be blank.", getRootElement(), 255, 255, 255, false)
		end
	else
		outputChatBox ("Username can not be blank.", getRootElement(), 255, 255, 255, false)
	end
end
addEvent ("loggin", true)
addEventHandler ("loggin", getRootElement(), submitLogin)


addEvent ("register", true)
addEventHandler ("register", getRootElement(),
	function (source, Nuser, Npass)
		if (Nuser ~= "" and Nuser ~= nil and Npass ~= "" and Npass ~= nil) then
			local Nacc = addAccount (Nuser, Npass)
			if Nacc then
				outputChatBox ("You have successfully registered, now try logging in.", getRootElement(), 255, 255, 255)
			else
				outputChatBox ("this account already has been created.", getRootElement(), 255, 255, 255)
			end
		end
	end
)

سـاعـدوني في حل هذة مشكلة رجاء رجاء

شكراً

Link to comment
-- My  Login Panel :D
function interfaz( )
	local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "radar" }

	for _, component in ipairs( components ) do
		setPlayerHudComponentVisible( component, false )
	end

	local x, y = guiGetScreenSize( )

	showCursor( true )

	main = guiCreateWindow( x/3.8, y/3.8, x/2.02, y/2, "Login Panel", false )
	guiWindowSetMovable( main, false)
	guiWindowSetSizable( main, false)
	guiSetInputEnabled(main,true)

	guiCreateLabel( x/10, y/8, x/4, y/4, "Username:", false, main)
	guiCreateLabel( x/10, y/5, x/4, y/4, "Password:", false, main)

	loginU = guiCreateEdit( x/8, y/6.8, x/5, y/24, "", false, main)
	loginP = guiCreateEdit( x/8, y/4.5, x/5, y/24, "", false, main)
guiEditSetMasked( loginP, true )
guiEditSetMaxLength( loginU, 10 )
guiEditSetMaxLength( loginP, 10 )

	btnL = guiCreateButton( x/8, y/3.5, x/10, x/20, "Login", false, main)
	btnR = guiCreateButton( x/4, y/3.5, x/10, x/20, "Register", false, main)

	addEventHandler ("onClientGUIClick", btnL,
		function (us, pa)
			local us = guiGetText (loginU)
			local pa = guiGetText (loginP)
			triggerServerEvent ("loggin", getRootElement(), getLocalPlayer(), us, pa)
		end, false
	)

	addEventHandler ("onClientGUIClick", btnR,
		function (us, pa)
			local us = guiGetText (loginU)
			local pa = guiGetText (loginP)
			triggerServerEvent ("register", getRootElement(), getLocalPlayer(), us, pa)
		end, false
	)
end
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), interfaz )


function hideW ()
	local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "radar" }
	for _, component in ipairs( components ) do
		setPlayerHudComponentVisible( component, true )
	end
	showCursor (false)
	guiSetVisible (main, false)
	guiSetInputEnabled(main,false)
end
addEvent ("Succes", true)
addEventHandler ("Succes", getRootElement(), hideW)

 

Edited by Kara
  • Like 1
Link to comment
3 hours ago, Kara said:

-- My  Login Panel :Dfunction interfaz( )	local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "radar" }	for _, component in ipairs( components ) do		setPlayerHudComponentVisible( component, false )	end	local x, y = guiGetScreenSize( )	showCursor( true )	main = guiCreateWindow( x/3.8, y/3.8, x/2.02, y/2, "Login Panel", false )	guiWindowSetMovable( main, false)	guiWindowSetSizable( main, false)	guiSetInputEnabled(main,true)	guiCreateLabel( x/10, y/8, x/4, y/4, "Username:", false, main)	guiCreateLabel( x/10, y/5, x/4, y/4, "Password:", false, main)	loginU = guiCreateEdit( x/8, y/6.8, x/5, y/24, "", false, main)	loginP = guiCreateEdit( x/8, y/4.5, x/5, y/24, "", false, main)guiEditSetMasked( loginP, true )guiEditSetMaxLength( loginU, 10 )guiEditSetMaxLength( loginP, 10 )	btnL = guiCreateButton( x/8, y/3.5, x/10, x/20, "Login", false, main)	btnR = guiCreateButton( x/4, y/3.5, x/10, x/20, "Register", false, main)	addEventHandler ("onClientGUIClick", btnL,		function (us, pa)			local us = guiGetText (loginU)			local pa = guiGetText (loginP)			triggerServerEvent ("loggin", getRootElement(), getLocalPlayer(), us, pa)		end, false	)	addEventHandler ("onClientGUIClick", btnR,		function (us, pa)			local us = guiGetText (loginU)			local pa = guiGetText (loginP)			triggerServerEvent ("register", getRootElement(), getLocalPlayer(), us, pa)		end, false	)endaddEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), interfaz )function hideW ()	local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "radar" }	for _, component in ipairs( components ) do		setPlayerHudComponentVisible( component, true )	end	showCursor (false)	guiSetVisible (main, false)	guiSetInputEnabled(main,false)endaddEvent ("Succes", true)addEventHandler ("Succes", getRootElement(), hideW)

 


نـفـس الـشئ !!ضفت اكودك , ومشكلة موجودة
&
Debug Script

WARNING: LOGIN\loginC.lua:12: Bad argument @'guiSetInputEnbled' [Expected bool at argument 1,got gui-window]

 

Link to comment
1 hour ago, Mr.OppS said:


نـفـس الـشئ !!ضفت اكودك , ومشكلة موجودة
&
Debug Script


WARNING: LOGIN\loginC.lua:12: Bad argument @'guiSetInputEnbled' [Expected bool at argument 1,got gui-window]

 

-- My  Login Panel :D
function interfaz( )
	local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "radar" }

	for _, component in ipairs( components ) do
		setPlayerHudComponentVisible( component, false )
	end

	local x, y = guiGetScreenSize( )

	showCursor( true )

	main = guiCreateWindow( x/3.8, y/3.8, x/2.02, y/2, "Login Panel", false )
	guiWindowSetMovable( main, false)
	guiWindowSetSizable( main, false)
	guiSetInputEnabled(true)

	guiCreateLabel( x/10, y/8, x/4, y/4, "Username:", false, main)
	guiCreateLabel( x/10, y/5, x/4, y/4, "Password:", false, main)

	loginU = guiCreateEdit( x/8, y/6.8, x/5, y/24, "", false, main)
	loginP = guiCreateEdit( x/8, y/4.5, x/5, y/24, "", false, main)
guiEditSetMasked( loginP, true )
guiEditSetMaxLength( loginU, 10 )
guiEditSetMaxLength( loginP, 10 )

	btnL = guiCreateButton( x/8, y/3.5, x/10, x/20, "Login", false, main)
	btnR = guiCreateButton( x/4, y/3.5, x/10, x/20, "Register", false, main)

	addEventHandler ("onClientGUIClick", btnL,
		function (us, pa)
			local us = guiGetText (loginU)
			local pa = guiGetText (loginP)
			triggerServerEvent ("loggin", getRootElement(), getLocalPlayer(), us, pa)
		end, false
	)

	addEventHandler ("onClientGUIClick", btnR,
		function (us, pa)
			local us = guiGetText (loginU)
			local pa = guiGetText (loginP)
			triggerServerEvent ("register", getRootElement(), getLocalPlayer(), us, pa)
		end, false
	)
end
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), interfaz )


function hideW ()
	local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "radar" }
	for _, component in ipairs( components ) do
		setPlayerHudComponentVisible( component, true )
	end
	showCursor (false)
	guiSetVisible (main, false)
	guiSetInputEnabled(false)
end
addEvent ("Succes", true)
addEventHandler ("Succes", getRootElement(), hideW)

 

Link to comment
On ‏٢٤‏/‏٠٦‏/‏٢٠١٧ at 03:10, Kara said:

-- My  Login Panel :Dfunction interfaz( )	local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "radar" }	for _, component in ipairs( components ) do		setPlayerHudComponentVisible( component, false )	end	local x, y = guiGetScreenSize( )	showCursor( true )	main = guiCreateWindow( x/3.8, y/3.8, x/2.02, y/2, "Login Panel", false )	guiWindowSetMovable( main, false)	guiWindowSetSizable( main, false)	guiSetInputEnabled(true)	guiCreateLabel( x/10, y/8, x/4, y/4, "Username:", false, main)	guiCreateLabel( x/10, y/5, x/4, y/4, "Password:", false, main)	loginU = guiCreateEdit( x/8, y/6.8, x/5, y/24, "", false, main)	loginP = guiCreateEdit( x/8, y/4.5, x/5, y/24, "", false, main)guiEditSetMasked( loginP, true )guiEditSetMaxLength( loginU, 10 )guiEditSetMaxLength( loginP, 10 )	btnL = guiCreateButton( x/8, y/3.5, x/10, x/20, "Login", false, main)	btnR = guiCreateButton( x/4, y/3.5, x/10, x/20, "Register", false, main)	addEventHandler ("onClientGUIClick", btnL,		function (us, pa)			local us = guiGetText (loginU)			local pa = guiGetText (loginP)			triggerServerEvent ("loggin", getRootElement(), getLocalPlayer(), us, pa)		end, false	)	addEventHandler ("onClientGUIClick", btnR,		function (us, pa)			local us = guiGetText (loginU)			local pa = guiGetText (loginP)			triggerServerEvent ("register", getRootElement(), getLocalPlayer(), us, pa)		end, false	)endaddEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), interfaz )function hideW ()	local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "radar" }	for _, component in ipairs( components ) do		setPlayerHudComponentVisible( component, true )	end	showCursor (false)	guiSetVisible (main, false)	guiSetInputEnabled(false)endaddEvent ("Succes", true)addEventHandler ("Succes", getRootElement(), hideW)

 

 

On ‏٢٤‏/‏٠٦‏/‏٢٠١٧ at 01:52, #kAsR said:

خليه كذا

guiSetInputEnabled(true)

 

سـويـتـة !!ولكن هناك مشكلة ؛ كود ضعـيـف
مشكلة ترجع مرة اخري
اذا تكتب اسم حسابك تشوف حالك تكتب في شات
Bواذا كلمة سر يوجود بة حرف
تشوف لوحة الوزنيات طلعت
^^ حتي تـنـحـل مشكلة  = لازم اسوي إعادة تشغيل للمود*ريسترت* !! ارجو الحل

Link to comment
26 minutes ago, iMr.WiFi..! said:

"onClientKey"-- partmer 1 is keyif key == ..   	cancelEvent  

 

,, ياخي مو حل هذا !!
F1.F2.F...انا هكذآ راح اضيـف كل الحروف و كل الـ

 




مشكلة
T,Yاذا انت اسم حسابك بة حرف
تكتب اسم حسابك تشوف نفسك تكتب في شات
اذا انت مسوي كلمة سر ارقام !
و مسوي الارقام بيها اختصار !! = من تكتب كلمة السر >> الاختصارات تطلع في شات ويصير تخريب

Link to comment
On ‏٢٣‏/‏٠٦‏/‏٢٠١٧ at 18:48, Mr.OppS said:

السلام عليكم ,
كيف الحال؟
#عيد_سعيد

شباب اريد مساعدةة في لوحة تسجيل الدخول
لوحة تشتغل تمام ! مشكلة
T,Yاذا انت اسم حسابك بة حرف
تكتب اسم حسابك تشوف نفسك تكتب في شات
اذا انت مسوي كلمة سر ارقام !
و مسوي الارقام بيها اختصار !! = من تكتب كلمة السر >> الاختصارات تطلع في شات ويصير تخريب


سـيـرفـر


-- My  Login Panel :D
function interfaz( )
	local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "radar" }

	for _, component in ipairs( components ) do
		setPlayerHudComponentVisible( component, false )
	end

	local x, y = guiGetScreenSize( )

	showCursor( true )

	main = guiCreateWindow( x/3.8, y/3.8, x/2.02, y/2, "Login Panel", false )
	guiWindowSetMovable( main, false)
	guiWindowSetSizable( main, false)

	guiCreateLabel( x/10, y/8, x/4, y/4, "Username:", false, main)
	guiCreateLabel( x/10, y/5, x/4, y/4, "Password:", false, main)

	loginU = guiCreateEdit( x/8, y/6.8, x/5, y/24, "", false, main)
	loginP = guiCreateEdit( x/8, y/4.5, x/5, y/24, "", false, main)
guiEditSetMasked( loginP, true )
guiEditSetMaxLength( loginU, 10 )
guiEditSetMaxLength( loginP, 10 )

	btnL = guiCreateButton( x/8, y/3.5, x/10, x/20, "Login", false, main)
	btnR = guiCreateButton( x/4, y/3.5, x/10, x/20, "Register", false, main)

	addEventHandler ("onClientGUIClick", btnL,
		function (us, pa)
			local us = guiGetText (loginU)
			local pa = guiGetText (loginP)
			triggerServerEvent ("loggin", getRootElement(), getLocalPlayer(), us, pa)
		end, false
	)

	addEventHandler ("onClientGUIClick", btnR,
		function (us, pa)
			local us = guiGetText (loginU)
			local pa = guiGetText (loginP)
			triggerServerEvent ("register", getRootElement(), getLocalPlayer(), us, pa)
		end, false
	)
end
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), interfaz )


function hideW ()
	local components = { "weapon", "ammo", "health", "clock", "money", "breath", "armour", "wanted", "radar" }
	for _, component in ipairs( components ) do
		setPlayerHudComponentVisible( component, true )
	end
	showCursor (false)
	guiSetVisible (main, false)
end
addEvent ("Succes", true)
addEventHandler ("Succes", getRootElement(), hideW)



كـلـيـنـت


function submitLogin (source, user, pass)	if (user ~= "") then		if (pass ~= "") then			local acc = getAccount (user, pass)			if (acc ~= false) then				logIn (source, acc, pass)				outputChatBox ("You logged in successfully.")				triggerClientEvent (source, "Succes", source)			else				outputChatBox ("Wrong username or password, please try again!", getRootElement(), 255, 255, 255, false)			end		else			outputChatBox ("Password can not be blank.", getRootElement(), 255, 255, 255, false)		end	else		outputChatBox ("Username can not be blank.", getRootElement(), 255, 255, 255, false)	endendaddEvent ("loggin", true)addEventHandler ("loggin", getRootElement(), submitLogin)addEvent ("register", true)addEventHandler ("register", getRootElement(),	function (source, Nuser, Npass)		if (Nuser ~= "" and Nuser ~= nil and Npass ~= "" and Npass ~= nil) then			local Nacc = addAccount (Nuser, Npass)			if Nacc then				outputChatBox ("You have successfully registered, now try logging in.", getRootElement(), 255, 255, 255)			else				outputChatBox ("this account already has been created.", getRootElement(), 255, 255, 255)			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...