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

[TF2] Player credits and rewards


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Gachl
BANNED
Join Date: Feb 2009
Old 07-04-2009 , 16:06   Re: [TF2] Player credits and rewards
#21

Quote:
Originally Posted by LuFa View Post
Is there any way to get this to work on a listen server? I can't seem to get it to work properly
you may have to get sourcemod to work on your listen server before you can use this plugin. If SM works this should work too.

About the SQLite, I'll just test it (my testserver burns almost)
Gachl is offline
Gachl
BANNED
Join Date: Feb 2009
Old 07-04-2009 , 16:11   Re: [TF2] Player credits and rewards
#22

Hmm nope, sqlite works for me without any problems.
Gachl is offline
LuFa
Member
Join Date: Mar 2009
Old 07-04-2009 , 16:14   Re: [TF2] Player credits and rewards
#23

I can't earn any credits, and when I try to alter my amount, I get an error:

Quote:
L 07/04/2009 - 16:11:45: [SM] Native "PrintToChat" reported: Client index 0 is invalid
L 07/04/2009 - 16:11:45: [SM] Displaying call stack trace for plugin "candyscript.smx":
L 07/04/2009 - 16:11:45: [SM] [0] Line 422, /home/groups/alliedmodders/forums/files/4/8/5/3/9/44878.attach::cAddCandy()
Also when I start hosting, the plugin returns an error about being unable to connect to a mysql server
LuFa is offline
Gachl
BANNED
Join Date: Feb 2009
Old 07-04-2009 , 16:16   Re: [TF2] Player credits and rewards
#24

yea you are altering your amount via console, I should fix that
you have to use the clients rcon console until I fixed it (or just in chat /candy_add ...)

about the unable to connect error please give me the full log + the value of the cvar sm_candy_database + the corresponding database configuration in your database configuration file.
Gachl is offline
retsam
Veteran Member
Join Date: Aug 2008
Location: so-cal
Old 07-04-2009 , 16:19   Re: [TF2] Player credits and rewards
#25

Ya.. How do you specify this to use sqlite then? It should automatically use sqlite, and create a database file locally if the mysql database failed connection. Im not really sure how you have it working for you.

I just changed the database name in the cvar so it wouldnt use the mysql, but then the plugin is disabled and doesnt work when I start up the server. What should the database cvar be to use sqlite then?

sm_candy_database "credits" //Define the database configuration to use


L 07/04/2009 - 13:20:25: [SM] Native "SQL_TQuery" reported: Invalid database Han
dle 0 (error: 4)
L 07/04/2009 - 13:20:25: [SM] Displaying call stack trace for plugin "candyscrip
t.smx":
L 07/04/2009 - 13:20:25: [SM] [0] Line 595, candyscript.sp::AddCandy()
L 07/04/2009 - 13:20:25: [SM] [1] Line 437, candyscript.sp::cAddCandy()
L 07/04/2009 - 13:200: [SM] Native "SQL_TQuery" reported: Invalid database Han
dle 0 (error: 4)
L 07/04/2009 - 13:200: [SM] Displaying call stack trace for plugin "candyscrip
t.smx":
L 07/04/2009 - 13:200: [SM] [0] Line 595, candyscript.sp::AddCandy()
L 07/04/2009 - 13:200: [SM] [1] Line 437, candyscript.sp::cAddCandy()

Last edited by retsam; 07-04-2009 at 16:24.
retsam is offline
Sexual Harassment Panda
Veteran Member
Join Date: Dec 2008
Location: San Diego, CA
Old 07-04-2009 , 16:19   Re: [TF2] Player credits and rewards
#26

quick request, could this make a cfg file for itself in cfg/sourcemod.
Also, it's not even doing anything for me when i type !buy. menu won't even come up. It's acting like it's not loaded, but I know it is.
__________________
Sexual Harassment Panda is offline
Gachl
BANNED
Join Date: Feb 2009
Old 07-04-2009 , 16:26   Re: [TF2] Player credits and rewards
#27

Quote:
Originally Posted by retsam View Post
Ya.. How do you specify this to use sqlite then?
Open the "addons/sourcemod/configs/databases.cfg", add a sqlite database and put the sqlite db name in the sm_candy_database cvar

Quote:
Originally Posted by retsam View Post
I just changed the database name in the cvar so it wouldnt use the mysql, but then the plugin is disabled and doesnt work when I start up the server.
As admin with RCON admin flag on your server run sm_candy_reload_db in the client console

Quote:
Originally Posted by Sexual Harassment Panda View Post
quick request, could this make a cfg file for itself in cfg/sourcemod.
Also, it's not even doing anything for me when i type !buy. menu won't even come up. It's acting like it's not loaded, but I know it is.
Have you put the buymenu.txt in the right folder? (addons/sourcemod/config/buymenu.txt).
Gachl is offline
LuFa
Member
Join Date: Mar 2009
Old 07-04-2009 , 16:28   Re: [TF2] Player credits and rewards
#28

I left sm_candy_database at default and...

I don't think I have a mysql database

Will this plugin work without one? EDIT: oh so it does! thanks
LuFa is offline
retsam
Veteran Member
Join Date: Aug 2008
Location: so-cal
Old 07-04-2009 , 16:30   Re: [TF2] Player credits and rewards
#29

Humm I see... As a feature request then, you should check out N1g tf2 stats plugin. http://forums.alliedmods.net/showthr...light=tf2stats

His plugin automatically without having to edit the database file at all, creates a sqlite database locally with a custom name that stores all the stuff. I believe his goes into data\sqlite\blahblah.sq3

Last edited by retsam; 07-04-2009 at 16:33.
retsam is offline
Sexual Harassment Panda
Veteran Member
Join Date: Dec 2008
Location: San Diego, CA
Old 07-04-2009 , 16:30   Re: [TF2] Player credits and rewards
#30

I typed your command in client console, and candy responded, so it is loaded and responding to something.
Code:
sm_candy_reload_db
[candy] Reloading database connection.
Unknown command: sm_candy_reload_db
Also, buymenu.txt is in addons>sourcemod>configs.

What i meant is can it have a config for the cvars. some other plugins have it automatically create a config file for the plugin's cvars in config>sourcemod.
__________________
Sexual Harassment Panda is offline
Closed Thread



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 22:56.


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