25.06.2009, 11:45
Код:
if(!strcmp(cmd, "/ann", true) && PlayerAdminLevel[playerid] == 1337) { new msg[256], seconds; seconds = strval(strtok(cmdtext,idx)); if(seconds == 0) { SendClientMessage(playerid, CWARN," Server: /announce [time] [text]"); SendClientMessage(playerid, CWARN, " Server: Colors for the text can be viewed at /aacolors"); return 1; } msg = strrest(cmdtext,idx); format(tmp,sizeof(tmp),"~w~%s",msg); seconds = seconds * 1000; GameTextForAll(tmp,seconds,0); ToLog("announces", "%s: %s", PlayerName(playerid), msg); return 1; } if(!strcmp(cmd, "/announce", true) && PlayerAdminLevel[playerid] == 1337) { new msg[256], seconds; seconds = strval(strtok(cmdtext,idx)); if(seconds == 0) { SendClientMessage(playerid, CWARN," Server: /ann [time] [text]"); SendClientMessage(playerid, CWARN, " Server: Colors for the text can be viewed at /aacolors"); return 1; } msg = strrest(cmdtext,idx); format(tmp,sizeof(tmp),"~w~%s",msg); seconds = seconds * 1000; GameTextForAll(tmp,seconds,0); ToLog("announces", "%s: %s", PlayerName(playerid), msg); return 1; }