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 :)

BunnYboiii 08-20-2011 13:22

Re: XP Mod 1.0.5
 
Just so you know its Credits, not Creadits. ^^

modernwarfare 08-20-2011 13:39

Re: XP Mod 1.0.5
 
Quote:

Originally Posted by BunnYboiii (Post 1537126)
Just so you know its Credits, not Creadits. ^^


oh thx edited


what you think about the plugin?

drekes 08-20-2011 13:42

Re: XP Mod 1.0.5
 
Quote:

Originally Posted by modernwarfare (Post 1537118)
but i just want the begginers to have a good base :)

No offence, but this plugin is far from a good base

modernwarfare 08-20-2011 14:34

Re: XP Mod 1.0.5
 
Quote:

Originally Posted by drekes (Post 1537139)
No offence, but this plugin is far from a good base

Thanks i dont care if its or not

but i realse anyway

UPDATED

Doc-Holiday 08-20-2011 21:57

Re: XP Mod 1.0.6
 
lmfao.... its funny when i can look thorough the code and even read the same function names that are in battle field...


Functions that match mine:
ShowHud, HudShow (Same thinking ent to update player hud)
All of my Bomb functions
My hostage function.

and that was just a quick scroll...

Your indenting is horrible... I'm all for you testing and all that.. but really you should learn how to code first.....

we all start some where... i was like you once.. i c/p'd got called on it and got pissed and now look...

My C/P (First Plugin)
https://forums.alliedmods.net/showthread.php?t=58826

My New Virtual Reality
http://forums.alliedmods.net/showthread.php?p=1146548

modernwarfare 08-20-2011 22:14

Re: XP Mod 1.0.6
 
Quote:

Originally Posted by Doc-Holiday (Post 1537381)
lmfao.... its funny when i can look thorough the code and even read the same function names that are in battle field...


Functions that match mine:
ShowHud, HudShow (Same thinking ent to update player hud)
All of my Bomb functions
My hostage function.

and that was just a quick scroll...

Your indenting is horrible... I'm all for you testing and all that.. but really you should learn how to code first.....

we all start some where... i was like you once.. i c/p'd got called on it and got pissed and now look...

My C/P (First Plugin)
https://forums.alliedmods.net/showthread.php?t=58826

My New Virtual Reality
http://forums.alliedmods.net/showthread.php?p=1146548

Quote:

Originally Posted by modernwarfare (Post 1536497)
Credits:
  • Some tuts about how to make a xp mod plugin.
  • Some codes from onther tutorial and plugins from Allied Modders.
  • Stereo (some ideas)
  • plowed (cleaner code)
  • Doc-Holiday (some codes from his plugin)



its why i have that :)

thx for the codes helped me alot and i use your plugin :)

Doc-Holiday 08-20-2011 22:17

Re: XP Mod 1.0.6
 
Quote:

Originally Posted by modernwarfare (Post 1537384)
its why i have that :)

thx for the codes helped me alot and i use your plugin :)

added it a min before this post??

Code:

Last edited by modernwarfare; Today at 07:13 PM.                                                                                                                                  Reason: Update 1.0.6                                                               



modernwarfare 08-20-2011 23:17

Re: XP Mod 1.0.6
 
Quote:

Originally Posted by Doc-Holiday (Post 1537387)
added it a min before this post??

Code:

Last edited by modernwarfare; Today at 07:13 PM.                                                                  Reason: Update 1.0.6                               



yes i know sorry forgot but if you see i wrote

some codes from plugins and tuts from alliedmodders

Doc-Holiday 08-20-2011 23:24

Re: XP Mod 1.0.6
 
Quote:

Originally Posted by modernwarfare (Post 1537405)
yes i know sorry forgot but if you see i wrote

some codes from plugins and tuts from alliedmodders


still this plugin is like 99% copy/paste... which will never get approved.

modernwarfare 08-20-2011 23:33

Re: XP Mod 1.0.6
 
Quote:

Originally Posted by Doc-Holiday (Post 1537410)
still this plugin is like 99% copy/paste... which will never get approved.

Do you really think that i care about what you and onther ppl saying?
no i dont. i dont care if this plugin didnt get approved.
i made this for all begginers that needs it.

-----------------------------------------------------------------
Code:

1.0.7:
Fixed many many problems and bugs
Added more upgrades futures
Added more commands

and updated To Do list.

Tirant 08-20-2011 23:37

