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

[Tutorial] Usermessages : list, ussage, bitbuffer structure


Post New Thread Reply   
 
Thread Tools Display Modes
psychonic

BAFFLED
Join Date: May 2008
Old 03-23-2009 , 09:38   Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
Reply With Quote #21

Quote:
Originally Posted by SAMURAI16 View Post
that's sending a message, not hooking
I was getting the impression that he was hooking it to figure out how it works because his plugin that sends was not working
Quote:
Originally Posted by CrimsonGT
I have another plugin that uses SayText2 but when I use it, nothing prints to chat.
psychonic is offline
CrimsonGT
Veteran Member
Join Date: Oct 2007
Location: Gainesville, FL
Old 03-23-2009 , 09:38   Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
Reply With Quote #22

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.
__________________
CrimsonGT is offline
Dragonshadow
BANNED
Join Date: Jun 2008
Old 08-14-2009 , 09:54   Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
Reply With Quote #23

Quote:
Originally Posted by p3tsin View Post
It seems even CSS never fires that usermessage. You can do the progress bar with these 2 netprops though

Code:
CCSPlayer::m_iProgressBarDuration (byte)
CCSPlayer::m_flProgressBarStartTime (float)
Set starttime to GetGameTime() and duration to number of seconds you want it to last. Apparently you gotta reset the value of m_iProgressBarDuration to 0 manually when the time has ran out.
I know this is an old thread, but is there anything like this in tf2?
Dragonshadow is offline
Wazz
SourceMod Donor
Join Date: Mar 2009
Old 08-14-2009 , 20:33   Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
Reply With Quote #24

Your only chance is the using the developers commentary. I have no further help I can give though, good luck
Wazz is offline
flud
Senior Member
Join Date: Jun 2009
Location: Latvija
Old 04-29-2010 , 20:21   Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
Reply With Quote #25

any chance to see some example for l4d2 ?
__________________
Beware of a terrible language
flud is offline
Send a message via Skype™ to flud
KawMAN
SourceMod Donor
Join Date: Sep 2007
Location: Cracov
Old 05-01-2010 , 11:22   Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
Reply With Quote #26

This can be useful
PHP Code:
decl String:strRest[256]="";
decl String:strRestc[256]="";
new 
curbyte;
while(
BfGetNumBytesLeft(hBitBuffer))
{
    
curbyte BfReadByte(hBitBuffer);
    
Format(strRestsizeof(strRest), "%s%d"strRestcurbyte);
    
Format(strRestcsizeof(strRestc), "%s%c"strRestccurbyte);
}
PrintToServer("USERMSGHOOK: %s "strRest);
PrintToServer("USERMSGHOOK: %s "strRestc); 
also Name Change Message Block if
PHP Code:
public OnPluginStart()
{    
    
HookUserMessage(GetUserMessageId("SayText2"), UserMessageHooktrue);
}

public 
Action:UserMessageHook(UserMsg:MsgIdHandle:hBitBuffer, const iPlayers[], iNumPlayersbool:bReliablebool:bInit)
{
    
decl String:strMessage[256]="";

    
// Skip the first two bytes
    
BfReadByte(hBitBuffer);
    
BfReadByte(hBitBuffer);
    
    
// Read the message
    
BfReadString(hBitBufferstrMessagesizeof(strMessage), true);
    
//Next BfReadString is prev name, next is current name (changed to)
    
    //#Cstrike_Name_Change
    
if (StrEqual(strMessage"#Cstrike_Name_Change")) 
    {

        return 
Plugin_Handled;
    }
    return 
Plugin_Continue;

__________________

Last edited by KawMAN; 05-01-2010 at 11:36.
KawMAN is offline
Send a message via ICQ to KawMAN Send a message via Skype™ to KawMAN
Soldier.Zi
Junior Member
Join Date: Feb 2014
Old 05-23-2022 , 16:58   Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
Reply With Quote #27

Sorry for refreshing so old thread, but i want to ask where I can find list of all user messages for CS:GO?
Soldier.Zi is offline
Reply



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 03:17.


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