#STZ Posted April 27, 2017 Share Posted April 27, 2017 السلام عليكم ورحمة الله وبركاته ابي الطريقة الي اقدر اجيب فيها اعلي 20 لاعب مثلا معهم فلوس من الي هو اغني شخص لين رقم 15 Link to comment
#BrosS Posted April 27, 2017 Share Posted April 27, 2017 (edited) Table = {} getElementsByType table.sort math.max Edited April 27, 2017 by #BrosS Link to comment
MR.StoRm Posted April 27, 2017 Share Posted April 27, 2017 في القريد ليست ؟ @MR.NaiF-MTA Link to comment
MR.StoRm Posted April 27, 2017 Share Posted April 27, 2017 1 hour ago, MR.NaiF-MTA said: يب محاولاتك ؟ Link to comment
#STZ Posted April 28, 2017 Author Share Posted April 28, 2017 ابي فنكشنات او الطريقة بس 1 Link to comment
iMr.WiFi..! Posted April 28, 2017 Share Posted April 28, 2017 Table = {} getElementsByType getPlayerMoney table.insert table.sort Link to comment
Master_Ali Posted April 28, 2017 Share Posted April 28, 2017 function gettop20money() local table={} for k,v in ipairs(getElementsByType('player')do table.insert(table,{plr=v,mo=getPlayerMoney(v)}) end table.sort(table,function(a,b) return a.mo>b.mo end) local final={} for k=1,20 do table.insert(final,table[k]) end return final end addCommandHandler('getTop20',function(plr) local players= gettop20money() for k,v in ipairs(players)do outputChatBox('the plr name is ['..getPlayerNamee(v[1])..'] and he is money = ['..v[2]..']$ ',plr) end end) الكود غير مجرب Link to comment
Adham Posted April 28, 2017 Share Posted April 28, 2017 40 minutes ago, Master_Ali said: function gettop20money() local table={} for k,v in ipairs(getElementsByType('player')do table.insert(table,{plr=v,mo=getPlayerMoney(v)}) end table.sort(table,function(a,b) return a.mo>b.mo end) local final={} for k=1,20 do table.insert(final,table[k]) end return final end addCommandHandler('getTop20',function(plr) local players= gettop20money() for k,v in ipairs(players)do outputChatBox('the plr name is ['..getPlayerNamee(v[1])..'] and he is money = ['..v[2]..']$ ',plr) end end) الكود غير مجرب getPlayerNamee ? 1 Link to comment
Master_Ali Posted April 28, 2017 Share Posted April 28, 2017 5 hours ago, Deativated said: getPlayerNamee ? لا بتوب جديد والله مب متعود على الكتابه بيه معليش عدلها يا صاحب المووضوع +_+ ثانكس على الملاحظه Link to comment
#STZ Posted April 29, 2017 Author Share Posted April 29, 2017 شكرا ما ماستر ما تقصر بس مب فاهم a و b 1 Link to comment
Master_MTA Posted April 29, 2017 Share Posted April 29, 2017 1 minute ago, MR.NaiF-MTA said: شكرا ما ماستر ما تقصر بس مب فاهم a و b ترتيب الفيم يا قلبي لو تلاحظ هنا table.insert(table,{plr=v,mo=getPlayerMoney(v)}) end table.sort(table,function(a,b) return a.mo>b.mo end) moمتعرفه بانها فلوس اللاعب فهمت علي؟ 1 Link to comment
#STZ Posted April 29, 2017 Author Share Posted April 29, 2017 اها اوك مشكووور بحاول علي الجريد ليست وارد خبر 1 Link to comment
Master_MTA Posted April 29, 2017 Share Posted April 29, 2017 Just now, MR.NaiF-MTA said: اها اوك مشكووور بحاول علي الجريد ليست وارد خبر العفو بالتوفيق لو واجهتك اي مشكله عطني الدي بق 1 Link to comment
Master_Ali Posted April 29, 2017 Share Posted April 29, 2017 On ٢٧/٤/٢٠١٧ at 12:45, #BrosS said: Table = {} getElementsByType table.sort math.max why math.max table.sort enough 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