AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Can i remove the buyzone like this? (https://forums.alliedmods.net/showthread.php?t=121380)

Toastt 03-15-2010 02:33

Can i remove the buyzone like this?
 
can i remove the buy zone like this?

PHP Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
remove_entity_name"game_text" );
}

public 
remove_buyzone() {
        new 
iEntity = -1;
        while( ( 
iEntity find_ent_by_class(iEntity"func_buyzone") ) ) 
        
remove_entityiEntity );



shuttle_wave 03-15-2010 04:12

Re: Can i remove the buyzone like this?
 
like this

PHP Code:

#include <amxmodx>
#include <fakemeta>

new g_msgStatusIcon;

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

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

// Block buyzone (by ConnorMcLeod)
public msgStatusIcon(msgidmsgdestid)
{
 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;



Exolent[jNr] 03-15-2010 11:04

Re: Can i remove the buyzone like this?
 
Quote:

Originally Posted by Toastt (Post 1117797)
can i remove the buy zone like this?

PHP Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
remove_entity_name"game_text" );
}

public 
remove_buyzone() {
        new 
iEntity = -1;
        while( ( 
iEntity find_ent_by_class(iEntity"func_buyzone") ) ) 
        
remove_entityiEntity );



remove_buyzone() is never called.

PHP Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
remove_entity_name"game_text" );
    
remove_buyzone();
}

public 
remove_buyzone() {
        new 
iEntity = -1;
        while( ( 
iEntity find_ent_by_class(iEntity"func_buyzone") ) ) 
        
remove_entityiEntity );


or
PHP Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
remove_entity_name"game_text" );
    
remove_buyzone();
}

public 
remove_buyzone() {
    
remove_entity_name"func_buyzone" );


or
PHP Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
remove_entity_name"game_text" );
    
remove_entity_name"func_buyzone" );



Toastt 03-15-2010 11:20

Re: Can i remove the buyzone like this?
 
okay thanks exo

Arkshine 03-15-2010 12:45

Re: Can i remove the buyzone like this?
 
func_buyzone is not always used in a map, you should use shuttle_wave's plugin.

Toastt 03-15-2010 12:52

Re: Can i remove the buyzone like this?
 
Quote:

Originally Posted by Arkshine (Post 1118181)
func_buyzone is not always used in a map, you should use shuttle_wave's plugin.

oh okay then.

joropito 03-15-2010 12:54

Re: Can i remove the buyzone like this?
 
If theres no func_buyzone on a map, players could buy weapons when they are on their spawn points.

http://www.twhl.co.za/wiki.php?id=228

Quote:

Later releases of CS don't require a func_buyzone, as the player spawn area defines the buy area. However if you want to set the actual size of the buyzone, then use this entity.
That's the point of shuttle_wave's plugin blocks StatusIcon msgs and changes offset 235.

ConnorMcLeod 03-15-2010 13:13

Re: Can i remove the buyzone like this?
 
Do this in plugin_precache and the it's fine :

PHP Code:

public plugin_precache()
{
    new 
iEnt create_entity("info_map_parameters")
    
DispatchKeyValue(iEnt"buying""3")
    
DispatchSpawn(iEnt)


Code:

@PointClass iconsprite("sprites/CS/MapParams.spr") = info_map_parameters : "Miscellaneous mapping parameters"
[
        buying(choices)  : "Weapon_Buying" : "" =
        [
                "": "Both teams can buy guns"
                1: "Only CT's can buy guns"
                2: "Only T's can buy guns"
                3: "Neither CT's nor T's can buy guns"
        ]
        bombradius(integer) : "Bomb Radius" : 500
]


hleV 03-15-2010 13:18

Re: Can i remove the buyzone like this?
 
Wouldn't this be better?
PHP Code:

public plugin_init()
{
    new 
Entity = -1;

    while ((
Entity find_ent_by_class(Entity"func_buyzone")))
        
entity_set_int(EntityEV_INT_team3);


Just asking since I have no idea myself.

Arkshine 03-15-2010 13:19

Re: Can i remove the buyzone like this?
 
Don't use this method.


All times are GMT -4. The time now is 08:47.

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