Report System

Započeo Lyzzi
8. Avg. 2020.
846
pregleda
11
postova
Jack_White[BU]
4
Enforcer
8. Avg. 2020.
Problem(error/warning): Nema se errora nit warninga.Ovako ubacio sam report system kad igrac reportuje nekoga sa komandom
/reportasq da razgleda Admin ukoliko klikne Pregledaj ima opcije Prihvati/Odbij Ali u ovom snimku sto cu ostaviti dole..Kad kliknem Razgledaj ne pojavlja se nista..Kako da namjestim da Admin moze samo da odgovori na ovo ?

https://streamable.com/8u3jll

Imam i stocko-ove i sve
Deo skripte:
Evo komande koja pregleda reportove
CMD:reportasq(playerid, params[])
{
return ShowPlayerReports(playerid);
}

Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
N/A
Exnas.pwn
5
Godfather
8. Avg. 2020.
Pa daj stock ShowPlayerReports ili sta je vec, daj deo koji se desava kada igrac odabere nesto u dialogu
inquisitiveemmett
4
Shot Caller
8. Avg. 2020.
__vedran.xyz77 wrote on August 8, 2020, 4:54 pm:
Pa daj stock ShowPlayerReports ili sta je vec, daj deo koji se desava kada igrac odabere nesto u dialogu

i moj savet, promeni pesmu, od toga se postaje cigan i umobolan
Jack_White[BU]
4
Enforcer
8. Avg. 2020.
Evo svi Stock-0ve  😁
stock deleteReportsBy(playerid)
{
new
count = 0
;

if(!IsPlayerConnected(playerid))
    return count;

new nombre_1;
format(nombre_1, sizeof(nombre_1), GetPlayerNameEx(playerid));

new nombre_temp;

for(new i; i < sizeof(ReportData); i++) if(ReportExist(i))
{
    if(!(0 <= ReportData < MAX_PLAYERS))
        continue;

format(nombre_temp, sizeof(nombre_temp), GetPlayerNameEx(ReportData));

if(!CompareString(nombre_1:nombre_temp))
continue;

        DeleteReport(i);
        count ++;
}
return count;
}

stock DeleteReport(id)
{
if(IsValidReport(id))
    return 0;

    ReportData = false;
    ReportData = '\0';
    ReportData = INVALID_PLAYER_ID;
    ReportData = '\0';
    return 1;
}

stock CreateReport(playerid, reportado, razon[])
{
for(new i; i < sizeof(ReportData); i++)
{
    if(ReportExist(i))
        continue;

    ReportData = true;

    format(ReportData, MAX_PLAYER_NAME, GetPlayerNameEx(reportado));

    ReportData = playerid;

    format(ReportData, MAX_REPORT_STRING, razon);
    return i;
}
return -1;
}
stock ShowPlayerReports(playerid)
{
new
string,
count = 0,
index
;

format(string, sizeof(string), "Report #\tIgrac koje reportovao\tRepotrovan Igrac\tRazlog");
for(new i; i < sizeof(ReportData); i++)
{
    if(!ReportExist(i))
continue;

    format(string, sizeof(string), "%s\n#%i\t%s\t%s\t%s",
        string,
i,
GetPlayerNameEx(getReportValue(i->reporteDe)),
getReportValue(i->reportePara),
cutMessage(getReportValue(i->reporteRazon))
);

format(index, sizeof(index), "_report_%i", count);
SetPVarInt(playerid, index, i);

count++;
}
if(!count)
    return SendClientMessage(playerid, 0xFFFFFFFF, "Nema aktivnih reportova!");

ShowPlayerDialog(playerid, 5, DIALOG_STYLE_TABLIST_HEADERS, "reportasq", string, "Pregledaj", "Cancel");
return 1;
}
stock GetPlayerNameEx(playerid)
{
new name;
GetPlayerName(playerid, name, sizeof(name));

return name;
}
stock cutMessage(str[])
{
new _str;

if(strlen(str) > 20)
{
format(_str, sizeof(_str), "%.20s ...", str);
}
else
{
format(_str, sizeof(_str), "%s", str);
}

return _str;
}
Alhemičar v2
4
Shot Caller
8. Avg. 2020.
E ovi što imaju ImeIgraca GetName GetNameEx GetPlayerNameEx i šta sve ne u modu su mi najjači

Ne pojavljuje se ništa jer ja sam 100% siguran da u "tvom "modu"" dolazi do mešanja IDova dijaloga jer je taj dialog ID 5 a ko zna šta je to
marko077
6
Underboss
8. Avg. 2020.
Dodaj ispred
ShowPlayerDialog(playerid, 5, DIALOG_STYLE_TABLIST_HEADERS, "reportasq", string, "Pregledaj", "Cancel");

