xb0 Posted February 22, 2015 Share Posted February 22, 2015 السلام عليكم ورحمه الله وبركاته اخواني ابغى اعرف طريقه او اكواد تساعدني وهي ابغى كود= اني اعطي حساب شخص غير متوواجد بالسيرفر فلوس وبس Link to comment
TAPL Posted February 22, 2015 Share Posted February 22, 2015 getAccount -- تجيب الحساب من اسمه setAccountData -- تغير الأكاونت داتا Link to comment
xb0 Posted February 22, 2015 Author Share Posted February 22, 2015 مافهمت ولا شي ممكن كمان توضيح Link to comment
Professional Posted February 22, 2015 Share Posted February 22, 2015 (edited) addEventHandler("onPlayerJoin",root,function() getAccount(username,password ) local playermoney = getPlayerMoney ( source ) setAccountData ( playeraccount, "piraterpg.money", playermoney ) end end Edited February 22, 2015 by Guest Link to comment
nxFairlywell Posted February 22, 2015 Share Posted February 22, 2015 لوووول getAccount( getPlayerName ( source ) ) : / ########## getAccount Link to comment
^#Dream Posted February 22, 2015 Share Posted February 22, 2015 addEventHandler("onPlayerJoin",root,function() getAccount(username,password ) local playermoney = getPlayerMoney ( source ) setAccountData ( playeraccount, "piraterpg.money", playermoney ) end end account getAccount ( string username, [ string password ] ) getAccount("username","password" ) Link to comment
Professional Posted February 22, 2015 Share Posted February 22, 2015 تم تعديل [lua]addEventHandler("onPlayerJoin",root,function() getAccount("username","password" ) local playermoney = getPlayerMoney ( source ) setAccountData ( playeraccount, "piraterpg.money", playermoney ) end end [/lua] Link to comment
Professional Posted February 22, 2015 Share Posted February 22, 2015 ليه ما يعمل لوحه احسن له Link to comment
nxFairlywell Posted February 23, 2015 Share Posted February 23, 2015 شوف تقدر تجيب الحساب عبر الاسم والباس وتحط داتا للحساب وتحط القيمة مثلا فلوس ، سلاح، رصاص ، اسم للاعب ..الخ local acc = getAccount( "xb0", "1234" ) -- first arg = username , second arg = password function : value = money, ammo, weapon, name ...etc. setAccountData( acc, "anyThing", value ) -- value = money, var, count, weapons. etc.. end -- function Link to comment
The Killer Posted February 23, 2015 Share Posted February 23, 2015 ما يحتاج تحط الباس Link to comment
xb0 Posted February 23, 2015 Author Share Posted February 23, 2015 بجرب انا عندي مثلا ابي اعطي عضويه محدد الفلوس يعني ابغى زي الامر باف8 احط الحساب مسافه الفلوس مثلا ++++++++++++++++++ لسا ماجربت الكود حقكم بس بعطيكم الطريقه الي ابغاها لو موجودة Link to comment
Professional Posted February 23, 2015 Share Posted February 23, 2015 انصحك تعمل لوحه جرب اعمل لوحه بل جيتيدور والزق كل شيئ احسن ما تظلك تكتب باف 8 Link to comment
xb0 Posted February 23, 2015 Author Share Posted February 23, 2015 ماعرف اسوي المود ذا ومالي بالبرمجه خبره كبيره Link to comment
TAPL Posted February 23, 2015 Share Posted February 23, 2015 القسم للمساعدة مو عشان نبرمج عنك Link to comment
nxFairlywell Posted February 23, 2015 Share Posted February 23, 2015 addCommandHandler("setMoney", function( player, cmd, account, count ) if cmd and account then local money = tonumber( count ) local acc = getAccount( account ) setAccountData( acc, "accMoney", money ) else return end end ) addEventHandler( "onPlayerLogin", root, function( acc ) if acc then local data = getAccountData( acc, "accMoney" ) elseif data then givePlayerMoney( source, tonumber( data ) ) else return end end ) جرب كود سيرفر بس ماني مجربه Link to comment
xb0 Posted February 23, 2015 Author Share Posted February 23, 2015 القسم للمساعدة مو عشان نبرمج عنك الحين انا قلت برمجولي ؟؟ انا قلت ابي كودددد او فنكشن Link to comment
xb0 Posted February 23, 2015 Author Share Posted February 23, 2015 addCommandHandler("setMoney", function( player, cmd, account, count ) if cmd and account then local money = tonumber( count ) local acc = getAccount( account ) setAccountData( acc, "accMoney", money ) else return end end ) addEventHandler( "onPlayerLogin", root, function( acc ) if acc then local data = getAccountData( acc, "accMoney" ) elseif data then givePlayerMoney( source, tonumber( data ) ) else return end end ) جرب كود سيرفر بس ماني مجربه ماضبط بس في ملاحظة الحين addCommandHandler مو المفروض تكون تحت فنكشن function( acc ) ؟؟؟ Link to comment
nxFairlywell Posted February 23, 2015 Share Posted February 23, 2015 لا هذي الوظيفة addCommandHandler تسوي امر جديد والامر هنا انك تعطي الحساب فلوس Link to comment
TAPL Posted February 23, 2015 Share Posted February 23, 2015 القسم للمساعدة مو عشان نبرمج عنك الحين انا قلت برمجولي ؟؟ انا قلت ابي كودددد او فنكشن getAccount -- تجيب الحساب من اسمه setAccountData -- تغير الأكاونت داتا Link to comment
nxFairlywell Posted February 23, 2015 Share Posted February 23, 2015 ماني عارف وش الخطأ بالكود حقي بس ماني مجربه اتمنى احد يصححه Link to comment
The Killer Posted February 24, 2015 Share Posted February 24, 2015 addCommandHandler ("giveMoney", function (plr, cmd, accName, money) if (accName and money) then local acc = getAccount (accName) if (acc) then setAccountData (acc, "MoneyData", tostring (money)) else outputChatBox ("There is no account with this name.", plr, 255, 0, 0) end else outputChatBox ("Syntax: < Account Name > < Money >", plr, 255, 255, 0) end end ) addEventHandler ("onPlayerLogin", root, function (_, acc) if getAccountData (acc, "MoneyData") then -- Your stuff end end ) 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