03.04.2010, 08:16
If you are admin 103 you can tipe /announce [style] [text] the "style is from 0 to 6 "
Example : /announce 3 asdfgs . They all disappear from the screen except the style : 2 . I wanna make it dissapear after a time like the other styles . Here is the command code :
Example : /announce 3 asdfgs . They all disappear from the screen except the style : 2 . I wanna make it dissapear after a time like the other styles . Here is the command code :
Код:
if(strcmp(cmd, "/announce", true) == 0) { tmp = strtok(cmdtext, idx); if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 103) { new txtid; if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GREY, "USAGE: /announce [type] [text]"); return 1; } txtid = strval(tmp); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GREY, "USAGE: /announce [type] [text]"); return 1; } format(string, sizeof(string), "~w~%s",result); GameTextForAll(string, 5000, txtid); format(string, sizeof(string), "-ANNOUNCE- %s",result); //ircSay(EchoConnection, EchoChan, string); return 1; } else { SendClientMessage(playerid, COLOR_GREY, "You are not allowed to use this command."); } return 1;