Re: XP Mod 1.0.6
 
Quote:

Originally Posted by modernwarfare (Post 1537413)
Do you really think that i care about what you and onther ppl saying?
no i dont. i dont care if this plugin didnt get approved.
i made this for all begginers that needs it.

-----------------------------------------------------------------
Code:

1.0.7:
Fixed many many problems and bugs
Added more upgrades futures
Added more commands

and updated To Do list.

But obviously you are a beginner. That's what everyone is saying. The quality of this is nothing near where it needs to be in order to be approved. This doesn't help people at all. You don't have someone who doesn't speak English try and teach English to another person? You should make this a topic in the scripting help section and get some.

Kreation 08-20-2011 23:40

Re: XP Mod 1.0.7
 
You say you're trying to "create a base for beginners", but if beginners came to this to learn how to script they would undoubtedly fail miserably.

You should also never release a plugin if you don't care if it gets approved or not, then you're wasting your own and everyones time. Before you try to help beginners learn, you should learn some yourself.

Also, this is not meant to be mean, a dick, or flaming.

modernwarfare 08-20-2011 23:41

Re: XP Mod 1.0.6
 
Quote:

Originally Posted by Tirant (Post 1537415)
But obviously you are a beginner. That's what everyone is saying. The quality of this is nothing near where it needs to be in order to be approved. This doesn't help people at all. You don't have someone who doesn't speak English try and teach English to another person? You should make this a topic in the scripting help section and get some.

why is everybody like that

when you was like me you did the same thing

