[HELP] making reasons with sscanf
#5

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.
pawn Код:
if(ssacnf(params,"s[100]",reason))
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.
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;
}
EDIT: I think i may have read your questions incorrectly, sorry about that.
Reply


Messages In This Thread
[HELP] making reasons with sscanf - by AK47317 - 19.04.2011, 07:37
Re: [HELP] making reasons with sscanf - by Gh0sT_ - 19.04.2011, 08:12
Re: [HELP] making reasons with sscanf - by AK47317 - 19.04.2011, 08:18
Re: [HELP] making reasons with sscanf - by AK47317 - 20.04.2011, 10:13
Re: [HELP] making reasons with sscanf - by Haydz - 20.04.2011, 10:24
Re: [HELP] making reasons with sscanf - by AK47317 - 20.04.2011, 10:30
Re: [HELP] making reasons with sscanf - by Babul - 20.04.2011, 12:11

Forum Jump:


Users browsing this thread: 1 Guest(s)