Raised This Month: $51 Target: $400
 12% 

ClasicXp level mod


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay       
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 09-05-2013 , 09:45   ClasicXp level mod
Reply With Quote #1

Introduction:

I always liked to play cs and also to gain something, an award, etc.. So I started playing on servers with levelmod but I was often disappointed by the plugin itself because he didn't have many options,etc.
So I thought, why do not I try to do something for my taste, maybe others also enjoy it. This is the little story behind the plugin.

General aspects:

-This is a simple levemod with 9 levels.
-Version is 0.5 stable. Once per round will start a contest.
-A hud message will appear on the screen with some characters. First player who type the characters will win some xp.
-A blacklist system is present.This sistem block a specified player from receiving xp.
-Has some commands like amx_givexp etc
-For every level you receive some guns.
-Nvault xp save.
-Xp top
-And more.....

Part 1: levels
Levels are below:

Code:
Level 1 ->100 xp
Level 2 ->500 xp
Level 3 ->1000 xp	
Level 4 ->5000 xp
Level 5 ->10000 xp
Level 6 ->50000 xp
Level 7 ->60000 xp
Level 8->90000 xp
Level 9 ->100000 xp
You need 100 xp for level 1,500 xp for level 2,etc. Every player start from level 0 and from 0 xp.
As I said above every level has his guns and items.
Let's say that I make 100 xp during a round. My level wont increase until next spawn. This is to prevent receiving guns and items during a round.

The guns for every level:
Code:
Level 1: fb and deagle.
Level 2 :2fb and deagle
Level 3: 2fb,he and deagle
Level 4: 2fb,he,sk and deagle
Level 5: deagle,fg,sk,he and kevlar+helmet
Level 6: deagle,2fg,sk,2he and kevlar+helmet
Level 7:awp,deagle,2fg,2sk,3he and kevlar+helmet
Level 8: for TS ak-47,deagle,3fg,3sk,3he andkevlar+helmet and for CT m4a1,deagle,3fg,3sk,3he and kevlar+helmet
Level 9: for TS ak47,awp,deagle,3fg,3sk,3he,kevlar+helmet and nvgs and for CT m4a1,awp,deagle,3fg,3sk,3he,kevlar+helmet,defuser and nvgs"
This items are received at 10 seconds after spawn.
Because I didn't have an ideea for items I put something silly(I think) but you can modify them how you want.(See Tutorials part)

Part II : blacklist sistem

First you need to open from your configs folder BlackList.ini
After that simply add the name or the steam id in the file. The one that have the name or the steam id won't receive xp and a connections message will be showed.

