[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! |
All times are GMT -4. The time now is 19:55. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.