Protected Variables?

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

SG Kai
Posts: 2
Joined: 26 Oct 2022, 20:42

Protected Variables?

Postby SG Kai » 26 Oct 2022, 20:47

Hello everyone.

Is there a way to create a user or item variable and prevent the user from changing its values on the client side?
So that it is visible to all users, but cannot be changed on the client side?

Thank you.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Protected Variables?

Postby Lapo » 27 Oct 2022, 07:53

Hi,
there are private User Variables that exist only on the client that creates them. In other words these variables are not seen by others.
What you're asking is different and kind of defeats the purpose of User/Item variable. What you might be looking for is User Constants :), if they existed.

You can emulate something like that by setting User Variables from the server side and disabling SetUserVariables requests from client side.

Disabling specific client requests can be done via the AdminTool > Zone Configurator > Privilege Manager.
More on this here:
http://docs2x.smartfoxserver.com/Advanc ... ge-manager

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
SG Kai
Posts: 2
Joined: 26 Oct 2022, 20:42

Re: Protected Variables?

Postby SG Kai » 27 Oct 2022, 11:23

Oh, Privilege Manager, it seems that's what I need.
Thanks. I hadn't thought of that.

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 63 guests