Blockland Forums > Modification Help
Making the client respond to the server(TOPIC NAME CHANGED)
<< < (4/10) > >>
DrenDran:

--- Quote from: Reinforcements on February 13, 2011, 03:08:39 PM ---How would you check to see if the player has a certain file/add-on?

--- End quote ---
Add-on?
Client side mod.

File, as in, in the cache?
Can't be done.
Reinforcements:

--- Quote from: DrenDran on February 13, 2011, 08:47:55 PM ---Add-on?
Client side mod.

File, as in, in the cache?
Can't be done.

--- End quote ---
Well, I know theres a way to do this.

Bauklotz:
That uses a client-sided mod. The server sends a command to the client, and the client-sided mod answers. If the server doesn't get a answer, kickness.
Reinforcements:

--- Quote from: Bauklotz on February 14, 2011, 08:41:35 AM ---That uses a client-sided mod. The server sends a command to the client, and the client-sided mod answers. If the server doesn't get a answer, kickness.

--- End quote ---
:0

Thank you sir, I'll see if I can get something like this to work.
Reinforcements:
Err....I'm having trouble. Anyone mind helping me with the "server sends a command to the client and client responds" part? Heres what I have

server.cs

--- Code: ---package checkForAddOn_package
{
 function GameConnection::autoAdminCheck(%this)
{
   %parent = parent::autoAdminCheck(%this);
   %this.checkForAddon = schedule(75,0,kickPlayerFromServerForNotHavingACertainAddOn,%this);
   serverCmdkickPlayerFromServerForNotHavingACertainAddOn(%this);
   
    commandtoClient(%client, stopCheckForAddonAutoKick);
   
   return %parent;
 
}



};
activatePackage(checkForAddOn_package);

function kickPlayerFromServerForNotHavingACertainAddOn(%this)
{
echo("kicking player");
findClientByName(%this.name).delete("You must have <a:http://www.apple.com/>this add-on</a> to play on this server.");
}
--- End code ---
client.cs

--- Code: ---function serverCmdstopCheckForAddonAutoKick(%client)
{
  cancel(%this.checkForAddon);
 
return; 
}

--- End code ---
Navigation
Message Index
Next page
Previous page

Go to full version