Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- YCMD:report(playerid, params[], help) {
- if(PlayerInfo[playerid][pReportTime] >= 1) {
- new string[128];
- format(string, sizeof(string), "Vei putea da un report peste %d minute (%d secunde).", PlayerInfo[playerid][pReportTime]/60, PlayerInfo[playerid][pReportTime]);
- SCM(playerid, COLOR_GRAD4, string);
- return 1;
- }
- if(PlayerInfo[playerid][pAdmin] >= 1 && GetPVarInt(playerid, "Cover") == 0) return SCM(playerid, COLOR_GREY, "Nu poti da un report deoarece esti admin!");
- if(PlayerInfo[playerid][pLevel] < 5) SCM(playerid, COLOR_LGREEN, "Nu da report pentru motive inutile deoarece vei fi sanctionat!");
- ShowPlayerDialog(playerid, DIALOG_REPORT, DIALOG_STYLE_LIST, "Report", "Raporteaza DM\nRaporteaza un codat\nIntrebari despre donatii\nSunt blocat\nDoresc sa fac o afacere\nCere respawn\nAlta problema", "Select", "Close");
- return 1; }
- function CheckReport(playerid) {
- if(Ajutor[playerid] == 1) {
- SCM(playerid, COLOR_YELLOW, "Report-ul tau a fost inchis automat deoarece nu ai primit un raspuns.");
- Ajutor[playerid] = 0;
- ReportedPlayer[playerid] = -1;
- SetPVarInt(playerid, "Reported", 0);
- SetPVarInt(playerid, "ReportType", 0);
- SetPVarString(playerid, "ReportedBy", "");
- SetPVarInt(playerid, "ReportScore", 0);
- SetPVarString(playerid, "ReportText", "");
- if(ReportTimer[playerid] != 0) ReportTimer[playerid] = 0;
- }
- return 1; }
- case DIALOG_REPORT: {
- if(!response) return 1;
- SetPVarInt(playerid, "Selected", listitem);
- switch(listitem) {
- case 0: ShowPlayerDialog(playerid, DIALOG_REPORT+1, DIALOG_STYLE_INPUT, "Raporteaza DM", "Scrie ID-ul sau numele jucatorului pe care vrei sa-l raportezi:", "Next", "Back");
- case 1: ShowPlayerDialog(playerid, DIALOG_REPORT+1, DIALOG_STYLE_INPUT, "Raporteaza un codat", "Scrie ID-ul sau numele jucatorului pe care vrei sa-l raportezi:", "Next", "Back");
- case 2: {
- ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Intrebari despre donatii",
- "Cum donez?\nPentru a dona, trebuie sa iei legatura cu ownerii serverului", "Close", "");
- }
- case 3: {
- format(string, sizeof(string), "%s (%d) este blocat.", GetName(playerid), playerid);
- SendAdminMessage(0xC9161FFF, string, 1);
- if(ReportTimer[playerid] != 0) {
- KillTimer(ReportTimer[playerid]);
- ReportTimer[playerid] = 0;
- }
- ReportTimer[playerid] = SetTimerEx("CheckReport", 300000, 0, "%d", playerid);
- SCM(playerid, COLOR_YELLOW, "Reportul tau a fost trimis adminilor.");
- PlayerInfo[playerid][pReportTime] = 120;
- SetPVarInt(playerid, "Reported", 1);
- SetPVarInt(playerid, "ReportType", 3);
- }
- case 4: {
- format(string, sizeof(string), "%s (%d) doreste sa faca o afacere.", GetName(playerid), playerid);
- SendAdminMessage(0xC9161FFF, string, 1);
- if(ReportTimer[playerid] != 0) {
- KillTimer(ReportTimer[playerid]);
- ReportTimer[playerid] = 0;
- }
- ReportTimer[playerid] = SetTimerEx("CheckReport", 300000, 0, "%d", playerid);
- SCM(playerid, COLOR_YELLOW, "Reportul tau a fost trimis adminilor.");
- PlayerInfo[playerid][pReportTime] = 120;
- SetPVarInt(playerid, "Reported", 1);
- SetPVarInt(playerid, "ReportType", 4);
- }
- case 5: {
- format(string, sizeof(string), "%s (%d) a cerut un respawn.", GetName(playerid), playerid);
- SendAdminMessage(0xC9161FFF, string, 1);
- if(ReportTimer[playerid] != 0) {
- KillTimer(ReportTimer[playerid]);
- ReportTimer[playerid] = 0;
- }
- ReportTimer[playerid] = SetTimerEx("CheckReport", 300000, 0, "%d", playerid);
- SCM(playerid, COLOR_YELLOW, "Reportul tau a fost trimis adminilor.");
- PlayerInfo[playerid][pReportTime] = 120;
- SetPVarInt(playerid, "Reported", 1);
- SetPVarInt(playerid, "ReportType", 5);
- }
- case 6: ShowPlayerDialog(playerid, DIALOG_REPORT+1, DIALOG_STYLE_INPUT, "Alta problema", "Scrie problema pe care o ai.\nNu folosi comanda /report aiurea deoarece vei fi sanctionat.", "Ok", "Back");
- }
- }
- case DIALOG_REPORT+1: {
- if(!response) return ShowPlayerDialog(playerid, DIALOG_REPORT, DIALOG_STYLE_LIST, "Report", "Raporteaza DM\nRaporteaza un codat\nIntrebari despre donatii\nSunt blocat\nDoresc sa fac o afacere\nCere respawn\nAlta problema", "Select", "Close");
- new type = GetPVarInt(playerid, "Selected"), id = strval(inputtext);
- if(type != 4) {
- if(sscanf(inputtext, "u", id)) {
- ShowPlayerDialog(playerid, DIALOG_REPORT, DIALOG_STYLE_LIST, "Report", "Raporteaza DM\nRaporteaza un codat\nIntrebari despre donatii\nSunt blocat\nDoresc sa fac o afacere\nCere respawn\nAlta problema", "Select", "Close");
- SCM(playerid, COLOR_GRAD3, "ID Invalid!");
- return 1;
- }
- if(id == playerid) {
- ShowPlayerDialog(playerid, DIALOG_REPORT, DIALOG_STYLE_LIST, "Report", "Raporteaza DM\nRaporteaza un codat\nIntrebari despre donatii\nSunt blocat\nDoresc sa fac o afacere\nCere respawn\nAlta problema", "Select", "Close");
- SCM(playerid, COLOR_GRAD4, "Nu te poti adauga pe tine in lista!");
- return 1;
- }
- if(!IsPlayerConnected(id)) {
- ShowPlayerDialog(playerid, DIALOG_REPORT, DIALOG_STYLE_LIST, "Report", "Raporteaza DM\nRaporteaza un codat\nIntrebari despre donatii\nSunt blocat\nDoresc sa fac o afacere\nCere respawn\nAlta problema", "Select", "Close");
- SCM(playerid, COLOR_GRAD4, "Acel player nu este online!");
- return 1;
- }
- }
- switch(type) {
- case 0: {
- format(string, sizeof(string), "%s (%d) l-a raportat pe %s (%d) pentru DM.", GetName(playerid), playerid, GetName(id), id);
- SendAdminMessage(0xC9161FFF, string, 1);
- SetPVarInt(id, "Reported", 1);
- SetPVarInt(id, "ReportType", 1);
- SetPVarString(id, "ReportedBy", GetName(playerid));
- SetPVarInt(id, "ReportScore", GetPVarInt(id, "ReportScore")+1);
- }
- case 1: {
- format(string, sizeof(string), "%s (%d) l-a raportat pe %s (%d) pentru cheats.", GetName(playerid), playerid, GetName(id), id);
- SendAdminMessage(0xC9161FFF, string, 1);
- SetPVarInt(id, "Reported", 1);
- SetPVarInt(id, "ReportType", 2);
- SetPVarString(id, "ReportedBy", GetName(playerid));
- SetPVarInt(id, "ReportScore", GetPVarInt(id, "ReportScore")+1);
- }
- case 6: {
- if(CuvinteCheie(inputtext)) {
- new time = 2;
- PlayerInfo[playerid][pReportTime] += time*60;
- Update(playerid, pReportTimex);
- format(string, sizeof(string), "Ai primit mute pe /report pentru %d minute! Motiv: Report aiurea.", time);
- SCM(playerid, -1, string);
- format(string, sizeof(string), "AdmBot: %s a primit mute %d minute pe /report de la AdmBot, motiv: Report aiurea.", GetName(playerid), time);
- SCMTA(COLOR_LIGHTRED, string);
- return 1;
- }
- else {
- format(string, sizeof(string), "Report de la %s (ID: %d, lvl: %d): %s.", GetName(playerid), playerid, PlayerInfo[playerid][pLevel], inputtext);
- SendAdminMessage(0xC9161FFF, string, 1);
- SetPVarInt(playerid, "Reported", 1);
- SetPVarInt(playerid, "ReportType", 6);
- SetPVarString(playerid, "ReportText", inputtext);
- }
- }
- }
- if(ReportTimer[playerid] != 0) {
- KillTimer(ReportTimer[playerid]);
- ReportTimer[playerid] = 0;
- }
- PlayerInfo[playerid][pReportTime] = 120;
- Ajutor[playerid] = 1;
- ReportTimer[playerid] = SetTimerEx("CheckReport", 300000, 0, "%d", playerid);
- SCM(playerid, COLOR_YELLOW, "Reportul tau a fost trimis adminilor.");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement