Approved Bonus Manager v1.2

Gameplay Addons
Post Reply
User avatar
Z0uha1r_LK
Mapper
Mapper
Morocco
Posts: 317
Joined: 2 Years Ago
Location: Morocco
Has thanked: 82 times
Been thanked: 35 times
Age: 19
Contact:

Bonus Manager v1.2

#1

Post by Z0uha1r_LK » 1 Month Ago

Bonus Manager
Screenshots:
01.jpg
Screenshot.
01.jpg (98.63 KiB) Viewed 593 times
01.jpg
Screenshot.
01.jpg (98.63 KiB) Viewed 593 times
Description:
It's a bonus list, every bonus has have level, The player can get a bonus from menu, once round or after a cooldown time or once time in map.

How to create new bonus plugin:
1. Include <ze_bonus_manager> in your plugin.
2. Declare this in plugin_init()
  1. // Register new bonus in menu.
  2. ze_register_bonus("Frost Nade", "Handler_FrostNade", 30)
3. Create handler function located in ze_register_bonus(), Like it:
  1. public Handler_FrostNade(iPlayer, iBonus) {
  2.     // Player is not a alive
  3.     if (!is_user_alive(iPlayer)) {
  4.         ze_colored_print(iPlayer, "%L", LANG_PLAYER, "BONUS_NOTALIVE")
  5.         return;
  6.     }  
  7.    
  8.     // Give player frost nade.
  9.     rg_give_item(iPlayer, "weapon_flashbang")
  10. }
Requirements:
ze_levels - viewtopic.php?f=15&t=72

How to open menu:
  1. say /bonus
  2. say .bonus
  3. say !bonus
  4. say_team /bonus
  5. say_team .bonus
  6. say_team !bonus
Cvars:
  • ze_bonus_enable
    • 0 | Disable bonus menu.
    • 1 | Always players can get bonus from menu without limit.
    • 2 | Can players get bonus once time every cooldown time. Require: ze_bonus_cooldown.
    • 3 | Can players get bonus, But can't override max times. Require: ze_bonus_maxtimes.
    • 4 | Can players get bonus once time every round.
    • 5 | Can players get bonus once time every map.
  • ze_bonus_cooldown
    • 60 | Cooldown time before re-enable bonus menu for players. Require: ze_bonus_enable 2.
  • ze_bonus_maxtimes
    • 3 | Max times to disable menu for players. Require: ze_bonus_enable 3.
Configuration:
zombie_escape.txt
  1. [en]
  2. BONUS_DONE = You has get the bonus (%s).
  3. BONUS_COOLDOWN = The cooldown time is not over, Wait ^4%d^1 sec(s).
  4. BONUS_LEVEL_ENOUGH = You don't have level enough.
  5. BONUS_ONCETIME = You can get a bonus a once time in map.
  6. BONUS_ISZOMBIE = Bonus menu is not available for zombies.
  7. BONUS_MAXTIME = You have reached the maximum number of times.
  8. BONUS_REMTIMES = You can open bonus menu ^4%s^1 time(s).
  9. BONUS_NOTALIVE = You are not a alive!
  10.  
  11. MENU_TITLE_BONUS = Menu Bonus \r(Your level: %d)
  12. FREE = Free
  13. LVL = Lvl
  14. UNLOCKED = Unlocked!
ze_bonus.ini Copy this file in configs directory.
  1. [+10 HP]
  2. NAME = +10 HP
  3. LEVEL = 5
  4.  
  5. [+10 AR]
  6. NAME = +10 AR
  7. LEVEL = 10
  8.  
  9. [+10 EC]
  10. NAME = +10 EC
  11. LEVEL = 15
  12.  
  13. [Fire Nade]
  14. NAME = Fire Nade
  15. LEVEL = 20
  16.  
  17. [Frost Nade]
  18. NAME = Frost Nade
  19. LEVEL = 25
  20.  
  21. [+10 Speed]
  22. NAME = +10 Speed
  23. LEVEL = 30
  24.  
  25. [Damage x1.2]
  26. NAME = Damage x1.2
  27. LEVEL = 40
Change Logs:
  1. [Version 1.0]
  2.  - Release.
  3. [Version 1.1]
  4.  - Fixed some bugs
  5.  - Fixed display menu for zombies.
  6.  - Fixed level required in menu (Thanks. czirimbolo)
  7.  - Added new items in ze_bns_items.sma.
  8.  - Added new native ze_open_bonus_menu().
  9.  - Updated Cvar ze_bonus_enable.
  10. [Version 1.2] ; Current
  11.  - Added new item "Damage x1.2".
  12.  - Added file controlling bonus ze_bonus.ini.
  13.  - Updated Cvar "ze_bonus_enable" new property.
  14.  - Fixed enable bonus menu after player reconnect.
