pawn Код:
#include <zcmd>
#include <a_samp>
#define MAX_PLAYERS 500
CMD:reportar(playerid, params[])
{
new ID, Motivo[128], NomeQuemReportou[25], Msg[128], NomeQuemFoiReportado[25];
GetPlayerName(ID, NomeQuemFoiReportado, sizeof(NomeQuemFoiReportado));
GetPlayerName(playerid, NomeQuemReportou, sizeof(NomeQuemReportou));
if(sscanf(params, "is", ID, Motivo)) SendClientMessage(playerid, 0xFF0000FF, "Use: /reportar ID Motivo");
if(IsPlayerConnected(ID))
{
SendClientMessage(playerid, 0x00FF00FF, "Voce Reportou Com Sucesso!");
}
else
{
SendClientMessage(playerid, 0xFF0000FF, "Jogador esta off-line");
}
for (new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(playerid))
{
if(!IsPlayerAdmin(i)) //verificar os playres conectados na rcon
{
format(Msg, 128, "O Jogador %s reportou o Jogador %s Motivo: %s", NomeQuemReportou, NomeQuemFoiReportado, Motivo);
SendClientMessage(playerid, -1, Msg);
}
}
}
return 1;
}