Page 1 of 1

[ANY] DeadChat

Posted: Fri Apr 08, 2016 1:19 am
by iPlayer
[ANY] DeadChat

https://github.com/KirillMysnik/sp-deadchat

Description
The plugin makes spec/dead chat messages visible to all players as long as they're not team-only; if a message from a dead player is team-only, only his team will see this message, but that includes alive team members too.

Installation
  1. Download the latest development snapshot of this plugin
  2. Extract sp-deadchat-master directory to your mod folder
  3. Add the following line to autoexec.cfg:
    sp plugin load deadchat

Tested Games:
[-] CS:S, Linux
[+] CS:S, Windows - works
[-] CS:GO, Linux
[+] CS:GO, Windows - crashes, see https://github.com/Source-Python-Dev-Team/Source.Python/issues/194
[+] TF2, Linux - works
[-] TF2, Windows
[-] Other games - not tested, but the plugin should support them

Posted: Fri Apr 08, 2016 2:07 pm
by decompile
Getting an import error in

Syntax: Select all

import info


and when I bypass it Ill get
saytext2_filter = server[SAYTEXT2_FILTER_IDENTIFIER].make_function(

ValueError: Could not find signature.


[SP] Plugin 'deadchat' was unable to be loaded.


CS:S Windows

Would this work for spectator team chat too?

Posted: Fri Apr 08, 2016 3:52 pm
by iPlayer
Yes, it will work for spec team chat this way: if it's a team spec message, only spectators will see it; but if it's a regular spec message, everyone will see it.

As for the signature, it's a Windows-specific problem, but I'll try to find a correct signature soon.

Posted: Fri Apr 08, 2016 6:37 pm
by iPlayer
I think I got it working for CS:S on Windows. Please test it.

Posted: Fri Apr 08, 2016 7:57 pm
by decompile
[SP] Successfully loaded plugin 'deadchat'.

Works!

Posted: Fri Apr 08, 2016 8:25 pm
by decompile
Loaded ingame getting

AttributeError: 'str' object has no attribute 'get_string_array' for every msg

Posted: Fri Apr 08, 2016 9:22 pm
by iPlayer
Fixed that.
You can update from GitHub or go to deadchat_css.py and on line 27 replace

Syntax: Select all

msg_name = args[3].get_string_array()

with

Syntax: Select all

msg_name = args[3]

Re: [CS:S/CS:GO] DeadChat

Posted: Fri May 20, 2016 2:58 am
by decompile
CS:S Version Linux

When im in spec, my messages shows 2x times.

"say this is just a test msg"

Code: Select all

*ZUSCHAUER* decompile :  this is just a test msg
*ZUSCHAUER* decompile :  this is just a test msg

Re: [CS:S/CS:GO] DeadChat

Posted: Fri May 20, 2016 5:23 pm
by iPlayer
Can't reproduce on CS:S, Windows
Image

Can this be Linux-specific?

decompile, try adding such line

Code: Select all

recipient_filter.remove_all_players()

to 27th line of deadchat_css.py

It will look like this

Code: Select all

@PreHook(saytext2_filter)
def pre_saytext2_filter(args):
    recipient_filter = make_object(RecipientFilter, args[0])
    recipient_filter.remove_all_players()
    msg_name = args[3]


Don't forget to write back.

Re: [CS:S/CS:GO] DeadChat

Posted: Fri May 20, 2016 5:39 pm
by satoon101
I know that under certain circumstances, EventScripts would have this issue when SourceMod was also installed. I don't fully remember what causes it or how to avoid it, sorry. This might not even be your issue, but I thought it worth mentioning.

Re: [CS:S/CS:GO] DeadChat

Posted: Fri May 20, 2016 5:46 pm
by iPlayer
Thanks, Satoon

Decompile, make sure this problem is not present when DeadChat is unloaded

Re: [CS:S/CS:GO] DeadChat

Posted: Fri May 20, 2016 11:19 pm
by decompile
When I add that line, no chat messages gets shown in chat.
And this problem is not present when deadcheat is unloaded

Re: [CS:S/CS:GO] DeadChat

Posted: Fri May 20, 2016 11:27 pm
by satoon101
Just checking to make sure, but from what my post refers to, do you have SourceMod on your server? If so, try disabling it to see if the problem persists.

Re: [CS:S/CS:GO] DeadChat

Posted: Sat May 21, 2016 10:18 am
by iPlayer
decompile, try this

Syntax: Select all

@PreHook(saytext2_filter)
def pre_saytext2_filter(args):
recipient_filter = make_object(RecipientFilter, args[0])
msg_name = args[3]

if msg_name in ("Cstrike_Chat_AllDead", "Cstrike_Chat_AllSpec"):
recipient_filter.remove_all_players()
recipient_filter.add_all_players()

elif msg_name == "Cstrike_Chat_T_Dead":
recipient_filter.remove_all_players()
recipient_filter.update(PlayerIter('t'))

elif msg_name == "Cstrike_Chat_CT_Dead":
recipient_filter.remove_all_players()
recipient_filter.update(PlayerIter('ct'))

Re: [ANY] DeadChat

Posted: Tue Apr 25, 2017 2:06 pm
by iPlayer
DeadChat update
Works perfectly on bitbuf games and successfully crashes on CS:GO (see Source-Python-Dev-Team/Source.Python#194)
Fixed a bug with dupe chat messages when HLTV is on the server (see Source-Python-Dev-Team/Source.Python#185)
Dedicated separate files to signatures / offsets
Updated signature for bitbuf games, made it more stable
Improved flexibility
General refactor and updates