Raised This Month: $226 Target: $400
 56% 

OciXCrom's Custom Shop + API


Post New Thread Reply   
 
Thread Tools Display Modes
anash
Junior Member
Join Date: May 2018
Old 02-20-2021 , 14:14   Re: OciXCrom's Custom Shop + API
Reply With Quote #291

Hello, added the plugins, When i type /shop i get " The Custom Shop doesn't have any available items at the moment!"
the CostumShopItems.ini is created but its empty , any idea why or how to fix?
anash is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-20-2021 , 14:26   Re: OciXCrom's Custom Shop + API
Reply With Quote #292

Because you added cshop_items.amxx before custom_shop.amxx in plugins.ini.
__________________


Dear admins. If somehow you managed to read this, plz fix.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Old 02-20-2021, 14:33
anash
This message has been deleted by anash. Reason: repetition
anash
Junior Member
Join Date: May 2018
Old 02-20-2021 , 16:00   Re: OciXCrom's Custom Shop + API
Reply With Quote #293

Quote:
Originally Posted by OciXCrom View Post
Because you added cshop_items.amxx before custom_shop.amxx in plugins.ini.
Thank you, that works

Sorry for spamming, I have a question; is there a way to limit the number of items one can buy in one round?

for example, if the limit is 2 items, if player buy speed and health, he cant buy any other item untill next round

Last edited by anash; 02-20-2021 at 16:04.
anash is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-09-2021 , 07:34   Re: OciXCrom's Custom Shop + API
Reply With Quote #294


  • Fixed a missing check for the player's team when purchasing an item that allowed you to purchase items from the other team if you changed team while the menu was open (report from HowToRuski).

@anash try this:

Code:
#include <amxmodx> #include <cromchat> #include <customshop> #if !defined MAX_PLAYERS const MAX_PLAYERS = 32 #endif new _cshop_item_limit new g_iItemsBought[MAX_PLAYERS + 1] public plugin_init() {     register_plugin("CSHOP: Item Limit", "1.0", "OciXCrom")     register_logevent("OnRoundStart", 2, "0=World triggered", "1=Round_Start")     _cshop_item_limit = register_cvar("cshop_item_limit", "2")     cshop_get_prefix(CC_PREFIX, charsmax(CC_PREFIX)) } public OnRoundStart() {     arrayset(g_iItemsBought, 0, sizeof(g_iItemsBought)) } public cshop_item_selected(id) {     new iLimit = get_pcvar_num(_cshop_item_limit)     if(g_iItemsBought[id] >= iLimit)     {         CC_SendMessage(id, "You can only purchase &x04%i items &x01per round.", iLimit)         return DONT_BUY     }     g_iItemsBought[id]++     return BUY_ITEM }
__________________


Dear admins. If somehow you managed to read this, plz fix.

Last edited by OciXCrom; 03-09-2021 at 07:35.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
shubhambanekar
Junior Member
Join Date: Feb 2021
Old 03-18-2021 , 10:08   Re: OciXCrom's Custom Shop + API
Reply With Quote #295

Quote:
Originally Posted by OciXCrom View Post
The shop only works for the current map. Any long-term purchases would need to be handled via a separate plugin. You could edit your skin plugin to do that.
How can I do that?
I want to create a new menu item called inventory in CS SHOP MENU, where once weapon skin is purchased gets saved in that inventory, and one can activate any skin or default skin from that menu.

Last edited by shubhambanekar; 03-18-2021 at 10:08.
shubhambanekar is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-18-2021 , 10:33   Re: OciXCrom's Custom Shop + API
Reply With Quote #296

If you don't have the coding knowledge to do it, you should post a request. Bear in mind it's not that simple to make so don't expect a fast reply.
__________________


Dear admins. If somehow you managed to read this, plz fix.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
shubhambanekar
Junior Member
Join Date: Feb 2021
Old 03-25-2021 , 01:41   Re: OciXCrom's Custom Shop + API
Reply With Quote #297

Quote:
Originally Posted by OciXCrom View Post
If you don't have the coding knowledge to do it, you should post a request. Bear in mind it's not that simple to make so don't expect a fast reply.
I have created a new thread here, https://forums.alliedmods.net/showthread.php?t=331383
shubhambanekar is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:27.


Powered by vBulletin®
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Theme made by Freecode