This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

OciXCrom's Custom Shop + API


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
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 #1

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
brN17
Junior Member
Join Date: Mar 2022
Old 03-20-2022 , 15:27   Re: OciXCrom's Custom Shop + API
Reply With Quote #2

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
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-21-2022 , 15:07   Re: OciXCrom's Custom Shop + API
Reply With Quote #3

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 #4

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 #5

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 #6

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 #7

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 #8

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
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 09-25-2022 , 11:56   Re: OciXCrom's Custom Shop + API
Reply With Quote #9

nvm

Last edited by HowToRuski; 09-25-2022 at 12:05.
HowToRuski is offline
rUsHnUt
Junior Member
Join Date: Jan 2017
Old 11-19-2022 , 15:26   Re: OciXCrom's Custom Shop + API
Reply With Quote #10

Hi OciXCrom,

Wonderfull plugin!

Is it possible to include the bunnyhop CSHOP extra item in this thread?
When I try to download from that link my Avast antivirus detects virus/malware and breaks the download.
Still would be nice to have all sub-items in this thread as well.

I downloaded that bunnyhop extra item from somewhere else and after adding cshop_bunnyhop.amxx into plugins-cshop.cfg my (in-game) character does not slow down when hitting the ground (after a jump) before I even bought bunnyhop from the menu.
When I remove/disable the bunnyhop item all is back to normal.
I can understand removing the friction after you bought it, but not before.
Checked "edgefriction" and "sv_friction" in console and they are respectively 2 and 4 ( with and without the bunnyhop installed ).

There is also a small difference in height you can jump onto after buying bunnyhop.
I wasn't able to crouch-jump onto a crate anymore. I checked sv_gravity and it was still 800.

Can you edit the cshop_edit menu so you can have a "back" function after selecting an item?
In other words: The "8. Previous page" becomes unselectable after selecting an item.
So every time I change something I have to close the menu and open it again just to be able to save it.
rUsHnUt is offline
Reply



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 08:13.


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