Comanda /rc(report chat) -
qRazor - 28.08.2017
In loc sa trimita mesajul la admin trimite de 2 ori la player.
Poza:
http://imgur.com/a/KC0AH
Comanda /acr:
Код HTML:
CMD:acr(playerid, params[])
{
new strglobal[856];
if(PlayerInfo[playerid][pAdmin] == 0) return 1;
new toplayerid;
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;
}
Comanda /rc:
Код HTML:
CMD:rc(playerid, params[])
{
new stringuri[128], message[128], string1, string2;
if(ActiveReport[playerid] == 0) return SCM(playerid, COLOR_WHITE, "You don't have a report active.");
if(sscanf(params, "s[128]", message)) return ShowSyntax(playerid, "/rc <Message>");
if(ReportDuty[playerid] == 2) string1 = ReportDuty[playerid];
if(ReportDuty[playerid] == 1) string2 = ReportDuty[playerid];
if(PlayerInfo[playerid][pAdmin] >= 1)
{
format(stringuri, 128, "* Admin %s: %s", GetName(playerid), message);
SCM(playerid,COLOR_YELLOW,stringuri);
SCM(string2,COLOR_YELLOW,stringuri);
}
else
{
format(stringuri, 128, "* Player %s: %s", GetName(playerid), message);
SCM(playerid,COLOR_YELLOW,stringuri);
SCM(string1,COLOR_YELLOW,stringuri);
}
return 1;
}
Re: Comanda /rc(report chat) -
10MIN - 28.08.2017
Pot spune ca variabilele alea sunt "mixate cu mixeru". Incearca sa reconstruiesti comanda de la zero...
Re: Comanda /rc(report chat) -
qRazor - 28.08.2017
Ma poti ajuta? Comanda /rc am facut-o eu de la 0 insa am intampinat problema de mai sus.
Re: Comanda /rc(report chat) -
RedGun2015 - 28.08.2017
Incearca asa:
Код:
CMD:rc(playerid, params[])
{
new stringuri[128], message[128], string1, string2;
if(ActiveReport[playerid] == 0) return SCM(playerid, COLOR_WHITE, "You don't have a report active.");
if(sscanf(params, "s[128]", message)) return ShowSyntax(playerid, "/rc <Message>");
if(ReportDuty[playerid] == 2) string1 = ReportDuty[playerid];
if(ReportDuty[playerid] == 1) string2 = ReportDuty[playerid];
new id = ReportAdminID[playerid]; //admin
new id2 = ReportPlayerID[playerid]; // player
if(PlayerInfo[playerid][pAdmin] >= 1)
{
format(stringuri, 128, "* Admin %s: %s", GetName(playerid), message);
SCM(id2,COLOR_YELLOW,stringuri);
SCM(string2,COLOR_YELLOW,stringuri);
}
else
{
format(stringuri, 128, "* Player %s: %s", GetName(playerid), message);
SCM(id,COLOR_YELLOW,stringuri);
SCM(string1,COLOR_YELLOW,stringuri);
}
return 1;
}
Re: Comanda /rc(report chat) -
qRazor - 28.08.2017
Multumesc, respect!
Re: Comanda /rc(report chat) -
10MIN - 28.08.2017
Tot nu o sa iti mearga... Asa ar fi corect:
PHP код:
CMD:rc(playerid, params[])
{
new stringuri[128], message[128], string1, string2;
if(ActiveReport[playerid] == 0) return SCM(playerid, COLOR_WHITE, "You don't have a report active.");
if(sscanf(params, "s[128]", message)) return ShowSyntax(playerid, "/rc <Message>");
if(PlayerInfo[playerid][pAdmin] >= 1)
{
format(stringuri, 128, "* Admin %s: %s", GetName(playerid), message);
SCM(playerid,COLOR_YELLOW,stringuri);
SCM(ReportPlayerID[playerid],COLOR_YELLOW,stringuri);
}
else
{
format(stringuri, 128, "* Player %s: %s", GetName(playerid), message);
SCM(playerid,COLOR_YELLOW,stringuri);
SCM(ReportAdminID[playerid],COLOR_YELLOW,stringuri);
}
return 1;
}
//Si cealalta modificata:
CMD:acr(playerid, params[])
{
new strglobal[856];
if(PlayerInfo[playerid][pAdmin] == 0) return 1;
new toplayerid;
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;
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;
}
PS: Posibil sa aibe cateva erori, le rezolvi tu
Re: Comanda /rc(report chat) -
qRazor - 29.08.2017
A mers 10MIN cum a zis RedGun, multumesc oricum
![Cheesy](images/smilies/biggrin.png)
+1 si tie