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

[ANY] Store by Zephyrus [1.1 - 03.01.2016]


Post New Thread Reply   
 
Thread Tools Display Modes
Der Joker aka XRAY
Junior Member
Join Date: Aug 2015
Location: Bavaria, Germany
Old 05-27-2016 , 12:21   Re: [ANY] Store by Zephyrus [1.1 - 03.01.2016]
Reply With Quote #521

For some reason when i change the items.cfg it won't have any effect on the server and the actual menu(no changes)

Is this problem common and are any fixes known?

Last edited by Der Joker aka XRAY; 05-27-2016 at 12:21.
Der Joker aka XRAY is offline
Lannister
Veteran Member
Join Date: Apr 2015
Old 05-27-2016 , 12:27   Re: [ANY] Store by Zephyrus [1.1 - 03.01.2016]
Reply With Quote #522

You need to restart the server!
Lannister is offline
good_live
AlliedModders Donor
Join Date: Oct 2013
Old 05-27-2016 , 13:07   Re: [ANY] Store by Zephyrus [1.1 - 03.01.2016]
Reply With Quote #523

Quote:
Originally Posted by daleGEND View Post
Not sure if anyone has attempted this before, but is it OK to edit the credit amount outside of sourcemod via the SQL database? Any potential issues that could crop up? For instance I have a third-party application giving credits to someone who has done something on my forums. I am attempting to make a forum addon that gives those credits to them via the database itself. Any potential issue there?
Nope. I hadn't any issues so far.
good_live is offline
daleGEND
AlliedModders Donor
Join Date: Feb 2005
Location: USA
Old 05-27-2016 , 14:16   Re: [ANY] Store by Zephyrus [1.1 - 03.01.2016]
Reply With Quote #524

Quote:
Originally Posted by good_live View Post
Nope. I hadn't any issues so far.
Thanks for the reply!
__________________
Bor3d Gaming - A Mature Online Gaming Community

Feel free to add me on STEAM as well: https://steamcommunity.com/id/b0r3d
daleGEND is offline
Addicted.
AlliedModders Donor
Join Date: Dec 2013
Location: 0xA9D0DC
Old 05-27-2016 , 15:59   Re: [ANY] Store by Zephyrus [1.1 - 03.01.2016]
Reply With Quote #525

Quote:
Originally Posted by daleGEND View Post
Not sure if anyone has attempted this before, but is it OK to edit the credit amount outside of sourcemod via the SQL database? Any potential issues that could crop up? For instance I have a third-party application giving credits to someone who has done something on my forums. I am attempting to make a forum addon that gives those credits to them via the database itself. Any potential issue there?
If the player is connected on the server it would most likely lose the additional credits because the credits are handled locally on the server until disconnect/map end
Addicted. is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 05-28-2016 , 01:35   Re: [ANY] Store by Zephyrus [1.1 - 03.01.2016]
Reply With Quote #526

Quote:
Originally Posted by daleGEND View Post
Not sure if anyone has attempted this before, but is it OK to edit the credit amount outside of sourcemod via the SQL database? Any potential issues that could crop up? For instance I have a third-party application giving credits to someone who has done something on my forums. I am attempting to make a forum addon that gives those credits to them via the database itself. Any potential issue there?
There is issues:

Quote:
Originally Posted by oaaron99 View Post
If the player is connected on the server it would most likely lose the additional credits because the credits are handled locally on the server until disconnect/map end
^

If you adjust John's credit while John is on the server, the Store will save his credit when he quits, and it will overwrite your modification. This basically means:

- If you raise his credits, he will lose when he is quitting.

- If you reduce his credits, he will "get them back" when he is quitting.

If John is not connected to any of your servers while the modification happens, then there will be absolutely no problem with this.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].

Last edited by DarkDeviL; 05-28-2016 at 03:36. Reason: Also take a look at #529
DarkDeviL is offline
lay295
Senior Member
Join Date: Sep 2013
Old 05-28-2016 , 02:33   Re: [ANY] Store by Zephyrus [1.1 - 03.01.2016]
Reply With Quote #527

Quote:
Originally Posted by arne1288 View Post
There is issues:

If you adjust John's credit while John is on the server, the Store will save his credit when he quits, and it will overwrite your modification. This basically means:

- If you raise his credits, he will lose when he is quitting.

- If you reduce his credits, he will "get them back" when he is quitting.

If John is not connected to any of your servers while the modification happens, then there will be absolutely no problem with this.
This is not true, I do it all the time. They will not lose additional credits either, the plugin basically just caches the credits they've earned just as most people would expect but the MySQL statement just adds those to the current value, and doesn't overwrite it with what it thinks the value should be.

Code:
Format(STRING(m_szQuery), "UPDATE store_players SET `credits`=GREATEST(`credits`+%d,0), `date_of_last_join`=%d, `name`='%s' WHERE `id`=%d", g_eClients[client][iCredits]-g_eClients[client][iOriginalCredits], g_eClients[client][iDateOfLastJoin], g_eClients[client][szNameEscaped], g_eClients[client][iId]);
If they are connected though they would have to rejoin the server to see the new credits
__________________

lay295 is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 05-28-2016 , 03:19   Re: [ANY] Store by Zephyrus [1.1 - 03.01.2016]
Reply With Quote #528

Quote:
Originally Posted by lay295 View Post
This is not true, I do it all the time. They will not lose additional credits either, the plugin basically just caches the credits they've earned just as most people would expect but the MySQL statement just adds those to the current value, and doesn't overwrite it with what it thinks the value should be.
My experience was inherited through some of Zephyrus' older Stores, which were caching these values, and blindly saving (and overwriting) them according to the above explanation.

However, looking a little bit closer (@GitHub), I have to admit that it does indeed appear like this one should handle things way better.

It does however still seems like the above explanation is still true for some situations:
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].

Last edited by DarkDeviL; 05-29-2016 at 01:59.
DarkDeviL is offline
uurbyrkdr
Senior Member
Join Date: Apr 2015
Old 05-28-2016 , 06:54   Re: [ANY] Store by Zephyrus [1.1 - 03.01.2016]
Reply With Quote #529

Hi.
Some players told me, they lost their items. But credits didn't change, only items lost.
Is there anyone have this problem?
And how can i fix this problem?
uurbyrkdr is offline
Der Joker aka XRAY
Junior Member
Join Date: Aug 2015
Location: Bavaria, Germany
Old 05-28-2016 , 07:33   Re: [ANY] Store by Zephyrus [1.1 - 03.01.2016]
Reply With Quote #530

Quote:
Originally Posted by Lannister View Post
You need to restart the server!
Thanks, but it didn't work in the beginning, i hat do change the database to MySQL and then it would work ^^
Der Joker aka XRAY 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:09.


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