Raised This Month: $ Target: $400
 0% 

How to disable buy menu?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
XunTric
BANNED
Join Date: Jan 2005
Location: Norway/Norge
Old 03-08-2005 , 10:57   How to disable buy menu?
Reply With Quote #1

Im working on a plugin where you get weapons on round start. How do i disable the buy menu like on fy maps?

Thanks
XunTric is offline
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 03-08-2005 , 11:11  
Reply With Quote #2

The way fy_ maps disable buying is a mapping technique and is compiled into the map itself...
xeroblood is offline
Send a message via MSN to xeroblood
XunTric
BANNED
Join Date: Jan 2005
Location: Norway/Norge
Old 03-08-2005 , 11:17  
Reply With Quote #3

kk, but is there still a way to disable the buy menu? I'm 90% sure ive seen it in a other metamod or amxx plugin.
XunTric is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 03-08-2005 , 18:27  
Reply With Quote #4

You could try this:

Code:
#include <amxmodx> #include <engine> public plugin_precache() {    disable_buyzone(); // disable buying    // do it in precache because it is done earlier than plugin_init, and it MIGHT matter } public disable_buyzone() {    // find that info entity    new ent = find_ent_by_class(-1,"info_map_parameters");    // if we couldn't find one, make our own    if(!ent) {       ent = create_entity("info_map_parameters");    }    // disable buying for both teams    DispatchKeyValue(ent,"buying","3");    DispatchSpawn(ent); }

It may not work.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
XunTric
BANNED
Join Date: Jan 2005
Location: Norway/Norge
Old 03-09-2005 , 07:51  
Reply With Quote #5

I'll try now.
Thanks

btw, if it works... where can i put the print when they try to buy?
like "This server is running with RuneScape Mod. You cant buy anything!"
XunTric is offline
XunTric
BANNED
Join Date: Jan 2005
Location: Norway/Norge
Old 03-09-2005 , 08:04  
Reply With Quote #6

It works!

But where do i place that print? (I tryed at the end of the function, but then i get 4 errors)

People can go on the menu and choose weapon, but then it comes "Counter-Terrorits cant buy weapons on this map" (or something like that... just like on fy maps)
Is there anyway to make it so they cant even get in to the menu?
XunTric is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 03-09-2005 , 15:14  
Reply With Quote #7

I don't think you can stop it from coming up at all. You could try registering the text message that says CTs can't buy weapons on this map and then use your own client_print on print_center to override it.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
TotalNoobScripter
Senior Member
Join Date: Aug 2004
Old 03-09-2005 , 16:40  
Reply With Quote #8

you could register the buy command, and make it do a PLUGIN_HANDLED

also btw...

RuneScape mod? me is interested.
TotalNoobScripter is offline
Send a message via AIM to TotalNoobScripter
Sp4rt4n
Senior Member
Join Date: Dec 2004
Old 03-09-2005 , 17:15  
Reply With Quote #9

off topic section... sounds cool
Sp4rt4n is offline
Send a message via MSN to Sp4rt4n
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 03-09-2005 , 19:15  
Reply With Quote #10

Hrmm, you could try doing what Avalanche said as well as searching for and deleting any "func_buyzone" entities... Some maps dont have them and use the user spawns as a buyzone radius, but maybe that will help?
xeroblood is offline
Send a message via MSN to xeroblood
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 14:08.


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