View Single Post
eyal282
Veteran Member
Join Date: Aug 2011
Old 07-11-2018 , 05:28   Re: [Tutorial] ClientPrefs
Reply With Quote #38

Quote:
Originally Posted by ddhoward View Post
https://sm.alliedmods.net/new-api/cl...s/CookieAccess

This selection configures whether the user can change the cookie value manually, or whether they can even see the current value via sm_cookies.

CookieAccess_Public means that the user can insert any string into the cookie by using sm_cookies.

CookieAccess_Restricted means that the user can use sm_cookies to view the raw value of the cookie as stored in the database, but cannot change it.

CookieAccess_Private means that the cookie will not show up in the sm_cookies list, and cannot be viewed or changed. The value of the cookie is instead exclusively changed through other means, such as a menu or something.

The vast majority of cookies will be private. There is almost no reason to do anything else. Any cookie that takes a user-defined string would probably be better off having a separate, dedicated command to changing it and reading it. I really can't think of any valid reason to use anything other than CookieAccess_Private.
I am using cookies to determine which guns you'll have in a gun menu. If you found the cookie in sm_cookies, you should be able to change one gun with a keybind without returning to menu
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline