Raised This Month: $ Target: $400
 0% 

Fully Threaded Server Redirect


Post New Thread Reply   
 
Thread Tools Display Modes
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 05-16-2012 , 18:24   Re: Fully Threaded Server Redirect
Reply With Quote #61

Few points that I see before even installing this:

1) "Put your configurations in server.cfg" - What configurations? Must I visit another plugin to get the list? Please list everything yourself.

2) "The default database used is default instead of serverredirect" - Why must you use the default database key? What's wrong with using serverredirect in databases.cfg?

I also get this in the console if I use !servers or /servers in chat (note: apart from this bug, the plugin works). Also sm_servers doesn't exist. I assume all or most of this could be solved by registered sm_server instead of just server etc. (Turns out he needed to return Plugin_Handled;)
Code:
[REDIRECT] Fetching Servers. May take a few seconds.
Unknown command: servers
11530 :  !servers
A quick edit of this plugin, for those who require it.
Changelog for 1.2.1 (I assume 1.2 exists (since this was the plugin's previous version) even though there's no changelog for it):
  • Uses RegAdminCmd instead of RegConsoleCmd to allow for admin overrides if necessary (still defaults to public access). Now the sm_ prefix can be used.
  • Changed DATABASE_KEY back to "serverredirect"
  • Returned Plugin_Handled when necessary to stop "Unknown command" logs in client console.
  • Edited a few strings (and default chat color).

Note the 2nd edit: make sure you use "serverredirect" in databases.cfg.

Cvars since the OP still doesn't say what they are:

sm_redirect_version -- Shows the plugin version, do not edit.
sm_redirect_serverid <id> -- ID of the server in the database
sm_redirect_showcurrent <1/0> -- Whether to show the current server in the redirect menu
sm_redirect_showoffline <1/0> -- Whether to show offline servers in the redirect menu
sm_redirect_menusort <1/0> -- Indicates how menu items get sorted. 1 = by display name (default), 2 = by server ID
sm_redirect_enableheartbeat <1/0> -- Whether to enable heartbeat signal for this server. If stopped, the server will be marked as offline

(Final mention since the OP doesn't give information: the MySQL user for the database must have at least SELECT and UPDATE privileges coming from each server in question.)
Attached Files
File Type: sp Get Plugin or Get Source (serverredirect.sp - 300 views - 15.5 KB)
__________________

Last edited by 11530; 06-08-2012 at 07:39.
11530 is offline
Kammi_
AlliedModders Donor
Join Date: Dec 2007
Old 07-31-2012 , 09:18   Re: Fully Threaded Server Redirect
Reply With Quote #62

it want work anymore

Code:
L 07/31/2012 - 15:08:33: [SM] Displaying call stack trace for plugin "serverredirect.smx":
L 07/31/2012 - 15:08:33: [SM]   [0]  Line 194, /home/groups/alliedmodders/forums/files/1/5/3/7/2/5/104227.attach::ShowServerMenu2()
L 07/31/2012 - 15:08:44: [STEAMTOOLS] Server Gameplay Stats received with an unexpected eResult. (eResult = 16)
L 07/31/2012 - 15:11:46: [SM] Native "IsClientConnected" reported: Client index 0 is invalid
L 07/31/2012 - 15:11:46: [SM] Displaying call stack trace for plugin "serverredirect.smx":
L 07/31/2012 - 15:11:46: [SM]   [0]  Line 194, /home/groups/alliedmodders/forums/files/1/5/3/7/2/5/104227.attach::ShowServerMenu2()
__________________



Kammi_ is offline
Send a message via ICQ to Kammi_
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 07-31-2012 , 10:11   Re: Fully Threaded Server Redirect
Reply With Quote #63

Quote:
Originally Posted by Kammi_ View Post
it want work anymore

Code:
L 07/31/2012 - 15:08:33: [SM] Displaying call stack trace for plugin "serverredirect.smx":
L 07/31/2012 - 15:08:33: [SM]   [0]  Line 194, /home/groups/alliedmodders/forums/files/1/5/3/7/2/5/104227.attach::ShowServerMenu2()
L 07/31/2012 - 15:08:44: [STEAMTOOLS] Server Gameplay Stats received with an unexpected eResult. (eResult = 16)
L 07/31/2012 - 15:11:46: [SM] Native "IsClientConnected" reported: Client index 0 is invalid
L 07/31/2012 - 15:11:46: [SM] Displaying call stack trace for plugin "serverredirect.smx":
L 07/31/2012 - 15:11:46: [SM]   [0]  Line 194, /home/groups/alliedmodders/forums/files/1/5/3/7/2/5/104227.attach::ShowServerMenu2()
You're probably getting those errors because you are testing on a listen server.
__________________
11530 is offline
Kammi_
AlliedModders Donor
Join Date: Dec 2007
Old 07-31-2012 , 14:55   Re: Fully Threaded Server Redirect
Reply With Quote #64

ok problem fixed but another one is still there i have all configured but it tell's me

Code:
[ﻅD]  【ツ】Kammi_ 【ツ :  !servers
[REDIRECT]  Fetching servers. May take a few seconds.
[REDIRECT] There are currently no servers available.
my mysql tabel

PHP Code:
-- phpMyAdmin SQL Dump
-- version 3.3.9.2
-- http://www.phpmyadmin.net
--
-- 
Hostlocalhost
-- Erstellungszeit31. Juli 2012 um 20:47
-- Server Version5.1.61
-- PHP-Version5.3.3-7+squeeze8

SET SQL_MODE
="NO_AUTO_VALUE_ON_ZERO";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- 
Datenbank: `serverredirect`
--

-- --------------------------------------------------------

--
-- 
Tabellenstruktur für Tabelle `server`
--

CREATE TABLE IF NOT EXISTS `server` (
  `
idint(11NOT NULL AUTO_INCREMENT,
  `
addressvarchar(50NOT NULL DEFAULT '85.114.130.122',
  `
groupnumberint(11NOT NULL DEFAULT '1',
  `
last_updatedatetime NOT NULL,
  `
display_namevarchar(100NOT NULL DEFAULT '[new server]',
  `
offline_namevarchar(100NOT NULL DEFAULT '[offline]',
  `
maxplayersint(11NOT NULL DEFAULT '0',
  `
currplayersint(11NOT NULL DEFAULT '0',
  `
mapvarchar(70NOT NULL DEFAULT '[no map]',
  
PRIMARY KEY (`id`),
  
KEY `groupnumber` (`groupnumber`),
  
KEY `last_update` (`last_update`)
ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=;

--
-- 
Daten für Tabelle `server`
--

INSERT INTO `server` (`id`, `address`, `groupnumber`, `last_update`, `display_name`, `offline_name`, `maxplayers`, `currplayers`, `map`) VALUES
(1'85.114.130.122:27115'1'2008-12-31 00:00:00''Dust2 Arena | 1 AWP | Bank | HLstatsX | {MAP} | {CURR}/{MAX}''Dust2 Arena | 1 AWP | Bank | HLstatsX | OFFLINE'00'[no map]'),
(
2'85.114.130.122:27215'1'2008-12-31 00:00:00''Office | DM | NoBlock | AWP | HLstatsX | {MAP} | {CURR}/{MAX}''Office | DM | NoBlock | AWP | HLstatsX | OFFLINE'00'[no map]'),
(
3'85.114.130.122:27315'1'2008-12-31 00:00:00''Assault 24/7 | 1 AWP | Bank | HLstatsX | {MAP} | {CURR}/{MAX}''Assault 24/7 | 1 AWP | Bank | HLstatsX | OFFLINE'00'[no map]'),
(
4'85.114.130.122:27415'1'2008-12-31 00:00:00''Surf | DM | NoBlock | AWP | HLstatsX | {MAP} | {CURR}/{MAX}''Surf | DM | NoBlock | AWP | HLstatsX | OFFLINE'00'[no map]'),
(
5'85.114.130.122:27515'1'2008-12-31 00:00:00''AIM_DEAGLE_MAPS | DM | HLSTATSX | {MAP} | {CURR}/{MAX}''AIM_DEAGLE_MAPS | DM | HLSTATSX | OFFLINE'00'[no map]'); 
my database cfg

Code:
    "serverredirect"
    {
        "driver"            "mysql"
        "host"                "93.186.196.17"
        "database"            "serverredirect"
        "user"                "user"
        "pass"                "pw"
        //"timeout"            "0"
        "port"                "3306"
    }
what is wrong ?
__________________



Kammi_ is offline
Send a message via ICQ to Kammi_
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 07-31-2012 , 17:51   Re: Fully Threaded Server Redirect
Reply With Quote #65

Have you put cvars:

sm_redirect_serverid "1" in Server #1
sm_redirect_serverid "2" in Server #2
etc. ?
__________________
11530 is offline
Kammi_
AlliedModders Donor
Join Date: Dec 2007
Old 07-31-2012 , 19:40   Re: Fully Threaded Server Redirect
Reply With Quote #66

ok it runs but one more problem it shows diffrent maps to the servers and 3 of them want work. see @ the screenshot how can i fix this ?



in hlsw is all right



but in phpmyadmin it want work corrctly



i have add this cavars in my server cfg

assault

Code:
sm_redirect_serverid "1"
sm_redirect_serverid "2"
sm_redirect_serverid "4"
sm_redirect_serverid "5"
sm_redirect_menusort "2"
sm_redirect_enableheartbeat "1"
deagle

Code:
sm_redirect_serverid "1"
sm_redirect_serverid "2"
sm_redirect_serverid "3"
sm_redirect_serverid "4"
sm_redirect_menusort "2"
sm_redirect_enableheartbeat "1"
dust2

Code:
sm_redirect_serverid "2"
sm_redirect_serverid "3"
sm_redirect_serverid "4"
sm_redirect_serverid "5"
sm_redirect_menusort "2"
sm_redirect_enableheartbeat "1"
office

Code:
sm_redirect_serverid "1"
sm_redirect_serverid "3"
sm_redirect_serverid "4"
sm_redirect_serverid "5"
sm_redirect_menusort "2"
sm_redirect_enableheartbeat "1"
surf

Code:
sm_redirect_serverid "1"
sm_redirect_serverid "2"
sm_redirect_serverid "3"
sm_redirect_serverid "5"
sm_redirect_menusort "2"
sm_redirect_enableheartbeat "1"
__________________




Last edited by Kammi_; 07-31-2012 at 19:51.
Kammi_ is offline
Send a message via ICQ to Kammi_
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 07-31-2012 , 20:51   Re: Fully Threaded Server Redirect
Reply With Quote #67

You only use one sm_redirect_serverid for each server. It is the ID for the server.
__________________
11530 is offline
Kammi_
AlliedModders Donor
Join Date: Dec 2007
Old 08-01-2012 , 09:04   Re: Fully Threaded Server Redirect
Reply With Quote #68

thanks now all works correctly
__________________



Kammi_ is offline
Send a message via ICQ to Kammi_
Pythong
SourceMod Donor
Join Date: Dec 2008
Old 08-19-2012 , 20:54   Re: Fully Threaded Server Redirect
Reply With Quote #69

Is it possible to make it so it doesn't count bots?

The reason i ask is because my MvM servers are showing up as 32/6 (I have max visible players set at 6 - since thats the max humans it can take)
Pythong is offline
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 08-19-2012 , 21:49   Re: Fully Threaded Server Redirect
Reply With Quote #70

Quote:
Originally Posted by Pythong View Post
Is it possible to make it so it doesn't count bots?

The reason i ask is because my MvM servers are showing up as 32/6 (I have max visible players set at 6 - since thats the max humans it can take)
Try this version below, which is an edit of my version of this plugin from post #61.

Changelog for 1.2.2:
  • Added convar sm_redirect_allowbots to count/ignore bots in the player count.
Attached Files
File Type: sp Get Plugin or Get Source (serverredirect.sp - 241 views - 16.1 KB)
__________________
11530 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 21:13.


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