Approved Levels Weapons Menu

Gameplay Addons
User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1972
Joined: 2 Years Ago
Location: Egypt
Has thanked: 32 times
Been thanked: 108 times
Age: 22
Contact:

Levels Weapons Menu

#1

Post by Raheem » 2 Years Ago

Levels Weapons Menu

Description:
  • This plugin based on our Levels System. Every new Level player will be able to get new guns. Player need to Gain XP to Grow up in Level and then he can Unlock more Weapons. This is a Pro-Edition that highly coded.
Cvars:
  • ze_buy_time 60 Menu buy time?
  • ze_give_HE_nade 1 Give Fire Nade? 0 = Disable | 1 = Enable
  • ze_give_SM_nade 1 Give Frost Nade? 0 = Disable | 1 = Enable
  • ze_give_FB_nade 1 Give Another Frost Nade? 0 = Disable | 1 = Enable
  • ze_block_weapons_lowlvl 1 Block player from picking up high levels weapons? 0 = Allow | 1 = Block
Client Commands:
  • say /enable or say_team /enable Re-Enable Menu if you use Remember choice.
  • guns Write in console this will get you the guns menu if the buy time not elapsed yet.
Installation & Instructions:
  • Delete the old weapons_menu Then Add this new one.
  • Open your zombie_escape.ini and delete these lines:

    1. [Weapons Menu]
    2. PRIMARY = weapon_m4a1 , weapon_ak47 , weapon_aug , weapon_sg552 , weapon_galil , weapon_famas , weapon_scout , weapon_awp , weapon_sg550 , weapon_m249 , weapon_g3sg1 , weapon_ump45 , weapon_mp5navy , weapon_m3 , weapon_xm1014 , weapon_tmp , weapon_mac10 , weapon_p90
    3. SECONDARY = weapon_usp , weapon_glock18 , weapon_deagle , weapon_p228 , weapon_elite , weapon_fiveseven
  • How to edit Levels Weapons? Simply you can do this from zombie_escape.ini or from the source code you are free. So how to do it?
    You need only to change the Weapons position. So i'll give you example This:


    1. PRIMARY = weapon_xm1014 , weapon_ump45 , weapon_m3 , weapon_mp5navy , weapon_p90 , weapon_galil , weapon_famas , weapon_sg550 , weapon_g3sg1 , weapon_m249 , weapon_sg552 , weapon_aug , weapon_m4a1 , weapon_ak47
    2. SECONDARY = weapon_usp , weapon_p228 , weapon_glock18 , weapon_fiveseven , weapon_deagle , weapon_elite

    Mean:

    1. weapon_xm1014  // Level 0
    2. weapon_ump45   // Level 0
    3. weapon_m3      // Level 1
    4. weapon_mp5navy // Level 2
    5. weapon_p90     // Level 3
    6. weapon_galil   // Level 4
    7. weapon_famas   // Level 5
    8. weapon_sg550   // Level 6
    9. weapon_g3sg1   // Level 7
    10. weapon_m249    // Level 8
    11. weapon_sg552   // Level 9
    12. weapon_aug     // Level 10
    13. weapon_m4a1    // Level 11
    14. weapon_ak47    // Level 12
    15.  
    16. weapon_usp         // Level 0
    17. weapon_p228        // Level 0
    18. weapon_glock18     // Level 1
    19. weapon_fiveseven   // Level 2
    20. weapon_deagle      // Level 3
    21. weapon_elite       // Level 4

    So change the position of weapons to edit it.
  • Weapons Names & Max BP Ammo can be changed only from The source code:

    1. // Primary and Secondary Weapons Names [Default Values]
    2. new const szWeaponNames[][] =
    3. {
    4.     "",
    5.     "P228",
    6.     "",
    7.     "Scout",
    8.     "HE Grenade",
    9.     "XM1014",
    10.     "",
    11.     "MAC-10",
    12.     "AUG",
    13.     "Smoke Grenade",
    14.     "Dual Elite",
    15.     "Five Seven",
    16.     "UMP 45",
    17.     "SG-550",
    18.     "Galil",
    19.     "Famas",
    20.     "USP",
    21.     "Glock",
    22.     "AWP",
    23.     "MP5",
    24.     "M249",
    25.     "M3",
    26.     "M4A1",
    27.     "TMP",
    28.     "G3SG1",
    29.     "Flashbang",
    30.     "Desert Eagle",
    31.     "SG-552",
    32.     "AK-47",
    33.     "",
    34.     "P90"
    35. }
    36.  
    37. // Max Back Clip Ammo (Change it From here if you need)
    38. new const szMaxBPAmmo[] =
    39. {
    40.     -1,
    41.     52,
    42.     -1,
    43.     90,
    44.     1,
    45.     32,
    46.     1,
    47.     100,
    48.     90,
    49.     1,
    50.     120,
    51.     100,
    52.     100,
    53.     90,
    54.     90,
    55.     90,
    56.     100,
    57.     120,
    58.     30,
    59.     120,
    60.     200,
    61.     32,
    62.     90,
    63.     120,
    64.     90,
    65.     2,
    66.     35,
    67.     90,
    68.     90,
    69.     -1,
    70.     100
    71. }
  • This system works like, In the first level that it's the 0 level player will see in the menu 2 Primary Weapons and 2 Secondary Weapons and every next level he will unlock another 1 Primary and 1 Secondary and every time the old weapons will be displayed also in the menu. If you don't like this system and need special one just post down here and i'll make it like your needs. I don't need to explain how it done as it need that you should understand the code first so for minimize the efforts just let me do it for you :).
