From bottom to up - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: From bottom to up (
/showthread.php?tid=290183)
From bottom to up - Max_Coldheart - 14.10.2011
Good day!
How to get from bottom to up in numbers, like from example, I would like to format 4, 2, 3, 1, and 5. but I would like the highest on bottom, and lowest on top. How to do this? I know this in C#, but not in pawn.
Have a nice day !
Re: From bottom to up -
DRIFT_HUNTER - 14.10.2011
Well if its just a count down than you can create new variable and than -- it and check is it 0 if its 0 kill timer...
But if its for some kinda top 5 something than i guess best way is to use Sql (Mysql can be used to)
You can check 0admin cos its gave that kinda function's
Re: From bottom to up -
park4bmx - 14.10.2011
Quote:
Originally Posted by DRIFT_HUNTER
Well if its just a count down than you can create new variable and than -- it and check is it 0 if its 0 kill timer...
But if its for some kinda top 5 something than i guess best way is to use Sql (Mysql can be used to)
You can check 0admin cos its gave that kinda function's
|
what he said but let me show u an example
pawn Код:
new CountDown;
new CDTimer;
//where ever you gonan use the function
{
CountDownTImer=10;//this would set the counter to start form 10
CDTimer = SetTimer("CountDownTImer", 1000, true);
}
forward CountDownTImer();
public CountDownTImer()
{
CountDownTImer--;
return 1;
}
//Killing the timer whenever the function reaches 0
if(CountDownTImer==0)
{
KillTimer(CDTimer );
if(CDTimer != -1) KillTimer(CDTimer );//make sure the timer is killed ;)
}
And thats all you need
Re: From bottom to up -
SuperViper - 15.10.2011
pawn Код:
for(new i = 100; i > 0; i--) {
}
Re: From bottom to up - Max_Coldheart - 15.10.2011
Okay, but what about top5? How would this be done?