The reason DRPG uses connection arguments is because I didn't want the "%1 connected." then the instant "%1 has left the game." messages. Unfortunately, connection arguments are totally "static" at the moment, meaning there is only fixed arguments. If it was a more "dynamic" approach, such as appending arguments to a list which get sent to the server, I would recommend it. Regardless, here's the server side code:
function GameConnection::onConnectRequest(%this,%a,%b,%c,%d,%e,%f,%g,%h,%i)
{
echo("\n" @ %c SPC "trying to connect.");
if(%f !$= "")
{
%this.hasRTB = 1;
%this.rtbVersion = %f;
}
if(getField(%h,1) $= "DRPG")
{
echo(%c SPC "trying to connect with DRPG v" @ getField(%h,2) @ ".");
if(trim(getField(%h,2)) >= trim($DRPG::ClientVersion))
{
%this.hasDRPG = 1;
%this.drpgVersion = getField(%h,2);
Parent::onConnectRequest(%this,%a,%b,%c,%d,%e,%f,%g,%h,%i);
}
else
{
echo(%C SPC "needs to download a new version of DRPG.");
%this.schedule(0,"delete","You need the latest <a:dl.dropbox.com/u/551734/Add-Ons/Client_DRPG.zip>DRPG Client</a> (v" @ $DRPG::ClientVersion @ " ) to play on this server.");
return;
}
}
else
{
echo(%c SPC "trying to connect without DRPG.");
%this.schedule(0,"delete","You need the latest <a:dl.dropbox.com/u/551734/Add-Ons/Client_DRPG.zip>DRPG Client</a> (v" @ $DRPG::ClientVersion @ " ) to play on this server.");
}
}
I would only use this method for playing around. If you want your mod to actually be allowed on RTB used the previous post's mentioned method. Probably useless information considering I explained something to you then told you not to use it but I was just showing you the mechanics.