![]() |
Client. vs Clientr.
Hey this is probably a really stupid question but Ive never been too sure.
From what I know, clientr. variables are more secure but you can only change them serverside, usualy with triggeractions (pain in the ass). But Im told client. variables can be edited clientside. I was thinking of using some values in client. vars, should I? Its quicker and doesn't use triggeractions. Less lag right? |
Well, first you should weigh up what you're using them for. If it's information you wish to be kept secure.
What are you storing in it? Then maybe I can help you decide what prefix to use. |
If you are storing gralats or or money you should use clientr. also if you arn't invoking an action on a x/y you should use triggerserver, not triggeraction.
|
Well, as Codein said, it depends on what you are making. Clientr is often used for security, ie storing MD5 encrypted passwords for comparision or if you don't want it to be edited clientside.
Should provide more info tho :) |
Think of it this way: What don't you want hackers changing with a memory editer :p. If it's something like a flag saying your radio is playing then client.radio =1 is fine. If it's something like your characters expierence, clientr.exp would be more appropriate. If it's important: clientr. it.
|
Ya, less important things that wouldn't effect gameplay if hacked is what you'd use client.vars for. Things that would give benefits for the player if they were able to hack them are for clientr.vars, like a speed var for your movement, damage vars, and so on.
|
Just a note, for things which you need client. for, but you need secure, I would use base64encode() and base64decode() ... would work best if you did it a certain number of time such as this:
PHP Code:
|
Quote:
A smart game hacker could use the lead that servers use base64 encoding. If the hacker was worth his salt, he'd easily find the the amount of times you've base64 encoded a value and then decode it from there. I had an example in my head on how I'd get round but a) It's lost now and b) I'm not sharing it publicly. My idea was this: Say if you have your finger on the shoot button, a temp variable would count how many bullets have been shot and then after you release the button, it'd subtract this amount from your clientr.ammo. I don't know how practical it is though. Also, this way, it doesn't matter who's shooting and who's not. It might cause a bit more lag than you'd want for the whole server but definitely less lag than taking off the ammo every time a projectile is launched/fired and definitely more secure than client. flags. Maybe a combination of my idea and base64 encoding so that hackers can't just hold down the ammo button and find the address for the client variable. I'm not sure though, just a thought. |
Quote:
|
Quote:
|
Quote:
Quote:
|
Really I don't like to use clientr. flags to "store" information, really. I use it as a reference of sorts, I like to store important information like a players HP, money, etc, in objects and files and reflect those to clientr. flags so that they can be easily read.
But, like I've said before, I've come across an odd problem where clientr. flags can be set clientside. |
Quote:
Dunno if this is fixed or all, because using objects and comparison serverside fix insexure stuff like that.. |
Quote:
However, I also use a system where important values are stored in objects and reflected to clientr. flags. Just seems more secure. |
Quote:
Now I use objects and clientr flags. |
| All times are GMT +2. The time now is 01:20 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.