Raised This Month: $51 Target: $400
 12% 

func_buyzone creator?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ricky
Senior Member
Join Date: Jul 2005
Old 07-04-2015 , 05:28   func_buyzone creator?
Reply With Quote #1

is there a plugin out there that adds a buyzone to maps without one?
Ricky is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-04-2015 , 08:09   Re: func_buyzone creator?
Reply With Quote #2

Quote:
Originally Posted by Ricky View Post
is there a plugin out there that adds a buyzone to maps without one?
How this can happen ? In CS(maybe other games, but I'm not sure) if no func_buyzone exists then the game search in a radius(250.0 units if I remember well) around player spawnpoints to determine if you are in buyzone or not.
__________________

Last edited by HamletEagle; 07-04-2015 at 08:10.
HamletEagle is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 07-04-2015 , 13:43   Re: func_buyzone creator?
Reply With Quote #3

Afaik you're right hamlet, he probably wants something else but doesn't wants to say to keep secret (lol)
I guess he wants to remove the buyzones and create new ones in the whole map so he can hook buy commands and make them show a costum menu. (so this would allow opening the menu in the whole map since if you are outside the buyzone, you can't hook it)
__________________
Jhob94 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-04-2015 , 14:15   Re: func_buyzone creator?
Reply With Quote #4

Quote:
Originally Posted by Jhob94 View Post
Afaik you're right hamlet, he probably wants something else but doesn't wants to say to keep secret (lol)
I guess he wants to remove the buyzones and create new ones in the whole map so he can hook buy commands and make them show a costum menu. (so this would allow opening the menu in the whole map since if you are outside the buyzone, you can't hook it)
I can post an example of how to proper create a buyzone if this is what he really wants. But, he should tell us what he is trying to do so we can give the proper solution.
__________________
HamletEagle is offline
Ricky
Senior Member
Join Date: Jul 2005
Old 07-04-2015 , 15:45   Re: func_buyzone creator?
Reply With Quote #5

aim_ak-colt for example doesn't allow any teams to buy weapons at any part of the map. I use Ven's Buyzone everywhere plugin but that doesn't remedy this. Just trying to override this and allow buying for players in these types of maps with a buyzone.
Ricky is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-04-2015 , 15:52   Re: func_buyzone creator?
Reply With Quote #6

Then remove the old info_map_parameters entity, create a new one and use DispatchKeyValue(EntIndex, "buying", "") on it. This should do the trick.
__________________

Last edited by HamletEagle; 07-04-2015 at 15:53.
HamletEagle is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-05-2015 , 05:50   Re: func_buyzone creator?
Reply With Quote #7

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <engine>
#include <hamsandwich>

public plugin_precache()
{
    new 
InfoMapParametersEnt find_ent_by_class(-1"info_map_parameters"

    if(
pev_valid(InfoMapParametersEnt)) 
    { 
        
DispatchKeyValue(InfoMapParametersEnt"buying"""
    } 
    else 
    {
         
InfoMapParametersEnt create_entity("info_map_parameters")
         
ExecuteHamB(Ham_SpawnInfoMapParametersEnt)
         
DispatchKeyValue(InfoMapParametersEnt"buying"""
    }

This should be enough.
__________________

Last edited by HamletEagle; 07-05-2015 at 06:11.
HamletEagle is offline
Ricky
Senior Member
Join Date: Jul 2005
Old 07-05-2015 , 11:14   Re: func_buyzone creator?
Reply With Quote #8

Thank you! I will test this out on Tuesday. Would make a nice release as a small bit useful plugin.
Ricky is offline
vitorrossi
Senior Member
Join Date: Apr 2012
Location: NY, USA
Old 07-05-2015 , 17:24   Re: func_buyzone creator?
Reply With Quote #9

Quote:
Originally Posted by Ricky View Post
Thank you! I will test this out on Tuesday. Would make a nice release as a small bit useful plugin.

This is too simple to release as a plugin. If you do they will probably reject it.
vitorrossi 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 09:51.


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