18.02.2011, 14:14
pawn Код:
if (!strcmp("/ann", cmdtext, true) || !strcmp("/announce", cmdtext, true))
{
if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xff0000ff, "Need To Be A RCON Admin !");
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, -1, "USAGE: /ann [text]");
return 1;
}
GameTextForAll(result, 5000, 0);
return 1;
}