Veteran Member
|
07-21-2019
, 06:05
Help with zephyrus store include's new syntax
|
#1
|
PHP Code:
#if defined _store_included
#endinput
#endif
#define _store_included
new g_cvarChatTag = -1;
#define ITEM_NAME_LENGTH 64
#define STORE_MAX_ITEMS 2048
#define STORE_MAX_HANDLERS 64
#define STORE_MAX_PLANS 8
#define STORE_MAX_SLOTS 4
enum Item_Plan
{
String:szName[ITEM_NAME_LENGTH],
iPrice,
iTime
}
enum Store_Item
{
String:szName[ITEM_NAME_LENGTH],
String:szUniqueId[PLATFORM_MAX_PATH],
String:szShortcut[64],
iId,
iPrice,
iParent,
iHandler,
iFlagBits,
iData,
iPlans,
bool:bBuyable,
bool:bIgnoreVIP,
Handle:hAttributes
}
enum Type_Handler
{
String:szType[64],
String:szUniqueKey[32],
bool:bEquipable,
bool:bRaw,
Handle:hPlugin,
Function:fnMapStart,
Function:fnReset,
Function:fnConfig,
Function:fnUse,
Function:fnRemove
}
enum Client_Item
{
iId,
iUniqueId,
bool:bSynced,
bool:bDeleted,
iDateOfPurchase,
iDateOfExpiration,
iPriceOfPurchase,
}
native Store_RegisterHandler(String:type[], String:uniquekey[], Function:mapstart, Function:reset, Function:config, Function:use, Function:remove, bool:equipable = true, bool:raw = false);
native Store_RegisterMenuHandler(String:identifier[], Function:menu, Function:handler);
native Store_SetDataIndex(itemid, index);
native Store_GetDataIndex(itemid);
native Store_GetEquippedItem(client, String:type[], slot=0);
native Store_IsClientLoaded(client);
native Store_DisplayPreviousMenu(client);
native Store_SetClientMenu(client, num);
native Store_GetClientCredits(client);
native Store_SetClientCredits(client, credits);
native Store_IsClientVIP(client);
native Store_IsItemInBoughtPackage(client, itemid, uid=-1);
native Store_ShouldConfirm();
native Store_DisplayConfirmMenu(client, String:title[], Function:callback, data);
native Store_GetItem(itemid, output[Store_Item]);
native Store_GetHandler(index, output[Type_Handler]);
native Store_GiveItem(client, itemid, purchase=0, expiration=0, price=0);
native Store_RemoveItem(client, itemid);
native Store_GetClientItem(client, itemid, output[Client_Item]);
native Store_GetClientTarget(client);
native Store_GiveClientItem(client, recipient, itemid);
native Store_HasClientItem(client, itemid);
native Store_IterateEquippedItems(client, &start, bool:attributes=false);
forward Store_OnClientModelChanged(client, String:model[]);
public Extension:__ext_store_sm =
{
name = "Store - The Resurrection",
file = "store_sm.ext",
#if defined AUTOLOAD_EXTENSIONS
autoload = 1,
#else
autoload = 0,
#endif
required = 0,
};
My bad try :s XD :
PHP Code:
#if defined _store_included
#endinput
#endif
#define _store_included
int g_cvarChatTag = -1;
#define ITEM_NAME_LENGTH 64
#define STORE_MAX_ITEMS 2048
#define STORE_MAX_HANDLERS 64
#define STORE_MAX_PLANS 8
#define STORE_MAX_SLOTS 4
enum Item_Plan
{
char szName[ITEM_NAME_LENGTH],
iPrice,
iTime
}
enum Store_Item
{
char szName[ITEM_NAME_LENGTH],
char szUniqueId[PLATFORM_MAX_PATH],
char szShortcut[64],
iId,
iPrice,
iParent,
iHandler,
iFlagBits,
iData,
iPlans,
bool bBuyable,
bool bIgnoreVIP,
Handle hAttributes
}
enum Type_Handler
{
char szType[64],
char szUniqueKey[32],
bool bEquipable,
bool bRaw,
Handle hPlugin,
Function fnMapStart,
Function fnReset,
Function fnConfig,
Function fnUse,
Function fnRemove
}
enum Client_Item
{
iId,
iUniqueId,
bool bSynced,
bool bDeleted,
iDateOfPurchase,
iDateOfExpiration,
iPriceOfPurchase,
}
native Store_RegisterHandler(char[] type, char[] uniquekey, Function mapstart, Function reset, Function config, Function use, Function remove, bool equipable = true, bool raw = false);
native Store_RegisterMenuHandler(char[] identifier, Function menu, Function handler);
native Store_SetDataIndex(int itemid, int index);
native Store_GetDataIndex(int itemid);
native Store_GetEquippedItem(int client, char[] type, int slot=0);
native Store_IsClientLoaded(int client);
native Store_DisplayPreviousMenu(int client);
native Store_SetClientMenu(int client, int num);
native Store_GetClientCredits(int client);
native Store_SetClientCredits(int client, int credits);
native Store_IsClientVIP(int client);
native Store_IsItemInBoughtPackage(int client, int itemid, int uid=-1);
native Store_ShouldConfirm();
native Store_DisplayConfirmMenu(int client, char title[], Function callback, int data);
native Store_GetItem(int itemid, int output[Store_Item]);
native Store_GetHandler(int index, int output[Type_Handler]);
native Store_GiveItem(int client, int itemid, int purchase=0, int expiration=0, int price=0);
native Store_RemoveItem(int client, int itemid);
native Store_GetClientItem(int client, int itemid, int output[Client_Item]);
native Store_GetClientTarget(int client);
native Store_GiveClientItem(int client, int recipient, int itemid);
native Store_HasClientItem(int client, int itemid);
native Store_IterateEquippedItems(int client, int &start, bool attributes=false);
forward Store_OnClientModelChanged(int client, char model[]);
public Extension:__ext_store_sm =
{
name = "Store - The Resurrection",
file = "store_sm.ext",
#if defined AUTOLOAD_EXTENSIONS
autoload = 1,
#else
autoload = 0,
#endif
required = 0,
};
__________________
|
|