Problema /finishreport -
qRazor - 29.08.2017
Cand dau /finishreport dupa contul de admin totul este ok ii da 1 mesaj la adm 1 la player si il inchide, cand intru pe contul de player imi face spam 2 randuri, nu trimite la admin niciun mesaj, si nu inchide nici reportul dupa player cand dau /finishreport.
Poza:
http://imgur.com/a/kkWDU
Comanda /finishreport:
Код HTML:
CMD:finishreport(playerid, params[])
{
new strglobal[80], toplayerid;
if(ActiveReport[playerid] != 1) return SCM(playerid, COLOR_WHITE, "You're not in a report session!");
if(ReportDuty[playerid] == 1) { toplayerid = ReportAdminID[playerid]; }
if(ReportDuty[playerid] == 2) { toplayerid = ReportPlayerID[playerid]; }
ActiveReport[toplayerid] = 0, ActiveReport[playerid] = 0;
ReportDuty[playerid] = 0, ReportDuty[toplayerid] = 0;
format(strglobal, 80,"* %s stopped this report session (Command).", GetName(playerid));
SCM(playerid, COLOR_YELLOW2, strglobal);
SCM(toplayerid, COLOR_YELLOW2, strglobal);
ReportPlayerID[playerid] = INVALID_PLAYER_ID;
ReportPlayerID[toplayerid] = INVALID_PLAYER_ID;
ReportAdminID[playerid] = INVALID_PLAYER_ID;
ReportAdminID[toplayerid] = INVALID_PLAYER_ID;
return 1;
}
Comanda /acr:
Код HTML:
CMD:acr(playerid, params[])
{
new strglobal[856], toplayerid;
if(PlayerInfo[playerid][pAdmin] == 0) return 1;
if(sscanf(params, "u", toplayerid)) return ShowSyntax(playerid, "/acr <Name/PlayerID>");
if(ActiveReport[playerid] != 0) return SCM(playerid, COLOR_WHITE, "You're in a report right now.");
if(toplayerid == INVALID_PLAYER_ID) return ShowSyntax(playerid, "/acr <Name/PlayerID>");
if(HaveReport[toplayerid] == 0) return SCM(playerid, COLOR_WHITE, "This player don't have a report active anymore.");
format(strglobal, sizeof(strglobal), "%s picked up %s's report.", GetName(playerid), GetName(toplayerid));
SendAdmins(strglobal);
HaveReport[toplayerid] = 0;
ActiveReport[playerid] = 1, ActiveReport[toplayerid] = 1;
ReportDuty[playerid] = 2, ReportDuty[toplayerid] = 1;
ReportPlayerID[playerid] = toplayerid;
ReportPlayerID[toplayerid] = toplayerid;
ReportAdminID[playerid] = playerid;
ReportAdminID[toplayerid] = toplayerid;
format(strglobal, sizeof(strglobal), "* %s picked up %s's report.", GetName(playerid), GetName(toplayerid));
SCM(playerid, COLOR_YELLOW2, strglobal);
SCM(toplayerid, COLOR_YELLOW2, strglobal);
SCM(playerid, COLOR_YELLOW2, "* You can stop this report by typing [/finishreport] in chat.");
SCM(toplayerid, COLOR_YELLOW2, "* You can stop this report by typing [/finishreport] in chat.");
SCM(playerid, COLOR_YELLOW2, "* You can talk with the player in chat now.");
SCM(toplayerid, COLOR_YELLOW2, "* You can talk with the admin in chat now.");
PlayerInfo[playerid][pReports] ++;
return 1;
}
Re: Problema /finishreport -
webby - 01.09.2017
PHP код:
CMD:finishreport(playerid, params[])
{
new strglobal[80];
if(ActiveReport[playerid] == 0) return SCM(playerid, COLOR_WHITE, "You're not in a report session!");
if(ReportDuty[playerid] == 1) { playerid = ReportAdminID[playerid]; } // admin
if(ReportDuty[playerid] == 2) { toplayerid = ReportPlayerID[toplayerid]; } // jucator
ActiveReport[playerid] = 0;
ReportDuty[playerid] = 0;
ActiveReport[toplayerid] = 0;
ReportDuty[toplayerid] = 0;
format(strglobal, sizeof(strglobal), "* %s has stopped this report session.", GetName(playerid));
SCM(playerid, COLOR_YELLOW2, strglobal); // admin
SCM(toplayerid, COLOR_YELLOW2, strglobal); // jucator
ReportPlayerID[playerid] = INVALID_PLAYER_ID;
ReportAdminID[playerid] = INVALID_PLAYER_ID;
ReportPlayerrID[toplayerid] = INVALID_PLAYER_ID;
ReportAdminID[toplayerid] = INVALID_PLAYER_ID;
return 1;
}
PHP код:
ReportPlayerID[playerid] = INVALID_PLAYER_ID;
ReportAdminID[playerid] = INVALID_PLAYER_ID;
ReportPlayerrID[toplayerid] = INVALID_PLAYER_ID;
ReportAdminID[toplayerid] = INVALID_PLAYER_ID;
-> acestea le poti scoate, pentru ca nu ai (/finishreport [ID]).
daca te-am ajutat, +rep.
P.S.: ce gamemode folosesti?!