Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void Shop_Started()
- {
- CategoryId category_id = Shop_RegisterCategory("ability", "Способности", "");
- if (Shop_StartItem(category_id, "shop_jetpack"))
- {
- ConVar CVARB, CVARS, CVART;
- (CVARB = CreateConVar("sm_shop_jetpack_price", "450", "Цена покупки.", _, true, 0.0)).AddChangeHook(ChangeCvar_Buy);
- (CVARS = CreateConVar("sm_shop_jetpack_sell_price", "200", "Цена продажи.", _, true, 0.0)).AddChangeHook(ChangeCvar_Sell);
- (CVART = CreateConVar("sm_shop_jetpack_time", "86400", "Время действия покупки в секундах.", _, true, 0.0)).AddChangeHook(ChangeCvar_Time);
- Shop_SetInfo("Jetpack", "Press SPACE+CTRL to activate", CVARB.IntValue, CVARS.IntValue, Item_Togglable, CVART.IntValue);
- Shop_SetCallbacks(OnItemRegistered, OnEquipItem, _, OnDisplay, OnDisplayDescription, _, _, OnSell);
- Shop_EndItem();
- (CVARB = CreateConVar("sm_shop_jetpack_reloadtime", "60.0", "Сколько секунд нужно для перезарядки ранца.", 0, true, 1.0)).AddChangeHook(ChangeCvar_ReloadTime);
- (CVARS = CreateConVar("sm_shop_jetpack_boost", "500.0", "Сила подъема ракетного ранца(мин. 100).", 0, true, 100.0)).AddChangeHook(ChangeCvar_Boost);
- (CVART = CreateConVar("sm_shop_jetpack_max", "2", "Сколько секунд можно использовать ранец.", 0, true, 0.0)).AddChangeHook(ChangeCvar_Max);
- }
- }
- public void OnItemRegistered(CategoryId category_id, const char[] sCategory, const char[] sItem, ItemId item_id)
- {
- g_iID = item_id;
- }
- public bool OnDisplay(int iClient, CategoryId category_id, const char[] sCategory, ItemId item_id, const char[] sItem, ShopMenu menu, bool &disabled, const char[] sName, char[] sBuffer, int iMaxlen)
- {
- SetGlobalTransTarget(iClient);
- FormatEx(sBuffer, iMaxlen, "%t", "Jetpack", iClient);
- return true;
- }
- public bool OnDisplayDescription(int iClient, CategoryId category_id, const char[] sCategory, ItemId item_id, const char[] sItem, ShopMenu menu, const char[] sDescription, char[] sBuffer, int iMaxlen)
- {
- SetGlobalTransTarget(iClient);
- FormatEx(sBuffer, iMaxlen, "%t", "JetpackDesc", iClient);
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement