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

[CODE] [ORPHEU] How to hook when player use +voicerecord


Post New Thread Reply   
 
Thread Tools Display Modes
Owyn
Veteran Member
Join Date: Nov 2007
Old 09-19-2010 , 05:38   Re: [CODE] [ORPHEU] How to hook when player use +voicerecord
Reply With Quote #11

i don't need functions, i want messages they read
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.
Owyn is offline
Send a message via ICQ to Owyn
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-19-2010 , 05:44   Re: [CODE] [ORPHEU] How to hook when player use +voicerecord
Reply With Quote #12

what?
__________________
Arkshine is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 09-19-2010 , 05:58   Re: [CODE] [ORPHEU] How to hook when player use +voicerecord
Reply With Quote #13

see you don't understand but still answer =\

net packets sent from client to server and given to those functions to accept and work on
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.
Owyn is offline
Send a message via ICQ to Owyn
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-19-2010 , 06:22   Re: [CODE] [ORPHEU] How to hook when player use +voicerecord
Reply With Quote #14

My deepest apology, I have always difficulties to understand you. Weird..
I still don't understand what you want, the cl messages are handled in SV_ExecuteClientMessage(), so if you want to hook theses messages, you need to hook this function. But all is already written in the first post.
__________________
Arkshine is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 09-19-2010 , 07:58   Re: [CODE] [ORPHEU] How to hook when player use +voicerecord
Reply With Quote #15

ok, i hooked function which handles my message, what's next? my message is nor in arguments passed to function nor in its return. but it looks you sure know how to do it so please tell me
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.
Owyn is offline
Send a message via ICQ to Owyn
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-19-2010 , 08:16   Re: [CODE] [ORPHEU] How to hook when player use +voicerecord
Reply With Quote #16

You are quite funny, you are trying to do something you don't understand. Joropito has already explained, still you ask..

I've never tried to hook, or nor interested in that, but looking at the at the decompiled code, you can know easily that the argument passed into the function is the client_s structure. To get what message clc_ is passed you need to read the byte with MSG_ReadByte(). And you know the related function to call, the index is used in the sv_clcfuncs structure which contains the offset to the related function.

So, now you can know what messages sent by hooking one function, nice. Then.. you are going to do what now ? Hooking this main function or hooking all the functions related is the same thing.
If you are interested by the data passed, you need to read the client_t structure. Good luck with that..
__________________

Last edited by Arkshine; 09-19-2010 at 09:08.
Arkshine is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 09-19-2010 , 09:31   Re: [CODE] [ORPHEU] How to hook when player use +voicerecord
Reply With Quote #17

Owyn, the best way to do what you want is to write a new engine module. Try that and post here your results please

Also, send us your cl_client.h file because we lost that file.
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
Owyn
Veteran Member
Join Date: Nov 2007
Old 09-19-2010 , 10:59   Re: [CODE] [ORPHEU] How to hook when player use +voicerecord
Reply With Quote #18

MSG_Readbits() actually does the thing

my cl_client wasn't half complete, cuz its a struct of structs of structs etc... and i had just one level
__________________
☜ Free Mozy ☂backup\҉sync user
Quote:
Американский форум - Задаёшь вопрос, потом тебе отвечают.
Израильский форум - Задаёшь вопрос, потом тебе задают вопрос.
Русский форум - Задаёшь вопрос, потом тебе долго рассказывают, какой ты мудак.
Owyn is offline
Send a message via ICQ to Owyn
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 09-19-2010 , 11:07   Re: [CODE] [ORPHEU] How to hook when player use +voicerecord
Reply With Quote #19

Quote:
Originally Posted by Owyn View Post
MSG_Readbits() actually does the thing

my cl_client wasn't half complete, cuz its a struct of structs of structs etc... and i had just one level
Be careful, calling MSG_ReadBits() yourself you can crash the server or at least crash some client connections because messages will be corrupted.
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-19-2010 , 11:13   Re: [CODE] [ORPHEU] How to hook when player use +voicerecord
Reply With Quote #20

It would be simply better to hook the related functions..
__________________
Arkshine 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 07:47.


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