Get Highest Variable?
#1

Heey all,
How can i detect the highest variable from all players that is connected?

Thanks Admigo
Reply
#2

What variable are you trying to get? Do you mean value from the variable or what?
Reply
#3

Yeah,i need the highest value.
Reply
#4

How do you declare the variable(s)?
Reply
#5

I just want to make a poker system. So i want a variable pokerpoint or something = value.
Reply
#6

So loop through all the players on a table and get the highest value?
Reply
#7

Yeah:P
Reply
#8

pawn Код:
new CurrentHighest = 0;
new HighestPlayerID;
for(new i=0; i<MAX_PLAYERS; i++)
{
    if (pokerpoint[i] > CurrentHighest)
    {
        HighestPlayerID = i;
        CurrentHighest = pokerpoint[i];
       
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)