Raised This Month: $51 Target: $400
 12% 

How to hook the client's console print?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wangningyu
Member
Join Date: Dec 2011
Location: China.GuangDong
Old 08-07-2014 , 12:26   How to hook the client's console print?
Reply With Quote #1

I want write a client moudle, and add some fuction:
1. support input utf8 chat when player press Y/U (messagemode/2). (finished)
2. translate the console message to utf8 text, that support all message can be normal show.

in the amxx , if I use utf8 format and print_console to write plugins,



the console said utf8 string tested is ok.

but this message will show in console too , but the utf8 strings show failed :

case 2: client_print(0, print_chat, "%L", LANG_PLAYER, "ADMIN_BAN_2", name, name2)
case 1: client_print(0, print_chat, "%L", LANG_PLAYER, "ADMIN_BAN_1", name2)



the console is ignored the utf8 string , just only print ansi string like this:




I find the function in the sdk:

void (*pfnConsolePrint)( const char *strMsg );

but some the normal message(killed) into here too, and the param strMsg is not a whole message , maybe use many packets to recv.

so , hook which fuction in the engine hlsdk to fix this bug?

thans for you reply !
__________________
One Code , One Dream !
wangningyu 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 08:50.


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