[CS:S] No Spec Hop Cash
2 Attachment(s)
Okay, so there are two other plugins that do kinda the same thing as this one, but not really. I'll explain in this thread the differences
This plugin will keep track of player's cash when they join spectate, or disconnect, and ensure that when they join back to a team, they have the same cash they left with (on a per map basis only, map change will reset their cash to default). How this works is if they join spectate with less money than mp_startmoney, or simply disconnect and reconnect before the map changes, this plugin will reapply the amount of money the had before leaving the team. This is to thwart what is knows as, "spectate hopping" to increase their cash when they fall below mp_startmoney. If mp_startmoney is 1000, and the player has 300 when they enter spectate, after they join back to a team and spawn, their money will be changed back to 300. If a player joins spectate with more cash than mp_startmoney, this plugin will leave their cash alone. If a player disconnects (for whatever reason), if they reconnect before the map changes, their cash will be restored to what it was when they disconnected. Messages are displayed to the players when they enter spectate and when they join back to a team - you can modify it a bit in the translations file, just keep the format the same. example: [SpecHopCash] When you join your team again, your cash will be restored to $<amount> [SpecHopCash] Your cash has been restored to $<amount> ---------------------- How this plugin differs from ^BuGs^ Disable Spec For Cash is his plugin has been reported as not working, and he hasn't been showing that he's still supporting that plugin. Also, his plugin would just subtract the entire mp_startmoney amount from a player after they joined spectate and back. How this plugin differs from FlyingMongoose's Spectate Hop For Money Prevention is that his plugin hard sets the player's cash in such a way that team money is not given to a player when they spawn. Example: When a player goes into spectate with 300, and then back into a team, when they spawn, their money is set to 300 and the player doesn't get the amount of money given to the team at the beginning of the round like every other player gets. Reported here. Also, his plugin was giving timer errors. ---------------------- So, this is why I am publishing this plugin. It is basically a combo of the above two plugins without options. It simply restores a player's cash when they join spectate and go back to a team. I've tested this as best I can and am 98% sure it will work w/o issue, but please reply if you discover any issues and I'll jump on it as soon as I can. CREDITS: FlyingMongoose ^BuGs^ databomb KyleS Thank you guys for the basic ideas and help to make this a better plugin Also, there is a plugin called Save Scores that will save a players scores as well as their cash amount. If you're looking for that additional functionality, you might want to take a look at that one. CHANGE LOG: Version 1.0 - Initial release Version 1.1 - 1.3 - Internal changes including translation file, cleaner code, and use of array. Version 1.4 - Fixed the retrieval of saved cash amount from array and annotated code a bit. - Added translation file Version 1.4a - Removed handle for timer, not needed (thanks for suggestion databomb) Version 1.5 - Changed from using array's to using a Trie - thanks for the heads up on that KyleS - it's a better suited data structure Version 1.6 - Fixed possible bug where player could retain cash across map changes. INSTALLATION - Download the plugin and translation file. Place the NoSpecHopCash.smx into your sourcemod plugins folder - place the NoSPecHopCash.phrases.txt in your sourcemod translations folder |
Re: [CS:S] No Spec Hop Cash
I could use this thanks man. I just need to find the time to try it. I'm so plugged in Im suffocating :P
|
Re: [CS:S] No Spec Hop Cash
Hi. Nice plugin. I was looking exactly for the same thing, but i have one question. You said that the money will not change only if they are less than mp_startmoney. So my question is, if somebody go spec with 5000 lets say is he going to get money for the spec hop or no ?
|
Re: [CS:S] No Spec Hop Cash
if someone goes into spec with 5000, he will rejoin his team with 5000, but he'll get the team winning amount just like everyone else does. He won't get extra money than anyone else
|
Re: [CS:S] No Spec Hop Cash
Here's my modification on your plugin to make sure that people can't just type 'retry' in console to avoid the same thing. I seem to recall seeing this somewhere already but in case you find it worthwhile too: (untested yet)
PHP Code:
|
Re: [CS:S] No Spec Hop Cash
thank you for the improvement
|
Re: [CS:S] No Spec Hop Cash
Was databomb's code added to the plugin?
Plus, I am being told it's not working on the current CSS Windows server .... I had one of my admins test it and he said he can still bhop spec and get cash.... |
Re: [CS:S] No Spec Hop Cash
I will work on this tomorrow... as I said in a different thread, the wife claimed the PC for the night - I don't have access to my stuffs :(
But I'll implement databomb's code, test it, and post if it's working. I'm also going to fix the one bug I posted in OP under the NOTES in the meantime, exvel's plugin is a great one - http://forums.alliedmods.net/showthread.php?p=660327 It does more than mine will, so if you don't want/need all that it does, wait until tomorrow and I'll have this one fixed |
Re: [CS:S] No Spec Hop Cash
Will wait, thank you.
|
Re: [CS:S] No Spec Hop Cash
okay... I'm not going to update the OP with this version because I think with the help of databomb, we can get the feature where when a player types retry they will have their old cash restored instead of getting the mp_startmoney...
I tried the code that databomb posted above, but it didn't work... I don't know why :( The attached plugin works and was tested on a windows server. I fixed the issue where after you rejoined a team, it showed that you had the full mp_startmoney even though you went to spec with less than that. I utilized a timer :) Maybe databomb will help with the Array stuff to address those players that use "retry"... otherwise, the plugin SaveScores is a really good one :) |
All times are GMT -4. The time now is 14:52. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.