im really mad :(

Tirant 08-20-2011 23:42

Re: XP Mod 1.0.7
 
Quote:

Originally Posted by Kreation (Post 1537418)
Also, this is not meant to be mean, a dick, or flaming.

Exactly. And all the "bases for beginners" are located in the tutorials/snippets section.

Quote:

Originally Posted by modernwarfare (Post 1537420)
why is everybody like that

when you was like me you did the same thing

im really mad :(

We're not trying to be asses, just trying to explain to you in a nice way that you should go back and study up.

modernwarfare 08-20-2011 23:48

Re: XP Mod 1.0.7
 
Quote:

Originally Posted by Tirant (Post 1537422)
Exactly. And all the "bases for beginners" are located in the tutorials/snippets section.



We're not trying to be asses, just trying to explain to you in a nice way that you should go back and study up.



lol do you really think that is a nice way?

Tirant 08-20-2011 23:56

Re: XP Mod 1.0.7
 
Quote:

Originally Posted by modernwarfare (Post 1537425)
lol do you really think that is a nice way?

It's called being brutally honest. I actually had to think it out to make it sound that nice, so I'm hurt you'd say that. Else it would have been VERY blunt which you wouldn't like. If you want me to, I can say it the "non-nice way".

modernwarfare 08-20-2011 23:59

Re: XP Mod 1.0.7
 
Quote:

Originally Posted by Tirant (Post 1537428)
It's called being brutally honest. I actually had to think it out to make it sound that nice, so I'm hurt you'd say that. Else it would have been VERY blunt which you wouldn't like. If you want me to, I can say it the "non-nice way".

ok , thx for the nice way

but what i need to the plugin to get approven?

I readed the thread about approving plugins

but i really dont understand why this wouldnt get approved?

wickedd 08-21-2011 00:11

Re: XP Mod 1.0.7
 
Quote:

Originally Posted by modernwarfare (Post 1537429)

but i really dont understand why this wouldnt get approved?

Quote:

this plugin is like 99% copy/paste... which will never get approved.

Doc-Holiday 08-21-2011 00:11

Re: XP Mod 1.0.7
 
Quote:

Originally Posted by modernwarfare (Post 1537429)
ok , thx for the nice way

but what i need to the plugin to get approven?

I readed the thread about approving plugins

but i really dont understand why this wouldnt get approved?

in my opinion this wont get approved because 99.99% of this is a copy and paste..

Your indenting is all off. you obv dont understand how things work... like i said i idid the same thing you did for my first plugin as you can see the link in my previous post.

Yes this is open source and free for everyone to look at but taking the exact same stuff from other plugins and putting it in one. isn't good pratice. Also... When i named my variables and fucntions the way did.. when you copied and pasted them you changed them...

g_iNumber = global integer..
g_bBombPlanted = global bomb planted Boolean

it makes it easier for others to see what each variable is

i = Integer
b = bool
sz = string
fl = float

though not required but good practice.

modernwarfare 08-21-2011 00:15

Re: XP Mod 1.0.7
 
ok thx guys

i think this will be moved to trash :(

but i will still use this in one of my server :)

and will still like adding more upgrades and etc..


And doc-holiday

why you dont answer at your battle field plugin?

I gave some ideas and etc..

Doc-Holiday 08-21-2011 01:00

Re: XP Mod 1.0.7
 
Quote:

Originally Posted by modernwarfare (Post 1537437)
ok thx guys

i think this will be moved to trash :(

but i will still use this in one of my server :)

and will still like adding more upgrades and etc..


And doc-holiday

why you dont answer at your battle field plugin?

I gave some ideas and etc..

cuz i b busy lol.. ive been trying to figure things out on how to do certain things the version i have on my server right now is pretty uptodate with fixes and what not. but its still got issues ive been working on.

DrunkenKoZ 08-21-2011 02:55

Re: XP Mod 1.0.7
 
These plugins are open source for a reason. As long as he gives credit for other peoples codes there should be no problem.


Also

You can feel free to use this. It will allow you to give and take xp away from people if you're an admin.

Code:

register_concmd( "amx_givexp", "xp_givexp", ADMIN_BAN, "<target> <amount>" )
register_concmd( "amx_takexp", "xp_takexp", ADMIN_BAN, "<target> <amount>" )
 
public xp_givexp( id, level,cid )
{
    if( ! cmd_access ( id, level, cid, 3 ) )
        return PLUGIN_HANDLED;
 
    new target[32], amount[21], reason[21];
 
    read_argv( 1, target, 31 );
    read_argv(2, amount, 20 );
    read_argv( 3, reason, 20 );
 
    new player = cmd_target( id, target, 8 );
 
    if( ! player )
        return PLUGIN_HANDLED;
 
    new admin_name[32], player_name[32];
    get_user_name( id, admin_name, 31 );
    get_user_name( player, player_name, 31 );
 
    new expnum = str_to_num( amount );
 
    PlayerXP[player] += expnum;
 
    switch( get_cvar_num ( "amx_show_activity" ) )
    {
          case 1: client_print( 0, print_chat, "ADMIN: gave %i points for %s.", expnum, player_name );
          case 2: client_print( 0, print_chat, "ADMIN %s: gave %i points for %s.", admin_name, expnum, player_name );
    }
 
    client_print( player, "[AMXX] You received %i points. (Total: %d)", expnum, PlayerXP[player] );
 
    SaveData( id )
 
    return PLUGIN_CONTINUE;
}
 
public xp_takexp( id, level,cid )
{
    if( ! cmd_access ( id, level, cid, 3 ) )
        return PLUGIN_HANDLED;
 
    new target[32], amount[21], reason[21];
 
    read_argv( 1, target, 31 );
    read_argv( 2, amount, 20 );
    read_argv( 3, reason, 20 );
 
    new player = cmd_target( id, target, 8 );
 
    if( ! player )
        return PLUGIN_HANDLED;
 
    new admin_name[32], player_name[32];
    get_user_name( id, admin_name, 31 );
    get_user_name( player, player_name, 31 );
 
    new expnum = str_to_num( amount );
 
    PlayerXP[player] -= expnum;
 
    switch(get_cvar_num("amx_show_activity"))
    {
          case 1: client_print( 0, print_chat, "ADMIN: took %i points from %s.", expnum, player_name );
          case 2: client_print( 0, print_chat, "ADMIN %s: took %i points from %s.", admin_name, expnum, player_name );
    }
 
    client_print( player, "You received %i points. (Total: %d)", expnum, PlayerXP[player] );
 
    SaveData( id )
 
    return PLUGIN_CONTINUE;
}

Credit goes to [X]-RayCat for making this code.

modernwarfare 08-21-2011 07:18

Re: XP Mod 1.0.7
 
Quote:

Originally Posted by DrunkenKoZ (Post 1537489)
These plugins are open source for a reason. As long as he gives credit for other peoples codes there should be no problem.


Also

You can feel free to use this. It will allow you to give and take xp away from people if you're an admin.

Code:

register_concmd( "amx_givexp", "xp_givexp", ADMIN_BAN, "<target> <amount>" )
register_concmd( "amx_takexp", "xp_takexp", ADMIN_BAN, "<target> <amount>" )
 
public xp_givexp( id, level,cid )
{
    if( ! cmd_access ( id, level, cid, 3 ) )
        return PLUGIN_HANDLED;
 
    new target[32], amount[21], reason[21];
 
    read_argv( 1, target, 31 );
    read_argv(2, amount, 20 );
    read_argv( 3, reason, 20 );
 
    new player = cmd_target( id, target, 8 );
 
    if( ! player )
        return PLUGIN_HANDLED;
 
    new admin_name[32], player_name[32];
    get_user_name( id, admin_name, 31 );
    get_user_name( player, player_name, 31 );
 
    new expnum = str_to_num( amount );
 
    PlayerXP[player] += expnum;
 
    switch( get_cvar_num ( "amx_show_activity" ) )
    {
          case 1: client_print( 0, print_chat, "ADMIN: gave %i points for %s.", expnum, player_name );
          case 2: client_print( 0, print_chat, "ADMIN %s: gave %i points for %s.", admin_name, expnum, player_name );
    }
 
    client_print( player, "[AMXX] You received %i points. (Total: %d)", expnum, PlayerXP[player] );
 
    SaveData( id )
 
    return PLUGIN_CONTINUE;
}
 
public xp_takexp( id, level,cid )
{
    if( ! cmd_access ( id, level, cid, 3 ) )
        return PLUGIN_HANDLED;
 
    new target[32], amount[21], reason[21];
 
    read_argv( 1, target, 31 );
    read_argv( 2, amount, 20 );
    read_argv( 3, reason, 20 );
 
    new player = cmd_target( id, target, 8 );
 
    if( ! player )
        return PLUGIN_HANDLED;
 
    new admin_name[32], player_name[32];
    get_user_name( id, admin_name, 31 );
    get_user_name( player, player_name, 31 );
 
    new expnum = str_to_num( amount );
 
    PlayerXP[player] -= expnum;
 
    switch(get_cvar_num("amx_show_activity"))
    {
          case 1: client_print( 0, print_chat, "ADMIN: took %i points from %s.", expnum, player_name );
          case 2: client_print( 0, print_chat, "ADMIN %s: took %i points from %s.", admin_name, expnum, player_name );
    }
 
    client_print( player, "You received %i points. (Total: %d)", expnum, PlayerXP[player] );
 
    SaveData( id )
 
    return PLUGIN_CONTINUE;
}

Credit goes to [X]-RayCat for making this code.

thx man i knew that someone must to be nice :)

, and trying it then will add and give credits :)

