#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
)

 


Share this post


Link to post
On 23/09/2019 at 15:42, Abdo NourEldin said:

القسم غير صحيح *

اكتب بأي قسم ؟

Share this post


Link to post
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
)

ياريت مساعده

Share this post


Link to post

التزم بموضوع واحد ولا تكرر ردودك

 

  • Like 1

Share this post


Link to post

مثال الويكي واضح جداً, حاول تسوي مثله ...

سوي كذا :

if #getAccountsBySerial( getPlayerSerial ( player ) ) > 2 then return end

البلاير غير معرفة, فقط مثال .

Share this post


Link to post
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

Share this post


Link to post

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.