Approved Levels-XP System

Plug-ins compatibility with Zombie Escape 1.x only!


Post Reply
User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2213
Joined: 7 years ago
Contact:

Levels-XP System

#1

Post by Raheem » 7 years ago

Levels-XP System

Description:
  • Level-XP system for our Mod. Player need to earn XP so his level go up. Optimized version and many new things have been inserted.
Cvars:
  • ze_zombie_infect 3 How much XP zombie get for infecting Human?
  • ze_escape_success 5 How much XP Human get for Escaping?
  • ze_enable_dmg 1 Enable damage XP? 0 = Disable | 1 = Enable
  • ze_required_dmg 50.0 Damage Required so Player get XP?
  • ze_dmg_award 3 How much XP Human get for make the Required damage?
  • ze_start_xp 50 How much XP new Player get (His first time to enter the server)?
  • ze_max_xp_first_level 100 First Level XP needed?
  • ze_maxlevels_increment 2 XP needed increment Rate.
  • ze_enable_percentage_style 1 Enable To display XP as Percentage? 0 = Disable | 1 = Enable
  • ze_new_level_zero_xp 0 When Player get new Level start his XP from Zero? 0 = No | 1 = Yes
  • ze_add_commas_to_xp 1 Enable add commas if you use number mode not percentage? 0 = Disable | 1 = Enable
  • ze_levels_save_type 0 Saving type, 1 = MySQL | 0 = nVault
  • ze_levels_host "127.0.0.1" MySQL host.
  • ze_levels_user "root" MySQL username have all permissions to database.
  • ze_levels_pass "password" MySQL username password.
  • ze_levels_dbname "levels_db" MySQL database name.
Natives (API):
  • ze_get_user_xp(id) This will return the XP the player have. id is the player Index.
  • ze_set_user_xp(id, iXP) Set player XP. id is the player index. iXP is the XP amount to set.
  • ze_get_user_level(id) This will return the player level. id is the player Index
  • ze_set_user_level(id, iLevel) This will set the player level. id is Player Index. iLevel is the level to give.
  • ze_get_user_max_xp(id) This will return the XP needed for the next Level for this player. id is the Player index.
  • ze_set_user_max_xp(id, iMaxXP) To set Max XP for player. id - Player index, iMaxXP is XP to set.
Forwards (API):
  • ze_on_levelup(id) Called on everytime a player levels up, id is player index.
Installation & Instructions:
  • Simply install it like any plugin nothing new but don't forget to copy the sound folder also.
  • You can change the Hud Message Colors and Position from the Defines in the code. So you will need to Re-Compile the plugin again after editing.

    1. // Messages
    2. const Float:HUD_SPECT_X = -1.0
    3. const Float:HUD_SPECT_Y = 0.70
    4. const Float:HUD_STATS_X = -1.0
    5. const Float:HUD_STATS_Y = 0.90
    6.  
    7. const HUD_STATS_ZOMBIE_R = 200
    8. const HUD_STATS_ZOMBIE_G = 220
    9. const HUD_STATS_ZOMBIE_B = 0
    10.  
    11. const HUD_STATS_HUMAN_R = 0
    12. const HUD_STATS_HUMAN_G = 200
    13. const HUD_STATS_HUMAN_B = 210
    14.  
    15. const HUD_STATS_SPEC_R = 100
    16. const HUD_STATS_SPEC_G = 100
    17. const HUD_STATS_SPEC_B = 100
  • You can change the Level UP sound as you need.
  • If you enabled Percentage Style this mean that instead of Displaying: XP: 500/1000 it will display: XP 50.00 %
  • MaxLevels Increment is a rate that control how much XP needed for the next Level. So for Example if you set the First Level XP to 100 then when player connect he will have 0/100 XP The increment rate works like: 0/200 XP, 0/400 XP, 0/800 XP It will Multiply the needed XP in the factor you set. The factor can take the float form like: 1.5, 0.5, 1.2, 1.55 And so on.
  • If you enable start xp from zero so when player get new level his XP will be zero. And if you used Percentage mode so it will be 0.0 %
  • Commas will be added only if you use normal mode not Percentage one.
  • If you need this system to work properly with No-Steam/Non-Steam Clients which their games not generate unique SteamID so in reunion.cfg edit these two Cvars cid_NoSteam47, cid_NoSteam48 to be like: cid_NoSteam47 = 3, cid_NoSteam48 = 3.
  • Rank/Top System for Level-System: Here.
  • All ideas are welcomed, Any bug please report.

