Jump to content

سؤال


Recommended Posts

سلام عليكم

انا مسوي حماية للحساب

بس مو راديه تشتغل

addEventHandler ( "onPlayerLogin", root,
	function ( _, acc )
		if acc then
			local vTable = dbPoll ( dbQuery ( db, "SELECT Account FROM DD WHERE Account =?", tostring ( getAccountName ( acc ) ) ), -1 )
			if type(vTable) == "table" and #vTable >= 1 then
				if vTable[1].Serial ~= getPlayerSerial ( source ) then
					cancelEvent ( true )
				end
			end
		end
	end
)

 

انا مخزن علي القاعده اسم الحساب + السريال

المشكله اني مسوي حمايه لنفسي

و اول م اسجل

م يدخلني ونا مسويه سريالي وحسابي

Link to comment
8 minutes ago, Abdul KariM said:

عليكم السلام لازم تسوي لوب للبيانات الي بالقاعدة

لان انت تبي تستعلم عن اول قيمة فقط لازم تستعلم عن كل القيم

ممكن تسوهالي اخوي

حق لما يسجل دخول

م حد يقدر يسجل غيره حق حمايه الحساب

 

Link to comment
addEventHandler ( "onPlayerLogin", root,
	function ( _, acc )
		if acc then
			local vTable = dbPoll ( dbQuery ( db, "SELECT * FROM DD WHERE Account =?", tostring ( getAccountName ( acc ) ) ), -1 )
			if type(vTable) == "table" and #vTable >= 1 then
				if vTable [ 1 ] [ "Serial" ] ~= getPlayerSerial ( source ) then
					cancelEvent ( true )
				end
			end
		end
	end
)

كودك صحيح ولا حاجة لاستخدام اللوب لاني مانتبهت انك مستعلم عن الحساب من البداية

لكن عندك غلط انك مستعلم عن الحساب عن طريق الحساب نفسه جرب هذا الكود وان شاء الله يشتغل

Edited by Abdul KariM
  • Like 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...