Raised This Month: $32 Target: $400
 8% 

Solved Getting info structure of user messages?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Shadowysn
Senior Member
Join Date: Sep 2015
Location: Location:
Old 11-22-2019 , 08:00   Getting info structure of user messages?
Reply With Quote #1

How do you get the info structure of a user message without trial-and-error?

I want to send a user message that is specific to one or two games.
But with the lack of info and my disliking in having to do extensive trial-and-error, usually I'd try to find info about it online or use a hook.

So far there haven't been any successful findings about it online.
I haven't used a user message hook yet, however since I read that functions that print information to either the chat, console, or hint messages don't work in those hooks, is there any other way?

EDIT:
I meant something like this:
PHP Code:
Handle usermsg StartMessageAll("UserMessageThatIsNotReal");
if (
usermsg != null)
{
    
// code to pass on here
    // Let's just assume that UserMessageThatIsNotReal's info goes like this:
    // integer - determine the number of players that get chosen by the game
    // integer - what client index to start from
    // It would probably go like this:
    
BfWriteByte(usermsg5);
    
BfWriteByte(usermsg, -1);
    
EndMessage();
    
// I want to know the values and the assortment of them for a user message in L4D2 called 'Splatter' but
    // I have no idea what the assortment of that usermsg is, and how many values I have to pass

And how did usermsg all tie to EngineVersion or a specific feature the game contains?
__________________
ragdoll spam, that is all

Steam profile, where I game, obviously.
Youtube channel, where I do Stick Death Maze animations and some other stuff.
no plugin requests, sorry


My Plugins:
-search list-
Modified Plugins:
1 | 2 | 3 | 4

Last edited by Shadowysn; 11-24-2019 at 04:39.
Shadowysn is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 11-22-2019 , 09:15   Re: Getting info structure of user messages?
Reply With Quote #2

I didn't understand what you want.

If you are trying to check which game is running you can use EngineVersion.

Code sample:

Spoiler


In this case I suppose you know which games has the "Hint" feature for example.

This is done in the sourcemod basechat.sp

If you are trying to found what game has a feature or not, then I don't know how to achieve that.
__________________

Last edited by Marttt; 11-22-2019 at 09:41.
Marttt is offline
Shadowysn
Senior Member
Join Date: Sep 2015
Location: Location:
Old 11-22-2019 , 09:37   Re: Getting info structure of user messages?
Reply With Quote #3

I have created another XY problem. Yet again.

Edited the first post.
__________________
ragdoll spam, that is all

Steam profile, where I game, obviously.
Youtube channel, where I do Stick Death Maze animations and some other stuff.
no plugin requests, sorry


My Plugins:
-search list-
Modified Plugins:
1 | 2 | 3 | 4

Last edited by Shadowysn; 11-22-2019 at 09:40.
Shadowysn is offline
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 11-22-2019 , 09:37   Re: Getting info structure of user messages?
Reply With Quote #4

Taking the hunter call-out blocker plugin as an example, the game will not fetch those specific survivor dialogues related to seeing hunters in plain sight. Though I have no knowledge of how those user messages are read in order.

Last edited by cravenge; 11-22-2019 at 09:41.
cravenge is offline
hmmmmm
Great Tester of Whatever
Join Date: Mar 2017
Location: ...
Old 11-22-2019 , 17:16   Re: Getting info structure of user messages?
Reply With Quote #5

For games with usermessages that use bitbuffers I don't know of any other way than reversing the binary in which they're sent/handled (which I believe L4D2 is one of)

Otherwise, for games with usermessages that use protobuf you can look at the protobuf files.
hmmmmm is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 11-23-2019 , 12:57   Re: Getting info structure of user messages?
Reply With Quote #6

"Splatter", "MeleeSlashSplatter", "MeleeClubSplatter", and "MudSplatter" all appear to contain just 1 byte which is the number of splatters to apply to the player.
__________________
asherkin is offline
Shadowysn
Senior Member
Join Date: Sep 2015
Location: Location:
Old 11-24-2019 , 04:39   Re: Getting info structure of user messages?
Reply With Quote #7

Quote:
Originally Posted by hmmmmm View Post
For games with usermessages that use bitbuffers I don't know of any other way than reversing the binary in which they're sent/handled (which I believe L4D2 is one of)

Otherwise, for games with usermessages that use protobuf you can look at the protobuf files.
Ah, okay then.
Quote:
Originally Posted by asherkin View Post
"Splatter", "MeleeSlashSplatter", "MeleeClubSplatter", and "MudSplatter" all appear to contain just 1 byte which is the number of splatters to apply to the player.
Well, um, thanks for explaining the one user message I wanted.

I was actually trying to create a blood splatter particle, but I guess I can keep this in mind later down the line.
__________________
ragdoll spam, that is all

Steam profile, where I game, obviously.
Youtube channel, where I do Stick Death Maze animations and some other stuff.
no plugin requests, sorry


My Plugins:
-search list-
Modified Plugins:
1 | 2 | 3 | 4
Shadowysn is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 11-24-2019 , 05:13   Re: Getting info structure of user messages?
Reply With Quote #8

I made a UserMsg Hooks plugin which can log all the different structures for different UserMsgs, and log/display the associated data. I would suggest using that to figure out unknowns.
__________________
Silvers is offline
Reply


Thread Tools
Display Modes

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 21:45.


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