Changelog:
  • Spoiler!
    Version: 1.0
    • First Release.
    Version: 1.1 [Current Version]
    • Some optimization suggested by Jack GamePlay.
    • Fixed problem that when player get higher level menu sometimes get destroyed or not appear correctly.
    • Fixed problem in Secondary Weapon Menu that player can choose higher weapon if he clicked from (0-7).
    • Added new cvar that player with low level can't pick up weapons with high levels. Blocked for weapons which dropped by other players and also which found in the map.
Screenshots:
  • ImageImageImageImage
  • ImageImageImageImage
Downloads:
Last edited by Raheem on 02 Aug 2018, 11:43, edited 1 time in total.
You don't know? Learn and you will know.

User avatar
Mohamed Alaa
Mod Developer
Mod Developer
Egypt
Posts: 624
Joined: 2 Years Ago
Location: Egypt
Has thanked: 34 times
Been thanked: 48 times
Age: 19
Contact:

#2

Post by Mohamed Alaa » 2 Years Ago

Some optimization:
  1. if (ze_get_user_level(id) == 0)
  2.         WPN_MAXIDS[id] = 2
  3.     else if (ze_get_user_level(id) == 1)
  4.         WPN_MAXIDS[id] = 3
  5.     else if (ze_get_user_level(id) == 2)
  6.         WPN_MAXIDS[id] = 4
  7.     else if (ze_get_user_level(id) == 3)
  8.         WPN_MAXIDS[id] = 5
  9.     else if (ze_get_user_level(id) == 4)
  10.         WPN_MAXIDS[id] = 6
  11.     else if (ze_get_user_level(id) == 5)
  12.         WPN_MAXIDS[id] = 7
  13.     else if (ze_get_user_level(id) == 6)
  14.         WPN_MAXIDS[id] = 8
  15.     else if (ze_get_user_level(id) == 7)
  16.         WPN_MAXIDS[id] = 9
  17.     else if (ze_get_user_level(id) == 8)
  18.         WPN_MAXIDS[id] = 10
  19.     else if (ze_get_user_level(id) == 9)
  20.         WPN_MAXIDS[id] = 11
  21.     else if (ze_get_user_level(id) == 10)
  22.         WPN_MAXIDS[id] = 12
  23.     else if (ze_get_user_level(id) == 11)
  24.         WPN_MAXIDS[id] = 13
  25.     else if (ze_get_user_level(id) == 12)
  26.         WPN_MAXIDS[id] = 14
With
  1. switch(ze_get_user_level(id))
  2. {
  3.         case 0: WPN_MAXIDS[id] = 2
  4.         case 1: WPN_MAXIDS[id] = 3
  5.         case 2: WPN_MAXIDS[id] = 4
  6.         case 3: WPN_MAXIDS[id] = 5
  7.         case 4: WPN_MAXIDS[id] = 6
  8.         case 5: WPN_MAXIDS[id] = 7
  9.         case 6: WPN_MAXIDS[id] = 8
  10.         case 7: WPN_MAXIDS[id] = 9
  11.         case 8: WPN_MAXIDS[id] = 10
  12.         case 9: WPN_MAXIDS[id] = 11
  13.         case 10:    WPN_MAXIDS[id] = 12
  14.         case 11:    WPN_MAXIDS[id] = 13
  15.         case 12:    WPN_MAXIDS[id] = 14
  16. }
