Raised This Month: $12 Target: $400
 3% 

OciXCrom's Custom Shop + API


Post New Thread Reply   
 
Thread Tools Display Modes
sigerman
Senior Member
Join Date: Aug 2013
Location: Argentina, Bs.As.
Old 03-17-2022 , 20:04   Re: OciXCrom's Custom Shop + API
Reply With Quote #321

You can not edit the Limit in CustomShopItems.ini

When you restart the server or a mapchange the plugin just gets the default value back!

The same happens If you try to edit trough cshop_edit

I'm using:

Custom Shop 4.2.4
CSHOP: Default Items 4.2.2

The same happens If you try to add a new line to CustomShopItems.ini, gets deleted
sigerman is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-20-2022 , 09:32   Re: OciXCrom's Custom Shop + API
Reply With Quote #322

When you use "cshop_edit", you hit the "save" button as well.

The plugin is programmed to read CustomShopItems.ini AGAIN when the map ends so it can detect changes made to it. If it's not doing that, the problem lies in your server not changing map properly/crashing on map end, not the plugin.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
brN17
Junior Member
Join Date: Mar 2022
Old 03-20-2022 , 15:27   Re: OciXCrom's Custom Shop + API
Reply With Quote #323

yo I did it, but it's not stopping how to fix? I buy It 1 time and It keeps executing the command infinitely

Last edited by brN17; 03-20-2022 at 15:40.
brN17 is offline
sigerman
Senior Member
Join Date: Aug 2013
Location: Argentina, Bs.As.
Old 03-21-2022 , 11:36   Re: OciXCrom's Custom Shop + API
Reply With Quote #324

Quote:
Originally Posted by OciXCrom View Post
When you use "cshop_edit", you hit the "save" button as well.

The plugin is programmed to read CustomShopItems.ini AGAIN when the map ends so it can detect changes made to it. If it's not doing that, the problem lies in your server not changing map properly/crashing on map end, not the plugin.
(Yes, a hundred times checked, I hit the save button) When you use "cshop_edit", you hit the "save" button as well.

