Raised This Month: $ Target: $400
 0% 

How to block teammenu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
igor.ol13
Junior Member
Join Date: Nov 2012
Old 01-13-2013 , 16:37   How to block teammenu
Reply With Quote #1

I'm making a plugin and I need to block team menu, I've tried by hooking the VGUIMenu message, and if I need to block, I just tried to return PLUGIN_HANDLED... But it seems that function never runs, because I've used server_print to view when that's called, and never prints my message... Below what I've been tried

PHP Code:
in plugin_init:
register_message(get_user_msgid("VGUIMenu"), "hook_teammenu");

public 
hook_teammenu(msgiddestid)
{
    
server_print("A VGUIMENU WAS SHOWED"); // Here is never printed
    
    
if (get_msg_arg_int(1) != || !is_user_connected(id))
        return 
PLUGIN_CONTINUE;
        
    if (
cl_uid[id] == 0)
    {
        
showMainMenu(id);
        return 
PLUGIN_HANDLED;
    }
    return 
PLUGIN_CONTINUE;

there are something wrong? how can I do this?
igor.ol13 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 13:35.


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