-----------------------------------------------------------------------------------------------------------------------------------
  1. if (WPN_AUTO_ON)
  2.         ze_colored_print(id, "%L", LANG_PLAYER, "RE_ENABLE_MENU")
  3.        
  4.     if (WPN_AUTO_ON)
  5.     {
  6.         Buy_Primary_Weapon(id, WPN_AUTO_PRI)
  7.     }
  8.  
  9.     if (WPN_AUTO_ON)
  10.     {
  11.         Buy_Secondary_Weapon(id, WPN_AUTO_SEC)
  12.     }
--->
  1. if (WPN_AUTO_ON)
  2.     {
  3.         Buy_Primary_Weapon(id, WPN_AUTO_PRI)
  4.         Buy_Secondary_Weapon(id, WPN_AUTO_SEC)
  5.         ze_colored_print(id, "%L", LANG_PLAYER, "RE_ENABLE_MENU")
  6.     }
-----------------------------------------------------------------------------------------------------------------------------------
  1. if (ze_get_user_level(id) == 5)
  2.     {
  3.         ArrayGetString(g_szPrimaryWeapons, 7, szWeaponName, charsmax(szWeaponName))
  4.         iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n\r Next Level Unlock\w: \y%s^n", szWeaponNames[get_weaponid(szWeaponName)])
  5.     }
  6.     else if (ze_get_user_level(id) == 6)
  7.     {
  8.         ArrayGetString(g_szPrimaryWeapons, 8, szWeaponName, charsmax(szWeaponName))
  9.         iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n\r Next Level Unlock\w: \y%s^n", szWeaponNames[get_weaponid(szWeaponName)])
  10.     }
  11.     else if (ze_get_user_level(id) == 7)
  12.     {
  13.         ArrayGetString(g_szPrimaryWeapons, 9, szWeaponName, charsmax(szWeaponName))
  14.         iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n\r Next Level Unlock\w: \y%s^n", szWeaponNames[get_weaponid(szWeaponName)])
  15.     }
  16.     else if (ze_get_user_level(id) == 8)
  17.     {
  18.         ArrayGetString(g_szPrimaryWeapons, 10, szWeaponName, charsmax(szWeaponName))
  19.         iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n\r Next Level Unlock\w: \y%s^n", szWeaponNames[get_weaponid(szWeaponName)])
  20.     }
  21.     else if (ze_get_user_level(id) == 9)
  22.     {
  23.         ArrayGetString(g_szPrimaryWeapons, 11, szWeaponName, charsmax(szWeaponName))
  24.         iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n\r Next Level Unlock\w: \y%s^n", szWeaponNames[get_weaponid(szWeaponName)])
  25.     }
  26.     else if (ze_get_user_level(id) == 10)
  27.     {
  28.         ArrayGetString(g_szPrimaryWeapons, 12, szWeaponName, charsmax(szWeaponName))
  29.         iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n\r Next Level Unlock\w: \y%s^n", szWeaponNames[get_weaponid(szWeaponName)])
  30.     }
  31.     else if (ze_get_user_level(id) == 11)
  32.     {
  33.         ArrayGetString(g_szPrimaryWeapons, 13, szWeaponName, charsmax(szWeaponName))
  34.         iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n\r Next Level Unlock\w: \y%s^n", szWeaponNames[get_weaponid(szWeaponName)])
  35.     }