(I tested your plugin in two different servers, one in linux, one in windows, and I've done a lot of testing, and I'm still doing It to find out what can It be. Until now I really can't find a solution. The servers are not crashing at mapchange, they change the map normally. So well, If you have any ideas, please tell me) the problem lies in your server not changing map properly/crashing on map end, not the plugin.

I'm using your plugin, and It is great, no matter the details that happened to me with It, there is no doubt that you did an amazing job.

Last edited by sigerman; 03-21-2022 at 11:43. Reason: sorry for my english! I speak spanish
sigerman is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-21-2022 , 15:07   Re: OciXCrom's Custom Shop + API
Reply With Quote #325

Quote:
Originally Posted by brN17 View Post
yo I did it, but it's not stopping how to fix? I buy It 1 time and It keeps executing the command infinitely
Post your code. I don't see a working code anywhere. What you posted on the previous page will never be executed by the plugin as you're not using it in cshop_item_selected().

Also I think you're overcomplicating it. The full effect of the plugin can be written with barely 20 lines of code:

Code:
#include <amxmodx> #include <customshop> new ITEM_XP, XP_AMOUNT public plugin_init() {     register_plugin("CSHOP: Buy XP", "1.0", "OciXCrom")     XP_AMOUNT = cshop_get_int(ITEM_XP, "Amount") } public plugin_precache() {     ITEM_XP = cshop_register_item("buyxp", "XP", 100)     cshop_set_int(ITEM_XP, "Amount", 1500) } public cshop_item_selected(id, iItem) {     if(iItem == ITEM_XP)     {         server_cmd("amx_shaddxp #%i %i", get_user_userid(id), XP_AMOUNT)     } }

Quote:
Originally Posted by sigerman View Post
(Yes, a hundred times checked, I hit the save button) When you use "cshop_edit", you hit the "save" button as well.

(I tested your plugin in two different servers, one in linux, one in windows, and I've done a lot of testing, and I'm still doing It to find out what can It be. Until now I really can't find a solution. The servers are not crashing at mapchange, they change the map normally. So well, If you have any ideas, please tell me) the problem lies in your server not changing map properly/crashing on map end, not the plugin.

I'm using your plugin, and It is great, no matter the details that happened to me with It, there is no doubt that you did an amazing job.
Check the file privileges and whether the server and people editing it have access to write to the file. I can't think of any other reason.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
sigerman
Senior Member
Join Date: Aug 2013
Location: Argentina, Bs.As.
Old 03-30-2022 , 17:09   Re: OciXCrom's Custom Shop + API
Reply With Quote #326

Quote:
Originally Posted by OciXCrom View Post
Post your code. I don't see a working code anywhere. What you posted on the previous page will never be executed by the plugin as you're not using it in cshop_item_selected().

Also I think you're overcomplicating it. The full effect of the plugin can be written with barely 20 lines of code:

Code:
#include <amxmodx> #include <customshop> new ITEM_XP, XP_AMOUNT public plugin_init() {     register_plugin("CSHOP: Buy XP", "1.0", "OciXCrom")     XP_AMOUNT = cshop_get_int(ITEM_XP, "Amount") } public plugin_precache() {     ITEM_XP = cshop_register_item("buyxp", "XP", 100)     cshop_set_int(ITEM_XP, "Amount", 1500) } public cshop_item_selected(id, iItem) {     if(iItem == ITEM_XP)     {         server_cmd("amx_shaddxp #%i %i", get_user_userid(id), XP_AMOUNT)     } }



Check the file privileges and whether the server and people editing it have access to write to the file. I can't think of any other reason.
Same thing, tested privileges, the file is edited, the changes are made, but at mapchange or server restart the changes are undone and the default values are back. This happens Only in LIMIT and New Lines that are not the default ones.
sigerman is offline
brN17
Junior Member
Join Date: Mar 2022
Old 05-16-2022 , 18:18   Re: OciXCrom's Custom Shop + API
Reply With Quote #327

yo players are relating they're losing some points after some matter of time, any suspicious on what it could be? and can't edit flags through CustomShopItems.ini
brN17 is offline
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 09-02-2022 , 11:05   Re: OciXCrom's Custom Shop + API
Reply With Quote #328

CSHOP_EXITMENU

why cant i change color of close text?

its always the red one no matter if i put \w in front of it

Last edited by HowToRuski; 09-02-2022 at 11:34.
HowToRuski is offline
VeNoMuS
New Member
Join Date: Sep 2022
Old 09-11-2022 , 04:50   Re: OciXCrom's Custom Shop + API
Reply With Quote #329

Hello,

First of all, amazing plugin! However, I have an issue adding the Tactical Shield to this menu.
I hope it's still supported & I can get some help here

For some reason no one except the first player is able to buy it from the menu once - all after the first get their $ taken & no shield is given to them (using it in combination with army ranks server with $, not points or ammo packs).
An error appears in the server stating:
Player entity -1 out of range.

I tried adding autosnipers & granades and it worked, but for the shield.. I can't seem to make it work.
Does it want a check to see if the user is alive? Saw somewhere in some forums something similar?

The code I tried is as follows:
Code:
additem ITEM_SHIELD

public plugin_init()
register_plugin("CSHOP: SHIELD", "1.0", "OciXCrom")

public plugin_precache()
ITEM_SHIELD = cshop_register_item("shield", "SHIELD", 6000)

public cshop_item_selected(id, iItem)
{
if(iItem == ITEM_SHIELD)
{
give_item(id, "weapon_shield")
}
}
I just want to add it in the shopmenu available for everyone to buy for a certain amount of $, without any restrictions.

I'll appreciate any help.

Thanks in advance.

Last edited by VeNoMuS; 09-11-2022 at 04:53.
VeNoMuS is offline
luciaus18
Senior Member
Join Date: Dec 2014
Old 09-13-2022 , 11:58   Re: OciXCrom's Custom Shop + API
Reply With Quote #330

Hi, OciXCrom

1. There is a bug on this plugin: cshop_goldenak.amxx

Description: if you get golden ak47 and round ends, you respawn with the same ak47 but you shot with pistol xD. After you change weapon, everything is alright.

2. I wanted to ask, do you have source with custom skins (player models) to add in this shop?

Last edited by luciaus18; 09-13-2022 at 11:58.
luciaus18 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 15:43.


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