From bottom to up
#1

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 !
Reply
#2

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
Reply
#3

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
Reply
#4

pawn Код:
for(new i = 100; i > 0; i--) {
}
Reply
#5

Okay, but what about top5? How would this be done?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)