--->
  1. switch(ze_get_user_level(id))
  2.     {
  3.         case 5:
  4.         {
  5.             ArrayGetString(g_szPrimaryWeapons, 7, szWeaponName, charsmax(szWeaponName))
  6.             iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n\r Next Level Unlock\w: \y%s^n", szWeaponNames[get_weaponid(szWeaponName)])
  7.         }
  8.         case 6:
  9.         {
  10.             ArrayGetString(g_szPrimaryWeapons, 8, szWeaponName, charsmax(szWeaponName))
  11.             iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n\r Next Level Unlock\w: \y%s^n", szWeaponNames[get_weaponid(szWeaponName)])
  12.         }
  13.         case 7:
  14.         {
  15.             ArrayGetString(g_szPrimaryWeapons, 9, szWeaponName, charsmax(szWeaponName))
  16.             iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n\r Next Level Unlock\w: \y%s^n", szWeaponNames[get_weaponid(szWeaponName)])
  17.         }
  18.         case 8:
  19.         {
  20.             ArrayGetString(g_szPrimaryWeapons, 10, szWeaponName, charsmax(szWeaponName))
  21.             iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n\r Next Level Unlock\w: \y%s^n", szWeaponNames[get_weaponid(szWeaponName)])
  22.         }
  23.         case 9:
  24.         {
  25.             ArrayGetString(g_szPrimaryWeapons, 11, szWeaponName, charsmax(szWeaponName))
  26.             iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n\r Next Level Unlock\w: \y%s^n", szWeaponNames[get_weaponid(szWeaponName)])
  27.         }
  28.         case 10:
  29.         {
  30.             ArrayGetString(g_szPrimaryWeapons, 12, szWeaponName, charsmax(szWeaponName))
  31.             iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n\r Next Level Unlock\w: \y%s^n", szWeaponNames[get_weaponid(szWeaponName)])
  32.         }
  33.         case 11:
  34.         {
  35.             ArrayGetString(g_szPrimaryWeapons, 13, szWeaponName, charsmax(szWeaponName))
  36.             iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n\r Next Level Unlock\w: \y%s^n", szWeaponNames[get_weaponid(szWeaponName)])
  37.         }
  38.     }
Want your own mod edition? PM me.
Accepting web projects.
CS 1.6 hosting: powergamingtech.com

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1972
Joined: 2 Years Ago
Location: Egypt
Has thanked: 32 times
Been thanked: 108 times
Age: 22
Contact:

#3

Post by Raheem » 2 Years Ago

Ok, I'll do it in next version.
You don't know? Learn and you will know.

User avatar
Mohamed Alaa
Mod Developer
Mod Developer
Egypt
Posts: 624
Joined: 2 Years Ago
Location: Egypt
Has thanked: 34 times
Been thanked: 48 times
Age: 19
Contact:

#4

Post by Mohamed Alaa » 2 Years Ago

Raheem, just a suggestion.
How about blocking picking up guns which are in low levels that the player is?
Also for Armor(Block always). :)
Want your own mod edition? PM me.
Accepting web projects.
CS 1.6 hosting: powergamingtech.com

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1972
Joined: 2 Years Ago
Location: Egypt
Has thanked: 32 times
Been thanked: 108 times
Age: 22
Contact:

#5

Post by Raheem » 2 Years Ago

New version out: 1.1

I included all your suggestions Jack GamePlay... Nice ideas by the way.
You don't know? Learn and you will know.

LosT
Member
Member
Belgium
Posts: 13
Joined: 1 Year Ago
Has thanked: 0
Been thanked: 0
Contact:

#6

Post by LosT » 1 Year Ago

why not use it weapons from cso?? it cool :D
dark,paladin,dril,etc

johnnysins2000
Veteran Member
Veteran Member
Pakistan
Posts: 672
Joined: 2 Years Ago
Location: Lahore
Has thanked: 11 times
Been thanked: 10 times
Age: 22
Contact:

#7

Post by johnnysins2000 » 1 Year Ago

LosT wrote:
1 Year Ago
why not use it weapons from cso?? it cool :D
dark,paladin,dril,etc
For that u need to make Yourselve

Just learn it from here how to make level weapons menu

But as for your suggestion I will help u to do it after exams
Nobody Is That Busy If They Make Time :roll:

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1972
Joined: 2 Years Ago
Location: Egypt
Has thanked: 32 times
Been thanked: 108 times
Age: 22
Contact:

#8

Post by Raheem » 1 Year Ago

jhonny, you can help in converting weapons and editing the weapon menu i'll do it.
You don't know? Learn and you will know.

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1972
Joined: 2 Years Ago
Location: Egypt
Has thanked: 32 times
Been thanked: 108 times
Age: 22
Contact:

#9

Post by Raheem » 1 Year Ago

Updated to work with Zombie Escape v1.3
You don't know? Learn and you will know.

Rain1153
Senior Member
Senior Member
India
Posts: 278
Joined: 1 Year Ago
Has thanked: 2 times
Been thanked: 1 time
Age: 19
Contact:

#10

Post by Rain1153 » 1 Year Ago

raheeeem when are u gonna level extra items menu :P
LOL

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest