02.02.2014, 03:10
I downloaded another GM wthat uses zcmd and sscanf to see if I could get a tip from there.
Is this really how you do it?? Then why do you use zcmd and sscanf if you still gonna use strcmp in the command?? Or am I missing something??
EDIT: Saw what you said now and understand why strcmp is being used. Thanks!
pawn Код:
CMD:sign(playerid, params[])
{
new
give[5];
if(sscanf(params, "s[5]", give)) return SendClientMessage(playerid, COLOR_GREY, "[Usage]: /sign [1-4]");
if(!strcmp(give, "1", true))
{
ApplyAnimation(playerid, "GHANDS", "gsign2", 4.1, 1, 1, 1, 1, 1, 1);
}
else if(!strcmp(give, "2", true))
{
ApplyAnimation(playerid, "GHANDS", "gsign3", 4.1, 1, 1, 1, 1, 1, 1);
}
else if(!strcmp(give, "3", true))
{
ApplyAnimation(playerid, "GHANDS", "gsign5", 4.1, 1, 1, 1, 1, 1, 1);
}
else if(!strcmp(give, "4", true))
{
ApplyAnimation(playerid, "GHANDS", "gsign4LH", 4.1, 1, 1, 1, 1, 1, 1);
}
return 1;
}
EDIT: Saw what you said now and understand why strcmp is being used. Thanks!