Raised This Month: $32 Target: $400
 8% 

Buy Menu Management 2.0


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Server Management       
Mr. Frost
Member
Join Date: Nov 2011
Location: Atlantis
Old 12-26-2012 , 08:38   Buy Menu Management 2.0
Reply With Quote #1

BUY MENU MANAGEMENT
Version 2.0 © Danakt Frost

Description:
This plugin is designed to modify and supplement the Buy Menu.
Attention! This plugin is NOT Zombie Plague addon!

What's new in version 2.0?
  • Statistics of weapons purchases. With the help of statistics you can always see what weapon is least or most popular. Statistics opens with the command "amx_bmm_stats", both in the server console and in the admin console (administrator must have rights to the cvars edit).
  • Support bots. Now the bots are able to buy weapons that you added. Statistics weapons bought by bots isn't conducted.
  • No buyzone mode. When mode enabled, you can buy weapons and ammo at any point on the map. Activating by disabling "bmm_buyzone".
  • Free ammo. In spawn, and the purchase of any weapon, you will have a full back pack ammo, like in Counter-Strike: Source. Disabling by cvar "bmm_autoammo".
  • Autobuy and rebuy (F1 and F2).

The methods for adding items to the menu:
  1. The usual addition of weapons. The plugin is able to add weapons to the menu via third-party plugins using the internal API (See "bmm.inc" in the attached archive). An example of using this method you can see in the attached archive plugin "bmm_c4", which adds to menu of equipment terrorist the C4 bomb.
  2. Addition ZP Extra Items. The plugin can to add the Extra Items without a Zombie Plague. When adding, in the buy menu appears item "Uncategorised", in which they are located. You can move them by command "amx_bmm_category".
  3. Adding console commands in the menu. For cases where you want make item which executes command in the player console. Also when using this method can register a standard weapon (Sample: amx_bmm_additem "AK-47" 2500 T "" "ak47"). When you call a registered commands directly from the console, it will not work. Description of commands to add and its arguments, see below.

Commands:
  • amx_bmm_category — Open the menu categories. When adding a weapon with ZP Extra Items, in the buy menu appears item "Uncategorised", in which they are located. Using amx_bmm_category you can move the items in the appropriate category.You can also move already categorized items. Information about categories saved in file bmm_items.ini.
  • amx_bmm_additem — Adding console command in the buy menu. Usage: amx_bmm_additem <item name> <cost> <team> <flags ("" or "0" if you want to allow for all)> <command>.
  • amx_bmm_clear — Remove not used items from file.
  • amx_bmm_stats — Show weapons statistics.

Cvars:
  • bmm_on <1|0> — Enable/Disable the plugin.
  • bmm_multiple <1|0> — When registering ZP Extra Items price indicated in ammopacks, that significantly lower than the cost default weapons. This cvar multiplies the set price, if it low.
  • bmm_multiple_min <100> — Minimum price, after which it is multiplied.
  • bmm_multiple_num <1000> — How many times to multiple
  • bmm_autobuy_limit <5000> — Monetary limit for autobuy.
  • bmm_buyzone <1|0> — Enable/Disable buyzone. If 0, you can buy weapons and ammo at any point on the map.
  • bmm_autoammo <1|0> — Enable/Disable replenishment of bp ammo in respawn and the purchase of weapons.

Modules:
  • CStrike
  • Engine
  • FakeMeta
  • Fun
  • HamSandwich
  • NVault

Notes:
#1 Buy Menu Management can support the plugin "Money more than 16000".
To enable support for unlimited money, find this line at the top of the plugin code:
Code:
// #define MONEY_UL 1
...and remove the double slash before compiling.
#2 When you install the plugin on your server, from the Buy Menu disappears all the standard weapons. To get their back in the menu, install the plugin "bmm_default_weapons.sma", which you also can find in the attached archive.
#3 Also the attached archive contains the plugin "bmm_c4.sma" that adds a C4 bomb into terrorists equipment menu. You can use it as an example of the use of plugin API.
#4 If you can help with translating plugin to other languages​​, click on this link.

