Raised This Month: $ Target: $400
 0% 

Can i remove the buyzone like this?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Toastt
BANNED
Join Date: Nov 2009
Old 03-15-2010 , 02:33   Can i remove the buyzone like this?
Reply With Quote #1

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 );

Toastt is offline
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 03-15-2010 , 04:12   Re: Can i remove the buyzone like this?
Reply With Quote #2

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;

__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-15-2010 , 11:04   Re: Can i remove the buyzone like this?
Reply With Quote #3

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

__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Toastt
BANNED
Join Date: Nov 2009
Old 03-15-2010 , 11:20   Re: Can i remove the buyzone like this?
Reply With Quote #4

okay thanks exo
Toastt is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-15-2010 , 12:45   Re: Can i remove the buyzone like this?
Reply With Quote #5

func_buyzone is not always used in a map, you should use shuttle_wave's plugin.
__________________
Arkshine is offline
Toastt
BANNED
Join Date: Nov 2009
Old 03-15-2010 , 12:52   Re: Can i remove the buyzone like this?
Reply With Quote #6

Quote:
Originally Posted by Arkshine View Post
func_buyzone is not always used in a map, you should use shuttle_wave's plugin.
oh okay then.
Toastt is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 03-15-2010 , 12:54   Re: Can i remove the buyzone like this?
Reply With Quote #7

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.
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.

Last edited by joropito; 03-15-2010 at 12:57.
joropito is offline
Send a message via MSN to joropito
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-15-2010 , 13:13   Re: Can i remove the buyzone like this?
Reply With Quote #8

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
]
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 03-15-2010 , 13:18   Re: Can i remove the buyzone like this?
Reply With Quote #9

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.
__________________
hleV is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-15-2010 , 13:19   Re: Can i remove the buyzone like this?
Reply With Quote #10

Don't use this method.
__________________
Arkshine 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 08:47.


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