Jump to content

كيف اسوي لوحة التسجيل ما تسوي اكثر من حسابين ؟


#NexT<3

Recommended Posts

                                      ارجوووا المساعده

 

 

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

 

شو اسوي ؟؟؟؟؟

اتمنى المساااعده ❤️

 


 

addEvent( 'RegisterNewAccount', true )
addEventHandler( 'RegisterNewAccount', root,
function(newAccount, newPassword, securityQuestion, answerValue)
local playerAcc = getPlayerAccount(source)
if (not isGuestAccount(playerAcc)) then return end
local account = addAccount(newAccount, newPassword)
saveSecurityQuestion(newAccount, securityQuestion, answerValue)
triggerClientEvent( source, 'RegisterButtonDisable', source )
end
)

 


Link to comment
3 hours ago, MR-HERO said:

يمديك عن طريق وظيفة


getAccountsBySerial

 

addEvent( 'RegisterNewAccount', true )
addEventHandler( 'RegisterNewAccount', root,
function(newAccount, newPassword, securityQuestion, answerValue)
local playerAcc = getPlayerAccount(source)
if ( #getAccountsBySerial ( getPlayerSerial ( source ) ) < 2 ) then
local account = addAccount(newAccount, newPassword)
saveSecurityQuestion(newAccount, securityQuestion, answerValue)
triggerClientEvent( source, 'RegisterButtonDisable', source )
else
outputChatBox( '$Error : You can\'t create more 2 accounts !', source, 0, 255, 0, true   )
end
end
)

ياريت مساعده

Link to comment
addEvent( 'RegisterNewAccount', true )
addEventHandler( 'RegisterNewAccount', root,
	function(newAccount, newPassword, securityQuestion, answerValue)
		local playerAcc = getPlayerAccount(source)
		if #getAccountsBySerial ( getPlayerSerial ( source ) ) > 2 then outputChatBox("* لا يمكنك عمل اكثر من حسابين",source,255,0,0) return; end
		local account = addAccount(newAccount, newPassword)
		if account then
		saveSecurityQuestion(newAccount, securityQuestion, answerValue)
		triggerClientEvent( source, 'RegisterButtonDisable', source )
		end
	end
)

 

Edited by Abdo NourEldin
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...