[L4D] Item Buy System
55 Attachment(s)
This is my first plugin that I have made for Sourcemod. I decided that it would be nice to see something simple like this, and, seeing as I don't see any other addons that do this kind of thing (I may be wrong), I decided to make it my first project.
The point of this plugin is to allow survivors (and infected) to be rewarded for teamwork. They can also be rewarded for killing special infected and a certain number of regular infected, but they will not get nearly as many points for doing so. They will get much more points for helping someone up or healing someone than killing a hunter. They can then use these points to buy rewards. I also added an admin gifting system that I made in my spare time, which probably won't be as useful, but is still a nice touch. Any constructive criticism is appreciated. Console Commands (add a ! or / and subtract sm_ for chat):
Future Additions:
http://www.game-monitor.com/search.p...&type=variable Servers running the current version: http://www.game-monitor.com/search.p...ame=left4dead2 Change Log: Version 1.278: Added a variable to set the amount of rounds until reset. Version 1.277: Fixed points_reset_round and made it reset every two rounds in versus. Also defaulted it to on. Was tired of all the servers with prices at about 5,000 for a shotgun, anyway. Version 1.276: Fixed infected getting SI and witch kill points. Also raised tankonfire array size a bit. Version 1.275: Made the PLAYERS variable control every number related to the amount of players and fixed up the code a bit. Version 1.274: Made the panic event five mobs instead. Version 1.273: Made the number that cancels the purchasable -1. Found out that the only reason it wouldn't do it was because of some stupid typo I made. Version 1.272: Added super incendiary ammo that can burn special infected for a higher price and made the points announcements shorter. Version 1.271: Got rid of points_reset. Version 1.27: Added incendiary ammo and changed the points menu. There is now a special menu that has things that are more like power-ups than items. Expect more to be added soon. There is only incendiary ammo right now. You can also change the time incendiary ammo lasts, too. Version 1.263: Fixed bug where optional advertising could not be turned off. Version 1.262: You can now change the amount of time till the optional advertisement/gamepad reminder comes up. A few bugs have been fixed, too. Version 1.261: Points can now be chosen to reset at round ends, map loads, or both. Version 1.26: Added the ability to spawn mobs and panic events, and added the repeatbuy command. Version 1.256: Boomer cost fixed. Version 1.255: Changed disabling cost. Version 1.254: You can now disable items by making their cost -1 or below. Infected can no longer spawn in safe areas. Also, there is now an option to remind players how to get their number keys working. Version 1.253: Tank and witch spawning bug fixed. Version 1.252: There is now a limit for the amount of tanks and witches that players can spawn per round. Version 1.251: Can't get points as infected by attacking your own teammates now. Version 1.25: The points menu has been revamped to be more flexible. Tank points are now fixed (no more mass points when a tank is burned), and you can now change the price of items. Also, the code is a little cleaner, but it's not like you'll care. Version 1.24: Fixed a big error that made the plug-in not work. Version 1.23: Added a set points command and fixed some bugs here and there. Version 1.22: Tank burning points working now, tank and witch price raised to make versus a tiny bit less of a survivor slaughter fest. Version 1.21: Fixed a few problems concerning points and removed end round point clearance for versus and survival. Version 1.2: Big changes here. Infected can now get their own points by pouncing, vomiting/exploding and pulling survivors plus more. They even get their own menu, which is opened using the same command. Admins can now give clients points, too. Also, tank burn points are in again. Version 1.156: Now compatible with Super Versus. Version 1.155: Commented out two cvars. Version 1.154: Plugin now auto-creates a config. Version 1.153: Commented out tank burning points, since it was very buggy. Version 1.152: Some typos in text fixed. Version 1.151: Points can also be earned by killing or burning the tank now (sadly, there is no way I have found so far as to finding out if a player hurt a tank). You can get a total of 4 points from a tank. Version 1.15: You can now get points by killing a witch and additional points for killing the witch instantly. Points are now named item points (although are often called points for short) to make them a bit more self-explanatory. Version 1.14: Advertising is now off by default. If you want to turn it on, there is now a cvar to do so. Version 1.13: Even more hotfixing. Turns out I made a typo on the heal item, so it wouldn't work. This is fixed now. Also, the number of points you have is now shown in the menu title. Version 1.12: Another hotfix. The default value of points you get for killing 25 infected has been raised by a point and some text has been changed. Version 1.11: Hotfix considering invalid point numbers. Version 1.1: Added convars for points, added convars to turn off points (sm_on_versus doesn't work yet), and also fixed some code here and there. You no longer get points for opening doors (it was buggy). I also made the repeating message a bit more informative about what the plug-in actually does; some people I was playing with thought it was some other version of HLStatsX and ended up leaving. Also, refill, heal, and fakegod are now admin only commands, but they can still be awarded to clients and refill and heal can still be used with the point system. The price of the Shotgun and the SMG were raised to 5 to prevent cheap refills. Version 1.0: None. Credits: Madcap, {7~11} TROLL - I used their code for the Tankbuster menu (Troll) and ledge release (Madcap) as a reference. I learned how to give items to clients and create menus from Madcap's code (in fact, some of it is in there, just heavily modified), and I learned how to tie events to functions from Troll's code. AlliedModders LLC - I used the slap code as a reference for the gift plugin. The SourceMod Community as a whole - Special thanks to Exvel (I used his method of god mode for the fakegod in this plugin) and base64 (I used his method of message announcing for the announcement of the plugin on the server every 80 seconds). |
Re: [L4D] Points and Adming Gifting System
Does it work on Vesus to cuzz i dont think it should
cuzz people can heal themselves when they have the points so it causes more rage quiters because people heal them selfes with the points maby you can make it so it turns itself off when a Versus match is on ? Just my opinion of it but for Coop it verry Cool man Good job Owyeah and how do ya give stuff as an ADMIN ? |
Re: [L4D] Points and Adming Gifting System
Can you add more info on how it actually works, what cvars you can use for tweaking plugin settings, is there a menu being added? Will it work in versus, what rewards you can give to players?
|
Re: [L4D] Points and Adming Gifting System
Quote:
|
Re: [L4D] Points and Adming Gifting System
GOOD thing would be if you make cvar which will allow or disallow it in versus (depending on cvar setting) . If someone using modified versus settings with tons of zombies it would be great, but on classic versus this plugin can ruin game for infected, so just make cvar which will turn it off and on for versus. I see this as a good addition for those 10 vs 10 massacre games. Will test it now btw. Also looked into source code. !pointshelp, !pointsmenu, !points is say-commands to use as i understood. Btw, thanks for actually doing some good stuff for best MP game ever =)
|
Re: [L4D] Points and Adming Gifting System
OK, played against bots, works as it should in versus. I will adjust numbers of points you get in source code, so it will give less points and try to use it in multiplayer. I think you should add cvars for these settings. So admins can adjust prices and how much points survivors will get fot proper events. Also need more info on fakegod command.
Ok, tried fakegod command, it crushes game badly. And i cant find way how i can give rewards to players as an admin. Also giving to someone SMG or shotgun for 1 point = refill ammo for 1 point. |
Re: [L4D] Points and Adming Gifting System
Quote:
EDIT: Ok, I just added a lot of things to a new update that makes the mod a bit cleaner and better to use. I also changed the title to make this plugin sound a bit more interesting that just a point system (which it is). |
Re: [L4D] Item Buy and Admin Gifting System
Nice :) Does it create its cfg file automatically? I saw a thread in forums somewhere, how to add this feature to plugin. Dont remember where though.
Whats with fakegod command, is it really buggy or its just my internal problem. How about granting points for killing witch and burning up the tank? Or +1 point to all who took part in killing tank. That would be nice. |
Re: [L4D] Item Buy and Admin Gifting System
sm_clientgivemenu isn't working (. But sm_clientgive works fine. Fakegod doesnt work either, but at least it stopped crushing game.
|
Re: [L4D] Item Buy and Admin Gifting System
Quote:
Quote:
|
All times are GMT -4. The time now is 10:19. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.