pawn Код:
if(strcmp(cmd, "/relatorio", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new bool: Relatou[MAX_PLAYERS];
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo estб logado!");
return 1;
}
if(Relatou[playerid] == true) return SendClientMessage(playerid, -1, "Vocк sу pode mandar um relatуrio a cada 10 segundos, por favor espere um pouco");
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: /relatorio [texto]");
return 1;
}
if(TentouDivulgar(result))
{
if(cdivulgar[playerid] >= 4)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Aqui vocк nгo pode anunciar servidores!");
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Seu servidor й uma merda, nгo divulgue-o aqui!");
SendClientMessage(playerid, COLOR_LIGHTBLUE,"Seu noob peguei esse IP e vou divulgar nesse server tambйm, uaheuhaeuhaeahe!");
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
Kick(playerid);
}
format(string, 128, "AdmAviso: [%d]%s tentou divulgar: %s.",playerid,PlayerName(playerid),result);
ABroadCast(COLOR_YELLOW,string,1);
DivulgouLog(string);
cdivulgar[playerid] += 1;
return 1;
}
if(PlayerInfo[playerid][pVIP] == 1)
{
new lol;
lol = PlayerInfo[playerid][pVIP];
format(string, sizeof(string), "--> Relatуrio VIP de %s - ID[%d]: %s <--", PlayerName(playerid), playerid, lol, (result));
ABroadCast(0x33FF00FF,string,1);
SendClientMessage(playerid, COLOR_YELLOW, "Seu relatуrio VIP foi enviado aos admins, aguarde uma resposta...");
}
else if(PlayerInfo[playerid][pVIP] == 2)
{
new lol;
lol = PlayerInfo[playerid][pVIP];
format(string, sizeof(string), "--> Relatуrio Premium de %s - ID[%d]: %s -->", PlayerName(playerid), playerid, lol, (result));
ABroadCast(0x33FF00FF,string,1);
SendClientMessage(playerid, COLOR_YELLOW, "Seu relatуrio VIP foi enviado aos admins, aguarde uma resposta...");
}
else if(PlayerInfo[playerid][pSocio] == 1)
{
new lol;
lol = PlayerInfo[playerid][pSocio];
format(string, sizeof(string), "--> Relatуrio Sуcio de %s - ID[%d]: %s -->", PlayerName(playerid), playerid, lol, (result));
ABroadCast(0x33FF00FF,string,1);
SendClientMessage(playerid, COLOR_YELLOW, "Seu relatуrio VIP foi enviado aos admins, aguarde uma resposta...");
}
else
{
format(string, sizeof(string), "--> Relatуrio de %s(%d): %s -->", PlayerName(playerid), playerid, (result));
ABroadCast(0xFFFF66FF,string,1);
SendClientMessage(playerid, COLOR_YELLOW, "Seu relatуrio foi enviado com sucesso a Administraзгo, Aguarde por uma resposta...");
}
Relatou[playerid] = true;
SetTimerEx("ResetarTempo", 10000, false, "i", playerid);
}
return 1;
}