DCMD + SSCANF Problem
#1

I'm using DCMD + SSCANF to make some kind of sections in a command.
Somehow, this doesn't work. I had posted this problem earlier, but I changed method now.

This is the command:

pawn Код:
dcmd_test(playerid, params[])
{
        new select[31], select2[31];
        if(sscanf(params, "s[31]s[31]", select, select2))
        {
            SendClientMessage(playerid, COLOR_WHITE, "Usage: /test [Take/Place] [Stuff]");
            SendClientMessage(playerid, COLOR_WHITE, "Available stuff: Money, Weapon");
            return 1;
        }
  if(strcmp(select,"place", true) == 0)
  {
    if(strcmp(select2,"weapon",true) == 0)
    {
        SendClientMessage(playerid, COLOR_RED, "WEAPONSS :D");
        return 1;
    }
 }
 return 1;
}
It doesn't go further than the "USAGE" part.
Reply


Messages In This Thread
DCMD + SSCANF Problem - by Biesmen - 25.02.2011, 19:01
Re: DCMD + SSCANF Problem - by randomkid88 - 25.02.2011, 19:10
Re: DCMD + SSCANF Problem - by Biesmen - 25.02.2011, 19:16

Forum Jump:


Users browsing this thread: 1 Guest(s)