30.01.2010, 17:25
I have an announce command:
But there's something weird.
When I announce anything that's longer then 2 symbols, it gives me SERVER: Unknown Command, but it does announce the text anyways.
Do you know what's wrong?
pawn Код:
dcmd_announce(playerid, params[])
{
new message;
new string[128];
new string2[128];
if(PlayerInfo[playerid][AdminLevel] < LEVEL_ANNOUNCE) ErrorMessage(playerid, "Error: You don't have a high enough admin level!");
else if (sscanf(params, "s", message)) ErrorMessage(playerid, "Usage: '/announce [text]'");
else
{
format(string, sizeof(string), "~n~~w~%s", message);
GameTextForAll(string, 4000, 3);
format(string2, sizeof(string2), "Administrator %s has announced this: %s", PlayerName(playerid), message);
printf(string2);
}
return 1;
}
When I announce anything that's longer then 2 symbols, it gives me SERVER: Unknown Command, but it does announce the text anyways.
Do you know what's wrong?