if(strcmp(cmd, "/relatorio", true) == 0) { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, "Voce nгo estб logado!"); 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: /relatorio [texto]"); return 1; } format(string, sizeof(string), "[ATENЗГO] ==> Relatorio de %s(%d): %s", sendername, playerid, (result)); ABroadCast(COLOR_LIGHTBLUE,string,1); SendClientMessage(playerid, COLOR_YELLOW, "Sua mensagem foi enviada б administraзгo,Aguarde uma resposta."); } return 1; } |
if(GetTickCount() - FloodAn[playerid] < 10000)
{
format(string, sizeof(string), " Espere %d segundos para um novo anuncio!",10-(GetTickCount() - FloodAn[playerid])/1000);
SendClientMessage(playerid, COLOR_GRAD2, string);
return 1;
}
new EnviouRelatorio[MAX_PLAYERS];//topo do gm
new timerrelatorio;//topo do gm tambйm
if(strcmp(cmd, "/relatorio", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Voce nгo estб logado!");
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: /relatorio [texto]");
return 1;
}
format(string, sizeof(string), "[ATENЗГO] ==> Relatorio de %s(%d): %s", sendername, playerid, (result));
ABroadCast(COLOR_LIGHTBLUE,string,1);
EnviouRelatorio[playerid] = 1;
SendClientMessage(playerid, COLOR_YELLOW, "Sua mensagem foi enviada б administraзгo,Aguarde uma
resposta.");
timerrelatorio = SetTimerEx("TempoRelatorio", 10000, 0, "i", playerid);
if(EnviouRelatorio[playerid] == 1)
{
SendClientMessage(playerid,0x808080C8,"Vocк jб enviou um relatorio! Aguarde 10 segundos para enviar outro!");
return 1;
}
}
return 1;
}
forward TempoRelatorio(playerid);
public TempoRelatorio(playerid)
{
EnviouRelatorio[playerid] = 0;
KillTimer(timerrelatorio);
return 1;
}