25.10.2012, 00:39
Why is the announce text 265 cells big? You can only have around ~150 characters in a message (different for other resolutions).
You could of done this without sscanf either.
You could of done this without sscanf either.
pawn Код:
CMD:announce(playerid, params[])
{
new
string[152],
pName[MAX_PLAYER_NAME]
;
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFFFFFF, "You are not admin");
if (isnull(params)) return SendClientMessage(playerid, COLOR_WHITE,"/announce [text]");
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "{F2240D}[Admin] %s:{09F7C7} %s", pName, params);
SendClientMessageToAll(0xFFFFFFF, string);
return 1;
}