Example:
Code:
; BlackList*
HamletEagle
Terminator :)
HappyDay
STEAM_0*****649
If you want to enable xp again for the player just delete or comment(//) his name or steam id.

Part 3 : block name change

I added a block name change options for prevent thelf of xp.
When a player type in his console name etc a message will appear:
Quote:
[ClasicXp]Name change is disabled on this server.
Part 4 : commands

With this plugin you can use the folllowing commands :

Public commands:
Code:
/xp: show a chat message with your xp and your level:"You have x xp and level x"
/info : will show a motd with some informations.
/topxp : show a top15 by xp.
Admin commands: (need rcon acces)
Code:
amx_givexp : give xp to a player(amx_givexp "playername" "ammount") 
amx_takexp : take xp from a player(amx_takexp "playername" "ammount") 
amx_xp : find a player xp (amx_xp "playername")
Please read Know bugs part.

Part 5: cvars
Code:
XP_Kill: xp/kill,default 20 
XP_Hs: xp/hs,default 40
XP_AWP: xp/awp kill,default 15
XP_plant: xp/planting the bomb,default 5
XP_defuse: xp/defusing the bomb,defult 5
XP_knife: xp/knife kil,defult 50
XP_he: xp/he grenade kill,default 10
XP_save : xp save. Turn on/off xp saving. If it is 0 when a player disconnect from server or when map is changed the xp will reset to 0. 
name_change //default 1. 1=on 0=off
advertise : show a connection message. The message looks like that:
Quote:
[ClasicXp]Welcome name. [ClasicXp]This server is running ClasicXp Level mod by Hamlet Eagle. [ClasicXp]For more info type /info.
reminder : show a hud with you xp and level. Now the cvars for the contest. All of this have this xp_contest_ xp_contest_interval : time to repet event xp_contest_answer_time : time to answer xp_contest_min_xp : min value of xp xp_contest_max_xp : max value of xp I suggest you to leave the cvars at default setiing except xp_contest_min_xp and xp_contest_max_xp The value of xp will be between this two cvars.

Part 6: nvault sistem

The xp is saved at every disconnect and loaded at every connect in a nvault file called XpClasicMod. If you want to reset the xp for all players shut down you server and delete XpClasicMod.vault file from addons/amxmodx/data/vault

Part 7 : the contest

Once per round(as it is default,can be change by cvars) a contest will start. A hud message appear and players must type the characters showed in the hudmessage. First player which do that will receive some xp.

Part 8: Levelmod.cfg

This file appear in you configs folder after you activate this plugin. Inside you will find all the plugin's cvars. You can modify them.


It's looks like that:
Spoiler


Part 9: xp top
When a player tipe /xp on the screen will appear a motd with an xp top. It will looks like that:
Code:
1   HamletEagle   30 xp
2   Player1            6 xp
3   Player 5654     1 xp

Installation:

Put levelmod.amxx in plugins folder.
Put levelmod.sma in scripting folder.
Open plugins.ini file and type levelmod.amxx
Put inf.txt file in your config folder.
Change the map to activate the plugin.

Know bugs:

1.When you give/take xp from a player his level is not update properly.
2............................................ ............................................. ...

To do :
1. Add some classes that players can buy with xp.
2. Add a shop for every classes.
3. Add more levels.
4. Fix the bug from commands(see know bugs part).
5. Add a top15 for xp.-done
6 .Add more cvars.-done
7. Add a ml file.
8. Make messages to look more interesting.
9. Move all cvars to xp_cvars.cfg-done

Info:
The code contain a lof of comments to be easly to understand.
Please note that this is a beta release.
I'm not answering questions that can be solved by reading this post or that have been already answered in the comments.

Tutorials:

1.If you want to change the items go to this public Player_items and edit the lines starting with give_item. See http://forums.alliedmods.net/showthread.php?p=308210, may help you.
2.How to disable name change block ? Change the cvar namech to 0

Images: I'll add soon.

Change Log
Code:
+0.1:
-initial release
+0.2 beta : 
-add a blacklist system,contest,block name change
-two bug fix.
+0.3 beta : 
-add a cvar for block name change,
-fix a bug when you press y don't type anything and press enter you receive xp.
+0.4 beta : 
-move all the cvars to Levelmod.cfg file. You must modifiy them from this file.
+0.5 stable:
-add a top15 for xp
-totally rewrite contest part. You must delete LevelMod.cfg put the new version and change map.
If you will find any bugs(other than those present on Know bugs part) let me know. I'll fix them.
Attached Files
File Type: txt inf.txt (703 Bytes, 618 views)
File Type: sma Get Plugin or Get Source (levelmod.sma - 17665 views - 25.9 KB)

Last edited by HamletEagle; 12-14-2013 at 03:04.
HamletEagle is offline
BLacking98
Veteran Member
Join Date: Oct 2012
Location: California
Old 09-05-2013 , 11:05   Re: ClasicXp level mod
Reply With Quote #2

Nice job !
(sk stands for smoke grenade?)
__________________
BLacking98 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 09-05-2013 , 12:24   Re: ClasicXp level mod
Reply With Quote #3

Quote:
Originally Posted by BLacking98 View Post
Nice job !
(sk stands for smoke grenade?)
Yes,sk=smoke grenade.
HamletEagle is offline
Old 09-06-2013, 06:58
LordOfNothing
This message has been deleted by Arkshine. Reason: Off topic.
Old 09-06-2013, 07:01
HamletEagle
This message has been deleted by Arkshine. Reason: Off topic.
Old 09-06-2013, 08:17
sami_spt
This message has been deleted by Arkshine. Reason: Off topic.
Old 09-06-2013, 14:09
BLacking98
This message has been deleted by Arkshine. Reason: Off topic.
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 09-07-2013 , 13:35   Re: ClasicXp level mod
Reply With Quote #4

Nice, but why do you need to block name change? If you're using saving by steamid that isn't required.
__________________
Kia is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 09-08-2013 , 04:31   Re: ClasicXp level mod
Reply With Quote #5

Quote:
Originally Posted by Kia View Post
Nice, but why do you need to block name change? If you're using saving by steamid that isn't required.
I'm saving the xp by name. Please don't tell me to save the xp by steam id. I won't do that.

Last edited by HamletEagle; 09-08-2013 at 04:32.
HamletEagle is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 09-08-2013 , 04:37   AW: Re: ClasicXp level mod
Reply With Quote #6

Quote:
Originally Posted by HamletEagle View Post
I'm saving the xp by name. Please don't tell me to save the xp by steam id. I won't do that.
Do you have a vaild reason for that?
Saving via ID is much more saver.
__________________
Kia is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 09-08-2013 , 11:44   Re: AW: Re: ClasicXp level mod
Reply With Quote #7

Quote:
Originally Posted by Kia View Post
Do you have a vaild reason for that?
Saving via ID is much more saver.
Simply, I won't do that,not all people have a steam id.

Last edited by HamletEagle; 09-08-2013 at 11:45.
HamletEagle is offline
bLacK-bLooD
AlliedModders Donor
Join Date: Jun 2008
Old 09-08-2013 , 12:14   Re: ClasicXp level mod
Reply With Quote #8

It means that not everyone has steam. And that means that you are making plugins for non-steamers.

Does that ring a bell?
__________________
We all live under the same sky but we have different horizons.
bLacK-bLooD is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 09-08-2013 , 12:34   Re: ClasicXp level mod
Reply With Quote #9

Quote:
Originally Posted by bLacK-bLooD View Post
It means that not everyone has steam. And that means that you are making plugins for non-steamers.

Does that ring a bell?
Please stop making off-topic. I'm not making plugin for steamers or non-steamers,I'm making plugin that can be use by all people.
HamletEagle is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 09-08-2013 , 13:04   Re: ClasicXp level mod
Reply With Quote #10

Quote:
Originally Posted by HamletEagle View Post
Please stop making off-topic. I'm not making plugin for steamers or non-steamers,I'm making plugin that can be use by all people.
This includes non-steamers since they have no SteamID.
Well, it's up to you how you want to save, just giving advice that saving via name is very insecure, since it's a lot easier to steal a name then a SteamID.
__________________
Kia is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:50.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode