Problem with sscanf
#4

pawn Код:
CMD:clan(playerid, params[])
{
    if(isnull(params))
    {
        return 1; //Dialog is here
    }

    if (!strcmp(params, "join", true, 4))
    {
        if(!params[4] || !('0' <= params[5] <= '9')) return SendClientMessage(playerid, -1, "usage: /clan join <clan id>");
        new clanid = strval(params[5]);
    }
    else if (!strcmp(params, "accept", true, 6))
    {
        new id;
        if (!params[6] || sscanf(params[7], "u", id)) SendClientMessage(playerid, -1, "usage: /clan accept <id>");
        else if (id == INVALID_PLAYER_ID) SendErrorMessage(playerid, "player not found");
        else{
        }
    }
    else return 0; // Invalid parameter

    return 1;
}
Reply


Messages In This Thread
Problem with sscanf - by Cypress - 15.08.2013, 20:59
Re: Problem with sscanf - by Jefff - 15.08.2013, 21:12
Re: Problem with sscanf - by Cypress - 16.08.2013, 00:43
Re: Problem with sscanf - by Jefff - 16.08.2013, 13:35

Forum Jump:


Users browsing this thread: 1 Guest(s)