AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   XP Mod 1.2.4 (https://forums.alliedmods.net/showthread.php?t=165138)

modernwarfare 08-19-2011 15:39

XP Mod 1.2.4
 
5 Attachment(s)
This is the last release , im not updating this anymore
everyone who wants the lastest updates then pm me.
And thx for your supporting


XP Mod
Version 1.2.4


This is my first Plugin so help me if there is anything wrong.

Description:
This plugin lets the user get xp for killing players , and for every level there is an amount of xp needed , i added 45 levels but you can easy add more.
I made this plugin for i saw a req for a plugin like this and here you go.
Its easy to edit and i think this is a good base. I tested it just in cs 1.6 but idk if it would work on the others (maybe can someone test?). This plugin have deathmatch mode too , you can turn it on and off. In this plugin you add a shop too , in the shop you can buy skills , every skill level costs 1 x Skill Level = Points , there is 45 levels in every skill and you get 5 points every level. For more info about upgrades write /mainmenu. In this plugin you can us either sql or nvault to save/load data. In this plugin there is webstats too.


nVault Installation:
1- Download the XP-Mod.sma and compile it (or just download the amxx file from attachments)
2- Open cstrike\addons\amxmodx\plugins and put the amxx file there
3- Open cstrike\addons\amxmodx\configs\plugins.ini and write this there.
Code:

XP-Mod.amxx debug

4- Download
sound.zip and place the sound folder in your cstrike folder so it be: cstrike\sound\xpmod\all onther sounds here
5- Put xpmod.txt in cstrike\addons\amxmodx\data\lang
6- Run and test it.

SQLx Installation:
1- Download the XP-Mod.sma file and add it to cstrike\addons\amxmodx\scripting
2- Open the file and find
Code:

#define USE_NVAULT
3-Now make it like
Code:

//#define USE_NVAULT
4-Now find the following things and edit them to yours:
Code:

new Host[]    = ""
new User[]    = ""
new Pass[]    = ""
new Db[]    = ""

Change Host to the host ip/adress
Change user to the sql user
Change pass to the sql user password
Change Db to the sql database name

example:

Code:

new Host[]    = "localhost"
new User[]    = "test"
new Pass[]    = "123"
new Db[]    = "xpmod"

3- In the scripting there is an exe that is namned compiler , run it and then go to the folder compiled and in there find the XP-Mod-sql.amxx and copy it
and open cstrike\addons\amxmodx\plugins and place it there
5- Open cstrike\addons\amxmodx\configs\plugins.ini and write this there.
Code:

XP-Mod.amxx debug

6- Download
sound.zip and place the sound folder in your cstrike folder so it be: cstrike\sound\xpmod\all onther sounds here
7- Put xpmod.txt in cstrike\addons\amxmodx\data\lang
8- Run and test it.

Webstats Installation:
1- Download the webstats.zip
2- open the Config.php and edit the following:

SQL_HOST - the sql host
SQL_USER - the sql username
SQL_PASS - the sql username password
SQL_DB - the sql databse
Code:


    $result = $sql->query("SELECT * FROM xpmod ORDER BY xp DESC LIMIT 15;");



SELECT * FROM xpmod - what table (change xpmod to your table name)
ORDER BY xp - what it orders the players on (xp , lvl , points or anything else)
DESC LIMIT 15 - How much players do you want it to show (15)

Now copy all files to your webhost/website

Requirements:

nVault version:
nvault
fun
cstrike
fakemeta
hamsandwich
engine

SQLx version:
sqlx
fun
cstrike
fakemeta
hamsandwich
engine

Cvars:
Code:

SaveXP - Turns saving on and off (default on = 1)
Deathmatch - Turns Deathmatch on and off (default on = 1)
unlimitedammo - Turns unlimited ammo on and off (default on = 1)
nobuy - Turns no buy on and off (default on = 1)
upgradesshop - Turns shop on and off (default on = 1)
points_per_level - Amount points gained every level (default = 5)
sounds - Turns sounds on and off (default on = 1)
welcomemsg - Turns on or off welcome messege (default on = 1)
lvlupmsg - Turns on or off level up messge to everybody (default on = 1)
XP_per_kill - Amount xp gained per kill (default = 100)
XP_per_hs - Amount xp gained per Headshot (default = 50)
XP_per_he - Amount xp gained per HE Grenade kill (default = 50)
XP_per_knife - Amount xp gained per knife kill (default = 50)
XP_per_plant - Amount xp gained per bomb plant (default = 50)
XP_per_def - Amount xp gained per bomb defuse (default = 50)
XP_per_bomb - Amount xp gained per bomb explosion (default = 50)
XP_per_save - Amount xp gained per Saved target (default = 50)
XP_per_hostresc - Amount xp gained per Hostages rescue for ct (default = 50)
XP_per_hostnresc - Amount xp gained per Hostages not rescue for t (default = 50)
killstreak - Amount Kills needed for kill streak bonus (default = 4)
hsstreak - Amount Headshots needed for Headshot streak bonus (default = 4)
killstreakb - Amount xp gained for kill streak bonus (default = 200)
hsstreakb - Amount xp gained for kill streak bonus (default = 200)
gunsmenu - Turns guns menu on and off (default on = 1)



Commands:

Chat commands:
Code:

say /reset - resets everything
say /menu - shows the main menu
say /shop - shows the upgrade menu
say /sell - shows the upgrade sell menu
say /help - shows the help menu
say guns - shows the guns menu
say /myrank - shows your rank (just sql version , vault version coming soon)
say /15top - shows top 15 players (just sql version , vault version coming soon)

Consle commands:
Code:

help - shows the help menu
mainmenu - shows the main menu
shop - shows the upgrade menu
sell - shows the upgrade sell menu
help - shows the help menu
xpmod_setlvl - usage: <target> <level> (needs ADMIN_BAN)
xpmod_setpoints - usage: <target> <points> (needs ADMIN_BAN)



Languages:
[EN] - By modernwarfare (me)
[PL] - By MmikiM
[NL] - By drekes
[SV] - By modernwarfare (me)
[ES] - By Korxu
[BG] - By DeLiriuM
[TR] - By quLeryuzz
[SK] - By sulinek
[FR] - By ANTICHRISTUS
[DA] - By DoPe^
[RO] - By Nur56
[IT] - By aaarnas

More Languages soon.


ToDo List:

[list][*]Fix any bugs or problems if there is any.[*]Add more Languages[*]Make a better webstats template and player searching[*]Add Ranking

Tirant 08-19-2011 16:33

Re: XP Mod 1.0.0
 
I'd remove this unless you want to be flamed.

modernwarfare 08-19-2011 16:36

Re: XP Mod 1.0.0
 
Quote:

Originally Posted by Tirant (Post 1536539)
I'd remove this unless you want to be flamed.


do you really think i care?

im just helping new ppls

because no one like helped me with out some users (im not telling any names)

so i have felt how when nobody cares and nobody helps you

so i want help new beginners

and i dont care if anyone flamed

Tirant 08-19-2011 16:41

Re: XP Mod 1.0.0
 
Quote:

Originally Posted by modernwarfare (Post 1536542)
do you really think i care?

im just helping new ppls

because no one like helped me with out some users (im not telling any names)

so i have felt how when nobody cares and nobody helps you

so i want help new beginners

and i dont care if anyone flamed

Hey, more power to ya. There's plenty of help if you know where to look, and there are also some really great tutorials. You just have to actually WANT to learn and code in a readable style.

modernwarfare 08-19-2011 16:59

Re: XP Mod 1.0.0
 
Quote:

Originally Posted by Tirant (Post 1536545)
Hey, more power to ya. There's plenty of help if you know where to look, and there are also some really great tutorials. You just have to actually WANT to learn and code in a readable style.


ok ok shut dont talk about flaming

Stereo 08-19-2011 17:29

Re: XP Mod 1.0.0
 
Cool.

You can add a shop and:

XP_per_he - Amount xp gained per grenade kill

plowed 08-19-2011 17:48

Re: XP Mod 1.0.0
 
PHP Code:

public PlayerSpawn(id)
{
    if(
BombPlanted)
    {
    
BombPlanted false;    
    }
    if(!
is_user_bot(id) && is_user_connected(id)){
    if (
PlayerLevel[id] == 0) {
    
set_user_health(id100);
    
set_user_armor(id100);
    }
    if (
PlayerLevel[id] == 1) {
    
set_user_health(id110);
    
set_user_armor(id110);
    }
    if (
PlayerLevel[id] == 2) {
    
set_user_health(id120);
    
set_user_armor(id120);
    }
    if (
PlayerLevel[id] == 3) {
    
set_user_health(id130);
    
set_user_armor(id130);
    }
    if (
PlayerLevel[id] == 4) {
    
set_user_health(id140);
    
set_user_armor(id140);
        }
    if (
PlayerLevel[id] == 5) {
    
set_user_health(id150);
    
set_user_armor(id150);
        }
    if (
PlayerLevel[id] == 6) {
    
set_user_health(id160);
    
set_user_armor(id160);
        }
    if (
PlayerLevel[id] == 7) {
    
set_user_health(id170);
    
set_user_armor(id170);
        }
    if (
PlayerLevel[id] == 8) {
    
set_user_health(id180);
    
set_user_armor(id180);
        }
    if (
PlayerLevel[id] == 9) {
    
set_user_health(id190);
    
set_user_armor(id190);
        }
    if (
PlayerLevel[id] == 10) {
    
set_user_health(id200);
    
set_user_armor(id200);
        }
        }
    } 

->

PHP Code:

public PlayerSpawn(id)
{
    if(
BombPlanted)
    {
    
BombPlanted false;    
    }
    if(!
is_user_bot(id) && is_user_connected(id)){
    new 
bonus 100 + (PlayerLevel[id] * 10)
    
set_user_health(idbonus)
    
set_user_armor(idbonus)
          }
        } 

edit: Fixed mistake˛

modernwarfare 08-19-2011 17:57

Re: XP Mod 1.0.0
 
Quote:

Originally Posted by Stereo (Post 1536569)
Cool.

You can add a shop and:

XP_per_he - Amount xp gained per grenade kill

oh yes thx will add the grenade kill :)

