Raised This Month: $51 Target: $400
 12% 

Suicide Intercept


Post New Thread Reply   
 
Thread Tools Display Modes
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 08-11-2011 , 09:09   Re: [CS:S] Suicide Intercept
Reply With Quote #11

Quote:
Originally Posted by KyleS View Post
Yup
Thank you KyleS. I'll update this later today As I'm sure you (and others) are well aware, I'm still a n00b at sourcepawn and have a limited VB background. I do, however, have a pretty good handle on databases (SQL and Oracle), and select statements, but I still have a long way to go with sourcepawn.

I appreciate any help and criticism when it comes to plugins I put up.
TnTSCS is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 08-11-2011 , 14:58   Re: [CS:S] Suicide Intercept
Reply With Quote #12

Updated to 1.2 - if you update, you need to delete the old config file and let the plugin create you a new one.

* Version 1.2
* Applied KyleS' suggestions regarding the FindConVar
* Added min 0 and max 1 to sm_suicideintercept_enabled
* Added ability to modify the settings while in game (enable or disable it, change the death time)
* Updated description to include ability to block the suicide command
TnTSCS is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 08-17-2011 , 15:10   Re: [CS:S] Suicide Intercept
Reply With Quote #13

Updated to 1.2a

Version 1.2a (if you update from older version, delete the old config file and let the plugin create a new one)
- Cleaned up the code a bit and fixed the bool for enabling the plugin.
TnTSCS is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 09-05-2011 , 18:43   Re: [CS:S] Suicide Intercept
Reply With Quote #14

Updated OP with version 1.3a.

Changes include the removal of the config file (just set cvars in sourcemod.cfg or per map config file), cleaned up code more (handles and hookconvarchange) according to KyleS' suggestions, added translations file, and added the colors include.

Check it out and let me know what you think.

...:: TnT Edit ::...
Oh ya, forgot to mention I put in that if you have the "o" flag, you're allowed to use the suicide commands. You can override this in the admin_overrides.cfg using this:
"allow_suicide" "z"

The above would only allow those with ROOT flag to be able to use the suicide command right away.

Last edited by TnTSCS; 09-05-2011 at 18:47.
TnTSCS is offline
wazzgod
Member
Join Date: Oct 2005
Location: Home
Old 09-05-2011 , 19:03   Re: [CS:S] Suicide Intercept
Reply With Quote #15

Note there is a bug when you type spectate in console.

it waits x var then kills you, but doesnt send you to spectate. you have to type spectate in console again (after your dead) in order for you to switch

Maybe you should add some vars
bla_teamswitch_enable 1
bla_suicide_enable 1

ect so that if a user only wants "kill in console" to be delayed, they dont have to use any of those other features.


Just a idea
__________________
People Who Think They Know Everything
Are Very Irritating To Those Of Us Who Do.
wazzgod is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 09-05-2011 , 20:00   Re: [CS:S] Suicide Intercept
Reply With Quote #16

ya... I noticed that if a player legitimately wants to change teams, it kills them after X seconds , but doesn't display the change team screen...

I'll fix that and update the OP in a bit.

Because players can use jointeam and joinclass to commit suicide, I have to keep those in there, but I'll add a cvar to use only "kill and explode" or to use the other three as well... the other three will just delay the action of either spectate or jointeam/class

thoughts?
TnTSCS is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 09-05-2011 , 22:37   Re: [CS:S] Suicide Intercept
Reply With Quote #17

For the time being, I removed the hook for JOINTEAM and SPECTATE.

Updated OP:

Version 1.4
- As brought up by wazzgod, there is a bug with using the commands suicide or jointeam, so I removed those commands from being hooked. Now, only "kill" "explode" and "joinclass" are captured and delayed.
- Changed default flag for allow_suicide from CUSTOM1 to ROOT.
TnTSCS is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 09-06-2011 , 16:39   Re: [CS:S] Suicide Intercept
Reply With Quote #18

Added back the JOINTEAM and SPECTATE hooks. See OP for further details.

Version 1.4a
- Added back the hooks for "jointeam" and "spectate". Now if a player types one of those, it will delay it (if you have it set to) by X seconds, then after that time is up, it will perform the action of either of those commands (move them to spectate, or bring up the team selection menu).
- I added a few more entries in the translations file, so you'll have to get the new SuicideIntercept.phrases.txt if you are going to use this version.
- I changed the admin_overrides.cfg entry from allow_suicide to "bypass_suicideintercept". By default, ROOT admins can use the commands without the delay. If you want other flags to bypass this plugin, just add their flags to the command "bypass_suicideintercept"

...:: TnT Edit ::...

Version 1.4b
- Fixed janky translation file - now it has proper variables
* You need the newly upload translation file with the new smx

Last edited by TnTSCS; 09-06-2011 at 20:34. Reason: minor fix with translation file
TnTSCS is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 11-26-2011 , 23:45   Re: [CS:S] Suicide Intercept
Reply With Quote #19

Updated this plugin - addressed some issues and added a few cvars. If upgrading, make sure you download and replace the translation file. See the OP for the latest files

Version 1.5
- Redesigned the code to be cleaner and more effecient
* Fixed the bad Int of -1 in convars
* Added new cvars to allow configuration of blocking the "kill", "explode", "spectate", "jointeam", and "joinclass" commands
- Reworked some of the code so it keeps itself clean

Version 1.5.1
- Added Updater capability

UPGRADING?
You'll want to delete the old config file (after backing it up) so a new, updated one, will be created. You'll need to get the updated translation file as well - I've added a bunch of different phrases in there since 1.4b.
TnTSCS is offline
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 12-05-2011 , 18:13   Re: Suicide Intercept
Reply With Quote #20

Version 1.5.2
- Removed requirement for cstrike
- This plugin works on TF2 - confirmed
TnTSCS is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:04.


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