AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   How to block buymenu command? (https://forums.alliedmods.net/showthread.php?t=265718)

_pHabb 07-03-2015 18:06

How to block buymenu command?
 
Hello!

Help me please.

How to block buymenu command?

It's not work:
Code:

public OnPluginStart()
{
    HookUserMessage(GetUserMessageId("VGUIMenu"),HookUserMessages,true);
}

public Action:HookUserMessages(UserMsg:msg_id, Handle:bf, const players[], playersNum, bool:reliable, bool:init)
{
    decl String:type[10];
    BfReadString(bf, type, sizeof(type));
   
    if (StrEqual(type, "buymenu"))
    {
        PrintToChatAll("blocked");
        //OpenBuyMenu(client);
        return Plugin_Handled;
    }
   
    return Plugin_Continue;
}

Why dont work? Help me please.

_pHabb 07-04-2015 14:57

Re: How to block buymenu command?
 
Nobody know?

blaacky 07-04-2015 16:08

Re: How to block buymenu command?
 
Try setting mp_buytime to 0

SM9 07-04-2015 18:23

Re: How to block buymenu command?
 
PHP Code:

public Action CS_OnBuyCommand(int iClient, const char[] chWeapon)
{
    return 
Plugin_Handled;



_pHabb 07-05-2015 12:09

Re: How to block buymenu command?
 
Your dont understand me.
I want block "BUYMENU" COMMAND, but not delete buying.

_pHabb 07-06-2015 18:31

Re: How to block buymenu command?
 
Help me, guys, please..

GinNNy 07-06-2015 21:12

Re: How to block buymenu command?
 
Maybe try Commandlistner with buymenu and then Plugin_handled?
Not sure.

ESK0 07-07-2015 01:27

Re: How to block buymenu command?
 
Buymenu is client side comment, you cannot hook it or change it.. You can hook buy or autobuy or c
Set buytime to 0

_pHabb 07-08-2015 07:21

Re: How to block buymenu command?
 
Sadly...
Thanks for helping.


All times are GMT -4. The time now is 17:58.

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