Quote:

Originally Posted by plowed (Post 1536581)
PHP Code:

public PlayerSpawn(id)
{
    if(
BombPlanted)
    {
    
BombPlanted false;    
    }
    if(!
is_user_bot(id) && is_user_connected(id)){
    if (
PlayerLevel[id] == 0) {
    
set_user_health(id100);
    
set_user_armor(id100);
    }
    if (
PlayerLevel[id] == 1) {
    
set_user_health(id110);
    
set_user_armor(id110);
    }
    if (
PlayerLevel[id] == 2) {
    
set_user_health(id120);
    
set_user_armor(id120);
    }
    if (
PlayerLevel[id] == 3) {
    
set_user_health(id130);
    
set_user_armor(id130);
    }
    if (
PlayerLevel[id] == 4) {
    
set_user_health(id140);
    
set_user_armor(id140);
        }
    if (
PlayerLevel[id] == 5) {
    
set_user_health(id150);
    
set_user_armor(id150);
        }
    if (
PlayerLevel[id] == 6) {
    
set_user_health(id160);
    
set_user_armor(id160);
        }
    if (
PlayerLevel[id] == 7) {
    
set_user_health(id170);
    
set_user_armor(id170);
        }
    if (
PlayerLevel[id] == 8) {
    
set_user_health(id180);
    
set_user_armor(id180);
        }
    if (
PlayerLevel[id] == 9) {
    
set_user_health(id190);
    
set_user_armor(id190);
        }
    if (
PlayerLevel[id] == 10) {
    
set_user_health(id200);
    
set_user_armor(id200);
        }
        }
    } 

->

PHP Code:

public PlayerSpawn(id)
{
    if(
BombPlanted)
    {
    
BombPlanted false;    
    }
    if(!
is_user_bot(id) && is_user_connected(id)){
    if (
PlayerLevel[id] == 0) {
    
set_user_health(id100);
    
set_user_armor(id100);
}
else {
    new 
bonus PlayerLevel[id] * 10
    set_user_health
(idbonus)
    
set_user_health(idbonus)
          }
        }
    } 


added thx will give you creadits :)

drekes 08-20-2011 12:18

Re: XP Mod 1.0.5
 
Quote:

Originally Posted by modernwarfare (Post 1536497)
[*]Me (not much maybe 10% for editing).

If you only edited (or written 10%) of the code, you shouldn't release it.
You should look into more tutorials & understand how everything works
if you're releasing a plugin. Not copy-paste parts from tutorials & edit that a little bit.

modernwarfare 08-20-2011 13:09

Re: XP Mod 1.0.5
 
Quote:

Originally Posted by drekes (Post 1537076)
If you only edited (or written 10%) of the code, you shouldn't release it.
You should look into more tutorials & understand how everything works
if you're releasing a plugin. Not copy-paste parts from tutorials & edit that a little bit.

you are right

but i took some lines and etc

but i just want the begginers to have a good base :)


All times are GMT -4. The time now is 12:37.

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