Approved Level-XP System (v2.2f2)

Plug-ins compatibility with Zombie Escape Rebuild v1.x only.


Post Reply
User avatar
z0h1r-LK
Mod Developer
Mod Developer
Morocco
Posts: 520
Joined: 5 years ago
Location: The Red City ❤
Contact:

Level-XP System (v2.2f2)

#1

Post by z0h1r-LK » 7 months ago

Level-XP System

Description:

  • This add-on already made by Raheem for Zombie Escape 1.x, I've add some additions and improve it.
    A level system, which allows players to earn “XP” points by winning or infections or converting total damage into XP points and level up, this giving a target to players. You can also use “APIs” to create rewards with levels.

Screenshots:

  • Image Image Image Image

Instructions && Installations:

  • Compile .sma with AMX Mod X v1.10.0.5467 or newer.

  • Copy translation keys are does not exist and add it in zombie_escape.txt in section [en].

  • Copy ze_levels.cfg and paste it in configs directory.

ADMIN RCON only can use this commands, check #define ADMIN_ACCESS in plug-in

Translation Keys:

  1. HUD_SPEC_LEVEL = "Level: %i | XP: %i/%i"
  2. HUD_SPEC_LEVEL_PERC = "Level: %i | XP: %.2f%"
  3. HUD_SPEC_LEVEL_COMMAS = "Level: %s | XP: %s/%s"
  4. HUD_SPEC_LEVEL_NUM_ABBR = "Level: %s | XP: %s/%s"
  5.  
  6. HUD_USER_LEVEL = "Level: %i | XP: %i/%i"
  7. HUD_USER_LEVEL_PERC = "Level: %i | XP: %.2f%"
  8. HUD_USER_LEVEL_COMMAS = "Level: %s | XP: %s/%s"
  9. HUD_USER_LEVEL_NUM_ABBR = "Level: %s | XP: %s/%s"
  10.  
  11. MSG_LEVEL_UP = "!g%s !tin level !g%i"
  12.  
  13. CMD_SET_XP = "You have set %i XP point(s) for the player [%s]"
  14. CMD_ADD_XP = "You have give %i XP point(s) for the player [%s]"
  15. CMD_SET_MAXXP = "You have set %i Max XP point(s) for the player [%s]"
  16. CMD_ADD_MAXXP = "You have give %i Max XP point(s) for the player [%s]"

Console Variables:

  1. // --- --- ---
  2. // Level-XP System
  3. // --- --- ---
  4. ze_levels_save_type 0             // Levels Save Type (0 = nVault | 1 = MySQL/SQLite).
  5. ze_levels_auth_type 1             // Levels Auth Type (0 = Name | 1 = AuthID).
  6. ze_levels_zombie_infect 2         // How many XP do Zombie get when Zombie Infect (0 = Disabled).
  7. ze_levels_escape_success 8        // How many XP do alive Human get when Escape Success (0 = Disabled).
  8. ze_levels_dmg_enable 1            // Convert damage to Coins (1 = Enabled | 0 = Disabled).
  9. ze_levels_dmg_award 2             // How many XP do Human get when reached required damage (5 = Minimum).
  10. ze_levels_dmg_require "8000.0"    // Required damage to give Human XP = ze_levels_dmg_award.
  11. ze_levels_start_xp 0              // How many XP do player get when join server first time (0 = Disabled).
  12. ze_levels_dec_req_xp 1            // Decrease 'Max XP' from player XP when Level up (1 = Enabled | 0 = Disabled).
  13. ze_levels_max_xp_target 10        // Maximum XP to level up (Target XP to next level) (Note: Doesn't work in System 2).
  14. ze_levels_system_type 0           // Level System mode (0 = MaxXP + XP-Target | 1 = XP-Target x Increment rate | 2 = ze_levels.cfg).
  15. ze_levels_system_increment "2.0"  // System Mode 1: Increment rate (MaxXP * Increment rate).
  16. ze_levels_up_sound 1              // Play sound for player when Level up (1 = Enabled | 0 = Disabled).
  17. ze_levels_up_effects 1            // Show Fade Screen and Shake Screen when Level up (1 = Enabled | 0 = Disabled).
  18. ze_levels_maximum 100             // Maximum Levels on Server (default: 100).
  19. ze_levels_hud_style 1             // Level and XP HUD style (0 = Normal | 1 = Percentage | 2 = Commas | 3 = Number Abbreviations).
  20. ze_levels_hud_human_red 0         // Human Level HUD Red Color (0..255).
  21. ze_levels_hud_human_green 127     // Human Level HUD Green Color (0..255).
  22. ze_levels_hud_human_blue 255      // Human Level HUD Blue Color (0..255).
  23. ze_levels_hud_zombie_red 255      // Zombie Level HUD Red Color (0..255).
  24. ze_levels_hud_zombie_green 127    // Zombie Level HUD Green Color (0..255).
  25. ze_levels_hud_zombie_blue 0       // Zombie Level HUD Blue Color (0..255)
  26. ze_levels_hud_spectator_red 200   // Spectator Level HUD Red Color (0..255).
  27. ze_levels_hud_spectator_green 200 // Spectator Level HUD Green Color (0..255).
  28. ze_levels_hud_spectator_blue 200  // Spectator Level HUD Blue Color (0..255).

