Raised This Month: $ Target: $400
 0% 

[Tutorial] Usermessages : list, ussage, bitbuffer structure


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
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 #1

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 #2

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 #3

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 23:42.


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