[CS] Items Shop (API)
Release Date: 30/03/2015 - Latest Update: 30/03/2015
Current Version: 1.0.1
Description:
The Items Shop plugin is an Application Programming Interface system to use in the sub-plugins and it is compatible with any Counter-Strike 1.6 game modification servers. I have included decent descriptions at almost each line describing what is the function follow would do. This API includes two main forwards called when the client (user) attempts to buy the item from the items menu.
Commands:
Forwards:
API Natives:
Other APIs:
This plugin can only be ran using the AMX Settings API (INI) in order to make it easy to manage the settings of the items like: Item name, item description and item cost through a custom configuration (INI) file.
Shop Handle:
The included items shop handler is made to handle shop purchase event to deduct money after purchase, and set item availability according to money owned by player.
Credits:
The entire files have been uploaded on my https://github.com/funkyfresh95/Items-Shop-Plugin'target="_blank">GitHub - Items-Shop-Plugin Section.
Wyświetl pełny artykuł
Release Date: 30/03/2015 - Latest Update: 30/03/2015
Current Version: 1.0.1
Description:
The Items Shop plugin is an Application Programming Interface system to use in the sub-plugins and it is compatible with any Counter-Strike 1.6 game modification servers. I have included decent descriptions at almost each line describing what is the function follow would do. This API includes two main forwards called when the client (user) attempts to buy the item from the items menu.
Commands:
- say /items or say_team /items (Shows the items shop menu).
- say /shop or say_team /shop (Shows the items shop menu).
Forwards:
PHP Code:
forward fw_item_select_pre(PlayerID, ItemID, IgnoreCost);
forward fw_item_select_post(PlayerID, ItemID, IgnoreCost);
PHP Code:
native register_shop_item(const szName[], const szDesc[], iCost);
native get_item_id(const szRealName[]);
native get_item_real_name(ItemID, szRealName[], iLen);
native get_item_name(ItemID, szName[], iLen);
native get_item_desc(ItemID, szDesc[], iLen);
native get_item_cost(ItemID);
native get_items_count();
native show_items_menu(PlayerID);
native add_items_menu_text(const szText[]);
This plugin can only be ran using the AMX Settings API (INI) in order to make it easy to manage the settings of the items like: Item name, item description and item cost through a custom configuration (INI) file.
Shop Handle:
The included items shop handler is made to handle shop purchase event to deduct money after purchase, and set item availability according to money owned by player.
Credits:
- MeRcyLeZZ: Codes I used from his zombie plague extra items
- Myself: Edits and new additional features into the system
The entire files have been uploaded on my https://github.com/funkyfresh95/Items-Shop-Plugin'target="_blank">GitHub - Items-Shop-Plugin Section.