Osiris icon indicating copy to clipboard operation
Osiris copied to clipboard

hook user chat and overwrite it

Open E4zily opened this issue 1 year ago • 1 comments

hello,

im kinda new to this language and im wondering if someone could tell me how to hook the chat messages and overwrite them. for example, i type something else and it changes the text to caps or something.

thank you

E4zily avatar Jul 18 '22 16:07 E4zily

You can hook IVEngineClient::ClientCmd (https://github.com/perilouswithadollarsign/cstrike15_src/blob/master/public/cdll_int.h#L332) and check if szCmdString starts with "say". If yes, the rest of the string is the chat message. You can then change the string to whatever you want and return the original with it.

lstrsrt avatar Jul 22 '22 11:07 lstrsrt