/[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 28 by cstrike, Tue Dec 9 07:21:03 2008 UTC revision 29 by cstrike, Thu Dec 11 21:59:28 2008 UTC
# Line 494  Line 494 
494                          console_print(0, "%L", LANG_PLAYER, "DMAP_TIMELIMIT_CHANGED", floatround(get_cvar_float("mp_timelimit")));                          console_print(0, "%L", LANG_PLAYER, "DMAP_TIMELIMIT_CHANGED", floatround(get_cvar_float("mp_timelimit")));
495                  }                  }
496  #if defined DEDICATED_LOG_ENABLED  #if defined DEDICATED_LOG_ENABLED
497                  log_to_file(logfilename, "Time limit changed to %d To enable vote to occur now", floatround(get_cvar_float("mp_timelimit")));                  log_to_file(logfilename, "Time limit changed to %d to enable vote to occur now", floatround(get_cvar_float("mp_timelimit")));
498  #endif  #endif
499          } else {          } else {
500                  console_print(0, "%L", LANG_PLAYER, "DMAP_TIMELIMIT_NOTCHANGED");                  console_print(0, "%L", LANG_PLAYER, "DMAP_TIMELIMIT_NOTCHANGED");
# Line 625  Line 625 
625                  new players[32], inum;                  new players[32], inum;
626                  get_players(players, inum, "c");                  get_players(players, inum, "c");
627                  if (quiet != 2) {                  if (quiet != 2) {
                         new whenChange[40];  
                         if (get_cvar_float("enforce_timelimit") == 1.0 && is_cstrike) {  
                                 formatex(whenChange, 39, "%L", LANG_PLAYER, "DMAP_IN_SECONDS", timeleft);  
                         } else {  
                                 formatex(whenChange, 39, "%L", LANG_PLAYER, "DMAP_SHORTLY");  
                         }  
                         set_hudmessage(222, 70,0, -1.0, 0.36, 0, 4.0, 10.0, 2.0, 2.0, 4);  
628                          if (timeleft <= 0 || timeleft > 300) {                          if (timeleft <= 0 || timeleft > 300) {
629                                    set_hudmessage(222, 70,0, -1.0, 0.36, 0, 4.0, 10.0, 2.0, 2.0, 4);
630                                  show_hudmessage(0, "%L", LANG_PLAYER, "DMAP_MAP_WINS", nmaps[nnextmaps[b]], nvotes[b], timeleft);                                  show_hudmessage(0, "%L", LANG_PLAYER, "DMAP_MAP_WINS", nmaps[nnextmaps[b]], nvotes[b], timeleft);
631                          } else {                          } else {
                                 if (iscustommap(nmaps[nnextmaps[b]]) && usestandard) {  
632                                          set_hudmessage(0, 152, 255, -1.0, 0.22, 0, 4.0, 7.0, 2.1, 1.5, 4);                                          set_hudmessage(0, 152, 255, -1.0, 0.22, 0, 4.0, 7.0, 2.1, 1.5, 4);
633                                          show_hudmessage(0, "%L", LANG_PLAYER, "DMAP_MAP_WINS2", nmaps[nnextmaps[b]], nvotes[b], whenChange);                                  if (get_cvar_float("enforce_timelimit") == 1.0 && is_cstrike) {
634                                          //set_hudmessage(0, 152, 255, -1.0, 0.38, 0, 4.0, 7.0, 2.1, 1.5, 7);                                          show_hudmessage(0, "%L %L", LANG_PLAYER, "DMAP_MAP_WINS2", nmaps[nnextmaps[b]], nvotes[b], LANG_PLAYER, "DMAP_IN_SECONDS", timeleft);
                                         client_print(0, print_notify, "%L", LANG_PLAYER, "DMAP_DOWNLOAD_CUSTOM_MAP");  
635                                  } else {                                  } else {
636                                          set_hudmessage(0, 152, 255, -1.0, 0.22, 0, 4.0, 7.0, 2.1, 1.5, 4);                                          show_hudmessage(0, "%L %L", LANG_PLAYER, "DMAP_MAP_WINS2", nmaps[nnextmaps[b]], nvotes[b], LANG_PLAYER, "DMAP_SHORTLY");
637                                          show_hudmessage(0, "%L", LANG_PLAYER, "DMAP_MAP_WINS2", nmaps[nnextmaps[b]], nvotes[b], whenChange);                                  }
638                                    if (iscustommap(nmaps[nnextmaps[b]]) && usestandard) {
639                                            client_print(0, print_notify, "%L", LANG_PLAYER, "DMAP_DOWNLOAD_CUSTOM_MAP");
640                                  }                                  }
641                          }                          }
642                          if ((containi(mapsurl, "www") != -1 || containi(mapsurl, "http") != -1) && iscustommap(nmaps[nnextmaps[b]])) {                          if ((containi(mapsurl, "www") != -1 || containi(mapsurl, "http") != -1) && iscustommap(nmaps[nnextmaps[b]])) {
# Line 1021  Line 1015 
1015    
1016          new string[256], string2[256], string3[512];          new string[256], string2[256], string3[512];
1017          if (nmaps_num < 1) {          if (nmaps_num < 1) {
1018                  formatex(string3, 511, "%L", LANG_PLAYER, "DMAP_NO_MAPS_NOMINATED");                  formatex(string3, 511, "%L", LANG_SERVER, "DMAP_NO_MAPS_NOMINATED");
1019          } else {          } else {
1020                  new n = 0, foundone = 0;                  new n = 0, foundone = 0;
1021                  formatex(string, 255, "%L", LANG_PLAYER, "DMAP_NOMINATIONS");                  formatex(string, 255, "%L", LANG_SERVER, "DMAP_NOMINATIONS");
1022                  while (n < 3 && n < nmaps_num) {                  while (n < 3 && n < nmaps_num) {
1023                          formatex(string, 255, "%s   %s", string, nmaps[n++]);                          formatex(string, 255, "%s   %s", string, nmaps[n++]);
1024                  }                  }
# Line 1044  Line 1038 
1038    
1039  public listnominations(id) {  public listnominations(id) {
1040          if (get_pcvar_num(nominations_allowed) == 1) {          if (get_pcvar_num(nominations_allowed) == 1) {
1041                  new a = 0, string3[512], string1[128], temp[256];                  new a = 0, string3[512], string1[96], name1[33];
1042                  if (a < nmaps_num) {                  if (a < nmaps_num) {
1043                          //show_hudmessage(id, "The following maps have been nominated for the next map vote:");                          //show_hudmessage(id, "The following maps have been nominated for the next map vote:");
1044                          formatex(temp, 255, "%L", LANG_PLAYER, "DMAP_NOMINATED_MAPS");                          formatex(string3, 255, "%L", id, "DMAP_NOMINATED_MAPS");
                         add(string3, 511, temp);  
1045                  }                  }
1046                  while (a < nmaps_num) {                  while (a < nmaps_num) {
                         new name1[33];  
1047                          get_user_name(whonmaps_num[a], name1, 32);                          get_user_name(whonmaps_num[a], name1, 32);
1048                          //set_hudmessage(255, 0, 0, 0.12, 0.3 + 0.08 * float(a), 0, 15.0, 15.04, 1.5, 3.75, 2 + a);                          //set_hudmessage(255, 0, 0, 0.12, 0.3 + 0.08 * float(a), 0, 15.0, 15.04, 1.5, 3.75, 2 + a);
1049                          //show_hudmessage(id, "%s by: %s", nmaps[a], name1);                          //show_hudmessage(id, "%s by: %s", nmaps[a], name1);
1050                          formatex(string1, 128, "%L", LANG_PLAYER, "DMAP_MAP_BY", nmaps[a], name1);                          formatex(string1, 95, "%L", id, "DMAP_MAP_BY", nmaps[a], name1);
1051                          add(string3, 511, string1, 100);                          add(string3, 511, string1, 95);
1052                          a++;                          a++;
1053                  }                  }
1054                  hudtext16(string3, random_num(0, 222), random_num(0, 111), random_num(111, 222), 300, 10, random_num(1, 4), 15, id);                  hudtext16(string3, random_num(0, 222), random_num(0, 111), random_num(111, 222), 300, 10, random_num(1, 4), 15, id);
# Line 1092  Line 1084 
1084          if (total > 0) {          if (total > 0) {
1085                  //show_hudmessage(0, "The following maps are available to nominate:^n%s", string);                  //show_hudmessage(0, "The following maps are available to nominate:^n%s", string);
1086                  new temp[256];                  new temp[256];
1087                  formatex(temp, 255, "%L", LANG_PLAYER, "DMAP_AVAILABLE_MAPS");                  formatex(temp, 255, "%L", LANG_SERVER, "DMAP_AVAILABLE_MAPS");
1088                  add(string3, 511, temp, 100);                  add(string3, 511, temp, 100);
1089                  add(string3, 511, string, 100);                  add(string3, 511, string, 100);
1090                  add(string3, 511, "^n");                  add(string3, 511, "^n");
# Line 1440  Line 1432 
1432          }          }
1433    
1434          if (cstrike_running() == 1) {          if (cstrike_running() == 1) {
1435                  pos = formatex(menu, 511, "%L", LANG_PLAYER, "DMAP_CS_MENU_TITLE");                  pos = formatex(menu, 511, "%L", LANG_SERVER, "DMAP_CS_MENU_TITLE");
1436          } else {          } else {
1437                  pos = formatex(menu, 511, "%L", LANG_PLAYER, "DMAP_MENU_TITLE");                  pos = formatex(menu, 511, "%L", LANG_SERVER, "DMAP_MENU_TITLE");
1438          }          }
1439    
1440          new dmax = (nmaps_num > maps_to_select) ? maps_to_select : nmaps_num;          new dmax = (nmaps_num > maps_to_select) ? maps_to_select : nmaps_num;
# Line 1464  Line 1456 
1456    
1457                  if (iscustommap(nmaps[nnextmaps[nmapstoch]]) && usestandard) {                  if (iscustommap(nmaps[nnextmaps[nmapstoch]]) && usestandard) {
1458                          if (cstrike_running() == 1) {                          if (cstrike_running() == 1) {
1459                                  formatex(sMenuOption, 63, "%L", LANG_PLAYER, "DMAP_CS_MENU_CUSTOM", nmapstoch + 1, nmaps[nnextmaps[nmapstoch]]);                                  formatex(sMenuOption, 63, "%L", LANG_SERVER, "DMAP_CS_MENU_CUSTOM", nmapstoch + 1, nmaps[nnextmaps[nmapstoch]]);
1460                          } else {                          } else {
1461                                  formatex(sMenuOption, 63, "%L", LANG_PLAYER, "DMAP_MENU_CUSTOM", nmapstoch + 1, nmaps[nnextmaps[nmapstoch]]);                                  formatex(sMenuOption, 63, "%L", LANG_SERVER, "DMAP_MENU_CUSTOM", nmapstoch + 1, nmaps[nnextmaps[nmapstoch]]);
1462                          }                          }
1463                  } else {        // Don't show (Custom)                  } else {        // Don't show (Custom)
1464                          formatex(sMenuOption, 63, "%d. %s", nmapstoch + 1, nmaps[nnextmaps[nmapstoch]]);                          formatex(sMenuOption, 63, "%d. %s", nmapstoch + 1, nmaps[nnextmaps[nmapstoch]]);
# Line 1505  Line 1497 
1497          new mapname[32];          new mapname[32];
1498          get_mapname(mapname, 31);          get_mapname(mapname, 31);
1499          if (!mp_winlimit && get_cvar_float("mp_timelimit") < get_cvar_float("amx_extendmap_max")) {          if (!mp_winlimit && get_cvar_float("mp_timelimit") < get_cvar_float("amx_extendmap_max")) {
1500                  formatex(sMenuOption, 63, "%L", LANG_PLAYER, "DMAP_MENU_EXTEND", maps_to_select + 1, mapname, extendint);                  formatex(sMenuOption, 63, "%L", LANG_SERVER, "DMAP_MENU_EXTEND", maps_to_select + 1, mapname, extendint);
1501                  append_vote_percent(sMenuOption, maps_to_select, true);                  append_vote_percent(sMenuOption, maps_to_select, true);
1502                  pos += formatex(menu[pos], 511, sMenuOption);                  pos += formatex(menu[pos], 511, sMenuOption);
1503    
1504                  mkeys |= (1 << maps_to_select);                  mkeys |= (1 << maps_to_select);
1505          }          }
1506    
1507          formatex(sMenuOption, 63, "%L", LANG_PLAYER, "DMAP_MENU_NONE", maps_to_select + 2);          formatex(sMenuOption, 63, "%L", LANG_SERVER, "DMAP_MENU_NONE", maps_to_select + 2);
1508          append_vote_percent(sMenuOption, maps_to_select + 1);          append_vote_percent(sMenuOption, maps_to_select + 1);
1509          formatex(menu[pos], 511, sMenuOption);          formatex(menu[pos], 511, sMenuOption);
1510    
# Line 2734  Line 2726 
2726          new helpfile[64];          new helpfile[64];
2727          formatex(helpfile, 63, "%s/map_manage_help.htm", custompath);          formatex(helpfile, 63, "%s/map_manage_help.htm", custompath);
2728          get_cvar_string("Deags_Map_Manage", myversion, 31);          get_cvar_string("Deags_Map_Manage", myversion, 31);
2729          formatex(header, 79, "%L", LANG_PLAYER, "DMAP_HELP9", myversion);          formatex(header, 79, "%L", id, "DMAP_HELP9", myversion);
2730          if (!file_exists(helpfile)) {          if (!file_exists(helpfile)) {
2731                  gen_maphelphtml();                  gen_maphelphtml();
2732          }          }

Legend:
Removed from v.28  
changed lines
  Added in v.29

Contact webmaster
ViewVC Help
Powered by ViewVC RSS 2.0 feed