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

Map Rate v0.10 (6/30)


Post New Thread Reply   
 
Thread Tools Display Modes
Faust_mateo
Senior Member
Join Date: Nov 2007
Old 04-30-2009 , 00:13   Re: Map Rate v0.10 (6/30)
Reply With Quote #261

The instructions are kinda light on the main page could someone help out please:

DOD:S & SM 1.2

maprate.smx -> Plugins
maprate.phrases -> Translations
CVAR's ?
Anything else?


I am not exporting the info yet , That will come later, for now I just want to working in game.
Faust_mateo is offline
Sillium
AlliedModders Donor
Join Date: Sep 2008
Location: Germany
Old 04-30-2009 , 01:18   Re: Map Rate v0.10 (6/30)
Reply With Quote #262

Be sure you set up the DB config for SM (database.cfg)

Put the CVARs you need in your server.cfg
__________________
brb, dishes have developed their own language and are talking to the garbage about overthrowing me... i must correct this

www.unterwasserpyromanen.de
Sillium is offline
Faust_mateo
Senior Member
Join Date: Nov 2007
Old 04-30-2009 , 11:09   Re: Map Rate v0.10 (6/30)
Reply With Quote #263

Quote:
Originally Posted by Goatnapper View Post
Where do I put my maprate.cfg?

I dont see a mention of this on the front page but it looks like a "maprate.cfg" is needed. Where and why please.

Code:
Be sure you set up the DB config for SM (database.cfg)

Anyway to run this as a test without exporting ? I want to make sure it works wiht our setup before I bother to export.
Faust_mateo is offline
Cadav0r
Senior Member
Join Date: Jan 2006
Location: France
Old 04-30-2009 , 12:32   Re: Map Rate v0.10 (6/30)
Reply With Quote #264

Quote:
Originally Posted by Faust_mateo View Post
I dont see a mention of this on the front page but it looks like a "maprate.cfg" is needed. Where and why please.
This file is auto-generated on the first launch of the plugin. You find it in the directory cfg/sourcemod/
__________________
P.S : Sorry for my english but I'm French

My plugins : Admin Sounds




Cadav0r is offline
SuperShadow
SourceMod Donor
Join Date: Jun 2008
Location: Westminster, MD
Old 04-30-2009 , 14:25   Re: Map Rate v0.10 (6/30)
Reply With Quote #265

Quote:
Originally Posted by Faust_mateo View Post
Code:
Be sure you set up the DB config for SM (database.cfg)
Anyway to run this as a test without exporting ? I want to make sure it works wiht our setup before I bother to export.
The data for map rate plugin is stored in a either a MySQL or SQLite database. If you don't set up database.cfg to tell the plugin which type of database and where the database is, then it won't be able to store the rates. Which would ensure that any testing would not work.

I don't get your comment about exporting. You have to get data into the database before you worry about getting it back out (exporting).
SuperShadow is offline
Faust_mateo
Senior Member
Join Date: Nov 2007
Old 04-30-2009 , 17:26   Re: Map Rate v0.10 (6/30)
Reply With Quote #266

I think I am fundamentally misunderstanding the database nature.

This is what my DB looks like right now: (just found it)

Code:
"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"
    }

    "clientprefs"
    {
        "driver"            "sqlite"
        "host"                "localhost"
        "database"            "clientprefs-sqlite"
        "user"                "root"
        "pass"                ""
        //"timeout"            "0"
        //"port"            "0"
    }
}

Pardon my noobness but this is new territory for me.
Faust_mateo is offline
SuperShadow
SourceMod Donor
Join Date: Jun 2008
Location: Westminster, MD
Old 04-30-2009 , 20:27   Re: Map Rate v0.10 (6/30)
Reply With Quote #267

You should follow posts #18 and #19 to use the sqlite configuration for this, here's a link back: http://forums.alliedmods.net/showthr...103#post608103

Adding the stuff in post 18 to your database.cfg file and setting the maprate_db_config variable should get you up and running in the simplest configuration so you can do your testing.

Using MySQL is a little harder to set up, especially when dealing with rented web and game servers. There's a little more that needs to be configured and you have to depend on the hosts through service tickets to ensure that correct ports are open to get a connection.

I started off using this with sqlite on the game server. Graduated to using MySQl to our rented web server and rented game servers. Recently we switched over to a VSP for the web and a dedicated game server. It was much easier to configure the third time around.
SuperShadow is offline
Cleric
Member
Join Date: Feb 2009
Location: Sweden
Old 05-05-2009 , 15:10   Re: Map Rate v0.10 (6/30)
Reply With Quote #268

Code:
L 05/05/2009 - 20:36:50: [SM] Native "GetClientAuthString" reported: Client 6 is not connected
L 05/05/2009 - 20:36:50: [SM] Displaying call stack trace for plugin "maprate.smx":
L 05/05/2009 - 20:36:50: [SM]   [0]  Line 263, /home/groups/alliedmodders/forums/files/3/6/0/2/6/28221.attach::Timer_AutoRateClient()
L 05/05/2009 - 20:36:50: [SM] Native "GetClientAuthString" reported: Client 6 is not connected
L 05/05/2009 - 20:36:50: [SM] Displaying call stack trace for plugin "maprate.smx":
L 05/05/2009 - 20:36:50: [SM]   [0]  Line 263, /home/groups/alliedmodders/forums/files/3/6/0/2/6/28221.attach::Timer_AutoRateClient()
Dont know what it means. Just ignore it if its trivial.
__________________
Cleric is offline
Sillium
AlliedModders Donor
Join Date: Sep 2008
Location: Germany
Old 05-06-2009 , 01:13   Re: Map Rate v0.10 (6/30)
Reply With Quote #269

If I am right this happens when someone disconnects before he has voted. The plugin creates a timer to wait the specified amount of time before asking a player to vote, if the player disconnects before voting he obviously can't vote anymore :-)
To get rid of this it is necessary to check if the client is still connected before using GetClientAuthString like this:
Change this (in Timer_AutoRateClient)
Code:
g_lastRateTime[client - 1] = GetTime();

    GetClientAuthString(client, steamid, sizeof(steamid));

    if (!strcmp(steamid, steamid_orig)) {
        InitiateRate(client, g_current_map, false);
    }
to
Code:
g_lastRateTime[client - 1] = GetTime();

     if (IsClientInGame(client) && !IsFakeClient(client) && GetClientTeam(client) > 0) 
    {
        GetClientAuthString(client, steamid, sizeof(steamid));
    
        if (!strcmp(steamid, steamid_orig))
        {
            InitiateRate(client, g_current_map, false);
        }
    }
And compile it again, this should fix the error you see
__________________
brb, dishes have developed their own language and are talking to the garbage about overthrowing me... i must correct this

www.unterwasserpyromanen.de

Last edited by Sillium; 05-06-2009 at 01:17.
Sillium is offline
thegtz
Junior Member
Join Date: Mar 2007
Old 05-07-2009 , 04:11   Re: Map Rate v0.10 (6/30)
Reply With Quote #270

Does this plugin still work with CSS?
thegtz 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 14:21.


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