Changelog:
  • Spoiler!
    Version: 1.0
    • First Release.
    Version: 1.1
    • Added Check levels if ze_set_user_xp() native used.
    • Added New Cvar determine if Player XP should start from zero or not when he get new level.
    • Added Commas Cvar.
    • Added XP/MaxXP if one Spec other.
    Version: 1.2
    • Fixed player can go higher levels very fast.
    Version: 1.3
    • Added Auto detection for Non-Steam (STEAM_ID_LAN & VALVE_ID_LAN) users and save thier XP, Levels by their name. Normal players who have steamid it will be saved with steamid.
    Version: 1.4
    • Fixed some problems.
    • Added new cvar to save XP, Levels every X seconds.
    • Added new Rank System like /top15
    Version: 1.5
    • Added /myrank like default one in amxmodx but here for levels.
    • Replace any multi-byte character with space.
    • Fixed Saving & Loading Problems.
    • Added support in /lvlrank and /myrank for Non-Steam users.
    • Fixed giving XP at end round. Now it will give only alive humans only.
    • Added cvar to control Screen Fade/Shake effects.
    • Added new native to return max xp needed for next level.
    • Fixed problem in set level native.
    • Rank players in same levels with their XP. Highest XP will be first.
    • Some optimizations.
    Version: 1.6
    • Use nVault to be compatible with our ZE v1.2 and to solve resetting levels issue.
    Version: 1.7
    • Removed Rank/Top systems.
    • Temporary Fix for losing Levels, XP Inserted like coins system fix.
    • Removed support for "STEAM_ID_LAN/VALVE_ID_LAN".
    Version: 1.8
    • Fixed nVault saving issue.
    • Changed the Coding style.
    • Recoded natives, added explanation for natives in .inc file. Check Natives API.
    Version: 1.9 [Current Version]
    • Inserted MySQL support.
    • Added new forward that called when player levels up.

Screenshots:
  • ImageImageImageImageImage
Downloads:
He who fails to plan is planning to fail

johnnysins2000
Veteran Member
Veteran Member
Paraguay
Posts: 679
Joined: 7 years ago
Location: Paraguay
Contact:

#2

Post by johnnysins2000 » 7 years ago

nice and i think u already have share this on ZPPV?


Anyway i wanted to request u that When will u update the ze mod ?

what i am trying to say is that can u also put the Vip model and admin model code in the main sma just like zp has it ?
Nobody Is That Busy If They Make Time :roll:

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2213
Joined: 7 years ago
Contact:

#3

Post by Raheem » 7 years ago

All old works are out-dated and badly coded and no one will support it. All the new works here are coded highly with experience.

You can use it as separate plugin in the next updates it won't be integrated with them. Just to know why >> Because our mod is already multi-sources we need to make things easier not harder so i'am not going to integrate it.
He who fails to plan is planning to fail

johnnysins2000
Veteran Member
Veteran Member
Paraguay
Posts: 679
Joined: 7 years ago
Location: Paraguay
Contact:

#4

Post by johnnysins2000 » 7 years ago

I see what u trying to say is that u want to make seperate sma just like zp50 so it will be easier to edit for the scripters who want to change them as well! Ok then i will use that plugin

Nice Work

I Will wait for the ze vip plugin update
Nobody Is That Busy If They Make Time :roll:

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2213
Joined: 7 years ago
Contact:

#5

Post by Raheem » 7 years ago

This what we already done in all the mod.

About the VIP plugin updates i'll make after i finish some important things first.
He who fails to plan is planning to fail

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2213
Joined: 7 years ago
Contact:

#6

Post by Raheem » 7 years ago

New version Released.
Current Version Now: 1.1
He who fails to plan is planning to fail

User avatar
sam_bhosale4
Mod Tester
Mod Tester
India
Posts: 109
Joined: 7 years ago
Location: INDIA
Contact:

#7

Post by sam_bhosale4 » 7 years ago

I installed It Yesterday.. 7 players were playing!
It worked for me fine,like level up xp gain and all.. but for others they were leveling up on each round also I get normally LEVEL 0: 59/100 in hud but others get LEVEL 0:5/1 like this and they level up each round! Having this big problem because everyone is leveling up each round which is bad..Please fix it raheem bro!
Thanks!
-=SeRious-GaminG|Zombie Escape[Alien vs. Predator]|Asia=-
206.189.132.169:40000
Image

