new ReportCall[MAX_PLAYERS];
#define DIALOG_REPORT 5547 // Entsprechend ändern!!!
new pReportBlock[MAX_PLAYERS];
new JustReported[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
ReportCall[playerid] = 999;
JustReported[playerid] = 0;
}
public OnPlayerDisconnect(playerid, reason)
{
if(ReportCall[playerid] != 999)
{
new sendername[MAX_PLAYER_NAME], leaves[128];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(leaves, sizeof(leaves), "[REPORT-SYSTEM] %s Hat den Server verlassen! /report geschlossen", sendername);
SendClientMessage(playerid, COLOR_LIGHTGREEN,leaves);
ReportCall[playerid] = 999;
}
}
if(strcmp(cmd, "/report", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(JustReported[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GREY, " Bitte warte 30 Sekunden bis du den Nächsten Report schreiben kannst !");
return 1;
}
ShowPlayerDialog(playerid ,DIALOG_REPORT, DIALOG_STYLE_INPUT, "{F80000}Einen Report senden","Du hast eine Frage oder möchtest einen Cheater melden?\nSchreibe denen Text hier rein:","Senden", "Abbrechen");
}
return 1;
}
if(strcmp(cmd, "/cr", true) == 0)
{
new sendername[MAX_PLAYER_NAME];
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " Du musst Eingeloggt sein !");
return 1;
}
if(PlayerInfo[playerid][pAdmin] > 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Benutze: /cr [SpielerID/SpielerName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "** Adminstrator [ID:%d]%s hat den Report geschlossen!", playerid, sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTGREEN, string);
format(string, sizeof(string), "** Du hast den /report geschlossen!", playerid, sendername);
SendClientMessage(playerid, COLOR_LIGHTGREEN, string);
ReportCall[playerid] = 999;
ReportCall[giveplayerid] = 999;
}
}
}
}
}
if(strcmp(cmd, "/ar", true) == 0)
{
new sendername[MAX_PLAYER_NAME];
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " Du musst Eingeloggt sein !");
return 1;
}
if(PlayerInfo[playerid][pAdmin] > 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Benutze: /ar [SpielerID/SpielerName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PlayerNeedsHelp[giveplayerid] == 1)
{
PlayerNeedsHelp[giveplayerid] = 0;
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "AdmWarnung: %s hat den Report von: [ID:%d]%s Angenommen.", sendername, giveplayerid, giveplayer);
ABroadCast(COLOR_YELLOW, string, 1);
SendClientMessage(playerid, COLOR_YELLOW,"Schreib nun mit dem Spieler per Chat du bist Automatisch Verbunden.");
SendClientMessage(playerid, COLOR_YELLOW,"Du kannst den Report mit '/cr [SpielerID/SpielerName]' schließen");
format(string, sizeof(string), "** Adminstrator [ID:%d]%s hat dein Report Angenommen, er wird dich nun Supporten.", playerid, sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTGREEN, string);
SendClientMessage(giveplayerid, COLOR_LIGHTGREEN,"Du kannst nun per Chat mit dem Admin Schreiben.");
SendClientMessage(playerid, COLOR_LIGHTGREEN,"Du kannst nun per Chat mit dem Spieler Schreiben.");
ReportCall[giveplayerid] = playerid;
ReportCall[playerid] = giveplayerid; //Verbinde zum Reporter
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Der Spieler hat keine Report anfrage !");
return 1;
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Du bist kein Administrator ! ");
return 1;
}
}
return 1;
}
if(strcmp(cmd, "/tr", true) == 0)
{
new sendername[MAX_PLAYER_NAME];
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " Du musst Eingeloggt sein !");
return 1;
}
if(PlayerInfo[playerid][pAdmin] > 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "HINT: /tr [SpielerID/SpielerName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PlayerNeedsHelp[giveplayerid] == 1)
{
PlayerNeedsHelp[giveplayerid] = 0;
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "AdmWarning: %s hat die /report Anfrage von [ID:%d]%s gelöscht.", sendername, giveplayerid, giveplayer);
ABroadCast(COLOR_YELLOW, string, 1);
format(string, sizeof(string), "** Administrator [ID:%d]%s hat deine /report Anfrage verweigert !", playerid, sendername);
SendClientMessage(giveplayerid, 0xB35959AA, string);
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Der Spieler hat keine Report anfrage !");
return 1;
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Du bist kein Administrator ! ");
return 1;
}
}
return 1;
}
if(strcmp(cmd,"/lockreport",true)==0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 2) { return 1; }
tmp = strtok(cmdtext, idx);
new sendername[MAX_PLAYER_NAME];
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "/lockreport [Playerid]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid) && (giveplayerid != INVALID_PLAYER_ID))
{
if(pReportBlock[playerid]==0)
{
pReportBlock[giveplayerid]=1;
SendClientMessage(playerid,COLOR_GREY,"Report wurde für diesen Spieler ausgeschaltet!");
format(string, 256, "[REPORT(LOCK)]: %s hat den Report für %s gesperrt!",sendername, giveplayer);
ABroadCast(COLOR_RED,string,1);
SendClientMessage(giveplayerid,COLOR_YELLOW,"Der Befehl /report wurde für dich gesperrt!");
}
else
{
pReportBlock[giveplayerid]=0;
SendClientMessage(playerid,COLOR_GREY,"Report wurde für diesen Spieler freigeschaltet!");
format(string, 256, "[REPORT(LOCK)]: %s hat den Report für %s wieder freigegeben!",sendername, giveplayer);
ABroadCast(COLOR_RED,string,1);
SendClientMessage(giveplayerid,COLOR_YELLOW,"Der Befehl /report wurde für dich wieder freigegeben!");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Dieser Spieler ist nicht Aktiv!");
return 1;
}
}
return 1;
}
if(strcmp(cmd,"/showreports",true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] > 0 || PlayerInfo[playerid][pSupporter] > 0)
{
SendClientMessage(playerid,0x00D900C8,"|-------------Support-Tickets-------------|");
for(new i = 0;i<MAX_PLAYERS; i++)
{
if(PlayerNeedsHelp[i] == 1)
{
GetPlayerName(i, pname, sizeof(pname));
format(string, sizeof(string),"|Ticket von %s[ID:%d] | Status: Unbearbeitet",pname, i);
SendClientMessage(playerid,COLOR_YELLOW,string);
}
if(PlayerNeedsHelp[i] == 2)
{
GetPlayerName(i, pname, sizeof(pname));
format(string, sizeof(string),"|Ticket von %s[ID:%d] | Status: In Bearbeitung",pname, i);
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2,"INFO:Du bist kein Administrator/Supporter!");
}
}
return 1;
}
if(strcmp(cmd, "/movereport", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Du musst angemeldet sein!");
return 1;
}
if(PlayerInfo[playerid][pAdmin] > 0 || PlayerInfo[playerid][pSupporter] > 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "BEFEHL: /movereport [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PlayerNeedsHelp[giveplayerid] == 2)
{
if(AcceptReporter[giveplayerid] == playerid)
{
new sendername[MAX_PLAYER_NAME];
PlayerNeedsHelp[giveplayerid] = 1;
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "(([ADMIN] %s hat das Ticket von [ID:%d]%s. freigegeben))", sendername, giveplayerid, giveplayer);
ABroadCast(COLOR_YELLOW, string, 1);
format(string, sizeof(string), "** Admin/Supporter [ID:%s] %s hat dein Ticket weitergegeben.Warte bis sich ein Admin bei dir Meldet!", playerid, sendername);
SendClientMessage(giveplayerid,COLOR_YELLOW, string);
AcceptReporter[giveplayerid] = 600;
Supportchat[giveplayerid] = 0;
Supportable[giveplayerid] = 0;
JustReported[giveplayerid] = 0;
return 1;
}
}
}
}
}
}
return 1;
}
Das ganze müsstest du noch an dein Script anpassen.
ICh würde jetzt ein Danke erwarten hier alles rauszusuchen. Und das 'Mach ma bitte' wäre für mich eigt ein grund gewesen dir nicht zu helfen. Aber will ja nett sein!