AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [Store] Daily Credits (v2.2, 2017-11-10) [MySQL Support] (https://forums.alliedmods.net/showthread.php?t=300143)

yash1441 08-07-2017 14:54

[Store] Daily Credits (v2.2, 2017-11-10) [MySQL Support]
 
1 Attachment(s)
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.

yash1441 08-08-2017 01:59

Re: [Store] Daily Credits (v1.2, 2017-08-08)
 
Updated to 1.2

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

MithatGuner 08-08-2017 02:59

Re: [Store] Daily Credits (v1.2, 2017-08-08)
 
Good idea!

Kamizun 08-08-2017 11:39

Re: [Store] Daily Credits (v1.2, 2017-08-08)
 
Would be nice if you could add MySql Support for multiple-servers

yash1441 08-08-2017 15:22

Re: [Store] Daily Credits (v1.2, 2017-08-08)
 
Quote:

Originally Posted by Kamizun (Post 2540291)
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!

good_live 08-09-2017 05:16

Re: [Store] Daily Credits (v1.2, 2017-08-08)
 
Quote:

Originally Posted by Kamizun (Post 2540291)
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

Nexicon 08-09-2017 10:53

Re: [Store] Daily Credits (v1.2, 2017-08-08)
 
Nice!!

yash1441 08-09-2017 16:02

Re: [Store] Daily Credits (v1.2, 2017-08-08)
 
Added MySQL supported version.

EDIT: Update to fix errors.

yash1441 08-10-2017 02:28

Re: [Store] Daily Credits (v1.4, 2017-08-10)
 
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 :3

Kamizun 08-10-2017 13:14

Re: [Store] Daily Credits (v1.4, 2017-08-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.

https://image.prntscr.com/image/l45X...r1PGf4igJw.png

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 :)


All times are GMT -4. The time now is 18:05.

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