21.03.2009, 00:13
Код:
if(strcmp(cmd, "/announce", true) == 0 || strcmp(cmd, "/gov", true) == 0) { if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, sendername, sizeof(sendername)); 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_GRAD2, "USAGE: (/gov)ernment [text]"); return 1; } SendClientMessageToAll(ColorHere, "-|_________________ Announcement _________________|-"); SendClientMessageToAll(ColorHere, "Message Here"); } return 1; }