sscanf within sscanf
#7

Do it this way:

pawn Код:
CMD:import(playerid, params[])
{
    new string[128], weapon[32], amount, drugs[32];
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "ERROR: You need to login first before using any command.");
    if(!PlayerInfo[playerid][pFam]) return SendClientMessage(playerid, COLOR_GREY, "ERROR: You have to be in a offical organisation.");
    if(sscanf(params, "s[32]d", weapon, amount))
    {
        SCM(playerid, COLOR_WHITE, "USAGE: /import [weapon/drugs] [amount]");
        return 1;
    }
    if(!strcmp(params, "weapon", true))
    {
        if(!PlayerInfo[playerid][pFam]) return SendClientMessage(playerid, COLOR_GREY, "ERROR: You have to be in a offical organisation.");
        {
        }
    }
    if(!strcmp(params, "drugs", true))
    {
        if(!PlayerInfo[playerid][pFam]) return SendClientMessage(playerid, COLOR_GREY, "ERROR: You have to be in a offical organisation.");
        {
        }
    }
    return 1;
}
Reply


Messages In This Thread
sscanf within sscanf - by Sasoft - 30.08.2012, 16:49
Re: sscanf within sscanf - by Shetch - 30.08.2012, 16:56
Re: sscanf within sscanf - by mamorunl - 30.08.2012, 16:57
Re: sscanf within sscanf - by Sasoft - 30.08.2012, 17:07
Re: sscanf within sscanf - by TaLhA XIV - 30.08.2012, 17:09
Re: sscanf within sscanf - by mamorunl - 30.08.2012, 17:12
Re: sscanf within sscanf - by Emmet_ - 30.08.2012, 17:14
Re: sscanf within sscanf - by Sasoft - 30.08.2012, 17:28
Re: sscanf within sscanf - by mamorunl - 30.08.2012, 17:29
Re: sscanf within sscanf - by Sasoft - 30.08.2012, 17:38

Forum Jump:


Users browsing this thread: 1 Guest(s)