AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Enabling a Buy Zone that's disabled? (https://forums.alliedmods.net/showthread.php?t=207264)

rake 01-31-2013 18:27

Enabling a Buy Zone that's disabled?
 
I have a 24/7 fy_snow server for 1.6
The map has a built in buy zone, but it's unusable by anyone.
(CT's/T's cannot buy anything on this map.)

I want all weapons available, so I tried the 'CSDM Style Gun Menus' mod.
The mod didn't work for me for some reason, and it is supposed to block buy zones.
It worked backwards to my benefit and actually enabled the buy zone!
but it caused some other issues so I had to remove it.

So there's a way to make the already existing buy-zone in fy_snow usable,
but i'm not sure how to do it.

I'm quite nubbish. I did search the forums but couldn't find anything.
Any help mucho appreciated.

:fox:

hleV 01-31-2013 19:25

Re: Enabling a Buy Zone that's disabled?
 
Not tested. If the buyzones happen to be for the opposite teams, change amx_buyzone from 1 to 2.
PHP Code:

#include <amxmodx>
#include <engine>

#define TEAM_TERRORIST 1
#define TEAM_CT 2

public plugin_init()
{
    
register_plugin("Buy Zone Enabler""1.0""HLEV");
    
    
register_cvar("amx_buyzone""1");
}

public 
plugin_cfg()
{
    switch (
get_cvar_num("amx_buyzone"))
    {
        case 
1SetBuyZoneTeams(TEAM_TERRORISTTEAM_CT);
        case 
2SetBuyZoneTeams(TEAM_CTTEAM_TERRORIST);
    }
}

SetBuyZoneTeams(team1team2)
{
    new 
ent find_ent_by_class(ent"func_buyzone");
    
    if (!
ent)
        return;
    
    
entity_set_int(entEV_INT_teamteam1);
    
    
ent find_ent_by_class(ent"func_buyzone");
    
    if (!
ent)
        return;
    
    
entity_set_int(entEV_INT_teamteam2);



ANTICHRISTUS 02-01-2013 14:51

Re: Enabling a Buy Zone that's disabled?
 
I think that there is an existing plugin to make buyzones, maybe by alka ?!

rake 02-01-2013 15:47

Re: Enabling a Buy Zone that's disabled?
 
hleV I tried your plugin and it didn't work for me. =(
though I really appreciate you throwing that together!
I compiled the source code into .amxx using http://www.amxmodx.org/webcompiler.cgi
not sure if that's why it didn't work.
The Cvar command didn't seem to work either.

And yeah it's weird. fy_snow already has a built in buy zone, it's just disabled.
There's gotta be an easier way maybe?
Also, when using 'CSDM Gun Style Menus' which enables the buy zone,
it doesn't allow the armor that's placed on the map to be picked up.

So complex... all I need at the end of the day is just to have all the obtainable guns in fy_snow.
(Pistols/autosnipers really)

hleV 02-02-2013 18:55

Re: Enabling a Buy Zone that's disabled?
 
I just downloaded and tested that map. Buying works fine without any plugin.

ConnorMcLeod 02-03-2013 03:11

Re: Enabling a Buy Zone that's disabled?
 
Quote:

Originally Posted by hleV (Post 1885888)
I just downloaded and tested that map. Buying works fine without any plugin.

As in fy_iceworld, that's what i thought and i was about to test the map :)

rake 02-03-2013 05:54

Re: Enabling a Buy Zone that's disabled?
 
The Iceworld buyzone works. on fy_snow, I get the message "T/CT's can't buy anything on this map."
Just tried a few random fy_snow servers. None of 'em let me buy.
And it's always been like that for me. Maybe different map versions...?
Where did you get your version from? It's really all I want, I don't want a boatload of plugins for one simple function.

Thanks for your guys' help with this though, seriously =D

hleV 02-03-2013 06:58

Re: Enabling a Buy Zone that's disabled?
 
I got it from here.

rake 02-03-2013 09:14

Re: Enabling a Buy Zone that's disabled?
 
That's the same one I have. If I try to buy, T or CT I still get the same message.
You sure you were able to buy? I've never seen that on fy_snow, the buy-zones are always not working, you aren't supposed to be able to get weapons or armor that way.http://img.photobucket.com/albums/v4...ps5b1652ac.jpg

hleV 02-03-2013 09:15

Re: Enabling a Buy Zone that's disabled?
 
Disable AMXX and try again.


All times are GMT -4. The time now is 20:40.

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