johnnysins2000
Veteran Member
Veteran Member
Paraguay
Posts: 679
Joined: 7 years ago
Location: Paraguay
Contact:

#8

Post by johnnysins2000 » 7 years ago

sam_bhosale4 wrote: 7 years ago I installed It Yesterday.. 7 players were playing!
It worked for me fine,like level up xp gain and all.. but for others they were leveling up on each round also I get normally LEVEL 0: 59/100 in hud but others get LEVEL 0:5/1 like this and they level up each round! Having this big problem because everyone is leveling up each round which is bad..Please fix it raheem bro!
Thanks!
Post pictures To Show Your Problem clearly

Change the Cvars from the code

But still show The pictures So I can understand what is Your Problem

I think Your problem Is with cvars


Raheem has Showed Two types of HUD

One is XP : %
One is XP : In Numbers
Nobody Is That Busy If They Make Time :roll:

User avatar
sam_bhosale4
Mod Tester
Mod Tester
India
Posts: 109
Joined: 7 years ago
Location: INDIA
Contact:

#9

Post by sam_bhosale4 » 7 years ago

johnnysins2000 wrote: 7 years ago
sam_bhosale4 wrote: 7 years ago I installed It Yesterday.. 7 players were playing!
It worked for me fine,like level up xp gain and all.. but for others they were leveling up on each round also I get normally LEVEL 0: 59/100 in hud but others get LEVEL 0:5/1 like this and they level up each round! Having this big problem because everyone is leveling up each round which is bad..Please fix it raheem bro!
Thanks!
Post pictures To Show Your Problem clearly

Change the Cvars from the code

But still show The pictures So I can understand what is Your Problem

I think Your problem Is with cvars


Raheem has Showed Two types of HUD

One is XP : %
One is XP : In Numbers
no bro read it again what i said!
its not with cvar!
im using xp in number where for first level it should show LEVEL 0: 0/100 but instead because of some problem for others it shows LEVEL 0:0/0 or 5/0..
also on each round it levels up like if 1st round ends the players goes level 2 if 2nd round ends players goes level 3 and so on..
and i dont have screenshots sorry since other players of my server reported this problem to me!
-=SeRious-GaminG|Zombie Escape[Alien vs. Predator]|Asia=-
206.189.132.169:40000
Image

johnnysins2000
Veteran Member
Veteran Member
Paraguay
Posts: 679
Joined: 7 years ago
Location: Paraguay
Contact:

#10

Post by johnnysins2000 » 7 years ago

sam_bhosale4 wrote: 7 years ago
johnnysins2000 wrote: 7 years ago
sam_bhosale4 wrote: 7 years ago I installed It Yesterday.. 7 players were playing!
It worked for me fine,like level up xp gain and all.. but for others they were leveling up on each round also I get normally LEVEL 0: 59/100 in hud but others get LEVEL 0:5/1 like this and they level up each round! Having this big problem because everyone is leveling up each round which is bad..Please fix it raheem bro!
Thanks!



Post pictures To Show Your Problem clearly

Change the Cvars from the code

But still show The pictures So I can understand what is Your Problem

I think Your problem Is with cvars


Raheem has Showed Two types of HUD

One is XP : %
One is XP : In Numbers
no bro read it again what i said!
its not with cvar!
im using xp in number where for first level it should show LEVEL 0: 0/100 but instead because of some problem for others it shows LEVEL 0:0/0 or 5/0..
also on each round it levels up like if 1st round ends the players goes level 2 if 2nd round ends players goes level 3 and so on..
and i dont have screenshots sorry since other players of my server reported this problem to me!
They Only Reported to you? And U believe Them?
Ask Them to show screenshot it will make Your Problem look Clear and understandable.... Although I never Faced the problem What u said wait for Raheem to reply Maybe he knows What is Your Problem

Maybe other players are getting xp fast That's why they are leveling up fast

Notice one Thing Man the cvars

U get xp for doING 50 damage and for infecting and Killing so I still think u must change cvars and call those players and test again
Nobody Is That Busy If They Make Time :roll:

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2213
Joined: 7 years ago
Contact:

#11

Post by Raheem » 7 years ago

Maybe this happen if player have no steamid.. I don't know but i tested the plugin with bots and it's working without problems. I'll test again the plugin in your server, Me and another bot to see what the problem from also i'll test with no steamid as STEAM_ID_LAN. Just when i get time ok.
He who fails to plan is planning to fail