Commands:

  • ze_set_xp -→ Set or give XP points for specific player.

  • ze_set_maxxp -→ Set or give Max XP for specific player.

  • ze_set_level -→ Set or increase Level for specific player.

How to initialize SQL for Level?

  • This add-on is use database information from sql.cfg. So, Add-on is only create a Table automatically in database: amx_sql_db, If database is exist.

  • If you want save data using SQLite 🪶, Enable sqlite in modules.ini first and update cvar from amx_sql_type "mysql" to amx_sql_type "sqlite" in sql.cfg.

Level INI Settings:

  • Add this settings in section [Sounds]

  1. LEVEL_UP = events/task_complete.wav

Changes Log:

  1. [2.0]
  2.  - First release (Rebuild Version).
  3.  
  4. [2.1]
  5.  - Fix MySQL error.
  6.  
  7. [2.1f1]
  8.  - Fix MySQL table.
  9.  - Fix increment rate.
  10.  
  11. [2.2]
  12.  - Added new save type SQLite.
  13.  - Added new Auth type 'Name'.
  14.  - Added new system mode #3 (ze_levels.cfg).
  15.  - Removed duplicate Level up message in chat.
  16.  - Minor improvements and changes.
  17.  
  18. [2.2f1]
  19.  - Fix load issue.
  20.  
  21. [2.2f2]   ; Current
  22.  - Added new commands for ADMIN_RCON.
  23.  - Fixed CPU overflow when reaches max level (System #3).

To do:

  • Add cvar allow save via name and steam/valve id.

  • Add new system mode #3 (levels.cfg).

System Modes:

  • You can change system mode once time from ze_levels_system_type, When you setup your server.

    • Mode 0: Add value of ze_levels_max_xp_target with MaxXP.

    • Mode 1: Multiply a value of MaxXP of the player on ze_levels_system_increment.

    • Mode 2: Old way most used in Level Systems, Check ze_levels.cfg

APIs:

  • We will add Levels API in this API in future 😊

Downloads:

Last edited by z0h1r-LK 2 weeks ago, edited 8 times in total.
Reason: Update to v2.2f2

AmirWolf
Member
Member
Iran
Posts: 2
Joined: 7 months ago
Contact:

#2

Post by AmirWolf » 6 months ago

How do I use this system to level extras? (shop menu)


User avatar
z0h1r-LK
Mod Developer
Mod Developer
Morocco
Posts: 520
Joined: 5 years ago
Location: The Red City ❤
Contact:

#3

Post by z0h1r-LK » 6 months ago


@AmirWolf I will add tutorial later, It's easy!


[ Post made via Android ]

User avatar
z0h1r-LK
Mod Developer
Mod Developer
Morocco
Posts: 520
Joined: 5 years ago
Location: The Red City ❤
Contact:

#4

Post by z0h1r-LK » 6 months ago

  • Updated 2.1


User avatar
z0h1r-LK
Mod Developer
Mod Developer
Morocco
Posts: 520
Joined: 5 years ago
Location: The Red City ❤
Contact:

#5

Post by z0h1r-LK » 5 months ago

AmirWolf wrote: 6 months ago

How do I use this system to level extras? (shop menu)

Join our :arrow: Discord


User avatar
z0h1r-LK
Mod Developer
Mod Developer
Morocco
Posts: 520
Joined: 5 years ago
Location: The Red City ❤
Contact:

#6

Post by z0h1r-LK » 4 months ago

  • Updated to 2.1f1

    • Update if you use MySQL save type.


User avatar
z0h1r-LK
Mod Developer
Mod Developer
Morocco
Posts: 520
Joined: 5 years ago
Location: The Red City ❤
Contact:

#7

Post by z0h1r-LK » 2 months ago

  • Updated to 2.2

    • Sorry for late 🙂


User avatar
z0h1r-LK
Mod Developer
Mod Developer
Morocco
Posts: 520
Joined: 5 years ago
Location: The Red City ❤
Contact:

#8

Post by z0h1r-LK » 3 weeks ago

  • Updated to v2.2f1


User avatar
z0h1r-LK
Mod Developer
Mod Developer
Morocco
Posts: 520
Joined: 5 years ago
Location: The Red City ❤
Contact:

#9

Post by z0h1r-LK » 2 weeks ago

  • Updated to v2.2f2


Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Who is online

Users browsing this forum: No registered users and 1 guest