AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   [Tutorial] ClientPrefs (https://forums.alliedmods.net/showthread.php?t=228244)

ddhoward 08-09-2018 00:17

Re: [Tutorial] ClientPrefs
 
That is not what client prefs was designed for. It should not be used for that purpose. You'd be much better off creating a new sqlite database.

eyal282 08-09-2018 02:06

Re: [Tutorial] ClientPrefs
 
Quote:

Originally Posted by ddhoward (Post 2609200)
That is not what client prefs was designed for. It should not be used for that purpose. You'd be much better off creating a new sqlite database.

But what consequnces can be made from it with its benefit of being super convinient?

ddhoward 08-09-2018 02:39

Re: [Tutorial] ClientPrefs
 
Quote:

Originally Posted by eyal282 (Post 2609206)
But what consequnces can be made from it with its benefit of being super convinient?

If you're going to be bypassing the clientprefs natives and forwards, which is the entire point of Clientprefs, you may as well just create a new database. Your code would be nearly exactly the same, but it would be accessing an .sq3 file separate from clientprefs-sqlite.sq3.

https://wiki.alliedmods.net/SQL_(Sou...ipting)#SQLite

The only real downside would be clogging up the database with stuff that clientprefs wouldn't even access. :\

"Client Preferences" was designed for exactly that: preferences.

eyal282 08-09-2018 02:52

Re: [Tutorial] ClientPrefs
 
Quote:

Originally Posted by ddhoward (Post 2609209)
If you're going to be bypassing the clientprefs natives and forwards, which is the entire point of Clientprefs, you may as well just create a new database. Your code would be nearly exactly the same, but it would be accessing an .sq3 file separate from clientprefs-sqlite.sq3.

https://wiki.alliedmods.net/SQL_(Sou...ipting)#SQLite

The only real downside would be clogging up the database with stuff that clientprefs wouldn't even access. :\

"Client Preferences" was designed for exactly that: preferences.

What do you mean clientprefs wouldn't access?

ddhoward 08-09-2018 02:56

Re: [Tutorial] ClientPrefs
 
Quote:

Originally Posted by eyal282 (Post 2609214)
What do you mean clientprefs wouldn't access?

Quote:

Originally Posted by ddhoward (Post 2609209)
If you're going to be bypassing the clientprefs natives and forwards,

also

https://forums.alliedmods.net/showth...16#post2329616

delachambre 12-31-2018 01:25

Re: [Tutorial] ClientPrefs
 
Hello,

My cookies are not saved when the server restarts, a little idea? :)

Thanks in advance.

eyal282 12-31-2018 08:35

Re: [Tutorial] ClientPrefs
 
Quote:

Originally Posted by delachambre (Post 2631950)
Hello,

My cookies are not saved when the server restarts, a little idea? :)

Thanks in advance.

Code? Does it affect all plugins?

Bacardi 12-31-2018 09:39

Re: [Tutorial] ClientPrefs
 
Quote:

Originally Posted by delachambre (Post 2631950)
Hello,

My cookies are not saved when the server restarts, a little idea? :)

Thanks in advance.

This tutorial not explain, "how safe client cookie".

https://sm.alliedmods.net/new-api/clientprefs

https://sm.alliedmods.net/new-api/cl...etClientCookie

It depends, how you use cookies... from ClientPrefs menu (!settings) or other way.
- Safe cookie when value change.


All times are GMT -4. The time now is 22:25.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.