Author Topic: How to stop moveforward(3); ?  (Read 1618 times)

In a serverCmd, I have moveforward(3); . I want a seperate cmd that will stop the client. How would I do that?

I think its moveforward(0); Try that and then reply


moveforward() is clientside, so if you're running it in a server command, it wont work.

Well, it does... so I dunno what you're talking about.

I helped someone, yay me :cookieMonster:


Well, it does... so I dunno what you're talking about.
Have you tried it with someone else?

Also, use moveforward(1); ,it does that same thing, but is better coding habit. (since it is a true or false statement, anything not 0 comes back as true, it is better to use "1" since that is how many people use true/false checks.)

Ohhh, ok. I just went on Wallet's server and asked what it was, and someone said (3), so I used that. As for trying it with something else... why? It works, so why try it on other things?

To learn good coding habit so your mods don't screw up others.

I'm not talking about the 1 or 3 thing. I'm saying that this DOES work, so why test it?

Oh.

You can have client sided code in server script, so by having movefarward(1); in your code, your telling yourself to do it.

You can have client sided code in server script, so by having movefarward(1); in your code, your telling yourself to do it.

This is true, it's really just telling the server host to move forward.
You would have to make a client command to do it and call that command from the server using commandToClient().

Wait... you 2 just said the opposite. Laremere says it makes YOU do it, exidyne says the host...? Wtf? I want the person that type the serverCmd to be the one that walks, anyway.

By just saying that the localconnection(host) moves.

you need:
commandtoclient(%client,'movefoward',1);

or something similar.