/[svn]/hlds/cstrike/addons/amxmodx/scripting/deagsmapmanager.sma
ViewVC logotype

Diff of /hlds/cstrike/addons/amxmodx/scripting/deagsmapmanager.sma

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 51 by cstrike, Mon Jul 20 18:08:21 2009 UTC revision 53 by cstrike, Wed Mar 17 16:35:49 2010 UTC
# Line 31  Line 31 
31  *  *
32  *********************************************************************************  *********************************************************************************
33  *  *
34  *   Deagles Map Management v3.23  *   Deagles Map Manager v3.23
35  *   Last Update: 2009-02-16  *   Last Update: 2009-02-16
36  *  *
37  *   by Deagles/AMXX Community & Posting/Supporting by bmann_420  *   by Deagles/AMXX Community & Posting/Supporting by bmann_420
# Line 52  Line 52 
52  new const PLUGIN[]  = "DeagsMapManager";  new const PLUGIN[]  = "DeagsMapManager";
53  new const VERSION[] = "3.23SVN";  new const VERSION[] = "3.23SVN";
54  new const AUTHOR[]  = "Deags/AMXX Community";  new const AUTHOR[]  = "Deags/AMXX Community";
55  #define DMAP_EXPECTED_DV 510  #define DMAP_EXPECTED_DV 520
56    
57  // Comment out the following line to disable the dedicated log file  // Comment out the following line to disable the dedicated log file
58  #define DEDICATED_LOG_ENABLED  #define DEDICATED_LOG_ENABLED
# Line 226  Line 226 
226                          client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_NEXTMAP_VOTED", smap, timeleft);                          client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_NEXTMAP_VOTED", smap, timeleft);
227                  } else {                  } else {
228                          if (minutesleft <= 2 && timeleft) {                          if (minutesleft <= 2 && timeleft) {
229                                  client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_CURRENT_MAP", mapname);                                  client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_CURRENT_MAP_VOTE", mapname);
230                          }                          }
231                  }                  }
232          }          }
# Line 311  Line 311 
311    
312  public change_maps() {  public change_maps() {
313    
314          new map[51], curmap[51];          new map[32];
         get_mapname(curmap,50);  
315          get_pcvar_string(pEmptyMap, map, 31);          get_pcvar_string(pEmptyMap, map, 31);
316    
317          if (get_pcvar_num(pEmptymapAllowed) == 1 && strlen(map) > 0) {          if (get_pcvar_num(pEmptymapAllowed) == 1 && strlen(map) > 0) {
# Line 324  Line 323 
323          new m, iteration = 0;          new m, iteration = 0;
324          client_print(id, print_chat, "%L", id, "DMAP_LISTMAPS", totalmaps);          client_print(id, print_chat, "%L", id, "DMAP_LISTMAPS", totalmaps);
325          if (totalmaps - (50 * iteration) >= 50) {          if (totalmaps - (50 * iteration) >= 50) {
326                  console_print(id, "%L", id, "DMAP_LISTMAPS_MAPS", iteration * 50 + 1, iteration * 50 + 50);                  console_print(id, "%L", id, "DMAP_LISTMAPS_MAPS", iteration * 50 + 1, iteration * 50 + 50, totalmaps);
327          } else {          } else {
328                  console_print(id, "%L", id, "DMAP_LISTMAPS_MAPS", iteration * 50 + 1, iteration * 50 + (totalmaps - iteration * 50));                  console_print(id, "%L", id, "DMAP_LISTMAPS_MAPS", iteration * 50 + 1, iteration * 50 + (totalmaps - iteration * 50), totalmaps);
329          }          }
330    
331          for (m = 50 * iteration; (m < totalmaps && m < 50 * (iteration + 1)); m += 3)          for (m = 50 * iteration; (m < totalmaps && m < 50 * (iteration + 1)); m += 3)
# Line 357  Line 356 
356          }       //Now idreal is the real id of client          }       //Now idreal is the real id of client
357    
358          if (totalmaps - (50 * iteration) >= 50) {          if (totalmaps - (50 * iteration) >= 50) {
359                  console_print(idreal, "%L", idreal, "DMAP_LISTMAPS_MAPS", iteration * 50 + 1, iteration * 50 + 50);                  console_print(idreal, "%L", idreal, "DMAP_LISTMAPS_MAPS", iteration * 50 + 1, iteration * 50 + 50, totalmaps);
360          } else {          } else {
361                  console_print(idreal, "%L", idreal, "DMAP_LISTMAPS_MAPS", iteration * 50 + 1, iteration * 50 + (totalmaps - iteration * 50));                  console_print(idreal, "%L", idreal, "DMAP_LISTMAPS_MAPS", iteration * 50 + 1, iteration * 50 + (totalmaps - iteration * 50), totalmaps);
362          }          }
363    
364          for (m = 50 * iteration; (m < totalmaps && m < 50 * (iteration + 1)); m += 3) {          for (m = 50 * iteration; (m < totalmaps && m < 50 * (iteration + 1)); m += 3) {
# Line 401  Line 400 
400                          client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_NEXTMAP_VOTED", smap, timeleft);                          client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_NEXTMAP_VOTED", smap, timeleft);
401                  } else {                  } else {
402                          if (inprogress) {                          if (inprogress) {
403                                  client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_CURRENT_MAP", mapname);                                  client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_CURRENT_MAP_VOTE", mapname);
404                          }                          }
405                  }                  }
406          }          }
# Line 571  Line 570 
570                  return PLUGIN_HANDLED;                  return PLUGIN_HANDLED;
571          }          }
572    
         new arg[32];  
         read_argv(1, arg, 31);  
