Raised This Month: $ Target: $400
 0% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 05-08-2011 , 02:38   [Question] How To Block Buy And Change Team, And Choose Team Menu?
Reply With Quote #1

Title.

And How Do I Replace Those Menus With AMX ModX Menus?
__________________
jc980 is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 05-08-2011 , 03:10   Re: [Question] How To Block Buy And Change Team, And Choose Team Menu?
Reply With Quote #2

Quote:
Originally Posted by jc980 View Post
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;  

Doc-Holiday is offline
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 05-08-2011 , 04:09   Re: [Question] How To Block Buy And Change Team, And Choose Team Menu?
Reply With Quote #3

Thanks Doc.

Now For The Second Question.

And How Do I Replace Those Menus With AMX ModX Menus?
__________________
jc980 is offline
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 05-08-2011 , 10:03   Re: [Question] How To Block Buy And Change Team, And Choose Team Menu?
Reply With Quote #4

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.
Attached Files
File Type: sma Get Plugin or Get Source (zp_cs_buymenu.sma - 997 views - 67.5 KB)
__________________


Last edited by SonicSonedit; 05-08-2011 at 10:11.
SonicSonedit is offline
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 05-11-2011 , 04:38   Re: [Question] How To Block Buy And Change Team, And Choose Team Menu?
Reply With Quote #5

Quote:
Originally Posted by SonicSonedit View Post
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.
__________________
jc980 is offline
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 05-11-2011 , 06:49   Re: [Question] How To Block Buy And Change Team, And Choose Team Menu?
Reply With Quote #6

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
__________________

SonicSonedit is offline
csoldjb
Member
Join Date: Dec 2010
Old 05-11-2011 , 09:27   Re: [Question] How To Block Buy And Change Team, And Choose Team Menu?
Reply With Quote #7

I think you could use this :register_message("VGUIMenu","block_vguimenu" )
csoldjb is offline
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 05-12-2011 , 08:17   Re: [Question] How To Block Buy And Change Team, And Choose Team Menu?
Reply With Quote #8

Quote:
Originally Posted by csoldjb View Post
I think you could use this :register_message("VGUIMenu","block_vguimenu" )
not very useful at all.

Quote:
Originally Posted by SonicSonedit View Post
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 )
__________________
jc980 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:21.


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