AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Leader (https://forums.alliedmods.net/showthread.php?t=105947)

Econy 10-10-2009 05:59

Leader
 
how do i get the player with most frags?

Nextra 10-10-2009 06:05

Re: Leader
 
PHP Code:

new iMaxPlayers get_maxplayers( );
new 
iFragsiPlayeriCurTop = -999;

for( new 
id 1id <= iMaxPlayersid++ )
{
   if( 
is_user_connectedid ) )
   {
      
iFrags get_user_fragsid );
      if( 
iFrags iCurTop )
      {
         
iPlayer id,
         
iCurTop iFrags;
      }
   }
}

// iPlayer is 'leading' with iCurTop frags. 



All times are GMT -4. The time now is 22:38.

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