[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:
|
Re: [L4D] Item Buy and Admin Gifting System
I think there is event for burning someone with molotov. Anyway, i still have no idea how to use sm_clientgivemenu. Btw, your plugin works with last 1.0.1.4 patch for l4d (actually all of my plugins do and im happy about that).
|
Re: [L4D] Item Buy and Admin Gifting System
Quote:
http://wiki.alliedmods.net/Left_4_De...zombie_ignited |
Re: [L4D] Item Buy and Admin Gifting System
great plugin huh!
btw doesn't have a generated cfg ? |
Re: [L4D] Item Buy and Admin Gifting System
Really enjoying this plugin but I'm finding it's a bit OP. I think this would be a lot of fun if this were the only way one could acquire items. Been looking for another plugin to do this but I can't seem to find any.
I'd like to have it so that there's no items in the safe rooms and no items spawn in the map, this way you could only acquire items through the point system. |
Re: [L4D] Item Buy and Admin Gifting System
hello,
works the plugin on windowserver? |
Re: [L4D] Item Buy and Admin Gifting System
Quote:
If I do find any way to do that, though, I might release it as a seperate plug-in. Quote:
|
Re: [L4D] Item Buy and Admin Gifting System
There semms to be a problem. I saw many ppl which played on my host, were whining that they ressurected like 10 ppl and killed some zombies but they got 0 points. Mb theres some problem with resetting points to 0. I dont know.
|
Re: [L4D] Item Buy and Admin Gifting System
Quote:
|
Re: [L4D] Item Buy and Admin Gifting System
I dont remeber if i had 0 points when i should have more. But many other ppl complained about having 0 points after all efforts. Also, can this be connected with new 1014 patch? Also, one time, i received a message "you killed special infected, bla bla bla", but i was actually a smoker and pulled survivor from window, killing him.
|
Re: [L4D] Item Buy and Admin Gifting System
Quote:
|
Re: [L4D] Item Buy and Admin Gifting System
1. Sometimes it may lose its effect plug-ins 2. The plug-ins can not coexist with the "Super versus", or else players will use the points, but unable to get items. If remove the "Super versus" can be got:cry::cry: |
Re: [L4D] Item Buy and Admin Gifting System
So, you planning to add gifting to infected? Thats nice. But what about resetting points to zero, which occured sometimes. Mb its because too many ppl were playing?
|
Re: [L4D] Item Buy and Admin Gifting System
Quote:
|
Re: [L4D] Item Buy and Admin Gifting System
-snip-
|
Re: [L4D] Item Buy and Admin Gifting System
加油阿 資持你的插件:)
|
Re: [L4D] Item Buy and Admin Gifting System
Dude. We dont force you to work on it without rest, thats ridiculous. Go have a sleep, eat something, get some relax. Btw, previous post with hieroglifs rofl.
|
Re: [L4D] Item Buy and Admin Gifting System
Quote:
|
Re: [L4D] Item Buy and Admin Gifting System
Testing the infected system as we speak.
Minor suggestion before testing though. Rethink the default values possibly? 3 points for killing a tank but 5 for a witch? Insta kill a witch only for 3? just thought they were outta whack a little. Awesome plugin though. |
Re: [L4D] Item Buy and Admin Gifting System
tank burn points are in again?
but your plug is //HookEvent("zombie_ignited", TankBurnPoints); ??:shock: |
Re: [L4D] Item Buy and Admin Gifting System
Quote:
|
Re: [L4D] Item Buy and Admin Gifting System
Quote:
|
Re: [L4D] Item Buy and Admin Gifting System
WOW, tested it with bots, very nice. Zombie's menu is sooo imba, lol. That will make games much more fun. I expect players to keep points to mass spawn witches or to get tank. It will be very fun together with other plugins and with 10 vs 10 versus. The last needed thing is cvars for controlling the cost of each item. Also all clientgive commands appears to work from chat, but wont work from console, thats kinda strange.
|
Re: [L4D] Item Buy and Admin Gifting System
Quote:
I really recommend putting this on a versus server, as it makes it so much more tense, challenging, and overall, fun. EDIT: I still see a lot of servers with the old version. I'm guessing they haven't upgraded yet or they prefer the no infected points thing. They could just get rid of the infected points by making all the values 0 for them, though. |
Re: [L4D] Item Buy and Admin Gifting System
points_amount_extra_headshotkills - How many extra kills survivors are awarded for scoring headshots. 0 = None. (Default: 1)
points_amount_extra_minigunkills - How many extra kills survivors are awarded for scoring minigun kills. 0 = None. (Default: 1) The two could not be activated |
Re: [L4D] Item Buy and Admin Gifting System
Hi, I met you a few nights ago on my steam group's server (ACROSS), and the previous poster Psynature is the one who runs the server but I am having a problem we can think of no fix for.
The keys 6, 7, 8, 9 and 0 do not work for me, so I can only make !admin and !usepoints etc. choices 1-5. I had previously had 7 and 8 bound to some spawn commands, but I have done everything I can think of to remap the keys. 6,9 and 0 were not previously bound. I have used unbindall in the console, I have reset the default key configuration within the in-game options menu. I have reset the default .cfg file, I have uninstalled and reinstalled the entire game >.< I have edited the .cfg to include this (which I got from the config_default file): bind "0" "slot10" bind "1" "slot1" bind "2" "slot2" bind "3" "slot3" bind "4" "slot4" bind "5" "slot5" bind "6" "slot6" bind "7" "slot7" bind "8" "slot8" bind "9" "slot9" Why can't I use 6,7,8,9 or 0 to make selections in the !admin and !usepoints menus? I have come across players who also cannot use these keys. |
Re: [L4D] Item Buy and Admin Gifting System
I don't know why
I tried few times to compile this file but it show many Warning.. Is it not finish yet? |
Re: [L4D] Item Buy and Admin Gifting System
Quote:
|
Re: [L4D] Item Buy and Admin Gifting System
Quote:
There, your SourceMod should be working properly now. |
Re: [L4D] Item Buy and Admin Gifting System
:mrgreen:This system is awesome, i would like to insert a messenge telling players how many points left after they buy something?
Can i modify price of items? There was lots of warning during i compile this plugin. Is that alright at all? |
Re: [L4D] Item Buy and Admin Gifting System
Yay thank you so much =D That worked, ofc it had to be something that simple right.... *facepalm*
|
All times are GMT -4. The time now is 12:30. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.