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

[MM:S] Connect


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ajaxx
Senior Member
Join Date: Oct 2009
Old 04-02-2013 , 08:39   [MM:S] Connect
Reply With Quote #1

I want to programmatically connect an individual player to another server. How would I issue the command “connect 10.10.0.1:27015” to a specific player via MM:S?
Ajaxx is offline
psychonic

BAFFLED
Join Date: May 2008
Old 04-02-2013 , 09:24   Re: [MM:S] Connect
Reply With Quote #2

You can't directly.

The connect command on the client lacks the FCVAR_SERVER_CAN_EXECUTE flag so it would be blocked.

What you can do is use IServerPluginHelpers::CreateMessage with the DIALOG_ASKCONNECT type. The client can then accept the connect request with whatever button that they have bound to askconnect_accept (that might not be the exact name), defaulting to F3 in most games.

http://hg.alliedmods.net/hl2sdks/hl2...rplugin.h#l117
psychonic is offline
Ajaxx
Senior Member
Join Date: Oct 2009
Old 04-03-2013 , 08:50   Re: [MM:S] Connect
Reply With Quote #3

Thanks for the reply psychonic. I’m trying to split my servers into divisions based on skill. I would prefer the user not have a say in the redirect process, if they can opt out of it I’m sure some people would. Is there perhaps another way I can connect a player to another server? Both of the servers are under my control.
Ajaxx is offline
thetwistedpanda
Good Little Panda
Join Date: Sep 2008
Old 04-03-2013 , 09:08   Re: [MM:S] Connect
Reply With Quote #4

Give them the option to reconnect, and if after x seconds they haven't accepted it, provided they're not afk, kick/ban/force spec/etc. Even if it was possible to force it upon someone code wise, it's unlikely that you'd find support for doing it here as it was blocked by Valve for a reason (abusive server admins). While legit uses such as yours remain, it was ruined for everyone.
__________________
thetwistedpanda is offline
Ajaxx
Senior Member
Join Date: Oct 2009
Old 04-03-2013 , 14:03   Re: [MM:S] Connect
Reply With Quote #5

Ah, I see. Thanks for the explanation.
Ajaxx 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 06:35.


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