Raised This Month: $ Target: $400
 0% 

How to delete buyzone?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fl0werD
Senior Member
Join Date: May 2011
Old 02-26-2013 , 12:37   How to delete buyzone?
Reply With Quote #1

How to delete buyzone?

This code is not work:
PHP Code:
public Forward__Spawn_Pre(iEntity)
{
    if(!
pev_valid(iEntity))
        return 
FMRES_IGNORED;

    new 
szClassName[32];
    
pev(iEntitypev_classnameszClassNamecharsmax(szClassName))

    if(!
equal(szClassName"func_buyzone") && !equal(szClassName"info_buyzone"))
        return 
FMRES_IGNORED;

    
engfunc(EngFunc_RemoveEntityiEntity)
    return 
FMRES_SUPERCEDE;

This code is work:
PHP Code:
public Message__StatusIcon(MsgIDMsgDestiPlayer)
{
    static 
szIcon[5];
    
get_msg_arg_string(2szIconcharsmax(szIcon))
     
    if(
szIcon[0] != 'b' || szIcon[2] != 'y' || szIcon[3] != 'z')
        return 
PLUGIN_CONTINUE;

    
set_pdata_int(iPlayer235get_pdata_int(iPlayer235) & ~(1<<0))
    return 
PLUGIN_HANDLED;

But I want remove buyzone to not use message status icon.
fl0werD is offline
Send a message via ICQ to fl0werD
Bos93
Veteran Member
Join Date: Jul 2010
Old 02-26-2013 , 12:39   Re: How to delete buyzone?
Reply With Quote #2

http://forums.alliedmods.net/showpos...89&postcount=3
__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
fl0werD
Senior Member
Join Date: May 2011
Old 02-26-2013 , 12:41   Re: How to delete buyzone?
Reply With Quote #3

Quote:
Originally Posted by Bos93 View Post
Thank you very much.
fl0werD is offline
Send a message via ICQ to fl0werD
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-27-2013 , 00:45   Re: How to delete buyzone?
Reply With Quote #4

Better to alter existing entity, if exists.

PHP Code:
#include <amxmodx>
#include <engine>
#include <cstrike>

#define VERSION "0.0.1"
#define PLUGIN "No Buy"

public plugin_init()
{
    
register_plugin(PLUGINVERSION"ConnorMcLeod")

    new 
ClCmd_Buy[] = "ClCmd_Buy"
    
register_clcmd("buy"ClCmd_Buy)
    
register_clcmd("bUy"ClCmd_Buy)
    
register_clcmd("buY"ClCmd_Buy)
    
register_clcmd("bUY"ClCmd_Buy)
    
register_clcmd("Buy"ClCmd_Buy)
    
register_clcmd("BUy"ClCmd_Buy)
    
register_clcmd("BuY"ClCmd_Buy)
    
register_clcmd("BUY"ClCmd_Buy)

    new 
info_map_parameters[] = "info_map_parameters"
    
new iEnt find_ent_by_class(-1info_map_parameters)
    if( 
iEnt <= )
    {
        
iEnt create_entity(info_map_parameters)
    }

    
DispatchKeyValue(iEnt"buying""3")
    
DispatchSpawn(iEnt)

    
server_cmd("sv_restartround 1")
}

public 
ClCmd_Buyid )
{
    if( 
is_user_alive(id) )
    {
        if( 
cs_get_user_team(id) == CS_TEAM_T )
        {
            
client_print(idprint_center"#Cstrike_TitlesTXT_Terrorist_cant_buy")
        }
        else
        {
            
client_print(idprint_center"#Cstrike_TitlesTXT_CT_cant_buy")
        }
    }
    return 
PLUGIN_HANDLED_MAIN

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
fl0werD
Senior Member
Join Date: May 2011
Old 02-27-2013 , 04:59   Re: How to delete buyzone?
Reply With Quote #5

And on metamod like better?
fl0werD is offline
Send a message via ICQ to fl0werD
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-27-2013 , 13:16   Re: How to delete buyzone?
Reply With Quote #6

Nope, once entity is created/modified, no cpu is used anymore.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
fl0werD
Senior Member
Join Date: May 2011
Old 02-27-2013 , 14:36   Re: How to delete buyzone?
Reply With Quote #7

I don't use amxmodx...
fl0werD is offline
Send a message via ICQ to fl0werD
bibu
Veteran Member
Join Date: Sep 2010
Old 02-27-2013 , 16:02   Re: How to delete buyzone?
Reply With Quote #8

Quote:
Originally Posted by fl0werD View Post
I don't use amxmodx...
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
Reply


Thread Tools
Display Modes

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 21:39.


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