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:
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:
- HUD_SPEC_LEVEL = "Level: %i | XP: %i/%i"
- HUD_SPEC_LEVEL_PERC = "Level: %i | XP: %.2f%"
- HUD_SPEC_LEVEL_COMMAS = "Level: %s | XP: %s/%s"
- HUD_SPEC_LEVEL_NUM_ABBR = "Level: %s | XP: %s/%s"
- HUD_USER_LEVEL = "Level: %i | XP: %i/%i"
- HUD_USER_LEVEL_PERC = "Level: %i | XP: %.2f%"
- HUD_USER_LEVEL_COMMAS = "Level: %s | XP: %s/%s"
- HUD_USER_LEVEL_NUM_ABBR = "Level: %s | XP: %s/%s"
- MSG_LEVEL_UP = "!g%s !tin level !g%i"
- CMD_SET_XP = "You have set %i XP point(s) for the player [%s]"
- CMD_ADD_XP = "You have give %i XP point(s) for the player [%s]"
- CMD_SET_MAXXP = "You have set %i Max XP point(s) for the player [%s]"
- CMD_ADD_MAXXP = "You have give %i Max XP point(s) for the player [%s]"
Console Variables:
- // --- --- ---
- // Level-XP System
- // --- --- ---
- ze_levels_save_type 0 // Levels Save Type (0 = nVault | 1 = MySQL/SQLite).
- ze_levels_auth_type 1 // Levels Auth Type (0 = Name | 1 = AuthID).
- ze_levels_zombie_infect 2 // How many XP do Zombie get when Zombie Infect (0 = Disabled).
- ze_levels_escape_success 8 // How many XP do alive Human get when Escape Success (0 = Disabled).
- ze_levels_dmg_enable 1 // Convert damage to Coins (1 = Enabled | 0 = Disabled).
- ze_levels_dmg_award 2 // How many XP do Human get when reached required damage (5 = Minimum).
- ze_levels_dmg_require "8000.0" // Required damage to give Human XP = ze_levels_dmg_award.
- ze_levels_start_xp 0 // How many XP do player get when join server first time (0 = Disabled).
- ze_levels_dec_req_xp 1 // Decrease 'Max XP' from player XP when Level up (1 = Enabled | 0 = Disabled).
- ze_levels_max_xp_target 10 // Maximum XP to level up (Target XP to next level) (Note: Doesn't work in System 2).
- ze_levels_system_type 0 // Level System mode (0 = MaxXP + XP-Target | 1 = XP-Target x Increment rate | 2 = ze_levels.cfg).
- ze_levels_system_increment "2.0" // System Mode 1: Increment rate (MaxXP * Increment rate).
- ze_levels_up_sound 1 // Play sound for player when Level up (1 = Enabled | 0 = Disabled).
- ze_levels_up_effects 1 // Show Fade Screen and Shake Screen when Level up (1 = Enabled | 0 = Disabled).
- ze_levels_maximum 100 // Maximum Levels on Server (default: 100).
- ze_levels_hud_style 1 // Level and XP HUD style (0 = Normal | 1 = Percentage | 2 = Commas | 3 = Number Abbreviations).
- ze_levels_hud_human_red 0 // Human Level HUD Red Color (0..255).
- ze_levels_hud_human_green 127 // Human Level HUD Green Color (0..255).
- ze_levels_hud_human_blue 255 // Human Level HUD Blue Color (0..255).
- ze_levels_hud_zombie_red 255 // Zombie Level HUD Red Color (0..255).
- ze_levels_hud_zombie_green 127 // Zombie Level HUD Green Color (0..255).
- ze_levels_hud_zombie_blue 0 // Zombie Level HUD Blue Color (0..255)
- ze_levels_hud_spectator_red 200 // Spectator Level HUD Red Color (0..255).
- ze_levels_hud_spectator_green 200 // Spectator Level HUD Green Color (0..255).
- 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
inmodules.ini
first and update cvar fromamx_sql_type "mysql"
toamx_sql_type "sqlite"
insql.cfg
.
Level INI Settings:
Add this settings in section
[Sounds]
- LEVEL_UP = events/task_complete.wav
Changes Log:
- [2.0]
- - First release (Rebuild Version).
- [2.1]
- - Fix MySQL error.
- [2.1f1]
- - Fix MySQL table.
- - Fix increment rate.
- [2.2]
- - Added new save type SQLite.
- - Added new Auth type 'Name'.
- - Added new system mode #3 (ze_levels.cfg).
- - Removed duplicate Level up message in chat.
- - Minor improvements and changes.
- [2.2f1]
- - Fix load issue.
- [2.2f2] ; Current
- - Added new commands for ADMIN_RCON.
- - 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
withMaxXP
.
Mode 1: Multiply a value of
MaxXP
of the player onze_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: