Raised This Month: $51 Target: $400
 12% 

Solved block buy for me/individual


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 05-01-2017 , 05:20   block buy for me/individual
Reply With Quote #1

Title^
i tried and this does not work
PHP Code:

#include <amxmodx>

new bool:for_me[33];

public 
plugin_init()
{
    
register_clcmd("say /block","set_block_buy_me");
    
register_messageget_user_msgid"StatusIcon" ), "Msg_StatusIcon" );
}

public 
client_disconnect(id)
{
    
for_me[id] = false;
}

public 
set_block_buy_me(id)
{
    
for_me[id] = true;
    
client_print(id,print_chat,"you have blocked your buyzone");
}

public 
Msg_StatusIconmsgidmsgdestid 

    if(
for_me[id] == true)
    {
        
client_print(id,print_chat,"bool is okay");
        static 
szMsg];  
        
get_msg_arg_string2szMsg);  
        if( 
equalszMsg"buyzone" ) && get_msg_arg_int) ) {
            
client_print(id,print_chat,"blocked");    
            return 
PLUGIN_HANDLED;  
        }    
    }
    return 
PLUGIN_CONTINUE;  

__________________
Thanks everyone. #miss_you_all

Last edited by indraraj striker; 05-03-2017 at 00:02.
indraraj striker is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 05-01-2017 , 21:40   Re: block buy for me/individual
Reply With Quote #2

https://forums.alliedmods.net/showpo...66&postcount=2

Just add your bool there.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 05-01-2017 , 22:45   Re: block buy for me/individual
Reply With Quote #3

Thanks EFFx for the response
both code is working without bool but not with bool
code (your one) :
PHP Code:

#include <amxmodx>
#include <fakemeta>

new g_msgStatusIcon;
new 
bool:for_me[33];

// Define the Plugin Version
new const VERSION[] = "1.0";

public 
plugin_init()
{
    
register_plugin("Block Buy Menu"VERSION"Shuttle_Wave/ConnorMcleod")
    
register_clcmd("say /block","set_block_buy_me");
    
    
// Block BuyZone
    
g_msgStatusIcon get_user_msgid("StatusIcon");
    
register_message(g_msgStatusIcon"msgStatusIcon");
}

public 
client_disconnect(id

    
for_me[id] = false


public 
set_block_buy_me(id

    
for_me[id] = true
    
client_print(id,print_chat,"you have blocked your buyzone"); 


// Block buyzone (by ConnorMcLeod)
public msgStatusIcon(msgidmsgdestid)
{
    if(
for_me[id] == true
    { 
        static 
szIcon[8];
        
get_msg_arg_string(2szIcon7);
        
        if(
equal(szIcon"buyzone") && get_msg_arg_int(1))
        {
            
set_pdata_int(id235get_pdata_int(id235) & ~(1<<0));
            return 
PLUGIN_HANDLED;
        }
    }
    return 
PLUGIN_CONTINUE;

__________________
Thanks everyone. #miss_you_all
indraraj striker is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 05-02-2017 , 11:44   Re: block buy for me/individual
Reply With Quote #4

Maybet this solve - https://forums.alliedmods.net/showpo...08&postcount=4
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 05-03-2017 , 00:02   Re: block buy for me/individual
Reply With Quote #5

Thanks EFFx it works
#solved
__________________
Thanks everyone. #miss_you_all
indraraj striker 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 14:19.


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