08.03.2013, 19:31
Try this
pawn Код:
CMD:announce(playerid, params[])
{
if(APlayerData[playerid][PlayerLevel] < 2 && !IsPlayerAdmin(playerid))return SendClientMessage(playerid,-1,"Error: No command for you!");
new text[64], time, style;
if (sscanf(params, "iis[64]", style, time, text)) return
SendClientMessage(playerid, COLOR_WHITE, "Usage: /announce <style[0-6]> <time in ms> <text>");
if (strlen(text) > 64) return
SendClientMessage(playerid, COLOR_WHITE, "Message too long please shorten it!");
if(style == 2) return SendClientMessage(playerid, COLOR_WHITE, "Bug with style 2 don't use it!");
if (style < 0 || style > 6) return
SendClientMessage(playerid, COLOR_WHITE,"Invalid style!");
if (time > 20*1000) return
SendClientMessage(playerid, COLOR_WHITE, "No longer than 20 seconds!");
GameTextForAll(text, time, style);
return 1;
}