User avatar
sam_bhosale4
Mod Tester
Mod Tester
India
Posts: 109
Joined: 7 years ago
Location: INDIA
Contact:

#12

Post by sam_bhosale4 » 7 years ago

Are you deaf? Man im not newbie here.. you talking to me like im newbie.. and one more thing.. other players who reported this to me included my cousin and other admins of my own server.. and the thing screenshot.. when they reported this they didn't took screenshots because they were busy playing and didn't knew screenshot is needed.. and the thing you saying they must be leveling fast are you that noob that you can't even think that on each round they are leveling up.. can't get that much xp on one round dude think again.. also cvars you are talking about... I already settled my own configured lower xp gain cvars.. so please before you say anything please read what I said and think and reply.. humble request to you..
-=SeRious-GaminG|Zombie Escape[Alien vs. Predator]|Asia=-
206.189.132.169:40000
Image

User avatar
sam_bhosale4
Mod Tester
Mod Tester
India
Posts: 109
Joined: 7 years ago
Location: INDIA
Contact:

#13

Post by sam_bhosale4 » 7 years ago

johnnysins2000 wrote: 7 years ago
sam_bhosale4 wrote: 7 years ago
johnnysins2000 wrote: 7 years ago




Post pictures To Show Your Problem clearly

Change the Cvars from the code

But still show The pictures So I can understand what is Your Problem

I think Your problem Is with cvars


Raheem has Showed Two types of HUD

One is XP : %
One is XP : In Numbers
no bro read it again what i said!
its not with cvar!
im using xp in number where for first level it should show LEVEL 0: 0/100 but instead because of some problem for others it shows LEVEL 0:0/0 or 5/0..
also on each round it levels up like if 1st round ends the players goes level 2 if 2nd round ends players goes level 3 and so on..
and i dont have screenshots sorry since other players of my server reported this problem to me!
They Only Reported to you? And U believe Them?
Ask Them to show screenshot it will make Your Problem look Clear and understandable.... Although I never Faced the problem What u said wait for Raheem to reply Maybe he knows What is Your Problem

Maybe other players are getting xp fast That's why they are leveling up fast

Notice one Thing Man the cvars

U get xp for doING 50 damage and for infecting and Killing so I still think u must change cvars and call those players and test again
Are you deaf? Man im not newbie here.. you talking to me like im newbie.. and one more thing.. other players who reported this to me included my cousin and other admins of my own server.. and the thing screenshot.. when they reported this they didn't took screenshots because they were busy playing and didn't knew screenshot is needed..so i removed plugin instantly.. and the thing you saying they must be leveling fast are you that noob that you can't even think that on each round they are leveling up.. can't get that much xp on one round dude think again.. also cvars you are talking about... I already settled my own configured lower xp gain cvars.. so please before you say anything please read what I said and think and reply.. humble request to you..
-=SeRious-GaminG|Zombie Escape[Alien vs. Predator]|Asia=-
206.189.132.169:40000
Image

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2213
Joined: 7 years ago
Contact:

#14

Post by Raheem » 7 years ago

Sam, Enter the server and let's do some tests together.
He who fails to plan is planning to fail

User avatar
sam_bhosale4
Mod Tester
Mod Tester
India
Posts: 109
Joined: 7 years ago
Location: INDIA
Contact:

#15

Post by sam_bhosale4 » 7 years ago

Raheem wrote: 7 years ago Maybe this happen if player have no steamid.. I don't know but i tested the plugin with bots and it's working without problems. I'll test again the plugin in your server, Me and another bot to see what the problem from also i'll test with no steamid as STEAM_ID_LAN. Just when i get time ok.
Yeah can be problem with STEAM ID option..I will be waiting for fix! Thanks raheem bro!
-=SeRious-GaminG|Zombie Escape[Alien vs. Predator]|Asia=-
206.189.132.169:40000
Image

User avatar
sam_bhosale4
Mod Tester
Mod Tester
India
Posts: 109
Joined: 7 years ago
Location: INDIA
Contact:

#16

Post by sam_bhosale4 » 7 years ago

Raheem wrote: 7 years ago Sam, Enter the server and let's do some tests together.
Ohk sure! but on which server mine? cuz i disabled the plugin and installed the old xp system of ze 2.3 for temporary!
-=SeRious-GaminG|Zombie Escape[Alien vs. Predator]|Asia=-
206.189.132.169:40000
Image

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2213
Joined: 7 years ago
Contact:

