Get highest variables
#3

Quote:
Originally Posted by S4t3K
View Post
Get the variable of each vehicle and compare.

For example

PHP Code:

new var[10] = {9181254116, -384664253184};
new 
highest 0;
for(new 
0sizeof(var); i++)
{
      if(var[
i] > highesthighest = var[i];
      return 
1;
}
printf(highest); // Will display "64253" 
You were close.
pawn Code:
new highest = 0, var[10] = {9, 181, 254, 11, 6, -3, 846, 64253, 1, 84};
    for(new i = 0; i < sizeof(var); i++) highest = (var[i] > highest) ? (var[i]) : (highest);
    printf("d", highest); // Will display "64253"
Reply


Messages In This Thread
Get highest variables - by audriuxxx - 31.05.2014, 18:54
Re : Get highest variables - by S4t3K - 31.05.2014, 19:18
Re: Re : Get highest variables - by Threshold - 01.06.2014, 03:25

Forum Jump:


Users browsing this thread: 2 Guest(s)