Author Topic: Calling a client cmd from a server.cs  (Read 591 times)

Im making a System_test thing where it needs to give and ask the client for info (client sided saving cuz cheating is fun...)
And the client is required to have the addon
I have in the server.cs:
doing stuff...
function calledwhenever(%cl, %stuff)
{
findclientbyname(%cl.name).commandtoclientcheckthis(%stuff);
}

and in the client.cs
function clientcmdcheckthis(%stuff)
{
echo("the client has recieved what it needs");
}


This wont work...
Could someone help me make it work?

commandtoclient(%cl,'checkthis',%stuff);

commandtoclient(findclientbyname(noob),'asdf2',"Usux");

commandtoclient(%cl,'checkthis',%stuff);

commandtoclient(findclientbyname(noob),'asdf2',"Usux");

that /\


what about like a console command?
like
commandtoclient(%cl,'clienttimescale',"0.2");
?

???
a clientcmdblahblah IS a console command ...

commandtoclient(%noob,'timescale',-1);

Console command are just snippets of regular code, not something special.