Raised This Month: $ Target: $400
 0% 

array must be indexed ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 08-29-2013 , 13:31   Re: array must be indexed ?
Reply With Quote #7

Code:
public Cmd_Top15(id) {     new sort[32], count;         get_players(sort, count, "c");     SortCustom1D(sort, count, "stats_custom_compare");         new motd[1024], len         len = format(motd, 1023,"<body bgcolor=#778899><font color=#ff0000><pre>")     len += format(motd[len], 1023-len,"# Nick Kills Rank^n")         static name[32]     for(new a = 0; a < 15; a++)     {         get_user_name(sort[a], name, 31)         len += format(motd[len], 1023-len,"%d %s %d %s^n", a + 1, name, iKills[sort[a]], RANKS[iRank[sort[a]]])     }         len += format(motd[len], 1023-len,"</body></font></pre>")     show_motd(id, motd, "*Top15*")         return PLUGIN_CONTINUE; } public stats_custom_compare(elem1,elem2) {     if(iKills[elem1] > iKills[elem2]) return -1;     else if(iKills[elem1] < iKills[elem2]) return 1;         return 0; }
__________________

Last edited by Black Rose; 08-29-2013 at 13:31.
Black Rose is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:56.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode