How would I get my GM to do calculations for an input
#1

Hey,

What i want:
When you type in a value (EG.1) it will, reply with the answer.

EG.1
1 = 15, 30
2 = 30, 60
3 = 45, 90
4 = 60, 120
5 = 75, 150
6 = 90, 180
7 = 105, 210
8 = 120, 240
...

Example
pawn Код:
command(test,playerid,params[])
{
    new option[20];
    if(isnull(params)) // if they didn't type anything after /test
    {
        return SendClientMessage(playerid, -1, "USAGE: /test <number>");
    }
    if(!strcmp(option, "1", true))
    {

        printf("15,30");
        return 1;
    }
    if(!strcmp(option, "8", true))
    {
        printf("120,240");
        return 1;
    }
    return 1;
}
But I don't want limits so if you typed in

999 it would show
14985,29970

and if i typed in 999999
it would show
14999985,29999970
Reply


Messages In This Thread
How would I get my GM to do calculations for an input - by Deal-or-die - 03.05.2012, 04:04
Re: How would I get my GM to do calculations for an input - by Krx17 - 03.05.2012, 06:09

Forum Jump:


Users browsing this thread: 1 Guest(s)