Need help with this,can't figure it out.
#1

What i basically am trying to figure out is i have a variable pCookies under my pInfo enum and i want to somehow find a way to get the 5 players,who have the highest ammount of cookies.
Reply
#2

Maybe something like this
PHP код:
stock GetPlayerWithMostCookies( ) 
{
    new 
iRecord 0;
    new 
iChoosenPlayer MAX_PLAYERS 1;
    foreach(
Playeri) {
        if ( 
cookies[i] > iRecord ){
            
iRecord cookies[i];
            
iChoosenPlayer i;
        }
    }
    return 
iChoosenPlayer;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)