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

[L4D2] Team Kill Reactions Vocalize Fix


Post New Thread Reply   
 
Thread Tools Display Modes
Author
DeathChaos25
Senior Member
Join Date: Jan 2014
Location: Puerto Rico
Plugin ID:
4549
Plugin Version:
1.0
Plugin Category:
Fun Stuff
Plugin Game:
Left 4 Dead
Plugin Dependencies:
Servers with this Plugin:
17 
Plugin Description:
Unknown to many people, there are unused lines for all 8 survivors where they react to players team killing each other, this plugin restores these reactions.
Old 03-12-2015 , 23:47   [L4D2] Team Kill Reactions Vocalize Fix
Reply With Quote #1

About : Unknown to many people, there are unused lines for all 8 survivors where they react to players team killing each other, this plugin restores these reactions.

How it works :
There are 2 types of team kills where this plugin will work on, if a player either incapacitates or kills another player. When these happen, someone else on the team will react, the player who did the team killing will vocalize sorry, and if it was just an incapacitation, the incapacitated player will react by swearing(!)

This plugin requires scene processor to compile, and the scene processor plugin to function.

CVARs :
Code:
//current plugin version
"l4d2_teamkill_voc_version"
Code:
Version 1.0    03-12-2015
- Initial Release
Bugs :
Code:
- Plugin is expected to be 100% Bug free
ALL 8 Survivors have this implemented for them, so enjoy!

I'll add a video later tomorrow when I am not sleep deprived because I am making random plugins instead of sleeping like I am supposed to

Edit : If anyone has downloaded the plugin. please redownload as I had uploaded the wrong version which contained a handle error in the apology delay
Attached Files
File Type: zip Teamkill Reactions Fix.zip (8.7 KB, 3951 views)
__________________

Last edited by DeathChaos25; 03-13-2015 at 08:55.
DeathChaos25 is offline
Mr. Zero
Veteran Member
Join Date: Jun 2009
Location: Denmark
Old 03-13-2015 , 03:19   Re: [L4D2] Team Kill Reactions Vocalize Fix
Reply With Quote #2

Very nice, a quick note. Your ReactionDelayTimer function does use UserId, as it should, however you never validate the UserId, so the timer may pass on an invalid client.

A quick fix for it;
PHP Code:
line 95..

new 
client GetClientOfUserId(ReadPackCell(pack));
if (
client == 0)
    return 
Plugin_Stop
Another suggestion could be to move the choosing of a random Survivor to the timer, since you are check if the Survivor is busy before starting the timer, so after 2.5 seconds the Survivor might have begun another line. Just ideas.
Mr. Zero is offline
DeathChaos25
Senior Member
Join Date: Jan 2014
Location: Puerto Rico
Old 03-13-2015 , 06:59   Re: [L4D2] Team Kill Reactions Vocalize Fix
Reply With Quote #3

Quote:
Originally Posted by Mr. Zero View Post
Very nice, a quick note. Your ReactionDelayTimer function does use UserId, as it should, however you never validate the UserId, so the timer may pass on an invalid client.

A quick fix for it;
PHP Code:
line 95..

new 
client GetClientOfUserId(ReadPackCell(pack));
if (
client == 0)
    return 
Plugin_Stop
Another suggestion could be to move the choosing of a random Survivor to the timer, since you are check if the Survivor is busy before starting the timer, so after 2.5 seconds the Survivor might have begun another line. Just ideas.
I actually made quite a lot of small mistakes during the coding of this plugin, as it was a spur of the moment kind of thing I was doing when I should've been sleeping, some of the include checking IsPlayerAlive before IsClientInGame, validating clients but not excepting client 0, etc

I actually validate every single user (victim, attacker and then reactor) before packing them into the timer, I admit that I did indeed forget to also Validate them after, as the person may have left during the course of the delay.

Obviously, I could always super stealthy ninja edit the attached plugin without anyone noticing.
__________________
DeathChaos25 is offline
Krufftys Killers
Senior Member
Join Date: Jan 2014
Old 03-14-2015 , 12:12   Re: [L4D2] Team Kill Reactions Vocalize Fix
Reply With Quote #4

L 03/14/2015 - 10:59:21: [SM] Displaying call stack trace for plugin "[L4D2] Team Kill Reactions.smx":
L 03/14/2015 - 10:59:21: [SM] [0] Line 105, C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\[L4D2] Team Kill Reactions.sp::ApologyDelayTimer()
L 03/14/2015 - 10:59:21: [SM] Plugin "[L4D2] Team Kill Reactions.smx" encountered error 23: Native detected error
L 03/14/2015 - 10:59:21: [SM] Invalid data handle 75570635 (error 3) passed during timer end with TIMER_DATA_HNDL_CLOSE
L 03/14/2015 - 10:59:21: [SM] Unable to call function "ApologyDelayTimer" due to above error(s).
L 03/14/2015 - 11:06:23: [SM] Native "GetClientModel" reported: Client index -1 is invalid
L 03/14/2015 - 11:06:23: [SM] Displaying call stack trace for plugin "[L4D2] Team Kill Reactions.smx":
L 03/14/2015 - 11:06:23: [SM] [0] Line 131, C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\[L4D2] Team Kill Reactions.sp::ReactToTeamKill()
L 03/14/2015 - 11:06:23: [SM] [1] Line 100, C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\[L4D2] Team Kill Reactions.sp::ReactionDelayTimer()
L 03/14/2015 - 11:06:24: [SM] Native "ResetPack" reported: Invalid data pack handle 93e06e6 (error 3)
Krufftys Killers is offline
DeathChaos25
Senior Member
Join Date: Jan 2014
Location: Puerto Rico
Old 03-14-2015 , 12:17   Re: [L4D2] Team Kill Reactions Vocalize Fix
Reply With Quote #5

