How to get a number?
#6

You mean something like this:

pawn Код:
stock random(min, max)
{    

    new randomtext = random(max-min)+min;    
    return randomtext;
}
And then you could use it:

pawn Код:
CMD:refuel(playerid, params[])
{
     new string[126];
     format(string, sizeof(string), "You have refueled your vehicle with %d liters of fuel.", random(50,100));
     SendClientMessage(playerid, 0xFFFFFFFF, string);
     return 1;
}
I think that's what you're asking. Change the command part on your needs, just see the example of using the stock.
Reply


Messages In This Thread
How to get a number? - by Lajko1 - 24.11.2013, 18:20
Re: How to get a number? - by Jefff - 24.11.2013, 18:25
Re: How to get a number? - by nmader - 24.11.2013, 18:28
Re: How to get a number? - by Lajko1 - 24.11.2013, 18:46
Re: How to get a number? - by Lajko1 - 24.11.2013, 20:11
Re: How to get a number? - by iPrivate - 24.11.2013, 20:24
Re: How to get a number? - by Lajko1 - 24.11.2013, 20:51
Re: How to get a number? - by Jefff - 24.11.2013, 21:02
Re: How to get a number? - by Lajko1 - 24.11.2013, 21:09
Re: How to get a number? - by Jefff - 24.11.2013, 21:14

Forum Jump:


Users browsing this thread: 3 Guest(s)