08.05.2011, 21:14
PHP код:
if(strcmp(cmd, "/reportar", true) == 0 || strcmp(cmd, "/re", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, 0xFFFFFFAA, "USE: /reportar [id] [texto]");
id = strval(tmp);
new reportado[MAX_PLAYER_NAME], reportador[MAX_PLAYER_NAME], motivo[128];
GetPlayerName(id, reportado, sizeof(reportado));
GetPlayerName(playerid, reportador, sizeof(reportador));
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFFFFFFAA, "Error: Jogador off.");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFFFFFFAA, "ERROR: Jogador invбlido.");
motivo = strtok(cmdtext, idx);
if(!strlen(motivo)) return SendClientMessage(playerid, 0xFFFFFFAA, "USE: /reportar id texto");
new string[128];
format(string, sizeof(string), "Jogador %s[%i] reportou %s[%i] motivo %s", reportador, playerid, reportado, id, motivo);
SendClientMessage(i, 0xFFFFFFAA, "[js] Relatуrio enviado.");
for(new i = 0; i < MAX_PLAYERS; ++i)
{
if(IsPlayerAdmin(i))
{
SendClientMessage(i, 0xFFFFFFAA, string);
}
}
return 1;
}

