24.12.2014, 21:12
It should work
Код:
CMD:announce(playerid, params[]) { new text[64], time, style; if(PlayerInfo[playerid][pRank] >= 1 && PlayerInfo[playerid][pRank] <= 8) { if(sscanf(params, "iis[64]", style, time, text)) return SendClientMessage(playerid, -1, "Usage: /announce <style[0-6]> <time in ms> <text>"); if(strlen(text) > 64) return SendClientMessage(playerid, -1, "Message too long, please make it with less than 64 letters!"); if(style == 2) return SendClientMessage(playerid, -1, "Bug with style 2! Do not use it!"); if(style < 0 || style > 6) return SendClientMessage(playerid, -1,"Invalid style"); if(time > 20*1000) return SendClientMessage(playerid, -1, "No longer than 20 seconds"); GameTextForAll(text, time, style); } return 1; }