SA-MP Forums Archive
Help - 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: Help (/showthread.php?tid=552618)



Help - Edw - 25.12.2014

fixed


AW: Help - Flori - 25.12.2014

A short example how to get last 10 reports/numbers/.. of anything.


To test it i added it under the main() part. You can add it then in your command.
pawn Код:
main()
{
    new reports = 30; //You have 30 reports in your database.
    new a = reports -9;//You want to get the last 10 reports. 9 because you need to count also the newest report. That's the reason we use a<= reports, bc the last report should also be shown.
    while( a<=reports)
    {
        printf("%i",a);
        a++;
    }
    return 1;
}
That was the output:
Код:
21
22
23
24
25
26
27
28
29
30
Means, it will always show you the last reports.

This is just an example how you can make it, now you need to write by yourself a code for it. I hope i made it understandable.


Re: Help - Edw - 25.12.2014

Fixed,


Respuesta: Help - [DOG]irinel1996 - 25.12.2014

Not to be rude, but next time don't remove the issue. It might help someone else.

Regards.