Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

[CS] Items Shop


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
Brak odpowiedzi do tego tematu

#1 Adminek AMXX.PL

    Admin :)

  • Bot

Reputacja: 156
Profesjonalista

  • Postów:7 490
  • Lokalizacja:AMXX.PL
Offline

Napisano 29.03.2015 22:35

[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:
  • 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(PlayerIDItemIDIgnoreCost);
forward fw_item_select_post(PlayerIDItemIDIgnoreCost); 

API Natives:
PHP Code:

native register_shop_item(const szName[], const szDesc[], iCost);
native get_item_id(const szRealName[]);
native get_item_real_name(ItemIDszRealName[], iLen);
native get_item_name(ItemIDszName[], iLen);
native get_item_desc(ItemIDszDesc[], iLen);
native get_item_cost(ItemID);
native get_items_count();
native show_items_menu(PlayerID);
native add_items_menu_text(const szText[]); 

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:
  • 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.
Wyświetl pełny artykuł




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych