save on/off
Hi, how do I save the on/off values in the menu after changing the map? when the map changes, the on/off menu changes
in the sounds plugin I use this new g_hVault = INVALID_HANDLE; new bool:g_bDisabled[MAX_PLAYERS + 1]; on/off sounds are saved but the labels themselves are not in the menu, you need to save them in the menu too after changing the map Code:
#include <amxmodx> |
Re: save on/off
If you want data to be preserved between maps, you need to save the data and re-load it on the next map. Since this is per-user data, you need to save their SteamID along with the data of interest. Then, in plugin_init(), you can load the file into the plugin (using a Trie would be the most efficient but an array would be more straight forward). Then, in client_authorized(), you would look in that data to find the SteamID and then set that value to your array for that player.
There are several ways to save the data. A plain text file and nVault are two ways to do this. Also note that forcing a bind or other setting on a player is called "slowhacking" and is not supported here. Please remove it from your code. |
Re: save on/off
Quote:
|
Re: save on/off
Quote:
Start by trying to code it yourself, and if you get stuck or have specific questions, ask here(you should also show what you tried in terms of code). |
Re: save on/off
Quote:
|
| All times are GMT -4. The time now is 13:48. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.