Raised This Month: $ Target: $400
 0% 

[Question] Register Message from a specific player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dFF
sıɹɹoɥɔ ʞɔnu
Join Date: Oct 2009
Old 05-09-2011 , 12:57   [Question] Register Message from a specific player
Reply With Quote #1

For example I have:

PHP Code:
[...]
register_clcmd"register""register" )
register_clcmd"unregister""unregister" )

public 
registerid )
{
    
g_iHookMsgAmmoXid ] = register_messageg_iMsgAmmoX"Message_CurWeapon" )
}

public 
unregisterid )
{
    if( 
g_iHookMsgAmmoXid ] )
    {
        
unregister_messageg_iMsgAmmoXg_iHookMsgAmmoXid ] )
                    
        
g_iHookMsgAmmoXid ] = 0
    
}

It's necessary to disable the hook message (like in "unregister" function) when client disconect ?
dFF is offline
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 05-09-2011 , 13:13   Re: [Question] Register Message from a specific player
Reply With Quote #2

Depends on what should it do.
__________________

SonicSonedit is offline
dFF
sıɹɹoɥɔ ʞɔnu
Join Date: Oct 2009
Old 05-09-2011 , 14:38   Re: [Question] Register Message from a specific player
Reply With Quote #3

Simple, I hook player ammos. I want to know If Is necessary to unregister hook-message from a player who has hooked message. (Message_CurWeapon)
dFF is offline
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 05-09-2011 , 16:23   Re: [Question] Register Message from a specific player
Reply With Quote #4

dFF
Quote:
Simple, I hook player ammos. I want to know If Is necessary to unregister hook-message from a player who has hooked message.
First of all, the code you use above hooks it for all players. And no, you don't need to unregister it, just filter player id.
__________________

SonicSonedit 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 04:19.


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