printf(" string is : \n%s", string);


I posalji sta ti izadje u server logu
Alhemičar v2
4
Shot Caller
8. Avg. 2020.
xLanmi wrote on August 8, 2020, 5:35 pm:
Dodaj ispred
ShowPlayerDialog(playerid, 5, DIALOG_STYLE_TABLIST_HEADERS, "reportasq", string, "Pregledaj", "Cancel");

printf(" string is : \n%s", string);


I posalji sta ti izadje u server logu

Id dialoga: 5
Exnas.pwn
5
Godfather
8. Avg. 2020.
Lukenzzi_Cassano wrote on August 8, 2020, 4:59 pm:
Evo svi Stock-0ve  😁

stock deleteReportsBy(playerid)
{
  new
      count = 0
  ;

  if(!IsPlayerConnected(playerid))
      return count;

  new nombre_1;
  format(nombre_1, sizeof(nombre_1), GetPlayerNameEx(playerid));

  new nombre_temp;

  for(new i; i < sizeof(ReportData); i++) if(ReportExist(i))
  {
      if(!(0 <= ReportData < MAX_PLAYERS))
          continue;

      format(nombre_temp, sizeof(nombre_temp), GetPlayerNameEx(ReportData));

      if(!CompareString(nombre_1:nombre_temp))
        continue;

        DeleteReport(i);
        count ++;
  }
  return count;
}

stock DeleteReport(id)
{
  if(IsValidReport(id))
      return 0;

    ReportData = false;
    ReportData = '\0';
    ReportData = INVALID_PLAYER_ID;
    ReportData = '\0';
    return 1;
}

stock CreateReport(playerid, reportado, razon[])
{
  for(new i; i < sizeof(ReportData); i++)
  {
      if(ReportExist(i))
          continue;

      ReportData = true;

      format(ReportData, MAX_PLAYER_NAME, GetPlayerNameEx(reportado));

      ReportData = playerid;

      format(ReportData, MAX_REPORT_STRING, razon);
      return i;
  }
  return -1;
}
stock ShowPlayerReports(playerid)
{
  new
      string,
      count = 0,
      index
  ;

  format(string, sizeof(string), "Report #\tIgrac koje reportovao\tRepotrovan Igrac\tRazlog");
  for(new i; i < sizeof(ReportData); i++)
  {
      if(!ReportExist(i))
        continue;

      format(string, sizeof(string), "%s\n#%i\t%s\t%s\t%s",
          string,
        i,
        GetPlayerNameEx(getReportValue(i->reporteDe)),
        getReportValue(i->reportePara),
        cutMessage(getReportValue(i->reporteRazon))
      );

      format(index, sizeof(index), "_report_%i", count);
      SetPVarInt(playerid, index, i);

      count++;
  }
  if(!count)
      return SendClientMessage(playerid, 0xFFFFFFFF, "Nema aktivnih reportova!");

  ShowPlayerDialog(playerid, 5, DIALOG_STYLE_TABLIST_HEADERS, "reportasq", string, "Pregledaj", "Cancel");
  return 1;
}
stock GetPlayerNameEx(playerid)
{
  new name;
  GetPlayerName(playerid, name, sizeof(name));

  return name;
}
stock cutMessage(str[])
{
  new _str;

  if(strlen(str) > 20)
  {
      format(_str, sizeof(_str), "%.20s ...", str);
  }
  else
  {
      format(_str, sizeof(_str), "%s", str);
  }

  return _str;
}

Evo opet cu napisati

daj deo koji se desava kada igrac odabere nesto u dialogu
Jack_White[BU]
4
Enforcer
8. Avg. 2020.
xLanmi wrote on August 8, 2020, 5:35 pm:
Dodaj ispred
ShowPlayerDialog(playerid, 5, DIALOG_STYLE_TABLIST_HEADERS, "reportasq", string, "Pregledaj", "Cancel");

printf(" string is : \n%s", string);


I posalji sta ti izadje u server logu


Sve radi normalno
Alhemičar v2
4
Shot Caller
8. Avg. 2020.
Lukenzzi_Cassano wrote on August 8, 2020, 6:05 pm:
Sve radi normalno

Šta radi?
Ako misliš na console output

Jebeni ID dialoga promeni, treći put kažem
Jack_White[BU]
4
Enforcer
8. Avg. 2020.
Lockam reseno

A ovde inace bas ima par mnogo arogantnih ljudi koje misle da su neko i nesta
A ustvari su niko i su go kurac

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha