19.12.2016, 09:27
Unable to test this as I'm not near my computer, but how you could do it is as SickAttack suggested.
Which I believe can go as followed:
Only problem with this code is that you can't use a player's name, only their ID. But besides that it should work in theory.
Which I believe can go as followed:
Code:
new selector[2], target, weapon, Float:radius; if (sscanf(params, "s[2]ii", selector, target, weapon) { if (!strcmp(selector, "-r") // checks if the selector that was given equals -r { radius = float(target); // turns the integer (target) into a float //insert radius give code } else if (!strcmp(selector, "-p") // checks if the selector that was given equals -p { //insert player give code } else // if neither of the checks were positive { //sytax message (/giveweapon [-p / -r] [target] [weapon]) } } else { //sytax message (/giveweapon [-p / -r] [target] [weapon]) }