Credits & Thanks:
Thanks to ConnorMcLeod for plugin BP Ammo Features;

Changelog:
Code:
 — Version: 2.0 (Aug 10, 2013 MSK)
	[ADDED] Bots support.
	[ADDED] Autobuy and rebuy functions.
	[ADDED] No buyzone mode (cvar: bmm_buyzone <1|0> — enabled by default).
	[ADDED] Blocking buymenu on maps with restricting to buy weapons (awp, fy, 35hp etc). Can be switched off using a "bmm_buyzone" cvar.
	[ADDED] Statistics of popularity weapons (command: amx_bmm_stats).
	[ADDED] Full ammo in start round like CS:S (cvar: bmm_autoammo <1|0> — enabled by default).
	[IMPROVED] Standart weapons (attached plugin: bmm_standart_weapons).
	[IMPROVED] Plugin API (attached include: bmm.inc).
	[IMPROVED] Usability of the menu.
	[FIXED] Some bugs and holes.

 — Version: 1.0.1 (Mar 13, 2013 MSK)
	[FIXED] Bugs with buying weapons and switching menu.

 — Version: 1.0 (Dec 29, 2012 MSK)
	[ADDED] Ability to add console commands to the items (command: amx_bmm_additem).
	[ADDED] Registration all items in file "bmm_items.ini".
	[FIXED] Some bugs.

 — Version: 0.2beta (Dec 28, 2012 MSK)
	[ADDED] The ability to add items to certain admin levels.
	[ADDED] Number after the name if item names matches. (Item(1), Item(2) and so on).

 — Version: 0.1beta (Dec 26, 2012 MSK)
	Initial beta release.
Screenshots:
Purchase weapon, Weapons statistics in console, C4 in equipment:

[IMG]http://**************/a/img809/5580/ica0.jpg[/IMG] [IMG]http://**************/a/img829/8396/ia3c.png[/IMG] [IMG]http://**************/a/img20/1219/93mj.png[/IMG]
Attached Files
File Type: zip BMM2.zip (77.9 KB, 2533 views)
File Type: sma Get Plugin or Get Source (buy_menu_management_2.0.sma - 3627 views - 51.5 KB)
File Type: txt bmm.txt (2.1 KB, 1751 views)

Last edited by Mr. Frost; 08-12-2013 at 16:03.
Mr. Frost is offline
pokemonmaster
princess milk
Join Date: Nov 2010
Location: Somewhere in this world
Old 12-26-2012 , 08:56   Re: Buy Menu Management (v0.1beta)
Reply With Quote #2

Nice job!

EDIT: .... Just a suggestion. (Read Whitespace)
__________________
اَشْهَدُ اَنْ لَّآ اِلٰهَ اِلَّا اللہُ وَحْدَه لَا شَرِيْكَ لَه وَ اَشْهَدُ اَنَّ مُحَمَّدًا عَبْدُه وَرَسُوْلُه
No longer active in AMXX. Sorry.

Last edited by pokemonmaster; 12-26-2012 at 09:02.
pokemonmaster is offline
Mr. Frost
Member
Join Date: Nov 2011
Location: Atlantis
Old 12-26-2012 , 09:23   Re: Buy Menu Management (v0.1beta)
Reply With Quote #3

Quote:
Originally Posted by pokemonmaster View Post
Just a suggestion. (Read Whitespace)
I've have long time been programmed in javascript, where white spaces are not considered optimal. For me psychologically unpleasant such whitespace. Just a habit.
Mr. Frost is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-26-2012 , 20:13   Re: Buy Menu Management (v0.1beta)
Reply With Quote #4

Adding whitespace does not alter the usability of any script in any language, it just makes it easier to read.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Mr. Frost
Member
Join Date: Nov 2011
Location: Atlantis
Old 12-26-2012 , 21:54   Re: Buy Menu Management (v0.1beta)
Reply With Quote #5

Yes, I understand. Will appear after next update.
Mr. Frost is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-27-2012 , 02:12   Re: Buy Menu Management (v0.1beta)
Reply With Quote #6

PHP Code:
    register_native("zp_disinfect_user""_disinfect_user");
    
register_native("zp_make_user_nemesis""_make_user_nemesis");
    
register_native("zp_make_user_survivor""_make_user_survivor");
    
register_native("zp_respawn_user""_respawn_user");
    
register_native("zp_force_buy_extra_item""_force_buy_extra_item");
    
register_native("zp_override_user_model""_override_user_model");
    
register_native("zp_has_round_started""_has_round_started");
    
register_native("zp_is_nemesis_round""_is_nemesis_round");
    
register_native("zp_is_survivor_round""_is_survivor_round");
    
register_native("zp_is_swarm_round""_is_swarm_round");
    
register_native("zp_is_plague_round""_is_plague_round");
    
register_native("zp_get_zombie_count""_get_zombie_count");
    
register_native("zp_get_human_count""_get_human_count");
    
register_native("zp_get_nemesis_count""_get_nemesis_count");
    
register_native("zp_get_survivor_count""_get_survivor_count");
    
register_native("zp_register_zombie_class""_register_zombie_class");
    
register_native("zp_get_extra_item_id""_get_extra_item_id");
    
register_native("zp_get_zombie_class_id""_get_zombie_class_id");
    
register_native("zp_get_zombie_class_info""_get_zombie_class_info"); 
}
public 
_get_user_zombie() return false; public _get_user_nemesis() return false; public _get_user_survivor() return false;
public 
_get_user_first_zombie() return false;public _get_user_last_zombie() return false;public _get_user_last_human() return false;public _get_user_zombie_class() return false;public _get_user_next_class() return false;public _set_user_zombie_class() return false;public _get_user_ammo_packs() return false;public _set_user_ammo_packs() return false;public _get_zombie_maxhealth() return false;
public 
_get_user_batteries() return false;public _set_user_batteries() return false;public _get_user_nightvision() return false;public _set_user_nightvision() return false;public _infect_user() return false;public _disinfect_user() return false;public _make_user_nemesis() return false;public _make_user_survivor() return false;public _respawn_user() return false;public _force_buy_extra_item() return false;public _override_user_model() return false;public _has_round_started() return false;
public 
_is_nemesis_round() return false;public _is_survivor_round() return false;public _is_swarm_round() return false;public _is_plague_round() return false;public _get_zombie_count() return false;public _get_human_count() return false;public _get_nemesis_count() return false;public _get_survivor_count() return false;public _register_extra_item() return false;public _register_zombie_class() return false;public _get_extra_item_id() return false;public _get_zombie_class_id() return false;
public 
_get_zombie_class_info() return false
Is this a joke ?
Also, rest of code is poor, let's read wiki about plugins optimizations.
And lets user register_clcmd for all buy commands instead of hooking client_command for nothing.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Mr. Frost
Member
Join Date: Nov 2011
Location: Atlantis
Old 12-27-2012 , 05:51   Re: Buy Menu Management (v0.1beta)
Reply With Quote #7

What's the harm? I wanted to make it possible to addition to my plugin ZP Extra Items. Without some natives is not possible.

Okay, I'll read it.
Mr. Frost is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-27-2012 , 12:57   Re: Buy Menu Management (v0.1beta)
Reply With Quote #8

Quote:
Originally Posted by Mr. Frost View Post
What's the harm?
...
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Old 12-27-2012, 14:10
Mr. Frost
This message has been deleted by Mr. Frost. Reason: Ok
Mr. Frost
Member
Join Date: Nov 2011
Location: Atlantis
Old 12-29-2012 , 13:37   Re: Buy Menu Management (v1.0beta)
Reply With Quote #9

Now looks good?
Mr. Frost is offline
ghostpro1991
Member
Join Date: Aug 2011
Old 01-14-2013 , 00:34   Re: Buy Menu Management (v1.0beta)
Reply With Quote #10

How to add item from Z.P?
ghostpro1991 is offline
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 08:09.


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