Help with command
#6

Quote:
Originally Posted by Kane_
View Post
pawn Code:
CMD:fsafe(playerid, cmdtext[]){

    new szCmdInfo[30], szActionInfo[30], amount;

    if(sscanf(cmdtext, "s[30]S()[30]", szCmdInfo, szActionInfo))
    {
        SendClientMessage(playerid, -1, "USAGE: /fsafe [Action]");
        SendClientMessage(playerid, -1, "Available Actions: deposit, withdraw");
        return 1;
    }

    if(!strcmp(szCmdInfo, "deposit", true)){

        // Deposit here:

        if(sscanf(szActionInfo, "i", amount))
        {
            SendClientMessage(playerid, -1, "/fsafe deposit [amount]");
            return 1;
        }

    }


    return 1;
}
That should give you an idea of how to start.
Can you explain me this line
PHP Code:
if(sscanf(cmdtext"s[30]S()[30]"szCmdInfoszActionInfo)) 
s[30]S()[30]

first s[30] is for szCMDInfo
but S() for? and why brackets?
Reply


Messages In This Thread
Help with command - by akib - 05.02.2019, 06:26
Re: Help with command - by Proxus - 05.02.2019, 06:48
Re: Help with command - by akib - 05.02.2019, 07:07
Re: Help with command - by TheToretto - 05.02.2019, 08:54
Re: Help with command - by Kane - 05.02.2019, 09:52
Re: Help with command - by akib - 05.02.2019, 10:57
Re: Help with command - by TheToretto - 05.02.2019, 11:29

Forum Jump:


Users browsing this thread: 2 Guest(s)