Код:
if(strcmp(cmd, "/avisar", true) == 0 || strcmp(cmd, "/av", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] == 1)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo й um ADM !");
return 1;
}
if(admadministrando[playerid] < 1)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/administrar)");
return 1;
}
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, "USE: (/av)isar [text]");
return 1;
}
SendClientMessageToAll(COLOR_WHITE, "|-_-|Aviso da Administraзгo |-_-|");
format(string, sizeof(string), "Admin %s: %s", sendername, result);
SendClientMessageToAll(0x00FFFFFF, string);
}
return 1;
}