20.04.2011, 10:24
Firstly you need to create your reason, for example
new reason[100]; //You can make the string length whatever you want but as small as possible for efficiency.
then in the sscanf line put 's[100]' once again [100] is the string length use the same as you have above, you also need to put the reason after the quote marks like.
Then you can use 'reason' wherever you want and it will display the params which the player entered.
you can use this command below as an example.
EDIT: I think i may have read your questions incorrectly, sorry about that.
new reason[100]; //You can make the string length whatever you want but as small as possible for efficiency.
then in the sscanf line put 's[100]' once again [100] is the string length use the same as you have above, you also need to put the reason after the quote marks like.
pawn Код:
if(ssacnf(params,"s[100]",reason))
you can use this command below as an example.
pawn Код:
command(reason,playerid,params[])
{
new reason[75],string[90]
if(sscanf(params,"s[100]",reason)) return usage... /reason [reason]
format(string,sizeof(string),"Your reason was: %s",reason);
SendClientMessage(playerid, COLOR,string);
return 1;
}