[Tutorial] Usermessages : list, ussage, bitbuffer structure
To make things more simple to understand, I can say usermessages are something like events
There are different user message for every game (I mean CS:S for example don't have the same user message like TF2) ○ Here is list of usermessages in CS:S Code:
Geiger ○ How to create create (reproduce) an usermessage and send it to client Before all you need the usermessage structure. There are bunch of bits wich may not so easy to find (We'll talk about that later) Now i'll show how to send a message to all clients. If you want to set only to a client use StartMessageOne() native (at least check usermessages.inc) PHP Code:
Code would be: PHP Code:
You can find all bitbuffer natives in bitbuffer.inc file ○ How to hook user messages Well that's not so hard, but again problem is with structure of usermessage First I want to say you can't print anything in callback of hooked message (I mean you can't use PrintToChat, PrintToChatAll etc) Now, example: PHP Code:
I choosed "ResetHUD", of course you'll use what you need Now the most difficult part is structure of message. You can read all bits with BfRead*() natives (bitbuffer.inc) Let's say if structure is byte,byte,float,byte and you need to check if last is 40: PHP Code:
I can say this message have some kind of 4 arg's. To reach the 4nd you have to read the previous ones I can say that's all. You can ask here all you want to know about each usermessages (when they are called, structure ) ; I'll do a handjob to find what you need ;) |
Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
Would you post an example for BarTime please? I can't get it to work. Thanks
|
Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
Quote:
Also, you could've mentioned the use of the bool:intercept param in HookUserMessage. Nice tut otherwise. :up: Quote:
Code:
new Handle:buf = StartMessageOne("BarTime",client,USERMSG_RELIABLE) |
Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
It doesn't work. Thx anyway
|
Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
BarTime Draws a HUD progress bar which is filled from 0% to 100% for the time.
try this Code:
|
Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
Just to make note, BarTime doesn't work in TF2.
Should this work? I grabbed this usermessage from the tf2 list and tried to use it, but it never got called. Code:
public OnPluginStart() |
Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
Quote:
Still doesn't work. Also tried with WriteFloat. |
Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
Quote:
Code:
CCSPlayer::m_iProgressBarDuration (byte) |
Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
Quote:
This works! PHP Code:
|
Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
Anybody willing to take some screenshots of what these look like?
Thanks! |
Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
Quote:
|
Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
Where can i find usermessages for L4D ?
|
Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
Do "meta game" in your server console. Not all messages are actually used/work/do anything.
|
Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
thanks
+karma |
Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
Quote:
|
Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
You can give all the code?
Thanks. |
Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
Im a bit confused, I wrote a plugin that hooks all TF2 usermessages and creates a 0.1 second timer and then prints to chat when they are called. Some usermessages which I KNOW are being called are not printing out to chat. For example SayText2, I have another plugin that uses SayText2 but when I use it, nothing prints to chat.
I have... Code:
HookUserMessage(GetUserMessageId("SayText2"), fn_SayText2, true); |
Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
by guessing
BfReadByte(bf) -> see if return a value if no BfReadChar(bf) and so on untill you get a value Let's say if find a char. That means first argument is a char. Now you have to do BfReadChar(bf) BfReadByte(bf) -> if returns something is good, else again BfReadChar(bf) BfReadChar(bf) -> returns something ? if yes that means 2nd argument is char also |
Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
Quote:
PHP Code:
|
Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
that's sending a message, not hooking
|
Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
Quote:
Quote:
|
Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
Thanks Samurai,
and yeah, im not actually trying to find the SayText2 stuff, I just tested to see if my hooks were actually working which apparently they arent. (I hooked all of the TF2 usermessages) and I just tried out saytext and saytext2 and neither one worked so im a bit confused as to why the hooks arent being called on them when they are obviously being used. |
Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
Quote:
|
Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
Your only chance is the using the developers commentary. I have no further help I can give though, good luck :)
|
Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
any chance to see some example for l4d2 ?
|
Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
This can be useful
PHP Code:
PHP Code:
|
Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
Sorry for refreshing so old thread, but i want to ask where I can find list of all user messages for CS:GO?
|
| All times are GMT -4. The time now is 23:42. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.