Raised This Month: $ Target: $400
 0% 

[Tutorial] Usermessages : list, ussage, bitbuffer structure


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
p3tsin
Senior Member
Join Date: Sep 2005
Location: Finland
Old 01-25-2009 , 16:20   Re: [Tutorial] Usermessages : list, ussage, bitbuffer structure
Reply With Quote #3

Quote:
Originally Posted by SAMURAI16 View Post
First I want to say you can't print anything in callback of hooked message (I mean you can't use PrintToChat, PrintToChatAll etc)
To be more specific, you can't use other usermessages in hooks (PrintToChat is a wrapper for TextMsg usermsg), but PrintToServer and possibly PrintToConsole should work just fine. Use the MsgSentNotify callback (4th param in HookUserMessage) if you need to send usermessages.

Also, you could've mentioned the use of the bool:intercept param in HookUserMessage. Nice tut otherwise.

Quote:
Originally Posted by blade81 View Post
Would you post an example for BarTime please? I can't get it to work. Thanks
This should be it but donnu if it works.

Code:
new Handle:buf = StartMessageOne("BarTime",client,USERMSG_RELIABLE)
if(buf != INVALID_HANDLE) {
	BfWriteByte(buf,duration)
	BfWriteByte(buf,0)
	EndMessage()
}
__________________
plop

Last edited by p3tsin; 01-25-2009 at 16:26.
p3tsin is offline
 


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


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