AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to block teammenu (https://forums.alliedmods.net/showthread.php?t=205715)

igor.ol13 01-13-2013 16:37

How to block teammenu
 
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?


All times are GMT -4. The time now is 13:35.

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