#Mr.alkmasha Posted October 31, 2014 Share Posted October 31, 2014 اسلام عليكم ابي مساعده انا معي لوحة تسجيل و حطيت اذا الاعب سجل اول مره يحطه ب المطار بس ما زبط ذا الكود addEvent("Login-Register", true) addEventHandler("Login-Register", root, function(action, userName, passWord) if (action == "Login") then local account = getAccount(userName, passWord) if account then logIn(source, account, passWord) triggerClientEvent(source, "onLoginSuccess", source) else exports["guimessages"]:outputServer(source,"Wrong username or password!",0, 255, 50) end elseif (action == "Register") then local serial = getPlayerSerial(source) local TotalAcc = TotalAccounts(serial) or 0 if TotalAcc < 3 then if not getAccount(userName) then local accountAdded = addAccount(userName, passWord) if accountAdded then spawnPlayer (source,1682.52588,-2327.87305,13.54688, 0,0, 0, 0) setPlayerMoney (source, 100000) exports["guimessages"]:outputServer(source,"You have successfully registered!, you can now login with your username and password.",0, 255, 50) setAccountData(accountAdded, "reg-Serial", serial) else exports["guimessages"]:outputServer(source,"Error creating account, please contact the admin.",0, 255, 50) end else exports["guimessages"]:outputServer(source,"Account with this name already exists!",0, 255, 50) end else exports["guimessages"]:outputServer(source,"You can register up to 3 accounts only!",0, 255, 50) end end end) Link to comment
TAPL Posted October 31, 2014 Share Posted October 31, 2014 افتح الويكي على فنكشن السباون و أقرأ الملاحظة https://wiki.multitheftauto.com/wiki/SpawnPlayer Link to comment
#Mr.alkmasha Posted October 31, 2014 Author Share Posted October 31, 2014 ----------------| ما في طريقه ثانيه؟ ----------------| Link to comment
TAPL Posted October 31, 2014 Share Posted October 31, 2014 قرأت الملاحظة الي بالويكي؟ Link to comment
#Mr.alkmasha Posted October 31, 2014 Author Share Posted October 31, 2014 قرأت الملاحظة الي بالويكي؟ يب قرأت ذي Returns true if the player was spawned successfully, false otherwise. Link to comment
TAPL Posted October 31, 2014 Share Posted October 31, 2014 (Note) انا اقصد الملاحظة الي فوق Link to comment
#Mr.alkmasha Posted October 31, 2014 Author Share Posted October 31, 2014 يعني كذا؟ addEvent("Login-Register", true) addEventHandler("Login-Register", root, function(action, userName, passWord) if (action == "Login") then local account = getAccount(userName, passWord) if account then logIn(source, account, passWord) triggerClientEvent(source, "onLoginSuccess", source) else exports["guimessages"]:outputServer(source,"Wrong username or password!",0, 255, 50) end elseif (action == "Register") then local serial = getPlayerSerial(source) local TotalAcc = TotalAccounts(serial) or 0 if TotalAcc < 3 then if not getAccount(userName) then local accountAdded = addAccount(userName, passWord) if accountAdded then spawnPlayer (source,1682.52588,-2327.87305,13.54688, 0,0, 0, 0) setPlayerMoney (source, 100000) setCameraTarget (source, source) fadeCamera(source, false, 2.0) exports["guimessages"]:outputServer(source,"You have successfully registered!, you can now login with your username and password.",0, 255, 50) setAccountData(accountAdded, "reg-Serial", serial) else exports["guimessages"]:outputServer(source,"Error creating account, please contact the admin.",0, 255, 50) end else exports["guimessages"]:outputServer(source,"Account with this name already exists!",0, 255, 50) end else exports["guimessages"]:outputServer(source,"You can register up to 3 accounts only!",0, 255, 50) end end end) Link to comment
#Mr.alkmasha Posted October 31, 2014 Author Share Posted October 31, 2014 .ما زبط و ب الدي بق مايجي شي Link to comment
#DRAGON!FIRE Posted October 31, 2014 Share Posted October 31, 2014 ما قلت لنا وش المشكلة اصلأ ما يرسبن المفروض الحين يشتغل لانك حطيت الكميرا ع اللاعب ورسبنته شيكـ ع الديبوق وحدد المشكلة بالضبط . Link to comment
#Mr.alkmasha Posted October 31, 2014 Author Share Posted October 31, 2014 ما يطلع شي ب الدي بق ضليت اسوي ريستارت للمود ما زبط Link to comment
#Mr.alkmasha Posted October 31, 2014 Author Share Posted October 31, 2014 صلحته شكرا للي ساعدني 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