Jump to content

danuts

Membru
  • Posts

    122
  • Joined

  • Last visited

  • Days Won

    2

Community Answers

  1. danuts's post in Erori was marked as the answer   
    Dialog:DIALOG_REPORT_CHEATER(playerid, response, listitem, inputtext[]) { if(!response) return true; if(Iter_Count(Reports) >= MAX_REPORTS) return SCM(playerid, COLOR_LGREEN, "There are too many reports in queue. Please wait..."); if(Iter_Contains(ServerAdmins, playerid)) return SCM(playerid, COLOR_WHITE, "YOu are an admin, you can't use this command."); if(!Iter_Count(ServerAdmins)) return SCM(playerid, COLOR_GREY, "There are no admins connected."); if(PlayerInfo[playerid][pReportMute] > gettime()) return SCMF(playerid, COLOR_LGREEN, "You need to wait %d seconds before using this command again.", (PlayerInfo[playerid][pReportMute] - gettime())); if(isnull(inputtext)) return Dialog_Show(playerid, DIALOG_REPORT_CHEATER, DIALOG_STYLE_INPUT, "Report type: Cheater", "Scrie mai jos numele sau id-ul jucatorului care foloseste cheats:", "Select", "Close"); new userid = INVALID_PLAYER_ID; if(!IsPlayerLogged(userid)) return Dialog_Show(playerid, DIALOG_REPORT_CHEATER, DIALOG_STYLE_INPUT, "Report type: Cheater", "Scrie mai jos numele sau id-ul jucatorului care foloseste cheats:\n{AFAFAF}* Jucatorul nu este conectat.", "Select", "Close"); if(userid == playerid) return Dialog_Show(playerid, DIALOG_REPORT_CHEATER, DIALOG_STYLE_INPUT, "Report type: Cheater", "Scrie mai jos numele sau id-ul jucatorului care foloseste cheats:\n{AFAFAF}* Nu poti sa iti dai singur report.", "Select", "Close"); if(Iter_Contains(ServerAdmins, userid)) return Dialog_Show(playerid, DIALOG_REPORT_CHEATER, DIALOG_STYLE_INPUT, "Report type: Cheater", "Scrie mai jos numele sau id-ul jucatorului care foloseste cheats:\n{AFAFAF}* Nu poti sa raportezi un admin.", "Select", "Close"); new id = (Iter_Count(Reports) + 1); ReportInfo[id][reportID] = playerid; ReportInfo[id][reportPlayer] = userid; ReportInfo[id][reportType] = REPORT_TYPE_CHEATER; ReportInfo[id][reportTimer] = defer ExpirationReport(id); format(ReportInfo[id][reportText], 128, "%s is maybe using cheats.", GetName(userid)); Iter_Add(Reports, id); SCM(playerid, COLOR_YELLOW, "Jucatorul a fost raportat cu succes catre admini! Daca se suspecteaza ca foloseste cheats, o sa fie sanctionat in cel mai scurt timp posibil!"); SendAdmin(COLOR_DARKNICERED, "Report by %s (ID: %d, Level: %d): %s", GetName(playerid), playerid, PlayerInfo[playerid][pLevel], ReportInfo[id][reportText]); PlayerInfo[playerid][pReportMute] = (gettime() + 120); return true; } Ai uitat să pui cele două paranteze pătrate in header-ul „Dialog:”.
     
    P.S.: Data viitoare pune codul in code-block, te rog.
  2. danuts's post in Problema Compilare Pawno was marked as the answer   
    Din câte am înțeles de aici, foreach și YSI nu ar trebui folosite împreună. Încearcă să adaugi un comment (//) la #include <foreach> și apoi vezi dacă mai ai aceste warning-uri.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.