Skip to content

Conversation

@vinci6k
Copy link
Contributor

@vinci6k vinci6k commented Feb 1, 2021

As promised: https://forums.sourcepython.com/viewtopic.php?f=37&t=2472#p15210

Tested in CSS and CSGO with:

# ../showmenu_hook/showmenu_hook.py

# Source.Python
from messages.hooks import HookUserMessage


@HookUserMessage('ShowMenu')
def showmenu_pre(recipients, buffer):
    print(recipients, buffer)

@Ayuto
Copy link
Member

Ayuto commented Feb 1, 2021

Thank you! Have you check very big menus on CS:S (bitbuffer)? Because there should actually be a byte that tells us whether or not the menu is chunked (right before the menu string):
https://github.com/Source-Python-Dev-Team/Source.Python/blob/master/addons/source-python/packages/source-python/messages/base.py#L242-L263

@vinci6k
Copy link
Contributor Author

vinci6k commented Feb 1, 2021

I used change_map.py to test the hook and oddly enough, nothing seemed wrong. 😅

@jordanbriere jordanbriere merged commit 3b9085f into Source-Python-Dev-Team:master Feb 2, 2021
@vinci6k vinci6k deleted the showmenu_impl branch February 15, 2021 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants