I was writing around then I wondered about something I haven't tested yet.
Imagine a command (i.e. "password") that takes two arguments:
The first only takes "set" and "login" and the second will be explained now.
When you write "password set", after that you can write any string (i.e. "potato", for the sake of explanation).
But when another client writes that down, he must use "login" and then write "potato", to be told that the password is correct and set a variable to allow this user to mess with whatever was allowed.
If I set this password to "potato" before any client connects, wouldn't the client-side variable of the script be set to something else, the default, when it connects instead of the server-side variable?
If yes and only if yes, is there any way to prevent that without CVars? Like, using some sort of global variables?
Note: I'm aware I can use CVars but whatever I'm trying to do doesn't need CVars. I mean, I can prevent the users from editing the CVar but not from showing it's value to them.
Imagine a command (i.e. "password") that takes two arguments:
The first only takes "set" and "login" and the second will be explained now.
When you write "password set", after that you can write any string (i.e. "potato", for the sake of explanation).
But when another client writes that down, he must use "login" and then write "potato", to be told that the password is correct and set a variable to allow this user to mess with whatever was allowed.
If I set this password to "potato" before any client connects, wouldn't the client-side variable of the script be set to something else, the default, when it connects instead of the server-side variable?
If yes and only if yes, is there any way to prevent that without CVars? Like, using some sort of global variables?
Note: I'm aware I can use CVars but whatever I'm trying to do doesn't need CVars. I mean, I can prevent the users from editing the CVar but not from showing it's value to them.
Last edited: