#NexT<3 Posted September 22, 2019 Share Posted September 22, 2019 ارجوووا المساعده عندي لوحة تسجيل وابغى اخليه ما يسوي اكتر من حسابين شو اسوي ؟؟؟؟؟ اتمنى المساااعده 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
Abdo NourEldin Posted September 23, 2019 Share Posted September 23, 2019 القسم غير صحيح * Link to comment
#NexT<3 Posted September 25, 2019 Author Share Posted September 25, 2019 On 23/09/2019 at 15:42, Abdo NourEldin said: القسم غير صحيح * اكتب بأي قسم ؟ Link to comment
!# H E R O ,_ Posted September 25, 2019 Share Posted September 25, 2019 يمديك عن طريق وظيفة getAccountsBySerial Link to comment
#NexT<3 Posted September 25, 2019 Author Share Posted September 25, 2019 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 ) thenlocal account = addAccount(newAccount, newPassword)saveSecurityQuestion(newAccount, securityQuestion, answerValue)triggerClientEvent( source, 'RegisterButtonDisable', source )elseoutputChatBox( '$Error : You can\'t create more 2 accounts !', source, 0, 255, 0, true )endend) ياريت مساعده Link to comment
N3xT Posted September 25, 2019 Share Posted September 25, 2019 التزم بموضوع واحد ولا تكرر ردودك 1 Link to comment
فاّرس Posted September 26, 2019 Share Posted September 26, 2019 مثال الويكي واضح جداً, حاول تسوي مثله ... سوي كذا : if #getAccountsBySerial( getPlayerSerial ( player ) ) > 2 then return end البلاير غير معرفة, فقط مثال . Link to comment
Abdo NourEldin Posted September 28, 2019 Share Posted September 28, 2019 (edited) 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 September 28, 2019 by Abdo NourEldin Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now