Command of Roll numbers
#1

Hello brothers,
Today I'm having some issue in making a command so I want from you a favour and do it for me, It's quite simple but hard for me I don't know why !
My command is like this : /rollnumbers [From] [to]
In place of from and to you make numbers ex : /rollnumbers 5 50 and the server will show GameText to players rolling number randomly and it choose a number from 5 to 50,
Thanks !
Reply
#2

Anyone help pls ?
Reply
#3

EDIT : Out of topic, I didn't understand very well and I apologize.
Reply
#4

Example:
pawn Код:
CMD:rollnumbers(playerid, params[])
{
    new min, max;
    if(sscanf(params, "ii", min, max)) return SendClientMessage(playerid, -1, "USAGE: /random [from] [to]");
    if(min > max) new var = min, min = max, max = var;
    new str[65];
    format(str, sizeof(str), "Number Rolled Between %d and %d: %d", min, max, (random(max - min + 1) + min));
    SendClientMessage(playerid, 0xFFFF00FF, str);
    return 1;
}
The above would also work, but you shouldn't use the "uu" sscanf parameters like Ralfie suggested.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)