AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=109)
-   -   [CS:S] Buylevel (v1.1, 2010-09-14) ~ For GunGame:SM (https://forums.alliedmods.net/showthread.php?t=134264)

Artsemis 08-02-2010 19:10

[CS:S] Buylevel (v1.1, 2010-09-14) ~ For GunGame:SM
 
1 Attachment(s)
Buylevel for GunGame:SM
by {cDS} Artsemis of cyber Death Squad

Description
This mod requires that the server be running GunGame:SM. Players will earn cash for each kill which allows them to purchase the next level when they have the required funds. The amount of money awarded per kill, the cost of each level, and the number of levels from the last that can't be bought off of can all be defined in the configuration file that gets generated when the plugin is first run.

CVAR/Command List
  • sm_gg_buylevel_version - Buylevel Version
  • sm_buylevel_kill_value - Amount of money to award for a kill
  • sm_buylevel_level_cost - Amount of money required to buy a level
  • sm_buylevel_num_restricted_levels - Number of levels from the last that cannot be bought off of
  • !buylevel - Instantly levels the player up and deducts the appropriate funds.
  • /buylevel - Same as !buylevel except your message won't show up in the chat box.

Code:

----------
Changelog
----------
2010-09-14 (v1.1)
* Replaced "number of restricted levels" with the ability to restrict specific weapons

2010-08-02 (v1.0)
* Initial Release

Dependencies
GunGame:SM 1.0.9.4+

Plans
- Add translations support / custom messages

Notes
Will not compile on forums as it requires GunGame:SM

Issues
I noticed after trying this out, players' guns would sometimes disappear -- though they would still fire and seems to correct itself after a round or two. Unfortunately, I upgraded to GG 1.0.9.4 at the same time as I started running this mod so I'm unsure of the cause of the issue. I can confirm, though, that it seems to happen to players that don't even use the buylevel command at all. I don't want to say it's an issue on GunGame's side 100% but it's something I'm keeping an eye on.


This is my first attempt at coding anything on SM, go easy on me. :)

Warbucks 08-31-2010 12:49

Re: [CS:S] Buylevel (v1.0, 2010-08-02) ~ For GunGame:SM
 
Did you ever figure out why players weapons were disappearing?

Artsemis 09-04-2010 21:56

Re: [CS:S] Buylevel (v1.0, 2010-08-02) ~ For GunGame:SM
 
Sorry, I just got back from vacation and didn't have access to the web. I didn't, but I did notice in the gungame thread there were a few reports of the issue popping up from what I assume to be people not using this buylevel script. Whether it was a recent steam update or something in 1.0.9.4 of SM:GG (or the version right before it) I'm not sure... it doesn't appear to be an issue with buylevel, though.

nadrojcote 09-12-2010 23:35

Re: [CS:S] Buylevel (v1.0, 2010-08-02) ~ For GunGame:SM
 
I am still using it, and actually have a request if possible,

something like this, a new cvar sm_buylevel_excludedlevels to set static level numbers that you cannot buy off of.

Artsemis 09-15-2010 00:02

Re: [CS:S] Buylevel (v1.0, 2010-08-02) ~ For GunGame:SM
 
Quote:

Originally Posted by nadrojcote (Post 1298043)
I am still using it, and actually have a request if possible,

something like this, a new cvar sm_buylevel_excludedlevels to set static level numbers that you cannot buy off of.

This was on the to do list but since there was a special request, it's done. =d
I did realize after coding the update that you said specific levels... I hope specific guns is ok. It should only matter if you use a random gun order but let me know please.

nadrojcote 09-15-2010 17:08

Re: [CS:S] Buylevel (v1.0, 2010-08-02) ~ For GunGame:SM
 
yup that works thank! :)

was also wondering if there is anyway to hide !buylevel from being seen in chat when someone types it, so that people that are using !buylevel dont give it away.

Artsemis 09-15-2010 17:49

Re: [CS:S] Buylevel (v1.0, 2010-08-02) ~ For GunGame:SM
 
No problem. =d

I'm not sure if there's a way to override the default functionality of a registered command in sourcemod, but by default !buylevel is the "announced" version and /buylevel is the "silent" one. Hopefully that works for you... I'm not sure if there's a way to disable the ! option.

Warbucks 09-23-2010 23:13

Re: [CS:S] Buylevel (v1.1, 2010-09-14) ~ For GunGame:SM
 
Something I noticed. Some people run both buylevel and knifefight on their servers. You can buy a level during a knife fight and depending on how many levels multi level is set to in the config (ie: the buylevel was your third kill, and multi level is set to three kills), you will gain the speed/health boost.

Knifefight should probably be modified, but you may be able to do a check/block yourself.

Artsemis 09-24-2010 19:06

Re: [CS:S] Buylevel (v1.1, 2010-09-14) ~ For GunGame:SM
 
Hey warbucks, I remember you from gg5 development =d

Anyways, good catch. I'm not exactly sure that's something that should be handled here because buylevel's purpose is to give you a level when used and nothing more. It would make more sense to me in knife fight also, but then again, knife fight can't be adding checks for every other mod's possibilities either.

I'm not sure he'd be up for it, but the most logical way to handle it would be for gg to have a parameter on the level up method that tells it if it was a kill or not -- having multi level bonuses only take effect for actual kills.

Whist 10-02-2010 09:02

Re: [CS:S] Buylevel (v1.1, 2010-09-14) ~ For GunGame:SM
 
I thank you for implementing this function into SourceMod. It was very popular in the past and it is highly received by members in my community, good work. Correct me if I am wrong but I thought !buylevel use to give you your next level's gun if you were alive. If so, do you plan on implementing this or should I just be using a !give plugin.

-Thanks


All times are GMT -4. The time now is 11:44.

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