Author Topic: Client Command [Solved]  (Read 708 times)

Is there a way to have a client do /example and run a function, without that client being the host at a server?
« Last Edit: February 16, 2013, 11:23:39 PM by bloxmaster »

Yes, but people here go apestuff on you if you make even a single client-sided forward-slash-based function.

Yes, but people here go apestuff on you if you make even a single client-sided forward-slash-based function.

Why is that?

Server
Code: [Select]
function ServerCmdThing(%Client)
{
CommandToClient(%Client, "ClientCmd", %Arguments);
}
Client
Code: [Select]
function ClientCmd(%Arguments)
{
//Code
}

Is there a way to have a client do /example and run a function, without that client being the host at a server?
i'm sure you don't mean to imply all serverCmds are host-only, so i'll explain this:

Yes, but people here go apestuff on you if you make even a single client-sided forward-slash-based function.
it's because of the possibility that someone will make a server mod that uses that command, and you'll be intercepting it before it even tries to send it to the server, therefore making it impossible to use that part of whatever mod it is.

e.g. server has a mod that makes you a turnip

command is /turnip

you have a client mod that causes every object to render as a turnip (which probably would never happen ever, it's just an example)

to toggle it, the client mod intercepts chat messages where firstword is /turnip

-interceptexplanation-

People went apestuff on me because the DEFAULT control character for the Avatar Saver is the forward slash.
You could change it with [char]setChar [newChar]

People went apestuff on me because the DEFAULT control character for the Avatar Saver is the forward slash.
You could change it with [char]setChar [newChar]
lol

at least you thought about the complaints. that's more than could be said about every other mod i've seen that does the client-sided /cmd