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

Map Rate v0.10 (6/30)


Post New Thread Reply   
 
Thread Tools Display Modes
DontWannaName
Veteran Member
Join Date: Jun 2007
Location: VALVe Land, WA
Old 04-09-2008 , 03:18   Re: Map Rate
Reply With Quote #21

Any way to have this not use a database? Its not a big deal but my webhost is shared so therefore they block every freakin connection. I use NFOs 1 database I get instead of the 25 I get from my webhost.
__________________

DontWannaName is offline
Extreme_One
Veteran Member
Join Date: Nov 2006
Old 04-09-2008 , 03:50   Re: Map Rate
Reply With Quote #22

Superb plugin : thank you.

Feature Request:

Introduce a new cvar something like time_til_maprate
Set a timer on map load.

Then when the time_til_maprate has been reached the plugin watches for when a player dies and presents them with a maprate vote if they've not previously rated the current map.

I think that would make this plugin even more useful.

Thanks again.
__________________
Extreme_One is offline
imported_Anth0ny
Senior Member
Join Date: Jan 2005
Location: Saturn
Old 04-09-2008 , 07:34   Re: Map Rate
Reply With Quote #23

+1 to idea
__________________
aka Mad.Eagle
Creator\Owner\Admin of
www.megatron.ws
imported_Anth0ny is offline
Send a message via ICQ to imported_Anth0ny
Nolongerinthegame
AlliedModders Donor
Join Date: Sep 2005
Old 04-09-2008 , 09:07   Re: Map Rate
Reply With Quote #24

Getting this message on plugin load:

14:06:06 [maprate.smx] Error establishing database connection: [2003]: Can't connect to MySQL server on 'localhost' (10061)
14:06:06 [maprate.smx] FATAL: An error occurred while connecting to the database.
14:06:06 [SM] Plugin encountered error 25: Call was aborted
14:06:06 [SM] Native "SetFailState" reported: An error occurred while connecting to the database.
14:06:06 [SM] Displaying call stack trace for plugin "maprate.smx":
14:06:06 [SM] [0] Line 70, /home/groups/alliedmodders/forums/files/3/6/0/2/6/25406.attach::OnPluginStart()
14:06:06 [SM] Plugin Map Rate reloaded successfully.

Ive not made any modificications to databases.cfg

"Databases"
{


"driver_default" "mysql"

"default"
{
"driver" "default"
"host" "localhost"
"database" "sourcemod"
"user" "root"
"pass" ""
//"timeout" "0"
//"port" "0"
}

"storage-local"
{
"driver" "sqlite"
"database" "sourcemod-local"
}
}
Nolongerinthegame is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 04-09-2008 , 09:12   Re: Map Rate
Reply With Quote #25

You have to set up your databases.cfg to point to your mysql server.
bl4nk is offline
FLOOR_MASTER
Senior Member
Join Date: Mar 2008
Old 04-09-2008 , 09:36   Re: Map Rate
Reply With Quote #26

Alright, here's an experimental release -- I haven't fully tested it yet so I'm not adding it to the original post just yet. I've added the following functionality:
  • Admin command sm_maprate_resetratings will delete all ratings for the current map. The admin must have VOTE privileges (flag "k").
  • Cvar maprate_allow_revote (default 1) disallows players from changing their votes. If 1 (or nonzero), players can change their votes.
  • Cvar maprate_autorate_time (default 0) will specify an amount of time to wait in seconds, since the map began, before automatically asking players to rate the current map when they die and they haven't rated the map already. For example, maprate_autorate_time 180 will wait 3 minutes before starting to ask players to rate the map. If the cvar is zero, this feature is disabled.
Again, this is somewhat experimental due to limited testing, so keep that in mind if you decide to run it on your server. I'll continue to test it but have limited means to do so for non TF2 games.
Attached Files
File Type: sp Get Plugin or Get Source (maprate.sp - 908 views - 11.2 KB)

Last edited by FLOOR_MASTER; 04-09-2008 at 10:05.
FLOOR_MASTER is offline
FLOOR_MASTER
Senior Member
Join Date: Mar 2008
Old 04-09-2008 , 09:44   Re: Map Rate
Reply With Quote #27

nelioneil, you need to, as bl4nk suggested, change the "default" block with the correct information to connect to your MySQL database. If you don't have one, change the cvar maprate_db_config to storage-local and reload the plugin.
FLOOR_MASTER is offline
Extreme_One
Veteran Member
Join Date: Nov 2006
Old 04-09-2008 , 09:53   Re: Map Rate
Reply With Quote #28

Thanks for the new version FLOOR_MASTER I'll test it later when I get home.

Will the test version only offer the vote to players if they've not already voted for the current map?
I'd like players to be able to change their vote if they want to by using the !maprate command.
__________________
Extreme_One is offline
FLOOR_MASTER
Senior Member
Join Date: Mar 2008
Old 04-09-2008 , 10:08   Re: Map Rate
Reply With Quote #29

No, I hadn't considered that and the behavior you describe is definitely preferable. I updated the attachment to my post above. Note that I changed the default of maprate_allow_revote to 1 (from 0). AutoRate will never prompt for a rating if a user has already rated a map.
FLOOR_MASTER is offline
Extreme_One
Veteran Member
Join Date: Nov 2006
Old 04-09-2008 , 13:02   Re: Map Rate
Reply With Quote #30

Latest version works perfectly.

Nice work.

Although I don't use MySQL it would be really cool if someone could knock up a php script to grab map rating data and display it.
If someone did that then I might consider swapping over to MySQL.

Q: If I did decide to move over to MySQL would it be possible to somehow convert the data that I'd captured with SQLite so that I don't lose it?
__________________
Extreme_One 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:41.


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