573          new kName[32], timeleft = get_timeleft();          new kName[32], timeleft = get_timeleft();
574          get_user_name(id, kName, 31);          get_user_name(id, kName, 31);
575    
# Line 606  Line 603 
603          remove_task(DMAP_TASKID_TIME_TO_VOTE);          remove_task(DMAP_TASKID_TIME_TO_VOTE);
604          remove_task(DMAP_TASKID_GET_READY);          remove_task(DMAP_TASKID_GET_READY);
605  #if defined DEDICATED_LOG_ENABLED  #if defined DEDICATED_LOG_ENABLED
606          log_to_file(logfilename, "Admin: <%s> calls rockthevote with %d seconds left on map", kName, timeleft);          log_to_file(logfilename, "ADMIN <%s> calls rockthevote with %d seconds left on map", kName, timeleft);
607  #endif  #endif
608          inprogress = 1;          inprogress = 1;
609          mselected = false;          mselected = false;
# Line 626  Line 623 
623          if (nvotes[maps_to_select] > nvotes[b]) {          if (nvotes[maps_to_select] > nvotes[b]) {
624                  new mapname[32];                  new mapname[32];
625                  get_mapname(mapname, 31);                  get_mapname(mapname, 31);
626                  new Float:steptime = get_pcvar_float(pExtendmapStep);                  new steptime = get_pcvar_num(pExtendmapStep);
627                  set_cvar_float("mp_timelimit", get_cvar_float("mp_timelimit") + steptime);                  set_cvar_float("mp_timelimit", get_cvar_float("mp_timelimit") + steptime);
                 //oldtimelimit = get_cvar_float("mp_timelimit");  
628                  istimeset = 1;                  istimeset = 1;
629    
630                  if (quiet != 2) {                  if (quiet != 2) {
# Line 640  Line 636 
636                  }                  }
637                  client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_MAP_EXTENDED2", steptime);                  client_print(0, print_chat, "%L", LANG_PLAYER, "DMAP_MAP_EXTENDED2", steptime);
638  #if defined DEDICATED_LOG_ENABLED  #if defined DEDICATED_LOG_ENABLED
639                  log_to_file(logfilename, "Vote: Voting for the nextmap finished. Map %s will be extended to next %.0f minutes", mapname, steptime);                  log_to_file(logfilename, "Vote: Voting for the nextmap finished. Map %s will be extended to next %d minutes", mapname, steptime);
640  #endif  #endif
641                  inprogress = isend = 0;                  inprogress = isend = 0;
642                  nmaps_num = nbeforefill;                  nmaps_num = nbeforefill;
# Line 1446  Line 1442 
1442  show_vote_menu(bool:bFirstTime) {  show_vote_menu(bool:bFirstTime) {
1443    
1444          new menu[512], a, mkeys = (1 << maps_to_select + 1);          new menu[512], a, mkeys = (1 << maps_to_select + 1);
1445          new Float:steptime = get_pcvar_float(pExtendmapStep);          new steptime = get_pcvar_num(pExtendmapStep);
         new extendint = floatround(steptime);  
1446    
1447          new pos;          new pos;
1448    
# Line 1525  Line 1520 
1520          new mapname[32];          new mapname[32];
1521          get_mapname(mapname, 31);          get_mapname(mapname, 31);
1522          if (!mp_winlimit && get_cvar_float("mp_timelimit") < get_pcvar_float(pExtendmapMax)) {          if (!mp_winlimit && get_cvar_float("mp_timelimit") < get_pcvar_float(pExtendmapMax)) {
1523                  formatex(sMenuOption, 63, "%L", LANG_SERVER, "DMAP_MENU_EXTEND", maps_to_select + 1, mapname, extendint);                  formatex(sMenuOption, 63, "%L", LANG_SERVER, "DMAP_MENU_EXTEND", maps_to_select + 1, mapname, steptime);
1524                  append_vote_percent(sMenuOption, maps_to_select, true);                  append_vote_percent(sMenuOption, maps_to_select, true);
1525                  pos += formatex(menu[pos], 511, sMenuOption);                  pos += formatex(menu[pos], 511, sMenuOption);
1526    
# Line 2430  Line 2425 
2425                  return PLUGIN_HANDLED;                  return PLUGIN_HANDLED;
2426          }          }
2427    
2428            if (id == 0) {
2429                    announce_config_error("dmap_rtvpercent");
2430                    return PLUGIN_HANDLED;
2431            }
2432    
2433          new arg[32];          new arg[32];
2434          read_argv(1, arg, 3);          read_argv(1, arg, 3);
2435          new Float:percentage = float(str_to_num(arg)) / 100.0;          new Float:percentage = float(str_to_num(arg)) / 100.0;
# Line 2449  Line 2449 
2449                  return PLUGIN_HANDLED;                  return PLUGIN_HANDLED;
2450          }          }
2451    
2452            if (id == 0) {
2453                    announce_config_error("dmap_rtvplayers");
2454                    return PLUGIN_HANDLED;
2455            }
2456    
2457          new arg[32];          new arg[32];
2458          read_argv(1, arg, 3);          read_argv(1, arg, 3);
2459          new players = str_to_num(arg);          new players = str_to_num(arg);
# Line 2468  Line 2473 
2473                  return PLUGIN_HANDLED;                  return PLUGIN_HANDLED;
2474          }          }
2475    
2476            if (id == 0) {
2477                    announce_config_error("dmap_rtvwait");
2478                    return PLUGIN_HANDLED;
2479            }
2480    
2481          new arg[32];          new arg[32];
2482          read_argv(1, arg, 3);          read_argv(1, arg, 3);
2483          new wait = str_to_num(arg);          new wait = str_to_num(arg);
# Line 2487  Line 2497 
2497                  return PLUGIN_HANDLED;                  return PLUGIN_HANDLED;
2498          }          }
2499    
2500            if (id == 0) {
2501                    announce_config_error("dmap_messages");
2502                    return PLUGIN_HANDLED;
2503            }
2504    
2505          new arg[32];          new arg[32];
2506          read_argv(1, arg, 3);          read_argv(1, arg, 3);
2507          new wait = str_to_num(arg);          new wait = str_to_num(arg);
# Line 2506  Line 2521 
2521                  return PLUGIN_HANDLED;                  return PLUGIN_HANDLED;
2522          }          }
2523    
2524            if (id == 0) {
2525                    announce_config_error("dmap_mapsnum");
2526                    return PLUGIN_HANDLED;
2527            }
2528    
2529          new arg[32];          new arg[32];
2530          read_argv(1, arg, 3);          read_argv(1, arg, 3);
2531          new maps = str_to_num(arg);          new maps = str_to_num(arg);
# Line 2521  Line 2541 
2541          return PLUGIN_HANDLED;          return PLUGIN_HANDLED;
2542  }  }
2543    
2544  public dmapmaxnominations(id, level, cid) {  public dmapnominations(id, level, cid) {
2545          if (!cmd_access(id, level, cid, 2)) {          if (!cmd_access(id, level, cid, 2)) {
2546                  return PLUGIN_HANDLED;                  return PLUGIN_HANDLED;
2547          }          }
2548    
2549            if (id == 0) {
2550                    announce_config_error("dmap_nominations");
2551                    return PLUGIN_HANDLED;
2552            }
2553    
2554          new arg[32];          new arg[32];
2555          read_argv(1, arg, 3);          read_argv(1, arg, 3);
2556          new thisnumber = str_to_num(arg);          new thisnumber = str_to_num(arg);
# Line 2546  Line 2571 
2571                  return PLUGIN_HANDLED;                  return PLUGIN_HANDLED;
2572          }          }
2573    
2574            if (id == 0) {
2575                    announce_config_error("dmap_maxcustom");
2576                    return PLUGIN_HANDLED;
2577            }
2578    
2579          new arg[32];          new arg[32];
2580          read_argv(1, arg, 3);          read_argv(1, arg, 3);
2581          new thisnumber = str_to_num(arg);          new thisnumber = str_to_num(arg);
# Line 2560  Line 2590 
2590          return PLUGIN_HANDLED;          return PLUGIN_HANDLED;
2591  }  }
2592    
2593  public dmapquiet(id, level, cid) {  public dmapquietmode(id, level, cid) {
2594          if (!cmd_access(id, level, cid, 2)) {          if (!cmd_access(id, level, cid, 2)) {
2595                  return PLUGIN_HANDLED;                  return PLUGIN_HANDLED;
2596          }          }
2597    
2598            if (id == 0) {
2599                    announce_config_error("dmap_quietmode");
2600                    return PLUGIN_HANDLED;
2601            }
2602    
2603          new arg[32];          new arg[32];
2604          read_argv(1, arg, 31);          read_argv(1, arg, 31);
2605          if (containi(arg, "off") != -1) {          if (containi(arg, "off") != -1) {
# Line 2590  Line 2625 
2625                  return PLUGIN_HANDLED;                  return PLUGIN_HANDLED;
2626          }          }
2627    
2628            if (id == 0) {
2629                    announce_config_error("dmap_rtvtoggle");
2630                    return PLUGIN_HANDLED;
2631            }
2632    
2633          if (enabled == 0) {          if (enabled == 0) {
2634                  console_print(id, "=========Rockthevote is now enabled==============");                  console_print(id, "=========Rockthevote is now enabled=========");
2635          } else {          } else {
2636                  console_print(id, "=========Rockthevote is not disabled=================");                  console_print(id, "=========Rockthevote is now disabled=========");
2637          }          }
2638          enabled = !enabled;          enabled = !enabled;
2639          savesettings(id);          savesettings(id);
# Line 2601  Line 2641 
2641          return PLUGIN_HANDLED;          return PLUGIN_HANDLED;
2642  }  }
2643    
2644  public changefreeze(id, level, cid) {  public dmapfreeze(id, level, cid) {
2645          if (!cmd_access(id, level, cid, 1)) {          if (!cmd_access(id, level, cid, 1)) {
2646                  return PLUGIN_HANDLED;                  return PLUGIN_HANDLED;
2647          }          }
2648    
2649            if (id == 0) {
2650                    announce_config_error("dmap_freeze");
2651                    return PLUGIN_HANDLED;
2652            }
2653    
2654          if (!bIsCstrike) {          if (!bIsCstrike) {
2655                  console_print(id, "Freeze is always off on non-Counter Strike Servers");                  console_print(id, "Freeze is always off on non-Counter Strike Servers");
2656                  return PLUGIN_HANDLED;                  return PLUGIN_HANDLED;
# Line 2635  Line 2680 
2680                  return PLUGIN_HANDLED;                  return PLUGIN_HANDLED;
2681          }          }
2682    
2683            if (id == 0) {
2684                    announce_config_error("dmap_cyclemode");
2685                    return PLUGIN_HANDLED;
2686            }
2687    
2688          if (!cycle) {          if (!cycle) {
2689                  console_print(id, "=========     Cylce mode is now ON, NO VOTE will take place!   =========");                  console_print(id, "=========     Cycle mode is now ON, NO VOTE will take place!   =========");
2690          } else {          } else {
2691                  console_print(id, "=========     Cycle Mode is already on, no change is made   =========");                  console_print(id, "=========     Cycle Mode is already on, no change is made   =========");
2692                  console_print(id, "=========     If you are trying to enable voting, use command dmap_votemode");                  console_print(id, "=========     If you are trying to enable voting, use command dmap_votemode");
# Line 2656  Line 2706 
2706                  return PLUGIN_HANDLED;                  return PLUGIN_HANDLED;
2707          }          }
2708    
2709            if (id == 0) {
2710                    announce_config_error("dmap_votemode");
2711                    return PLUGIN_HANDLED;
2712            }
2713    
2714          if (cycle) {          if (cycle) {
2715                  console_print(id, "=========     Voting mode is now ON, Votes WILL take place   =========");                  console_print(id, "=========     Voting mode is now ON, Votes WILL take place   =========");
2716          } else {          } else {
# Line 2674  Line 2729 
2729                  return PLUGIN_HANDLED;                  return PLUGIN_HANDLED;
2730          }          }
2731    
2732            if (id == 0) {
2733                    announce_config_error("dmap_banlastmaps");
2734                    return PLUGIN_HANDLED;
2735            }
2736    
2737          new arg[32];          new arg[32];
2738          read_argv(1, arg, 4);          read_argv(1, arg, 4);
2739          new banamount;          new banamount;
# Line 2701  Line 2761 
2761          if (!(get_user_flags(id) & ADMIN_MAP)) {          if (!(get_user_flags(id) & ADMIN_MAP)) {
2762                  new myversion[32];                  new myversion[32];
2763                  get_cvar_string("Deags_Map_Manage", myversion, 31);                  get_cvar_string("Deags_Map_Manage", myversion, 31);
2764                  console_print(id, "*****This server uses the plugin Deagles NextMap Management %s *****", myversion);                  console_print(id, "*****This server uses the plugin Deagles Map Manager %s *****", myversion);
2765                  console_print(id, "");                  console_print(id, "");
2766                  if (cycle) {                  if (cycle) {
2767                          console_print(id, "===================  The plugin is set to cycle mode.  No vote will take place   =================");                          console_print(id, "===================  The plugin is set to cycle mode.  No vote will take place   =================");
# Line 2725  Line 2785 
2785                  }                  }
2786                  return PLUGIN_HANDLED;                  return PLUGIN_HANDLED;
2787          }          }
2788          //For CS 1.6, the following MOTD will display nicely, for 1.5, It will show html tags.          console_print(id, "%L", id, "DMAP_MOTD_LOADING");
2789          client_print(id, print_chat, "%L", id, "DMAP_MOTD_LOADING");          client_print(id, print_chat, "%L", id, "DMAP_MOTD_LOADING");
2790          showmotdhelp(id);          showmotdhelp(id);
2791    
# Line 2781  Line 2841 
2841  showsettings(id) {  showsettings(id) {
2842    
2843          console_print(id, "-----------------------------------------------------------------------------------------------");          console_print(id, "-----------------------------------------------------------------------------------------------");
2844          console_print(id, "                 Status of Deagles Map Management Version %s", VERSION);          console_print(id, "                 Status of Deagles Map Manager Version %s", VERSION);
2845    
2846          if (cycle) {          if (cycle) {
2847                  console_print(id, "===================  Mode is Cycle Mode NO vote will take place   =================");                  console_print(id, "===================  Mode is Cycle Mode NO vote will take place   =================");
# Line 2841  Line 2901 
2901                  console_print(id, "URL to download maps from will not be shown (dmap_mapsurl)");                  console_print(id, "URL to download maps from will not be shown (dmap_mapsurl)");
2902          }          }
2903          console_print(id, "------------------------------------------------------------------------------------------------");          console_print(id, "------------------------------------------------------------------------------------------------");
2904          console_print(id, "Commands: dmap_status; dmap_cyclemode; dmap_votemode; dmap_quietmode <OFF|NOSOUND|SILENT>;");          console_print(id, "Commands: dmap_banlastmaps <n>; dmap_cyclemode; dmap_default; dmap_freeze <ON|OFF>; dmap_mapsnum <n>;");
2905          console_print(id, "Commands: dmap_banlastmaps <n>; dmap_default ; dmap_mapsurl <url>; dmap_mapsnum <n>; dmap_maxcustom <n>;");          console_print(id, "Commands: dmap_mapsurl <url>; dmap_maxcustom <n>; dmap_messages <n(minutes)>; dmap_nominate <map>;");
2906          console_print(id, "Commands: dmap_rtvtoggle; dmap_rtvpercent <n>; dmap_rtvplayers <n>; dmap_rtvwait <n>;");          console_print(id, "Commands: dmap_nominations <n>; dmap_quietmode <OFF|NOSOUND|SILENT>; dmap_rockthevote; dmap_rtvpercent <n>;");
2907          console_print(id, "Commands: dmap_rockthevote; dmap_freeze; dmap_nominations <n>; dmap_messages <n(minutes)>;");          console_print(id, "Commands: dmap_rtvplayers <n>; dmap_rtvtoggle; dmap_rtvwait <n>; dmap_status; dmap_votemode;");
2908          console_print(id, "Cvars:    amx_emptymap <map>; amx_idletime <n>; amx_staytime <n>; dmap_strict <0|1>;");          console_print(id, "Cvars:    amx_emptymap <map>; amx_idletime <n>; amx_staytime <n>; dmap_strict <0|1>;");
2909          console_print(id, "Cvars:    emptymap_allowed <0|1>; enforce_timelimit <0|1>; amx_extendmap_max <n>; amx_extendmap_step <n>;");          console_print(id, "Cvars:    emptymap_allowed <0|1>; enforce_timelimit <0|1>; amx_extendmap_max <n>; amx_extendmap_step <n>;");
2910          console_print(id, "Cvars:    nominations_allowed <0|1>; weapon_delay <0|1>");          console_print(id, "Cvars:    nominations_allowed <0|1>; weapon_delay <0|1>");
# Line 3011  Line 3071 
3071                  return PLUGIN_HANDLED;                  return PLUGIN_HANDLED;
3072          }          }
3073    
3074            if (id == 0) {
3075                    announce_config_error("dmap_mapsurl");
3076                    return PLUGIN_HANDLED;
3077            }
3078    
3079          new arg[64];          new arg[64];
3080          read_argv(1, arg, 63);          read_argv(1, arg, 63);
3081          if (equali(arg, "http")) {          if (equali(arg, "http")) {
# Line 3064  Line 3129 
3129          isbuytime = 0;          isbuytime = 0;
3130  }  }
3131    
3132  public list_maps2() {  public listmaps_override(id) {
3133          messagemaps();          //TODO: if some cvar = 0 then return
3134            list_maps(id);
3135            return PLUGIN_HANDLED;
3136  }  }
3137    
3138  public list_maps3() {  public votemap_override(id) {
3139          messagenominated();          console_print(id, "%L", id, "DMAP_COMMAND_DISABLED");
3140            return PLUGIN_HANDLED;
3141  }  }
3142    
3143  public listmaps_override(id) {  public say_currentmap(id) {
3144          //TODO: if some cvar = 0 then return          new mapname[32];
3145          list_maps(id);          get_mapname(mapname, 31);
3146            client_print(id, print_chat, "%L", id, "DMAP_CURRENT_MAP", mapname);
3147            return PLUGIN_HANDLED;
3148    }
3149    
3150    public say_recentmaps(id) {
3151            if (bannedsofar <= 1) {
3152                    client_print(id, print_chat, "%L", id, "DMAP_RECENT_NONE");
3153                    return PLUGIN_HANDLED;
3154            }
3155    
3156            new sMaps[192];
3157            for (new i=1; i < bannedsofar; i++) {   // Start at 1 to skip current map
3158                    if (i == 1) {
3159                            formatex(sMaps, 31, "%s", lastmaps[i]);
3160                    } else {
3161                            format(sMaps, 191, "%s, %s", sMaps, lastmaps[i]);
3162                    }
3163            }
3164            client_print(id, print_chat, "%L", id, "DMAP_RECENT_MAPS", sMaps);
3165    
3166          return PLUGIN_HANDLED;          return PLUGIN_HANDLED;
3167  }  }
3168    
3169    
3170  public check_conflict() {  public check_conflict() {
3171          new sDV[8], iDV, bRepeat;          new sDV[8], iDV, bRepeat;
3172    
# Line 3123  Line 3212 
3212          client_print(0, print_chat, "[DMM] CONFLICT DETECTED! Disable %s in plugins.ini.", sPlugin);          client_print(0, print_chat, "[DMM] CONFLICT DETECTED! Disable %s in plugins.ini.", sPlugin);
3213  }  }
3214    
3215  public ff_status(id) {  announce_config_error(sCommand[]) {
3216            console_print(0, "[DMM] ERROR: The %s command does not belong in any config file.", sCommand);
3217            console_print(0, "[DMM] If you really want to run this command, do it from a client console.");
3218    }
3219    
3220    public say_ff(id) {
3221          client_print(id, print_chat, "%L: %L", LANG_PLAYER, "DMAP_FRIEND_FIRE", LANG_PLAYER, get_cvar_num("mp_friendlyfire") ? "ON" : "OFF");          client_print(id, print_chat, "%L: %L", LANG_PLAYER, "DMAP_FRIEND_FIRE", LANG_PLAYER, get_cvar_num("mp_friendlyfire") ? "ON" : "OFF");
3222          return PLUGIN_CONTINUE;          return PLUGIN_CONTINUE;
3223  }  }
# Line 3143  Line 3237 
3237          register_clcmd("say", "HandleSay", 0, "Say: vote mapname, nominate mapname, or just mapname to nominate a map, say: nominations");          register_clcmd("say", "HandleSay", 0, "Say: vote mapname, nominate mapname, or just mapname to nominate a map, say: nominations");
3238          register_clcmd("say rockthevote", "rock_the_vote", 0, "Rocks the Vote");          register_clcmd("say rockthevote", "rock_the_vote", 0, "Rocks the Vote");
3239          register_clcmd("say rtv", "rock_the_vote", 0, "Rocks the Vote");          register_clcmd("say rtv", "rock_the_vote", 0, "Rocks the Vote");
3240          register_clcmd("say ff", "ff_status", 0, "Displays friendly fire status");          register_clcmd("say ff", "say_ff", 0, "Displays friendly fire status");
3241          register_clcmd("say listmaps", "list_maps", 0, "Lists all maps in a window and in console");          register_clcmd("say listmaps", "list_maps", 0, "Lists all maps in the console");
3242          register_clcmd("say nextmap", "say_nextmap", 0, "Shows nextmap information to players");          register_clcmd("say nextmap", "say_nextmap", 0, "Shows nextmap information to players");
3243            register_clcmd("say currentmap", "say_currentmap", 0, "Shows name of the current map");
3244            register_clcmd("say recentmaps", "say_recentmaps", 0, "Shows names of recently played maps");
3245            register_clcmd("votemap", "votemap_override", 0, "Override for votemap command in GoldSrc engine");
3246          register_concmd("dmap_help", "dmaphelp", 0, "Shows on-screen help information about Map Plugin");          register_concmd("dmap_help", "dmaphelp", 0, "Shows on-screen help information about Map Plugin");
3247          register_concmd("dmap_status", "dmapstatus", ADMIN_DMAP, "Shows settings/status/help of the map management variables");          register_concmd("dmap_status", "dmapstatus", ADMIN_DMAP, "Shows settings/status/help of the map management variables");
3248          register_concmd("dmap_votemode", "dmapvotemode", ADMIN_SUPER_DMAP, "Enables Voting (This is default mode)");          register_concmd("dmap_votemode", "dmapvotemode", ADMIN_SUPER_DMAP, "Enables Voting (This is default mode)");
3249          register_concmd("dmap_cyclemode", "dmapcyclemode", ADMIN_SUPER_DMAP, "Disables Voting (To restore voting use dmap_votemode)");          register_concmd("dmap_cyclemode", "dmapcyclemode", ADMIN_SUPER_DMAP, "Disables Voting (To restore voting use dmap_votemode)");
3250          register_concmd("dmap_banlastmaps", "dmapbanlastmaps", ADMIN_SUPER_DMAP, "Bans the last <n> maps played from being voted (0-99)");          register_concmd("dmap_banlastmaps", "dmapbanlastmaps", ADMIN_SUPER_DMAP, "Bans the last <n> maps played from being voted (0-99)");
3251          register_concmd("dmap_quietmode", "dmapquiet", ADMIN_SUPER_DMAP, "Usage: <OFF|NOSOUND|SILENT>");          register_concmd("dmap_quietmode", "dmapquietmode", ADMIN_SUPER_DMAP, "Usage: <OFF|NOSOUND|SILENT>");
3252          register_concmd("dmap_freeze", "changefreeze", ADMIN_SUPER_DMAP, "Toggles Freeze/Drop at end of round ON|off");          register_concmd("dmap_freeze", "dmapfreeze", ADMIN_SUPER_DMAP, "Toggles Freeze/Drop at end of round ON|off");
3253          register_concmd("dmap_messages", "dmapmessages", ADMIN_SUPER_DMAP, "Sets the time interval in minutes between messages");          register_concmd("dmap_messages", "dmapmessages", ADMIN_SUPER_DMAP, "Sets the time interval in minutes between messages");
3254          register_concmd("dmap_rtvtoggle", "dmaprtvtoggle", ADMIN_SUPER_DMAP, "Toggles on|off Ability of players to use rockthevote");          register_concmd("dmap_rtvtoggle", "dmaprtvtoggle", ADMIN_SUPER_DMAP, "Toggles on|off Ability of players to use rockthevote");
3255          register_concmd("dmap_rockthevote", "admin_rockit", ADMIN_DMAP, "(option: now) Allows admins to force a vote");          register_concmd("dmap_rockthevote", "admin_rockit", ADMIN_DMAP, "Allows admins to force a vote");
3256          register_concmd("amx_rockthevote", "admin_rockit", ADMIN_DMAP, "(option: now) Allows admins to force a vote");          register_concmd("amx_rockthevote", "admin_rockit", ADMIN_DMAP, "Allows admins to force a vote");
3257          register_concmd("amx_rtv", "admin_rockit", ADMIN_DMAP, "(option: now) Allows admins to force a vote");          register_concmd("amx_rtv", "admin_rockit", ADMIN_DMAP, "Allows admins to force a vote");
3258          register_concmd("dmap_rtvpercent", "dmaprtvpercent", ADMIN_SUPER_DMAP, "Set the percent (3-100) of players for a rtv");          register_concmd("dmap_rtvpercent", "dmaprtvpercent", ADMIN_SUPER_DMAP, "Set the percent (3-100) of players for a rtv");
3259          register_concmd("dmap_rtvplayers", "dmaprtvplayers", ADMIN_SUPER_DMAP, "Sets the minimum number of players needed to rockthevote");          register_concmd("dmap_rtvplayers", "dmaprtvplayers", ADMIN_SUPER_DMAP, "Sets the minimum number of players needed to rockthevote");
3260          register_concmd("dmap_rtvwait", "dmaprtvwait", ADMIN_SUPER_DMAP, "Sets the minimum time before rockthevote can occur (5-30)");          register_concmd("dmap_rtvwait", "dmaprtvwait", ADMIN_SUPER_DMAP, "Sets the minimum time before rockthevote can occur (5-30)");
3261          register_concmd("dmap_default", "dmapdefaults", ADMIN_SUPER_DMAP, "Will restore settings to default");          register_concmd("dmap_default", "dmapdefaults", ADMIN_SUPER_DMAP, "Will restore settings to default");
3262          register_concmd("dmap_mapsurl", "dmapmapsurl", ADMIN_SUPER_DMAP, "Specify what website to get custom maps from");          register_concmd("dmap_mapsurl", "dmapmapsurl", ADMIN_SUPER_DMAP, "Specify what website to get custom maps from");
3263          register_concmd("dmap_mapsnum", "dmapmapsnum", ADMIN_SUPER_DMAP, "Set number of maps in vote (will not take effect until next map");          register_concmd("dmap_mapsnum", "dmapmapsnum", ADMIN_SUPER_DMAP, "Set number of maps in vote (will not take effect until next map");
3264          register_concmd("dmap_nominations", "dmapmaxnominations", ADMIN_SUPER_DMAP, "Set maximum number of nominations for each person");          register_concmd("dmap_nominations", "dmapnominations", ADMIN_SUPER_DMAP, "Set maximum number of nominations for each person");
3265          register_concmd("dmap_maxcustom", "dmapmaxcustom", ADMIN_SUPER_DMAP, "Set maximum number of custom nominations that may be made");          register_concmd("dmap_maxcustom", "dmapmaxcustom", ADMIN_SUPER_DMAP, "Set maximum number of custom nominations that may be made");
3266          register_concmd("dmap_cancelvote", "dmapcancelvote", ADMIN_DMAP, "Cancels the rocked vote");          register_concmd("dmap_cancelvote", "dmapcancelvote", ADMIN_DMAP, "Cancels the rocked vote");
3267          register_concmd("dmap_nominate", "dmapnominate", ADMIN_DMAP, "<mapname> - Force nomination of a map by an admin");          register_concmd("dmap_nominate", "dmapnominate", ADMIN_DMAP, "<mapname> - Force nomination of a map by an admin");

Legend:
Removed from v.51  
changed lines
  Added in v.53

Contact webmaster
ViewVC Help
Powered by ViewVC RSS 2.0 feed