Quote:
Originally Posted by SAMURAI16
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
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()
}
__________________