25.02.2011, 19:01
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:
It doesn't go further than the "USAGE" part.
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;
}