Quoting Mike Dussault's email to the [hlds] list:
"Here's some example code that could go in a
IServerPluginCallbacks::ClientCommand handler:
if ( FStrEq( pcmd, "doaskconnect" ) )
{
const char *ip = "MyTestServer.ValveSoftware.com:27015";
if ( engine->Cmd_Argc() >= 2 )
ip = engine->Cmd_Argv(1);
float flDuration = 4.0f;
if ( engine->Cmd_Argc() >= 3 )
flDuration = (float)atof( engine->Cmd_Argv(2) );
KeyValues *kv = new KeyValues("blah");
kv->SetFloat( "time", flDuration );
kv->SetString( "title", ip );
helpers->CreateMessage( pEntity, DIALOG_ASKCONNECT, kv, this );
return PLUGIN_STOP;
}
Here's the DIALOG_TYPE update. It would be in
public\engine\iserverplugin.h, but we'll have to do an sdk release for
that so it's a ways off.
typedef enum
{
DIALOG_MSG = 0, // just an on screen message
DIALOG_MENU, // an options menu
DIALOG_TEXT, // a richtext dialog
DIALOG_ENTRY, // an entry box
DIALOG_ASKCONNECT // Ask the client to connect to a specified IP
address. Only the "time" and "title" keys are used.
} DIALOG_TYPE;"
Regards,
---
Regime
http://www.livebythegun.com/
Ratman2000 wrote:
Hello,
Jason have sayed, that there is a way for Plugins to relocate the players,
but how can i find this way?
It there a page, i can find the information i need to build this relocate?
I have looked into the SDK and havend found any Plugin Helper or an other
function so
please tell me, how we can use this function!
- Added a way for server plugins to ask players if they'd like to
connect to a different server
Thanks!
With friendly Reguards
Ratman2000
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux