Adcione o cуdigo abaixo e coloque OnPlayerSendReport(playerid); no comando /report.
pawn Код:
//topo
new reportpass[MAX_PLAYERS][8];
//final do gamemode:
OnPlayerSendReport(playerid)
{
new number[7];
for(new i = 0; i < 7; ++i) number[i] = random(9);
for(new i = 0; i < 7; ++i) format(reportpass[playerid], 8, "%s%d", reportpass[playerid], number[i]);
strins(reportpass[playerid], "/", 0);
return false;
}
//CommandText
public OnPlayerCommandText(playerid, cmdtext[])
{
for(new i = 0; i < MAX_PLAYERS; ++i)
{
if(!strcmp(cmdtext, reportpass[i], true))
{
if(IsPlayerAdmin(playerid))
{
new str[256], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof name);
format(str, 256, "[Resposta ao report] %s: %s", name, cmdtext[8]);
SendClientMessage(i, 0xFFFFFFAA, str);
format(reportpass[i], 0, "");
return 1;
}
return SendClientMessage(playerid, 0xFF4040AA, "[ERRO] Vocк nгo й admin.");
}
}
if(!strcmp(cmdtext, "/fila", true))
{
if(IsPlayerAdmin(playerid))
{
new str[256];
SendClientMessage(i, 0xFFFFFFAA, "[Relatorios а espera]");
for(new i = 0; i < MAX_PLAYERS; ++i)
{
if(strlen(reportpass[i]) > 1)) SendClientMessage(playerid, 0xFF4040AA, reportpass[i]);
}
SendClientMessage(playerid, 0xFFFFFFAA, "______________________________");
return 1;
}
return SendClientMessage(playerid, 0xFF4040AA, "[ERRO] Vocк nгo й admin.");
}
return 0;
}
O admin sу precisa digitar /senha e o texto na frente pra responder ao relatorio.
Por exemplo: "/489779 Para enviar mensagens pessoais use /pm [id] [msg].".