Blockland Forums
Home
Help
Login
Register
Blockland Forums
»
Blockland Forums
»
Modification Help
»
Calling a client cmd from a server.cs
« previous
next »
Print
Pages: [
1
]
Author
Topic: Calling a client cmd from a server.cs (Read 591 times)
MARBLE MAN
September 22, 2012, 03:56:28 PM
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?
Ad Bot
Advertisement
Blocki
September 22, 2012, 03:57:12 PM
commandtoclient(%cl,'checkthis',%stuff);
commandtoclient(findclientbyname(noob),'asdf2',"Usux");
Lugnut
September 22, 2012, 04:03:28 PM
Quote from: Blocki on September 22, 2012, 03:57:12 PM
commandtoclient(%cl,'checkthis',%stuff);
commandtoclient(findclientbyname(noob),'asdf2',"Usux");
that /\
MARBLE MAN
September 22, 2012, 04:06:53 PM
ok thanks :D
MARBLE MAN
September 22, 2012, 04:13:37 PM
what about like a console command?
like
commandtoclient(%cl,'clienttimescale',"0.2");
?
Blocki
September 22, 2012, 04:23:47 PM
???
a clientcmdblahblah IS a console command ...
commandtoclient(%noob,'timescale',-1);
Nexus
September 22, 2012, 04:27:01 PM
Console command are just snippets of regular code, not something special.
Print
Pages: [
1
]
« previous
next »
Blockland Forums
»
Blockland Forums
»
Modification Help
»
Calling a client cmd from a server.cs