Código:
CMD:m(playerid, result[])
{
if(gPlayerLogged[playerid] == 0) { return SendClientMessage(playerid, 0xff6347FF, "* Você não está conectado."); }
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, 0xA92BF6F6, "Você não pode falar, pois foi calado");
return true;
}
if(!IsACop(playerid) && PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pAdminTemp] < 1)
{
SendClientMessage(playerid, COLOR_GREY, "Você não é um policial!");
return true;
}
if(OnDuty[playerid] != 1 && PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pAdminTemp] < 1)
{
SendClientMessage(playerid, COLOR_GREY, "Você não Bateu o cartão!");
return true;
}
if(PlayerInfo[playerid][pJailed] == 9)
{
SendClientMessage(playerid,COLOR_GRAD1,"Você não pode usar este comando nas Celas da Administração!");
return true;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
if(isnull(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: (/m)egafone [texto]");
return true;
}
//Anti Divulguer
if(AntiDivulguer(playerid, result))return 1;
if(IsACop(playerid) || PlayerInfo[playerid][pAdmin] > 0 || PlayerInfo[playerid][pAdminTemp] > 0)
{
new string[MAX_STRING];
if(admtrampando[playerid] > 0)
{
format(string, sizeof(string), "[MEGAFONE] %s:o< %s]", sendername, result);
SendClientMessageInRange(60.0, playerid, string, 0xFE85E0AA,0xFE85E0AA,0xFE85E0AA,0xFE85E0AA,0xFE85E0AA);
}
else if(PlayerInfo[playerid][pMembro] == 1||PlayerInfo[playerid][pLider] == 1)
{
format(string, sizeof(string), "Policia Militar %s:o< %s", sendername, result);
SendClientMessageInRange(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
}
else if(PlayerInfo[playerid][pMembro] == 2||PlayerInfo[playerid][pLider] == 2)
{
format(string, sizeof(string), "BOPE %s:o< %s", sendername, result);
SendClientMessageInRange(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
}
else if(PlayerInfo[playerid][pMembro] == 27||PlayerInfo[playerid][pLider] == 27)
{
format(string, sizeof(string), "Policial Militar %s:o< %s", sendername, result);
SendClientMessageInRange(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
}
else if(PlayerInfo[playerid][pMembro] == 3||PlayerInfo[playerid][pLider] == 3)
{
format(string, sizeof(string), "Exercito %s:o< %s", sendername, result);
SendClientMessageInRange(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
}
else if(IsAGOV(playerid))
{
format(string, sizeof(string), "Governo %s:o< %s", sendername, result);
SendClientMessageInRange(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
}
else if(PlayerInfo[playerid][pMembro] == 16||PlayerInfo[playerid][pLider] == 16)
{
format(string, sizeof(string), "ROTA %s:o< %s", sendername, result);
SendClientMessageInRange(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
}
else if(PlayerInfo[playerid][pMembro] == 11||PlayerInfo[playerid][pLider] == 11)
{
format(string, sizeof(string), "Policial Federal %s:o< %s", sendername, result);
SendClientMessageInRange(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
}
else if(PlayerInfo[playerid][pMembro] == 33||PlayerInfo[playerid][pLider] == 33)
{
format(string, sizeof(string), "Policial Civil %s:o< %s", sendername, result);
SendClientMessageInRange(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
}
else if(PlayerInfo[playerid][pMembro] == 34||PlayerInfo[playerid][pLider] == 34)
{
format(string, sizeof(string), "DETRAN %s:o< %s", sendername, result);
SendClientMessageInRange(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
}
printf("%s", string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Você não faz parte de nenhuma equipe !");
return true;
}
return true;
}