#17

Post by Raheem » 7 years ago

Hmm, Ok so let's test in my server. Just let's chat here now: http://escapers-zone.xyz/app.php/mchat
He who fails to plan is planning to fail

johnnysins2000
Veteran Member
Veteran Member
Paraguay
Posts: 679
Joined: 7 years ago
Location: Paraguay
Contact:

#18

Post by johnnysins2000 » 7 years ago

sam_bhosale4 wrote: 7 years ago
johnnysins2000 wrote: 7 years ago
sam_bhosale4 wrote: 7 years ago

no bro read it again what i said!
its not with cvar!
im using xp in number where for first level it should show LEVEL 0: 0/100 but instead because of some problem for others it shows LEVEL 0:0/0 or 5/0..
also on each round it levels up like if 1st round ends the players goes level 2 if 2nd round ends players goes level 3 and so on..
and i dont have screenshots sorry since other players of my server reported this problem to me!
They Only Reported to you? And U believe Them?
Ask Them to show screenshot it will make Your Problem look Clear and understandable.... Although I never Faced the problem What u said wait for Raheem to reply Maybe he knows What is Your Problem

Maybe other players are getting xp fast That's why they are leveling up fast

Notice one Thing Man the cvars

U get xp for doING 50 damage and for infecting and Killing so I still think u must change cvars and call those players and test again
Are you deaf? Man im not newbie here.. you talking to me like im newbie.. and one more thing.. other players who reported this to me included my cousin and other admins of my own server.. and the thing screenshot.. when they reported this they didn't took screenshots because they were busy playing and didn't knew screenshot is needed..so i removed plugin instantly.. and the thing you saying they must be leveling fast are you that noob that you can't even think that on each round they are leveling up.. can't get that much xp on one round dude think again.. also cvars you are talking about... I already settled my own configured lower xp gain cvars.. so please before you say anything please read what I said and think and reply.. humble request to you..

Please Mind Your Own Language and go to the IP which Raheem Has Given

Nobody face Errors Like U do because u don't read Instructions And Configure Server Properly So u get Noob ish problems

Hope Your Problem is solved :)
Nobody Is That Busy If They Make Time :roll:

User avatar
sam_bhosale4
Mod Tester
Mod Tester
India
Posts: 109
Joined: 7 years ago
Location: INDIA
Contact:

#19

Post by sam_bhosale4 » 7 years ago

For the problem I reported earlier, got screenshots for that.. Now you will understand what problem I was trying to say!
players get lvl up just by 1 infect or 1 escape where in screenshot u can see im still lvl 1 but they reached lvl 7,9 12 and more.. this is happening to more than half players and plugin working good for me and few others! for full problem please read my earlier post and check the current sscreenshots!
Please check Raheem bro and jack!
Waiting for fix cuz loving the plugin and using it on my server!
(In screenshots you can see at the bottom left)
thanks!
Attachments
Direct lvl 9
Direct lvl 9
Direct lvl 7
Direct lvl 7
here you can see he leveled up twice just by infecting 2!
here you can see he leveled up twice just by infecting 2!
-=SeRious-GaminG|Zombie Escape[Alien vs. Predator]|Asia=-
206.189.132.169:40000
Image

johnnysins2000
Veteran Member
Veteran Member
Paraguay
Posts: 679
Joined: 7 years ago
Location: Paraguay
Contact:

#20

Post by johnnysins2000 » 7 years ago

sam_bhosale4 wrote: 7 years ago For the problem I reported earlier, got screenshots for that.. Now you will understand what problem I was trying to say!
players get lvl up just by 1 infect or 1 escape where in screenshot u can see im still lvl 1 but they reached lvl 7,9 12 and more.. this is happening to more than half players and plugin working good for me and few others! for full problem please read my earlier post and check the current sscreenshots!
Please check Raheem bro and jack!
Waiting for fix cuz loving the plugin and using it on my server!
(In screenshots you can see at the bottom left)
thanks!

I see OK After Exams U give me IP of Your server And I will come to Your server To see What is the Problem Because This Problem didn't happened to me or anyone else but now u have post screenshots it is clear to me what is Your Problem

But still What I see is that U have messed Up Cvars

U said 1 Infection 1 Level up?
1 Kill 1 level UP

OK If Cvars are not Messed up I will come to the server myself to check

Sounds Fair Enough ? :)
Nobody Is That Busy If They Make Time :roll:

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: Bing [Bot] and 0 guests