Raised This Month: $ Target: $400
 0% 

Get 3 names


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 12-17-2008 , 07:59   Re: Get 3 names
Reply With Quote #5

I thought about something like this.
Code:
new i1st, i2nd, i3rd;   for (new i = 1; i <= get_maxplayers(); i++) {         if (get_user_frags(i) > i1st)         {                 i2nd = i1st;                 i1st = i;         }         else if (i1st >= get_user_frags(i) > i2nd)         {                 i3rd = i2nd;                 i2nd = i;         }         else if (i2nd >= get_user_frags(i) > i3rd)                 i3rd = i; }   new sz1st[32], sz2nd[32], sz3rd[32]; get_user_name(i1st, sz1st, 31); // Name of the 1st get_user_name(i2nd, sz2nd, 31); // Name of the 2nd get_user_name(i3rd, sz3rd, 31); // Name of the 3rd

But IMO players' deaths also should play a role here.
__________________

Last edited by hleV; 12-17-2008 at 08:03.
hleV 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 09:17.


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