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

[Store] Daily Credits (v2.2, 2017-11-10) [MySQL Support]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
yash1441
Senior Member
Join Date: Feb 2015
Location: Illuminati HQ
Plugin ID:
5750
Plugin Version:
2.2
Plugin Category:
Fun Stuff
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
Servers with this Plugin:
7 
Plugin Description:
Collect daily credits by playing on the server everyday. Credits increase each consecutive day!
Old 08-07-2017 , 14:54   [Store] Daily Credits (v2.2, 2017-11-10) [MySQL Support]
Reply With Quote #1

Daily Credits

for Zephyrus Store

Edit by Nachtfrische


Command: sm_daily
Alternative commands - sm_dailies, !daily, !dailies

Collect daily credits by playing on the server everyday. Credits increase each consecutive day!

Requires Zephyrus Store & Multi Colors

GitHub [Only use this for unstable developer versions]

CVARs
sm_daily_credits_enable - Daily Credits enable?(0 = Disabled, 1 = Enabled[DEFAULT])
sm_daily_credits_amount - Amount of Credits.(10[DEFAULT])
sm_daily_credits_bonus - Increase in Daily Credits on consecutive days.(2[DEFAULT])
sm_daily_credits_max - Max credits that you can get daily.(50[DEFAULT])
sm_daily_credits_resetperiod - Amount of days after which the streak should reset itself. Set to 0 to disable.(7[DEFAULT])
sm_daily_credits_interval - Number of minutes required by the player to play on the server before getting daily credits. Set to 0 to immediately give credits upon using !daily.(0[DEFAULT])

- A config file called "dailycredits.cfg" will be created in "cfg/sourcemod"
- Translation file support "dailycredits.phrases.txt".
- Color chat support


Download dailycredits_mysql files for MySQL supported plugin. Create a 'dailycredits' database entry for it.
Attached Files
File Type: zip DailyCredits_v2.2.zip (52.0 KB, 1792 views)
__________________

Last edited by yash1441; 11-09-2017 at 20:41. Reason: Added CVar for https://github.com/yash1441/DailyCredits/issues/7
yash1441 is offline
Send a message via Skype™ to yash1441
yash1441
Senior Member
Join Date: Feb 2015
Location: Illuminati HQ
Old 08-08-2017 , 01:59   Re: [Store] Daily Credits (v1.2, 2017-08-08)
Reply With Quote #2

Updated to 1.2

Should have done Today - Yesterday instead of Yesterday - Today to check for daily credits.
__________________

Last edited by yash1441; 08-08-2017 at 02:18.
yash1441 is offline
Send a message via Skype™ to yash1441
MithatGuner
Member
Join Date: Sep 2016
Location: Turkey
Old 08-08-2017 , 02:59   Re: [Store] Daily Credits (v1.2, 2017-08-08)
Reply With Quote #3

Good idea!
MithatGuner is offline
Kamizun
AlliedModders Donor
Join Date: May 2015
Location: Portugal
Old 08-08-2017 , 11:39   Re: [Store] Daily Credits (v1.2, 2017-08-08)
Reply With Quote #4

Would be nice if you could add MySql Support for multiple-servers
Kamizun is offline
yash1441
Senior Member
Join Date: Feb 2015
Location: Illuminati HQ
Old 08-08-2017 , 15:22   Re: [Store] Daily Credits (v1.2, 2017-08-08)
Reply With Quote #5

Quote:
Originally Posted by Kamizun View Post
Would be nice if you could add MySql Support for multiple-servers
I was thinking about that but I haven't really worked on any plugin with MySQL before. I'll try though. Will post a different version for MySQL support by tomorrow or day after!
__________________
yash1441 is offline
Send a message via Skype™ to yash1441
good_live
AlliedModders Donor
Join Date: Oct 2013
Old 08-09-2017 , 05:16   Re: [Store] Daily Credits (v1.2, 2017-08-08)
Reply With Quote #6

Quote:
Originally Posted by Kamizun View Post
Would be nice if you could add MySql Support for multiple-servers
I've made one a few months ago. It's not tested yet!
https://github.com/good-live/DailyCredits
good_live is offline
Nexicon
Senior Member
Join Date: Feb 2017
Old 08-09-2017 , 10:53   Re: [Store] Daily Credits (v1.2, 2017-08-08)
Reply With Quote #7

Nice!!
Nexicon is offline
yash1441
Senior Member
Join Date: Feb 2015
Location: Illuminati HQ
Old 08-09-2017 , 16:02   Re: [Store] Daily Credits (v1.2, 2017-08-08)
Reply With Quote #8

Added MySQL supported version.

EDIT: Update to fix errors.
__________________

Last edited by yash1441; 08-10-2017 at 01:52.
yash1441 is offline
Send a message via Skype™ to yash1441
yash1441
Senior Member
Join Date: Feb 2015
Location: Illuminati HQ
Old 08-10-2017 , 02:28   Re: [Store] Daily Credits (v1.4, 2017-08-10)
Reply With Quote #9

There was a slight problem with the earlier version, updated it to 1.4.


EDIT: Someone reported that it prints "[Daily] Come back tomorrow for your reward." 3 times. If anyone can help me fix this because I don't seem to be able to figure out how it's happening
__________________

Last edited by yash1441; 08-10-2017 at 02:30.
yash1441 is offline
Send a message via Skype™ to yash1441
Kamizun
AlliedModders Donor
Join Date: May 2015
Location: Portugal
Old 08-10-2017 , 13:14   Re: [Store] Daily Credits (v1.4, 2017-08-10)
Reply With Quote #10

Created the Database, connected but I can just spam sm_daily and get credits everytime.
The plugin created the tables but its not writting down the connected players or who use the commands.



There are error logs:
Code:
 [SM] Exception reported: Current result set has no fetched rows
 [SM] Blaming: dailycredits_mysql2.smx
 [SM] Call stack trace:
 [SM]   [0] SQL_FetchInt
 [SM]   [1] Line 94, ...\dailycredits_mysql2.sp::GiveCredits
 [SM]   [2] Line 70, ...\dailycredits_mysql2.sp::Cmd_Daily
 [SM] Exception reported: Current result set has no fetched rows
 [SM] Blaming: dailycredits_mysql2.smx
 [SM] Call stack trace:
 [SM]   [0] SQL_FetchInt
 [SM]   [1] Line 95, ...\dailycredits_mysql2.sp::GiveCredits
 [SM]   [2] Line 70, ...\dailycredits_mysql2.sp::Cmd_Daily
Add: I did not forget to remove the old one and I did not change any code from the plugin. I changed the name to dailycredits_mysql2 because I already had one on my desktop
Thank you for your time

Last edited by Kamizun; 08-10-2017 at 13:15. Reason: Additional information
Kamizun 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 05:16.


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