iMr ~ MnHmAr Posted February 7, 2016 Share Posted February 7, 2016 ابي اسوي توب ساعات يتحدث كل م افتح الوحه اشان م يتلخبط ابي الاشياء + شرح عليه او مثال Link to comment
Rockyz Posted February 7, 2016 Share Posted February 7, 2016 (edited) table getElementsByType -- loop the Players table.insert table.sort Edited February 8, 2016 by Guest Link to comment
3NAD Posted February 8, 2016 Share Posted February 8, 2016 https://forum.multitheftauto.com/viewtopic.php?f=160&t=96669 Link to comment
iMr ~ MnHmAr Posted February 8, 2016 Author Share Posted February 8, 2016 table getElementsByType -- loop the table table.insert table.sort [/quote كيف اجيب ب الجدول الترتيب وش ممكن تشرح لين هذذا table.insert ---------- مثال عليه table.sort --------------- ؟ + مثال عليه Link to comment
Rockyz Posted February 8, 2016 Share Posted February 8, 2016 table getElementsByType -- loop the table table.insert table.sort [/quote كيف اجيب ب الجدول الترتيب وش ممكن تشرح لين هذذا table.insert ---------- مثال عليه table.sort --------------- ؟ + مثال عليه TopList = { }; for i, v in ipairs ( getElementsByType ( "player" ) ) do local kill = getElementData ( v, "Kill" ) if kill then table.insert ( TopList, { Name= getPlayerName ( v ), Kills= kill } ) end end table.sort ( TopList, function( a, b ) return ( tonumber( a.Kills ) or 0 ) > ( tonumber( b.Kills ) or 0 ) 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