Approved Level-XP System (v2.1)

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


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

Level-XP System (v2.1)

#1

Post by z0h1r-LK » 2 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].

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"

Console Variables:

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

How to initialize MySQL 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.

Level INI Settings:

  • Add this settings in section [Sounds]

  1. LEVEL_UP = events/task_complete.wav

Changes Log:

  1. [2.0]
  2.  - First release.
  3.  
  4. [2.1]
  5.  - Fix MySQL error.
  6.  
  7. [2.1f1] ; Current.
  8.  - Fix MySQL table.
  9.  - Fix increment rate.

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.

APIs:

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

Downloads:

Last edited by z0h1r-LK 1 day ago, edited 2 times in total.
Reason: Fixes!

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

#2

Post by AmirWolf » 2 months ago

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


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

#3

Post by z0h1r-LK » 2 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: 487
Joined: 5 years ago
Location: The Red City ❤
Contact:

#4

Post by z0h1r-LK » 1 month ago

  • Updated 2.1


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

#5

Post by z0h1r-LK » 1 month ago

AmirWolf wrote: 2 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: 487
Joined: 5 years ago
Location: The Red City ❤
Contact:

#6

Post by z0h1r-LK » 1 day ago

  • Updated to 2.1f1

    • Update if you use MySQL save type.


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 0 guests