Quote:
Originally Posted by Konstantinos
Something like this:
pawn Code:
new id, Float: range, money;
if (!sscanf(params, "fi", range, money)) { // code.. } else if (!sscanf(params, "ri", id, money)) { // code.. } else SendClientMessage(playerid, -1, "Usage: /giveweapon [playerid/range] [money]");
|
Not quite conventional since people don't usually use decimals/floating point numbers. But a pretty clever solution.
You should make it like /cmd -r 5 5000 and /cmd -p 5 5000, -r for range, -p for player. But just a small detail I'd consider.