Hi: I have a small problem. I have a script I am using InstantViewDistance. My problem is that after (X) # of deaths the option to use InstantViewDistance disapears from your center mouse wheel menu. Now this is exec by an addons folder not in the map and there is a reason for this, I am disabled and players help me with the server price so I have added to this addon, vehicle sqf's so that any1 that is a paid member to the server are the only ones to get this menu and with setting thier view distance at will they can build vehicles of thier choice at will. yes I know if I add this to the map it will stay always, BUT then any1 that joins the server can get this menu and it is for paid members. Not to be mean to non members but it is a little extra something for those who wish to help with the server cost. there are vehicles on the map that non members can get and have to drive to cities. Here is what I have if anyone can please help me so the menu stays no matter how many times you die. ( config.cpp )#define true 1
#define false 0
class CfgPatches
{
class InstantViewDistance
{
units[] = {};
weapons[] = {};
requiredVersion = 0.1;
requiredAddons[] = {"CAWeapons", "CATracked", "CAWheeled", "CAAir", "CAWater"};
};
};
class CfgVehicles
{
class Land;
class Man : Land
{
class UserActions
{
class InstantViewDistance_Init
{
displayName="InstantViewDistance";
position="pos driver";
onlyforplayer=1;
radius=200000.0;
condition="(this == player) && (isnil ""executed"")";
statement="[] execVM ""\InstantViewdistance\scripts\viewdistance.sqf"";executed = 1;";
};
};
};
};
then I have a scripts folder with ( settingsfinished.sqf ) waituntil {alive player};
player removeAction InstantViewDistance;
player removeAction viewdistup;
player removeAction viewdistdown;
player removeAction airviewdistup;
player removeAction airviewdistdown;
player removeAction terrlow;
player removeAction terrmid;
player removeAction terrhigh;
player removeAction finished;
InstantViewDistance = player addaction ["InstantViewDistance", "instantviewdistance\scripts\viewdistance.sqf",80,1, false, true, "test2"];
( viewdistance.sqf ) vdist=1200;
avdist=1200;
player removeAction InstantViewDistance;
player removeAction viewdistup;
player removeAction viewdistdown;
player removeAction airviewdistup;
player removeAction airviewdistdown;
player removeAction terrlow;
player removeAction terrmid;
player removeAction terrhigh;
player removeAction finished;
viewdistup = player addaction ["ViewDistance Up", "instantviewdistance\scripts\viewdistancesettings.sqf",10,1, true, true,"test2"];
viewdistdown = player addaction ["ViewDistance Down", "instantviewdistance\scripts\viewdistancesettings.sqf",20,1, true, true,"test2"];
airviewdistup = player addaction ["AirViewDistance Up", "instantviewdistance\scripts\viewdistancesettings.sqf",60,1, true, true,"test2"];
airviewdistdown = player addaction ["AirViewDistance Down", "instantviewdistance\scripts\viewdistancesettings.sqf",70,1, true, true,"test2"];
terrlow = player addaction ["TerrainDetail Low", "instantviewdistance\scripts\viewdistancesettings.sqf",30,1, true, true,"test2"];
terrmid = player addaction ["TerrainDetail Medium", "instantviewdistance\scripts\viewdistancesettings.sqf",40,1, true, true,"test2"];
terrhigh = player addaction ["TerrainDetail High", "instantviewdistance\scripts\viewdistancesettings.sqf",50,1, true, true,"test2"];
finished = player addaction ["ViewDistance Finished", "instantviewdistance\scripts\settingsfinished.sqf",80,1, true, true, "test2"];
player addEventHandler ["killed",{[_this] execVM "instantviewdistance\scripts\settingsfinished.sqf";}];
( viewdistancesettings.sqf ) _var = _this select 3;
hint format["%1",_varar];
if(_vara == 1 and varb == 0) then
{
setViewDistance (vdist+100);
vdist = vdist+100;
hint format["ViewDistance %1",vdist]
};
if(_var == 10) then {setViewDistance vdist+100;vdist = vdist+100;hint format["View Distance set to %1m",vdist]};
if(_var == 20) then {setViewDistance vdist-100;vdist = vdist-100;hint format["View Distance set to %1m",vdist]};
if(_var == 30) then {setterraingrid 50;hint "Terrain Detail set to Low"};
if(_var == 40) then {setterraingrid 25;hint "Terrain Detail set to Medium"};
if(_var == 50) then {setterraingrid 12.5;hint "Terrain Detail set to High"};
if(_var == 60) then {avdist = avdist+100;hint format["Aircraft View Distance set to %1m",avdist]};
if(_var == 70) then {avdist = avdist-100;hint format["Aircraft View Distance set to %1m",avdist]};
//tgrid=50;
//vdist=900;
If anyone can help me, What do I need to add/subtract from either/all of these scripts to make the menu show up every time you die? As I said, right now the menu is there at start of game and some times you die once it disapears, some times you die 3 times b4 it disapears, some times 5 times. But it always disapears right now as codes are and you have to exit the game and rejoin to get the menu back. PLEASE HELP, Thanx Robert.