Author Topic: Client Sided Checking If Server Has An Add On  (Read 521 times)

How would you check if a server has an add on client sided?

use a command to server, then that sends a command back?

you'd need a server mod, sorry.

Most servers have RTB, which shows a list of all the add-ons the server has.

That's about the best you can do.

How would you check if a server has an add on client sided?

I imagine, this is to check for an add-on, you will make? if so, as phflack said,  you would need serversided code, something as simple as
Code: [Select]
function serverCmdMyModCheck(%client)
{
      commandToClient(%client, 'HasMyMod', 1);
}

then on you're client-sided script

Code: [Select]
function checkForMyMod()
{
      commandToServer('myModCheck');
}

function clientCmdHasMyMod()
{
      //if has mod
      doStuff();
}

So uppon joining the server, you would call checkForMyMod(), then this would send the command to the server, if the server has the mod, the server will reply activating the clientCmdHasMyMod()

Hope this helps :)