Download:
bonusmanager12.zip
Source Code + INC File + INI File
(5.74 KiB) Downloaded 9 times
bonusmanager12.zip
Source Code + INC File + INI File
(5.74 KiB) Downloaded 9 times
Last edited by Z0uha1r_LK on 19 Oct 2021, 14:08, edited 8 times in total.
These users thanked the author Z0uha1r_LK for the post (total 2):
SobekPogrywamy (1 Month Ago) • Raheem (2 Weeks Ago)
Z0uha1r_LK

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 582
Joined: 4 Years Ago
Has thanked: 20 times
Been thanked: 9 times
Contact:

#2

Post by czirimbolo » 1 Month Ago

tempsnip.png
tempsnip.png (96.48 KiB) Viewed 598 times
tempsnip.png
tempsnip.png (96.48 KiB) Viewed 598 times
its showing your current level but it should show required level to unlock.

Second thing:
with this cvar ze_bonus_enable 3 (once per map) you can use bonus again after reconnect

Can you fix these?
These users thanked the author czirimbolo for the post:
Z0uha1r_LK (1 Month Ago)
Image

User avatar
Z0uha1r_LK
Mapper
Mapper
Morocco
Posts: 317
Joined: 2 Years Ago
Location: Morocco
Has thanked: 82 times
Been thanked: 35 times
Age: 19
Contact:

#3

Post by Z0uha1r_LK » 1 Month Ago

czirimbolo wrote:
1 Month Ago
tempsnip.png

its showing your current level but it should show required level to unlock.

Second thing:
with this cvar ze_bonus_enable 3 (once per map) you can use bonus again after reconnect

Can you fix these?
Thanks bro.
Updated 1.1, Copy new lang in zombie_escape.txt
Check from change logs
Z0uha1r_LK

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 582
Joined: 4 Years Ago
Has thanked: 20 times
Been thanked: 9 times
Contact:

#4

Post by czirimbolo » 1 Month Ago

Z0uha1r_LK wrote:
1 Month Ago
czirimbolo wrote:
1 Month Ago
tempsnip.png

its showing your current level but it should show required level to unlock.

Second thing:
with this cvar ze_bonus_enable 3 (once per map) you can use bonus again after reconnect

Can you fix these?
Thanks bro.
Updated 1.1, Copy new lang in zombie_escape.txt
Check from change logs
nice, but I have small request:
bonus like HP, armor, speed etc work only for ONE round. Can you make it working on 1 map and resetting after change map? It would have sense then.

Speed bonus or armor for 1 round is a little bit poor
These users thanked the author czirimbolo for the post:
Z0uha1r_LK (1 Month Ago)
Image

User avatar
Z0uha1r_LK
Mapper
Mapper
Morocco
Posts: 317
Joined: 2 Years Ago
Location: Morocco
Has thanked: 82 times
Been thanked: 35 times
Age: 19
Contact:

#5

Post by Z0uha1r_LK » 1 Month Ago

czirimbolo wrote:
1 Month Ago

nice, but I have small request:
bonus like HP, armor, speed etc work only for ONE round. Can you make it working on 1 map and resetting after change map? It would have sense then.

Speed bonus or armor for 1 round is a little bit poor
I will add this features in next update.
Z0uha1r_LK

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 582
Joined: 4 Years Ago
Has thanked: 20 times
Been thanked: 9 times
Contact:

#6

Post by czirimbolo » 1 Month Ago

you can add max 6 bonuses because there is no second page. Please fix it and we can add more than 6 bonuses
Image

User avatar
Z0uha1r_LK
Mapper
Mapper
Morocco
Posts: 317
Joined: 2 Years Ago
Location: Morocco
Has thanked: 82 times
Been thanked: 35 times
Age: 19
Contact:

#7

Post by Z0uha1r_LK » 1 Month Ago

czirimbolo wrote:
1 Month Ago
you can add max 6 bonuses because there is no second page. Please fix it and we can add more than 6 bonuses
ok
Z0uha1r_LK

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2199
Joined: 4 Years Ago
Has thanked: 53 times
Been thanked: 161 times
Age: 23
Contact:

#8

Post by Raheem » 2 Weeks Ago

Good job, approved tag added.
These users thanked the author Raheem for the post:
Z0uha1r_LK (2 Weeks Ago)
He who fails to plan is planning to fail

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 582
Joined: 4 Years Ago
Has thanked: 20 times
Been thanked: 9 times
Contact:

#9

Post by czirimbolo » 2 Weeks Ago

It needs to be fixed bro

[ Post made via Android ]
These users thanked the author czirimbolo for the post:
Z0uha1r_LK (1 Week Ago)
Image

User avatar
Z0uha1r_LK
Mapper
Mapper
Morocco
Posts: 317
Joined: 2 Years Ago
Location: Morocco
Has thanked: 82 times
Been thanked: 35 times
Age: 19
Contact:

#10

Post by Z0uha1r_LK » 1 Week Ago

Update Fully. Version 1.2
Z0uha1r_LK

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest