Advertisement
Johurt

[FNC] GetHighestNumber

Jan 26th, 2013
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.36 KB | None | 0 0
  1. stock GetHighestNumber(...) // by Johurt specialy for LUK4S
  2. {
  3.     new k, a = numargs(), maxv;
  4.         for(k = 0; k < a; k++)
  5.         {
  6.         if(k == 0) { maxv = getarg(0); continue; }
  7.             if(getarg(k) > maxv) maxv = getarg(k);
  8.         }
  9.     return maxv;
  10. }
  11.  
  12. /*
  13.     Example: printf("%d", GetHighestNumber(50, 51, 100, 12432, 4325435, 2132348043));
  14.     Prints: 2132348043
  15. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement