View Single Post
Author Message
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia and king's landing...
Old 06-14-2014 , 02:29   [ZP50] Addon: Item Limiter (Update 1.1)
Reply With Quote #1

[ZP50] Addon: Item Limiter


Special thanks to: Kia and zmd94 for some Improvement tips and Testing respectively.

Description:-
Saw a lot of requests to add limits to extra items so made this plugin. As the title says this plugin makes it really easy to add limit to any extra item (Not yet compatible with VIP extra items). This plugin will work with zp43 extra items being used in zp50 mod but will not work with zp43 mod.

To add limit to extra items it uses an external "zp_extra_limit.ini" file that is to be placed in cstrike/addons/amxmodx/configs directory.

This plugin has 2 modes APART FROM THE CVAR, in the .sma file u can see #define PLUGIN_MODE , its default value is 1.

If it set to 1, LIMIT WILL BE APPLIED PER PERSON INDIVIDUALLY, i.e if limit is 3 and i buy one the plugin will show 1/3 for me and 0/3 for someone else who hasnt bought the item yet.

If it set to 2, LIMIT WILL BECOME GLOBAL, i.e if i buy the item once it will show 1/3 on everyone's item list.


How to add limit :-

Step 1:
Find the extra items register name. It is given inside any extra item's code in its register function



Step 2:
Copy and paste that name without the quotes in the "zp_extra_limit.ini" file in "item_id" section and in "item_limit" section put the desired limit.



Step 3:
Save the "zp_extra_limit.ini" and close it. (No change needs to be made in the .sma file of the extra item.)

Note: To add more than 1 extra item in the list, just add a coma after the previous extra item id/cost in the zp_extra_limit.ini and add the id of this other extra item after the coma.



Bugs : -

None. Report if u find any.

Although there is one thing. Do not put more than 128 items in the zp_item_limit.ini at one time, or it will give you errors.

Cvars:-

zp_extra_limit_mode (0 - Limit for 1 round | 1 - Limit for 1 map)(Def - 0)(I'll separate this specific to each item in the next update hopefully)

My Note:-

Dont PM me for anything related to this topic, post it here.........

Change log:-

v1.0
Release
v1.1 Added a define to change the mode of plugin, made some changes as Kia said.
Attached Files
File Type: ini zp_extra_limit.ini (63 Bytes, 1319 views)
File Type: sma Get Plugin or Get Source (zp50_extra_limiter.sma - 2698 views - 3.3 KB)
__________________
You will find everything u need :-

Last edited by Catastrophe; 10-26-2014 at 10:35.
Catastrophe is offline