So I have heard and seen that you can save settings to a character. For example, a player changes his view distance and after logging back in it will keep that setting he has changed.
The way I want to use this: I have some music that plays when a player loads into the server, and I am trying to allow them an option to turn it off permanently if they decide to. I heard something about profileNamespace is what I need to do, but I do not know how to do this. I just need some basic information on how to do such a thing, I can figure out how to make the option for the player via right click option or scroll wheel option, but I am confused on most of the other stuff.
In my rules.sqf,
private ["_messages","_timeout"]; waitUntil {uiSleep 1; !isNil ("Dayz_loginCompleted")}; playSound "introSong"; systemChat "Welcome!"; _messages = [ ["DayZ Epoch", "Welcome "+(name player)], ["World", worldName], ["Teamspeak", "myTeamspeak"], ["Website/Forums", "myWebsite"], ["Server Rules", "myRules"], ["News", "myNews"] ]; _timeout = 5; { private ["_title","_content","_titleText"]; uiSleep 2; _title = _x select 0; _content = _x select 1; _titleText = format[("<t font='TahomaB' size='0.40' color='#a81e13' align='right' shadow='1' shadowColor='#000000'>%1</t><br /><t shadow='1'shadowColor='#000000' font='TahomaB' size='0.60' color='#FFFFFF' align='right'>%2</t>"), _title, _content]; [ _titleText, [safezoneX + safezoneW - 0.8,0.50], //DEFAULT: 0.5,0.35 [safezoneY + safezoneH - 0.8,0.7], //DEFAULT: 0.8,0.7 _timeout, 0.5 ] spawn BIS_fnc_dynamicText; uiSleep (_timeout * 1.1); } forEach _messages;
and I know I would do something like
_loadMusic = ???
if (_loadMusic) then {
playSound "introSong";
systemChat "Welcome!";
};
But from there, I don't know much else of what to do. Maybe it's really simple and easy and I just don't see it, or maybe I have to define a variable for the toggle option of the music in a bunch of complicated ways.
Does anyone have any knowledge they can share with me? Thanks!