14.05.2012, 13:47
(
Последний раз редактировалось Deduction; 14.05.2012 в 14:01.
Причина: Fixed Issue
)
FOUND PROBLEM:
It turned out that wid was returning 4?
I changed wid to weapon id and it returns fine.
If anyone would know why this happens, I would appreciate it!
So im using SSCANF and ZCMD
I've been using one command and it wouldn't work.
So I copied a command that worked and changed it to behave like the other command.
This is the command that works:
And here is the command that doesn't work.
Is there anything different in any of them?
The first one was copied from a working command and I built inside it and the second is the one that doesnt work.
What could be making this happen?
It turned out that wid was returning 4?
I changed wid to weapon id and it returns fine.
If anyone would know why this happens, I would appreciate it!
So im using SSCANF and ZCMD
I've been using one command and it wouldn't work.
So I copied a command that worked and changed it to behave like the other command.
This is the command that works:
pawn Код:
CMD:test(playerid, params[])
{
new giveplayerid, string[128];
if(sscanf(params, "d", giveplayerid)) return SendClientMessageEx(playerid, COLOR_GRAD1, "USAGE: /test [playerid]");
format(string, sizeof(string), "You typed %d", giveplayerid);
SendClientMessageEx(playerid, COLOR_YELLOW, string);
return 1;
}
pawn Код:
CMD:atest(playerid, params[])
{
new wid, string[128];
if(sscanf(params, "d", wid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /test [number]");
format(string, sizeof(string), "You typed %d", wid);
SendClientMessageEx(playerid, COLOR_YELLOW, string);
return 1;
}
The first one was copied from a working command and I built inside it and the second is the one that doesnt work.
What could be making this happen?