AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Question] How To Block Buy And Change Team, And Choose Team Menu? (https://forums.alliedmods.net/showthread.php?t=156531)

jc980 05-08-2011 02:38

[Question] How To Block Buy And Change Team, And Choose Team Menu?
 
Title.

And How Do I Replace Those Menus With AMX ModX Menus?

Doc-Holiday 05-08-2011 03:10

Re: [Question] How To Block Buy And Change Team, And Choose Team Menu?
 
Quote:

Originally Posted by jc980 (Post 1465384)
Title.

And How Do I Replace Those Menus With AMX ModX Menus?

Not sure if you need both clcmd's but
PHP Code:

register_clcmd("chooseteam""BlockCMD"); //Blocks menu
register_clcmd("jointeam""BlockCMD"); //Blocks actual team join

public BlockCMD(id)
{
   return 
PLUGIN_HANDLED;


Buyzone blocker
PHP Code:

#define fm_cs_set_user_nobuy(%1)    set_pdata_int(%1, 235, get_pdata_int(%1, 235) & ~(1<<0))

public pluign_init()
{
     
register_message(get_user_msgid("StatusIcon"), "Message_StatusIcon"); //Block buy zone
}

public 
Message_StatusIcon(iMsgIdiMsgDestid//Blocks buyzone for VIP only
{
    if(
id == g_iVIPid)
    {
        static 
szIcon[8];  
        
get_msg_arg_string(2szIconcharsmax(szIcon));
        if(
equal(szIcon"buyzone"))
        {  
            if(
get_msg_arg_int(1))
            {  
                
set_pdata_int(id235get_pdata_int(id235) & ~(1<<0));
                return 
PLUGIN_HANDLED;  
            }  
        }
    }
      
    return 
PLUGIN_CONTINUE;  



jc980 05-08-2011 04:09

Re: [Question] How To Block Buy And Change Team, And Choose Team Menu?
 
Thanks Doc.

Now For The Second Question.

And How Do I Replace Those Menus With AMX ModX Menus?

SonicSonedit 05-08-2011 10:03

Re: [Question] How To Block Buy And Change Team, And Choose Team Menu?
 
1 Attachment(s)
jc980
about blocking chooseteam and showing custom menu: [SOLVED] Proper way to block team select menu popup on connect
about blocking buy and showing custom buymenu: See attachment.

I uploaded beta of my buymenu 2.0
See what commands i block.
Also you asked about how to save player-related data - you can use my bank code from example (attachment) and how upload items from file.
Anyway I'm going to re-master my buymenu system once again before release (4th time, lol) - I think I'll stick with custom native zp_register_buymenu_item instead from loading items from file.

jc980 05-11-2011 04:38

Re: [Question] How To Block Buy And Change Team, And Choose Team Menu?
 
Quote:

Originally Posted by SonicSonedit (Post 1465547)
jc980
about blocking chooseteam and showing custom menu: [SOLVED] Proper way to block team select menu popup on connect
about blocking buy and showing custom buymenu: See attachment.

I uploaded beta of my buymenu 2.0
See what commands i block.
Also you asked about how to save player-related data - you can use my bank code from example (attachment) and how upload items from file.
Anyway I'm going to re-master my buymenu system once again before release (4th time, lol) - I think I'll stick with custom native zp_register_buymenu_item instead from loading items from file.

thx dude.

anyways. i not gonna need this now. because, i accidentally formatted my drive. so i got fix something first before i re write my mod all over again.

SonicSonedit 05-11-2011 06:49

Re: [Question] How To Block Buy And Change Team, And Choose Team Menu?
 
jc980
Oh shi~
That happened to me once too (that was when I dissapeared from alliedmodders for a while). Just hold on, it's gonna be ok :)

csoldjb 05-11-2011 09:27

Re: [Question] How To Block Buy And Change Team, And Choose Team Menu?
 
I think you could use this :register_message("VGUIMenu","block_vguimenu" )

jc980 05-12-2011 08:17

Re: [Question] How To Block Buy And Change Team, And Choose Team Menu?
 
Quote:

Originally Posted by csoldjb (Post 1467441)
I think you could use this :register_message("VGUIMenu","block_vguimenu" )

not very useful at all.

Quote:

Originally Posted by SonicSonedit (Post 1467348)
jc980
Oh shi~
That happened to me once too (that was when I dissapeared from alliedmodders for a while). Just hold on, it's gonna be ok :)

hahahaha, trying to recover my files, by some program on the net. good thing i have an empty drive to use it( because the program requires using another hard drive to recover from the other hard drive )


All times are GMT -4. The time now is 04:21.

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