Quote:
Originally Posted by Krufftys Killers View Post
L 03/14/2015 - 10:59:21: [SM] Displaying call stack trace for plugin "[L4D2] Team Kill Reactions.smx":
L 03/14/2015 - 10:59:21: [SM] [0] Line 105, C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\[L4D2] Team Kill Reactions.sp::ApologyDelayTimer()
L 03/14/2015 - 10:59:21: [SM] Plugin "[L4D2] Team Kill Reactions.smx" encountered error 23: Native detected error
L 03/14/2015 - 10:59:21: [SM] Invalid data handle 75570635 (error 3) passed during timer end with TIMER_DATA_HNDL_CLOSE
L 03/14/2015 - 10:59:21: [SM] Unable to call function "ApologyDelayTimer" due to above error(s).
L 03/14/2015 - 11:06:23: [SM] Native "GetClientModel" reported: Client index -1 is invalid
L 03/14/2015 - 11:06:23: [SM] Displaying call stack trace for plugin "[L4D2] Team Kill Reactions.smx":
L 03/14/2015 - 11:06:23: [SM] [0] Line 131, C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\[L4D2] Team Kill Reactions.sp::ReactToTeamKill()
L 03/14/2015 - 11:06:23: [SM] [1] Line 100, C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\[L4D2] Team Kill Reactions.sp::ReactionDelayTimer()
L 03/14/2015 - 11:06:24: [SM] Native "ResetPack" reported: Invalid data pack handle 93e06e6 (error 3)
That was an incorrect upload I had done by mistake, the current uploaded version does not use the ApologyDelayTimer, which means no errors should occur.

Just download the plugin again and you should be fine.
__________________

Last edited by DeathChaos25; 03-14-2015 at 12:17.
DeathChaos25 is offline
sos crazy89
Member
Join Date: May 2015
Location: Russia
Old 11-02-2015 , 04:14   Re: [L4D2] Team Kill Reactions Vocalize Fix
Reply With Quote #6

l4d1 version
I tested this for a long time
This works great for l4d1
*survivors cursing when someone killed player
do not forget to set it https://forums.alliedmods.net/showthread.php?t=241585
Attached Files
File Type: sp Get Plugin or Get Source ([L4D] Team Kill Reactions.sp - 557 views - 6.8 KB)
__________________

Last edited by sos crazy89; 11-02-2015 at 04:17.
sos crazy89 is offline
Edison1318
Senior Member
Join Date: Nov 2015
Location: Peaceful place of the in
Old 09-13-2016 , 01:33   Re: [L4D2] Team Kill Reactions Vocalize Fix
Reply With Quote #7

Somehow FakeZoey says sorry in Nick voice.
__________________
EdisonGar
Edison1318 is offline
Send a message via Skype™ to Edison1318
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 09-13-2016 , 01:37   Re: [L4D2] Team Kill Reactions Vocalize Fix
Reply With Quote #8

Quote:
Originally Posted by Edison1318 View Post
Somehow FakeZoey says sorry in Nick voice.
Are you using my version of FakeZoey? If so, wait for my version of this plugin.
cravenge is offline
Edison1318
Senior Member
Join Date: Nov 2015
Location: Peaceful place of the in
Old 09-13-2016 , 11:12   Re: [L4D2] Team Kill Reactions Vocalize Fix
Reply With Quote #9

Quote:
Originally Posted by cravenge View Post
Are you using my version of FakeZoey? If so, wait for my version of this plugin.
Edited : 20/9/2016
Okay, i don't need your plugin cause i downloaded DeathChaos25's Team Kill Reaction latest plugin and it fixed FakeZoey's vocalize.
__________________
EdisonGar

Last edited by Edison1318; 09-20-2016 at 09:28. Reason: Fixed
Edison1318 is offline
Send a message via Skype™ to Edison1318
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 10-09-2016 , 05:18   Re: [L4D2] Team Kill Reactions Vocalize Fix
Reply With Quote #10

Took me long to post this and I'm glad you fixed the problem, Edison. Anyways, here's my version. It no longer makes survivors vocalize "PlayerSorry" in their real characters' voices instead it uses the player's model.
Attached Files
File Type: sp Get Plugin or Get Source (teamkill_reactions_fix.sp - 465 views - 7.9 KB)
File Type: smx teamkill_reactions_fix.smx (7.3 KB, 856 views)
cravenge 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 10:26.


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