hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2025.08.08. 06:42



Jelenlévő felhasználók

Jelenleg 358 felhasználó van jelen :: 2 regisztrált, 0 rejtett és 356 vendég

A legtöbb felhasználó (2883 fő) 2025.07.30. 16:00-kor tartózkodott itt.

Regisztrált felhasználók: Bing [Bot], Google [Bot]az elmúlt 5 percben aktív felhasználók alapján

Utoljára aktív
Ahhoz hogy lásd ki volt utoljára aktív, be kell jelentkezned.



Az oldal teljeskörű
használatához regisztrálj.

Regisztráció

Kereső


Új téma nyitása Hozzászólás a témához  [5 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Mi lehet a baj?
HozzászólásElküldve:2012.06.03. 22:20 
Offline
Őstag
Avatar

Csatlakozott:2011.11.15. 16:29
Hozzászólások:1142
Megköszönt másnak: 8 alkalommal
Megköszönték neki: 24 alkalommal
Kód:
  1. /*================================================================================

  2.        

  3.         ----------------------

  4.         -*- [ZP] Main Menu -*-

  5.         ----------------------

  6.        

  7.         This plugin is part of Zombie Plague Mod and is distributed under the

  8.         terms of the GNU General Public License. Check ZP_ReadMe.txt for details.

  9.        

  10. ================================================================================*/

  11.  

  12. #include <amxmodx>

  13. #include <amxmisc>

  14. #include <fakemeta>

  15. #define LIBRARY_BUYMENUS "zp50_buy_menus"

  16. #include <zp50_buy_menus>

  17. #define LIBRARY_ZOMBIECLASSES "zp50_class_zombie"

  18. #include <zp50_class_zombie>

  19. #define LIBRARY_HUMANCLASSES "zp50_class_human"

  20. #include <zp50_class_human>

  21. #define LIBRARY_ITEMS "zp50_items"

  22. #include <zp50_items>

  23. #define LIBRARY_ADMIN_MENU "zp50_admin_menu"

  24. #include <zp50_admin_menu>

  25. #define LIBRARY_RANDOMSPAWN "zp50_random_spawn"

  26. #include <zp50_random_spawn>

  27. #include <zp50_colorchat>

  28.  

  29. #define TASK_WELCOMEMSG 100

  30.  

  31. // CS Player PData Offsets (win32)

  32. const OFFSET_CSMENUCODE = 205

  33.  

  34. // Menu keys

  35. const KEYSMENU = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_8|MENU_KEY_9|MENU_KEY_0

  36.  

  37. #define flag_get(%1,%2) (%1 & (1 << (%2 & 31)))

  38. #define flag_get_boolean(%1,%2) (flag_get(%1,%2) ? true : false)

  39. #define flag_set(%1,%2) %1 |= (1 << (%2 & 31))

  40. #define flag_unset(%1,%2) %1 &= ~(1 << (%2 & 31))

  41.  

  42. new g_ChooseTeamOverrideActive

  43.  

  44. new cvar_buy_custom_primary, cvar_buy_custom_secondary, cvar_buy_custom_grenades

  45. new cvar_random_spawning

  46.  

  47. public plugin_init()

  48. {

  49.         register_plugin("[ZP] Main Menu", ZP_VERSION_STRING, "ZP Dev Team")

  50.        

  51.         register_event("HLTV", "event_round_start", "a", "1=0", "2=0")

  52.        

  53.         register_clcmd("chooseteam", "clcmd_chooseteam")

  54.        

  55.         register_clcmd("say /zpmenu", "clcmd_zpmenu")

  56.         register_clcmd("say zpmenu", "clcmd_zpmenu")

  57.        

  58.         // Menus

  59.         register_menu("Main Menu", KEYSMENU, "menu_main")

  60. }

  61.  

  62. public plugin_natives()

  63. {

  64.         set_module_filter("module_filter")

  65.         set_native_filter("native_filter")

  66. }

  67. public module_filter(const module[])

  68. {

  69.         if (equal(module, LIBRARY_BUYMENUS) || equal(module, LIBRARY_ZOMBIECLASSES) || equal(module, LIBRARY_HUMANCLASSES) || equal(module, LIBRARY_ITEMS) || equal(module, LIBRARY_ADMIN_MENU) || equal(module, LIBRARY_RANDOMSPAWN))

  70.                 return PLUGIN_HANDLED;

  71.        

  72.         return PLUGIN_CONTINUE;

  73. }

  74. public native_filter(const name[], index, trap)

  75. {

  76.         if (!trap)

  77.                 return PLUGIN_HANDLED;

  78.        

  79.         return PLUGIN_CONTINUE;

  80. }

  81.  

  82. public plugin_cfg()

  83. {

  84.         cvar_buy_custom_primary = get_cvar_pointer("zp_buy_custom_primary")

  85.         cvar_buy_custom_secondary = get_cvar_pointer("zp_buy_custom_secondary")

  86.         cvar_buy_custom_grenades = get_cvar_pointer("zp_buy_custom_grenades")

  87.         cvar_random_spawning = get_cvar_pointer("zp_random_spawning_csdm")

  88. }

  89.  

  90. // Event Round Start

  91. public event_round_start()

  92. {

  93.         // Show main menu message

  94.         remove_task(TASK_WELCOMEMSG)

  95.         set_task(2.0, "task_welcome_msg", TASK_WELCOMEMSG)

  96. }

  97.  

  98. // Welcome Message Task

  99. public task_welcome_msg()

  100. {

  101.         zp_colored_print(0, "[**.*] - ^x04Zombie Plague %s^x01 ", ZP_VERSION_STR_LONG)

  102.         zp_colored_print(0, "%L", LANG_PLAYER, "NOTICE_INFO1")

  103. }

  104.  

  105. public clcmd_chooseteam(id)

  106. {

  107.         if (flag_get(g_ChooseTeamOverrideActive, id))

  108.         {

  109.                 show_menu_main(id)

  110.                 return PLUGIN_HANDLED;

  111.         }

  112.        

  113.         flag_set(g_ChooseTeamOverrideActive, id)

  114.         return PLUGIN_CONTINUE;

  115. }

  116.  

  117. public clcmd_zpmenu(id)

  118. {

  119.         show_menu_main(id)

  120. }

  121.  

  122. public client_putinserver(id)

  123. {

  124.         flag_set(g_ChooseTeamOverrideActive, id)

  125. }

  126.  

  127. // Main Menu

  128. show_menu_main(id)

  129. {

  130.         static menu[250]

  131.         new len

  132.        

  133.         // Title

  134.         len += formatex(menu[len], charsmax(menu) - len, "\r[**.*]\y Zombie Plague %s^n^n", ZP_VERSION_STR_LONG)

  135.        

  136.         // 1. Buy menu

  137.         if (LibraryExists(LIBRARY_BUYMENUS, LibType_Library) && (get_pcvar_num(cvar_buy_custom_primary)

  138.         || get_pcvar_num(cvar_buy_custom_secondary) || get_pcvar_num(cvar_buy_custom_grenades)) && is_user_alive(id))

  139.                 len += formatex(menu[len], charsmax(menu) - len, "\r1.\w %L^n", id, "MENU_BUY")

  140.         else

  141.                 len += formatex(menu[len], charsmax(menu) - len, "\d1. %L^n", id, "MENU_BUY")

  142.        

  143.         // 2. Extra Items

  144.         if (LibraryExists(LIBRARY_ITEMS, LibType_Library) && is_user_alive(id))

  145.                 len += formatex(menu[len], charsmax(menu) - len, "\r2.\w %L^n", id, "MENU_EXTRABUY")

  146.         else

  147.                 len += formatex(menu[len], charsmax(menu) - len, "\d2. %L^n", id, "MENU_EXTRABUY")

  148.        

  149.         // 3. Zombie class

  150.         if (LibraryExists(LIBRARY_ZOMBIECLASSES, LibType_Library) && zp_class_zombie_get_count() > 1)

  151.                 len += formatex(menu[len], charsmax(menu) - len, "\r3.\w %L^n", id, "MENU_ZCLASS")

  152.         else

  153.                 len += formatex(menu[len], charsmax(menu) - len, "\d3. %L^n", id, "MENU_ZCLASS")

  154.        

  155.         // 4. Human class

  156.         if (LibraryExists(LIBRARY_HUMANCLASSES, LibType_Library) && zp_class_human_get_count() > 1)

  157.                 len += formatex(menu[len], charsmax(menu) - len, "\r4.\w %L^n", id, "MENU_HCLASS")

  158.         else

  159.                 len += formatex(menu[len], charsmax(menu) - len, "\d4. %L^n", id, "MENU_HCLASS")

  160.        

  161.         // 5. Unstuck

  162.         len += formatex(menu[len], charsmax(menu) - len, "\r6.\w %L^n^n", id, "MENU_BIND")

  163.        

  164.         // 6. Help

  165.         len += formatex(menu[len], charsmax(menu) - len, "\r6.\w %L^n^n", id, "MENU_INFO")

  166.        

  167.         // 7. Choose Team

  168.         len += formatex(menu[len], charsmax(menu) - len, "\r7.\w %L^n^n", id, "MENU_CHOOSE_TEAM")

  169.        

  170.         // 9. Admin menu

  171.         if (LibraryExists(LIBRARY_ADMIN_MENU, LibType_Library) && is_user_admin(id))

  172.                 len += formatex(menu[len], charsmax(menu) - len, "\r9.\w %L", id, "MENU_ADMIN")

  173.         else

  174.                 len += formatex(menu[len], charsmax(menu) - len, "\d9. %L", id, "MENU_ADMIN")

  175.        

  176.         // 0. Exit

  177.         len += formatex(menu[len], charsmax(menu) - len, "^n^n\r0.\w %L", id, "MENU_EXIT")

  178.        

  179.         // Fix for AMXX custom menus

  180.         set_pdata_int(id, OFFSET_CSMENUCODE, 0)

  181.         show_menu(id, KEYSMENU, menu, -1, "Main Menu")

  182. }

  183.  

  184. // Main Menu

  185. public menu_main(id, key)

  186. {

  187.         // Player disconnected?

  188.         if (!is_user_connected(id))

  189.                 return PLUGIN_HANDLED;

  190.        

  191.         switch (key)

  192.         {

  193.                 case 0: // Buy Menu

  194.                 {

  195.                         // Custom buy menus enabled?

  196.                         if (LibraryExists(LIBRARY_BUYMENUS, LibType_Library) && (get_pcvar_num(cvar_buy_custom_primary)

  197.                         || get_pcvar_num(cvar_buy_custom_secondary) || get_pcvar_num(cvar_buy_custom_grenades)))

  198.                         {

  199.                                 // Check whether the player is able to buy anything

  200.                                 if (is_user_alive(id))

  201.                                         zp_buy_menus_show(id)

  202.                                 else

  203.                                         zp_colored_print(id, "%L", id, "CANT_BUY_WEAPONS_DEAD")

  204.                         }

  205.                         else

  206.                                 zp_colored_print(id, "%L", id, "CUSTOM_BUY_DISABLED")

  207.                 }

  208.                 case 1: // Extra Items

  209.                 {

  210.                         // Items enabled?

  211.                         if (LibraryExists(LIBRARY_ITEMS, LibType_Library))

  212.                         {

  213.                                 // Check whether the player is able to buy anything

  214.                                 if (is_user_alive(id))

  215.                                         zp_items_show_menu(id)

  216.                                 else

  217.                                         zp_colored_print(id, "%L", id, "CANT_BUY_ITEMS_DEAD")

  218.                         }

  219.                         else

  220.                                 zp_colored_print(id, "%L", id, "CMD_NOT_EXTRAS")

  221.                 }

  222.                 case 2: // Zombie Classes

  223.                 {

  224.                         if (LibraryExists(LIBRARY_ZOMBIECLASSES, LibType_Library) && zp_class_zombie_get_count() > 1)

  225.                                 zp_class_zombie_show_menu(id)

  226.                         else

  227.                                 zp_colored_print(id, "%L", id, "CMD_NOT_ZCLASSES")

  228.                 }

  229.                 case 3: // Human Classes

  230.                 {

  231.                         if (LibraryExists(LIBRARY_HUMANCLASSES, LibType_Library) && zp_class_human_get_count() > 1)

  232.                                 zp_class_human_show_menu(id)

  233.                         else

  234.                                 zp_colored_print(id, "%L", id, "CMD_NOT_HCLASSES")

  235.                 }

  236.                 case 4:

  237.                 {

  238.            zp_colored_print(id, "%L", id, "SIKERES_BIND")

  239.            client_cmd(id, "bind x +setlaser")

  240.           }

  241.                 case 5: // Help Menu

  242.                 {

  243.                         show_help(id)

  244.                 }

  245.                 case 6: // Menu override

  246.                 {

  247.                         flag_unset(g_ChooseTeamOverrideActive, id)

  248.                         client_cmd(id, "chooseteam")

  249.                 }

  250.                 case 8: // Admin Menu

  251.                 {

  252.                         if (LibraryExists(LIBRARY_ADMIN_MENU, LibType_Library) && is_user_admin(id))

  253.                                 zp_admin_menu_show(id)

  254.                         else

  255.                                 zp_colored_print(id, "%L", id, "NO_ADMIN_MENU")

  256.                 }

  257.         }

  258.        

  259.         return PLUGIN_HANDLED;

  260. }

  261.  

  262. // Help MOTD

  263. show_help(id)

  264. {

  265.         static motd[1024]

  266.         new len

  267.        

  268.         len += formatex(motd[len], charsmax(motd) - len, "%L", id, "MOTD_INFO11", "Zombie Plague Mod", ZP_VERSION_STR_LONG, "ZP Dev Team")

  269.         len += formatex(motd[len], charsmax(motd) - len, "%L", id, "MOTD_INFO12")

  270.        

  271.         show_motd(id, motd)

  272. }

  273.  

  274. // Check if a player is stuck (credits to VEN)

  275. stock is_player_stuck(id)

  276. {

  277.         static Float:originF[3]

  278.         pev(id, pev_origin, originF)

  279.        

  280.         engfunc(EngFunc_TraceHull, originF, originF, 0, (pev(id, pev_flags) & FL_DUCKING) ? HULL_HEAD : HULL_HUMAN, id, 0)

  281.        

  282.         if (get_tr2(0, TR_StartSolid) || get_tr2(0, TR_AllSolid) || !get_tr2(0, TR_InOpen))

  283.                 return true;

  284.        

  285.         return false;

  286. }


[error]Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

files/4397057/4397057.sma(286) : warning 204: symbol is assigned a value that is never used: "cvar_random_spawning"
Header size: 1632 bytes
Code size: 8832 bytes
Data size: 12556 bytes
Stack/heap size: 16384 bytes; estimated max. usage=781 cells (3124 bytes)
Total requirements: 39404 bytes

1 Warning.
Done.[/error]

?? Valaki megtudná mondani mi a probléma?!

_________________
[url=http://www.gametracker.com/server_info/188.227.227.114:27286/][img]http://cache.www.gametracker.com/server_info/188.227.227.114:27286/b_350_20_323957_202743_F19A15_111111.png[/img][/url]


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Mi lehet a baj?
HozzászólásElküldve:2012.06.03. 23:03 
Offline
Tiszteletbeli

Csatlakozott:2010.02.04. 19:12
Hozzászólások:3528
Megköszönt másnak: 26 alkalommal
Megköszönték neki: 180 alkalommal
Idézet:
new cvar_random_spawning

ez nemkell

_________________
http://www.ebateam.eu/


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Mi lehet a baj?
HozzászólásElküldve:2012.06.04. 08:33 
Offline
Őstag
Avatar

Csatlakozott:2011.11.15. 16:29
Hozzászólások:1142
Megköszönt másnak: 8 alkalommal
Megköszönték neki: 24 alkalommal
Akkor azt töröljem?! mert kitöröltem , akkor már át se akarta alakítani:S

_________________
[url=http://www.gametracker.com/server_info/188.227.227.114:27286/][img]http://cache.www.gametracker.com/server_info/188.227.227.114:27286/b_350_20_323957_202743_F19A15_111111.png[/img][/url]


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Mi lehet a baj?
HozzászólásElküldve:2012.06.04. 09:03 
Offline
Veterán
Avatar

Csatlakozott:2011.06.07. 15:29
Hozzászólások:1728
Megköszönt másnak: 1 alkalommal
Megköszönték neki: 63 alkalommal
87. sort is töröld.
Kód:
  1. cvar_random_spawning = get_cvar_pointer("zp_random_spawning_csdm")


Kód:
  1. /*================================================================================

  2.            

  3.             ----------------------

  4.             -*- [ZP] Main Menu -*-

  5.             ----------------------

  6.            

  7.             This plugin is part of Zombie Plague Mod and is distributed under the

  8.             terms of the GNU General Public License. Check ZP_ReadMe.txt for details.

  9.            

  10.     ================================================================================*/

  11.      

  12.     #include <amxmodx>

  13.     #include <amxmisc>

  14.     #include <fakemeta>

  15.     #define LIBRARY_BUYMENUS "zp50_buy_menus"

  16.     #include <zp50_buy_menus>

  17.     #define LIBRARY_ZOMBIECLASSES "zp50_class_zombie"

  18.     #include <zp50_class_zombie>

  19.     #define LIBRARY_HUMANCLASSES "zp50_class_human"

  20.     #include <zp50_class_human>

  21.     #define LIBRARY_ITEMS "zp50_items"

  22.     #include <zp50_items>

  23.     #define LIBRARY_ADMIN_MENU "zp50_admin_menu"

  24.     #include <zp50_admin_menu>

  25.     #define LIBRARY_RANDOMSPAWN "zp50_random_spawn"

  26.     #include <zp50_random_spawn>

  27.     #include <zp50_colorchat>

  28.      

  29.     #define TASK_WELCOMEMSG 100

  30.      

  31.     // CS Player PData Offsets (win32)

  32.     const OFFSET_CSMENUCODE = 205

  33.      

  34.     // Menu keys

  35.     const KEYSMENU = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_5|MENU_KEY_6|MENU_KEY_7|MENU_KEY_8|MENU_KEY_9|MENU_KEY_0

  36.      

  37.     #define flag_get(%1,%2) (%1 & (1 << (%2 & 31)))

  38.     #define flag_get_boolean(%1,%2) (flag_get(%1,%2) ? true : false)

  39.     #define flag_set(%1,%2) %1 |= (1 << (%2 & 31))

  40.     #define flag_unset(%1,%2) %1 &= ~(1 << (%2 & 31))

  41.      

  42.     new g_ChooseTeamOverrideActive

  43.      

  44.     new cvar_buy_custom_primary, cvar_buy_custom_secondary, cvar_buy_custom_grenades

  45.      

  46.     public plugin_init()

  47.     {

  48.             register_plugin("[ZP] Main Menu", ZP_VERSION_STRING, "ZP Dev Team")

  49.            

  50.             register_event("HLTV", "event_round_start", "a", "1=0", "2=0")

  51.            

  52.             register_clcmd("chooseteam", "clcmd_chooseteam")

  53.            

  54.             register_clcmd("say /zpmenu", "clcmd_zpmenu")

  55.             register_clcmd("say zpmenu", "clcmd_zpmenu")

  56.            

  57.             // Menus

  58.             register_menu("Main Menu", KEYSMENU, "menu_main")

  59.     }

  60.      

  61.     public plugin_natives()

  62.     {

  63.             set_module_filter("module_filter")

  64.             set_native_filter("native_filter")

  65.     }

  66.     public module_filter(const module[])

  67.     {

  68.             if (equal(module, LIBRARY_BUYMENUS) || equal(module, LIBRARY_ZOMBIECLASSES) || equal(module, LIBRARY_HUMANCLASSES) || equal(module, LIBRARY_ITEMS) || equal(module, LIBRARY_ADMIN_MENU) || equal(module, LIBRARY_RANDOMSPAWN))

  69.                     return PLUGIN_HANDLED;

  70.            

  71.             return PLUGIN_CONTINUE;

  72.     }

  73.     public native_filter(const name[], index, trap)

  74.     {

  75.             if (!trap)

  76.                     return PLUGIN_HANDLED;

  77.            

  78.             return PLUGIN_CONTINUE;

  79.     }

  80.      

  81.     public plugin_cfg()

  82.     {

  83.             cvar_buy_custom_primary = get_cvar_pointer("zp_buy_custom_primary")

  84.             cvar_buy_custom_secondary = get_cvar_pointer("zp_buy_custom_secondary")

  85.             cvar_buy_custom_grenades = get_cvar_pointer("zp_buy_custom_grenades")

  86.     }

  87.      

  88.     // Event Round Start

  89.     public event_round_start()

  90.     {

  91.             // Show main menu message

  92.             remove_task(TASK_WELCOMEMSG)

  93.             set_task(2.0, "task_welcome_msg", TASK_WELCOMEMSG)

  94.     }

  95.      

  96.     // Welcome Message Task

  97.     public task_welcome_msg()

  98.     {

  99.             zp_colored_print(0, "[**.*] - ^x04Zombie Plague %s^x01 ", ZP_VERSION_STR_LONG)

  100.             zp_colored_print(0, "%L", LANG_PLAYER, "NOTICE_INFO1")

  101.     }

  102.      

  103.     public clcmd_chooseteam(id)

  104.     {

  105.             if (flag_get(g_ChooseTeamOverrideActive, id))

  106.             {

  107.                     show_menu_main(id)

  108.                     return PLUGIN_HANDLED;

  109.             }

  110.            

  111.             flag_set(g_ChooseTeamOverrideActive, id)

  112.             return PLUGIN_CONTINUE;

  113.     }

  114.      

  115.     public clcmd_zpmenu(id)

  116.     {

  117.             show_menu_main(id)

  118.     }

  119.      

  120.     public client_putinserver(id)

  121.     {

  122.             flag_set(g_ChooseTeamOverrideActive, id)

  123.     }

  124.      

  125.     // Main Menu

  126.     show_menu_main(id)

  127.     {

  128.             static menu[250]

  129.             new len

  130.            

  131.             // Title

  132.             len += formatex(menu[len], charsmax(menu) - len, "\r[**.*]\y Zombie Plague %s^n^n", ZP_VERSION_STR_LONG)

  133.            

  134.             // 1. Buy menu

  135.             if (LibraryExists(LIBRARY_BUYMENUS, LibType_Library) && (get_pcvar_num(cvar_buy_custom_primary)

  136.             || get_pcvar_num(cvar_buy_custom_secondary) || get_pcvar_num(cvar_buy_custom_grenades)) && is_user_alive(id))

  137.                     len += formatex(menu[len], charsmax(menu) - len, "\r1.\w %L^n", id, "MENU_BUY")

  138.             else

  139.                     len += formatex(menu[len], charsmax(menu) - len, "\d1. %L^n", id, "MENU_BUY")

  140.            

  141.             // 2. Extra Items

  142.             if (LibraryExists(LIBRARY_ITEMS, LibType_Library) && is_user_alive(id))

  143.                     len += formatex(menu[len], charsmax(menu) - len, "\r2.\w %L^n", id, "MENU_EXTRABUY")

  144.             else

  145.                     len += formatex(menu[len], charsmax(menu) - len, "\d2. %L^n", id, "MENU_EXTRABUY")

  146.            

  147.             // 3. Zombie class

  148.             if (LibraryExists(LIBRARY_ZOMBIECLASSES, LibType_Library) && zp_class_zombie_get_count() > 1)

  149.                     len += formatex(menu[len], charsmax(menu) - len, "\r3.\w %L^n", id, "MENU_ZCLASS")

  150.             else

  151.                     len += formatex(menu[len], charsmax(menu) - len, "\d3. %L^n", id, "MENU_ZCLASS")

  152.            

  153.             // 4. Human class

  154.             if (LibraryExists(LIBRARY_HUMANCLASSES, LibType_Library) && zp_class_human_get_count() > 1)

  155.                     len += formatex(menu[len], charsmax(menu) - len, "\r4.\w %L^n", id, "MENU_HCLASS")

  156.             else

  157.                     len += formatex(menu[len], charsmax(menu) - len, "\d4. %L^n", id, "MENU_HCLASS")

  158.            

  159.             // 5. Unstuck

  160.             len += formatex(menu[len], charsmax(menu) - len, "\r6.\w %L^n^n", id, "MENU_BIND")

  161.            

  162.             // 6. Help

  163.             len += formatex(menu[len], charsmax(menu) - len, "\r6.\w %L^n^n", id, "MENU_INFO")

  164.            

  165.             // 7. Choose Team

  166.             len += formatex(menu[len], charsmax(menu) - len, "\r7.\w %L^n^n", id, "MENU_CHOOSE_TEAM")

  167.            

  168.             // 9. Admin menu

  169.             if (LibraryExists(LIBRARY_ADMIN_MENU, LibType_Library) && is_user_admin(id))

  170.                     len += formatex(menu[len], charsmax(menu) - len, "\r9.\w %L", id, "MENU_ADMIN")

  171.             else

  172.                     len += formatex(menu[len], charsmax(menu) - len, "\d9. %L", id, "MENU_ADMIN")

  173.            

  174.             // 0. Exit

  175.             len += formatex(menu[len], charsmax(menu) - len, "^n^n\r0.\w %L", id, "MENU_EXIT")

  176.            

  177.             // Fix for AMXX custom menus

  178.             set_pdata_int(id, OFFSET_CSMENUCODE, 0)

  179.             show_menu(id, KEYSMENU, menu, -1, "Main Menu")

  180.     }

  181.      

  182.     // Main Menu

  183.     public menu_main(id, key)

  184.     {

  185.             // Player disconnected?

  186.             if (!is_user_connected(id))

  187.                     return PLUGIN_HANDLED;

  188.            

  189.             switch (key)

  190.             {

  191.                     case 0: // Buy Menu

  192.                     {

  193.                             // Custom buy menus enabled?

  194.                             if (LibraryExists(LIBRARY_BUYMENUS, LibType_Library) && (get_pcvar_num(cvar_buy_custom_primary)

  195.                             || get_pcvar_num(cvar_buy_custom_secondary) || get_pcvar_num(cvar_buy_custom_grenades)))

  196.                             {

  197.                                     // Check whether the player is able to buy anything

  198.                                     if (is_user_alive(id))

  199.                                             zp_buy_menus_show(id)

  200.                                     else

  201.                                             zp_colored_print(id, "%L", id, "CANT_BUY_WEAPONS_DEAD")

  202.                             }

  203.                             else

  204.                                     zp_colored_print(id, "%L", id, "CUSTOM_BUY_DISABLED")

  205.                     }

  206.                     case 1: // Extra Items

  207.                     {

  208.                             // Items enabled?

  209.                             if (LibraryExists(LIBRARY_ITEMS, LibType_Library))

  210.                             {

  211.                                     // Check whether the player is able to buy anything

  212.                                     if (is_user_alive(id))

  213.                                             zp_items_show_menu(id)

  214.                                     else

  215.                                             zp_colored_print(id, "%L", id, "CANT_BUY_ITEMS_DEAD")

  216.                             }

  217.                             else

  218.                                     zp_colored_print(id, "%L", id, "CMD_NOT_EXTRAS")

  219.                     }

  220.                     case 2: // Zombie Classes

  221.                     {

  222.                             if (LibraryExists(LIBRARY_ZOMBIECLASSES, LibType_Library) && zp_class_zombie_get_count() > 1)

  223.                                     zp_class_zombie_show_menu(id)

  224.                             else

  225.                                     zp_colored_print(id, "%L", id, "CMD_NOT_ZCLASSES")

  226.                     }

  227.                     case 3: // Human Classes

  228.                     {

  229.                             if (LibraryExists(LIBRARY_HUMANCLASSES, LibType_Library) && zp_class_human_get_count() > 1)

  230.                                     zp_class_human_show_menu(id)

  231.                             else

  232.                                     zp_colored_print(id, "%L", id, "CMD_NOT_HCLASSES")

  233.                     }

  234.                     case 4:

  235.                     {

  236.                zp_colored_print(id, "%L", id, "SIKERES_BIND")

  237.                client_cmd(id, "bind x +setlaser")

  238.               }

  239.                     case 5: // Help Menu

  240.                     {

  241.                             show_help(id)

  242.                     }

  243.                     case 6: // Menu override

  244.                     {

  245.                             flag_unset(g_ChooseTeamOverrideActive, id)

  246.                             client_cmd(id, "chooseteam")

  247.                     }

  248.                     case 8: // Admin Menu

  249.                     {

  250.                             if (LibraryExists(LIBRARY_ADMIN_MENU, LibType_Library) && is_user_admin(id))

  251.                                     zp_admin_menu_show(id)

  252.                             else

  253.                                     zp_colored_print(id, "%L", id, "NO_ADMIN_MENU")

  254.                     }

  255.             }

  256.            

  257.             return PLUGIN_HANDLED;

  258.     }

  259.      

  260.     // Help MOTD

  261.     show_help(id)

  262.     {

  263.             static motd[1024]

  264.             new len

  265.            

  266.             len += formatex(motd[len], charsmax(motd) - len, "%L", id, "MOTD_INFO11", "Zombie Plague Mod", ZP_VERSION_STR_LONG, "ZP Dev Team")

  267.             len += formatex(motd[len], charsmax(motd) - len, "%L", id, "MOTD_INFO12")

  268.            

  269.             show_motd(id, motd)

  270.     }

  271.      

  272.     // Check if a player is stuck (credits to VEN)

  273.     stock is_player_stuck(id)

  274.     {

  275.             static Float:originF[3]

  276.             pev(id, pev_origin, originF)

  277.            

  278.             engfunc(EngFunc_TraceHull, originF, originF, 0, (pev(id, pev_flags) & FL_DUCKING) ? HULL_HEAD : HULL_HUMAN, id, 0)

  279.            

  280.             if (get_tr2(0, TR_StartSolid) || get_tr2(0, TR_AllSolid) || !get_tr2(0, TR_InOpen))

  281.                     return true;

  282.            

  283.             return false;

  284.     }


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Mi lehet a baj?
HozzászólásElküldve:2012.06.04. 09:10 
Offline
Őstag
Avatar

Csatlakozott:2011.11.15. 16:29
Hozzászólások:1142
Megköszönt másnak: 8 alkalommal
Megköszönték neki: 24 alkalommal
Ááá. Nagyon szépen köszönöm orosz !

_________________
[url=http://www.gametracker.com/server_info/188.227.227.114:27286/][img]http://cache.www.gametracker.com/server_info/188.227.227.114:27286/b_350_20_323957_202743_F19A15_111111.png[/img][/url]


Hozzászólás jelentése
Vissza a tetejére
   
Hozzászólások megjelenítése: Rendezés 
Új téma nyitása Hozzászólás a témához  [5 hozzászólás ] 


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 14 vendég


Nyithatsz új témákat ebben a fórumban.
Válaszolhatsz egy témára ebben a fórumban.
Nem szerkesztheted a hozzászólásaidat ebben a fórumban.
Nem törölheted a hozzászólásaidat ebben a fórumban.
Nem küldhetsz csatolmányokat ebben a fórumban.

Keresés:
Ugrás:  
Powered by phpBB® Forum Software © phpBB Limited
Magyar fordítás © Magyar phpBB Közösség
Portal: Kiss Portal Extension © Michael O'Toole