Doesn't shows the reason
#2

pawn Код:
new string[128], giveplayerid, reason[100];
if(sscanf(params, "us[100]", giveplayerid, reason)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /clearflag [playerid] [reason]");
It seems you forgot to add string to be unformatted to reason, and also the reason is not string.
if you want the reason marked as optional parameter, then you can use uppercase "S", so when the reason is not specified, it will pass the usage message.
pawn Код:
if(sscanf(params, "uS[100]", giveplayerid, reason)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /clearflag [playerid] [reason]");
Not yet tested, hope it helps.
Reply


Messages In This Thread
Doesn't shows the reason - by Nivniv2 - 23.03.2013, 02:42
Re: Doesn't shows the reason - by RoboN1X - 23.03.2013, 03:06

Forum Jump:


Users browsing this thread: 2 Guest(s)