Doc-Holiday 08-21-2011 11:54

Re: XP Mod 1.0.7
 
We don't care if he uses our code... but a pure copy and paste from twenty plugins isn't coding..... and releasing a plugin that has been done beforeobv cuz he doesn't script.... means he can't support it. And the code is just copy and pastes from other plugins.... I don't care if he uses the code but to release a copy and paste of other plugins and calling it your own is just dumb.... use the code to learn from and make up your own.

modernwarfare 08-21-2011 12:31

Re: XP Mod 1.0.7
 
Quote:

Originally Posted by Doc-Holiday (Post 1537737)
We don't care if he uses our code... but a pure copy and paste from twenty plugins isn't coding..... and releasing a plugin that has been done beforeobv cuz he doesn't script.... means he can't support it. And the code is just copy and pastes from other plugins.... I don't care if he uses the code but to release a copy and paste of other plugins and calling it your own is just dumb.... use the code to learn from and make up your own.


i never said it was mine , i gave credits idiot!

Apollyon 08-21-2011 15:09

Re: XP Mod 1.0.8
 
I think a moderator needs to move this to "scripting help".

modernwarfare 08-21-2011 15:20

Re: XP Mod 1.0.8
 
Quote:

Originally Posted by Apollyon (Post 1537850)
I think a moderator needs to move this to "scripting help".

mmm idk but its no problem the mod can do what he thinks

Tirant 08-21-2011 21:35

Re: XP Mod 1.0.8
 
http://forums.alliedmods.net/showthread.php?t=11201

Doc-Holiday 08-21-2011 23:36

Re: XP Mod 1.0.8
 
Quote:

Originally Posted by Tirant (Post 1538080)

HAHA thanks for posting that

modernwarfare 08-22-2011 01:25

Re: XP Mod 1.0.8
 
i saw that before posting this

i know it maybe go to trash :(

just for you


All times are GMT -4. The time now is 06:03.

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