SolvedScript used to work but now doesnt

Posts 1–6 of 6 · Page 1 of 1
Script used to work but now doesnt
Well, I was using this little scroll menu I made on a server that had infiSTAR because my main menu was detected by it and it would flag me so I made it.

It used to work and I could actually use it, but now when I join the server its automatically flagged and I have to wait 4 hours for a restart.
I'm not sure what I added last but there's really not that much anyways. Would be sick if someone could help!

Code:
    [] spawn {
        hint parseText "<t font='puristaMedium' color='#40FF00' size='2'>Biggie's Menu</t><br/><t font='puristaMedium' color='#40FF00' size='1.5'>Loaded</t><br/>";
        sleep 0.1;
        call loadedmenu;
    };

    firstloaded = {
        removeAllActions player;
        call loadedmenu;
    };

    loadedmenu = {
        removeAllActions player;
        player addAction ["<t color='#40FF00'>Open Biggie's Menu</t>", {call openmenu}];
    };
            
    openmenu = {
        removeAllActions player;
        player addAction ["<t color='#40FF00'>Main Menu</t>", {call mainmenu}];
        player addAction ["<t color='#40FF00'>Altis Menu</t>", {call altismenu}];
        player addAction ["<t color='#40FF00'>Troll Menu</t>", {call trolledmenu}];
        player addAction ["<t color='#40FF00'>Spawn Menu</t>", {call spawnmenu}];
        player addAction ["<t color='#40FF00'>Close Menu</t>", {call closemenu}];
    };
    
    mainmenu = {
        removeAllActions player;
        player addAction ["<t color='#40FF00'>-Back-</t>", {call openmenu}];
        player addAction ["<t color='#E3E319'>Toggle pESP</t>", {call playesp}];
        player addAction ["<t color='#E3E319'>Toggle Vehicle God</t>", {call vehiclegod}];
        player addAction ["<t color='#E3E319'>Toggle Player God</t>", {call playergod}];
        player addAction ["<t color='#40FF00'>Close Menu</t>", {call closemenu}];
    };
    
    altismenu = {
        removeAllActions player;
        player addAction ["<t color='#40FF00'>-Back-</t>", {call openmenu}];
        player addAction ["<t color='#E3E319'>Unrestrain</t>", {call unrestrain}];
        player addAction ["<t color='#E3E319'>Unlock/Lock Vehicle</t>", {call lockveh}];
        player addAction ["<t color='#E3E319'>Sirens On</t>", {call sirenon}];
        player addAction ["<t color='#E3E319'>Sirens Off</t>", {call sirenoff}];
        player addAction ["<t color='#E3E319'>Give Money</t>", {call givemons}];
        player addAction ["<t color='#40FF00'>Close Menu</t>", {call closemenu}];
    };
    
    trolledmenu = {
        removeAllActions player;
        player addAction ["<t color='#40FF00'>-Back-</t>", {call openmenu}];
        player addAction ["<t color='#E3E319'>Goat Fuck</t>", {call goatfuck}];
        player addAction ["<t color='#40FF00'>Close Menu</t>", {call closemenu}];
    };
    
    spawnmenu = {
        removeAllActions player;
        player addAction ["<t color='#40FF00'>-Back-</t>", {call openmenu}];
        player addAction ["<t color='#E3E319'>Red Offroad</t>", {call redoffroad}];
        player addAction ["<t color='#E3E319'>Biggie's Loadout</t>", {call biggiesloadout}];
        player addAction ["<t color='#40FF00'>Close Menu</t>", {call closemenu}];
    };

    closemenu = {
        removeAllActions player;
        call loadedmenu;
    };

    //---------------------------------------//
    //            Altis Functions           //
    //--------------------------------------//

    unrestrain = {
        player setVariable["restrained",false,false];
    };
    
    givemons = {
        if (!isNil "life_inv_items") then {
            if (!isNil "life_no_injection") then {
                life_no_injection = true;
            };
            life_cash = life_cash + 1000000;
            if (!isNil "life_no_injection") then {
                life_no_injection = false;
            };
        } else {
            player setVariable ["cmoney", (player getVariable ["cmoney", 0]) + 5000, true];
        };
    };
    
    sirenon = {
        _vehiclesiren = vehicle player;
        _vehiclesiren getVariable "siren";
        _vehiclesiren setVariable["siren",true,true];
        [[_vehiclesiren],"life_fnc_copSiren",nil,true] spawn Life_fnc_MP;
        titleText ["Sirens On","PLAIN"];
    };
    
    sirenoff = {
        _vehiclesiren = vehicle player;
        _vehiclesiren getVariable "siren";
        _vehiclesiren setVariable["siren",false,false];
        [[_vehiclesiren],"life_fnc_copSiren",nil,false] spawn Life_fnc_MP;
        titleText ["Sirens Off","PLAIN"];
    };
    
    //---------------------------------------//
    //             Main Functions           //
    //--------------------------------------//

    playesp = {
        if(isNil "play_esp") then {
            play_esp = TRUE;
        } else {
            if!(play_esp) then {
                play_esp = TRUE;
            } else {
                play_esp = FALSE;
            };
        };

        if (play_esp) then {
            addMissionEventHandler ["Draw3D", {
                //onEachFrame {
                    {
                        if (player distance _x < 1000) then {
				            _pos = position _x;
				            _pos = [_pos select 0, _pos select 1, 2.6];
                            if(side _x != side player) then {
				                drawIcon3D ["", [1,0,0,1], _pos, .1, .1, 45, (format ["%2:%1m",floor (player distance _x), name _x]), 1, 0.03, "puristaMedium"]
				            } else {
				                drawIcon3D ["", [0,1,0,1], _pos, .1, .1, 45, (format ["%2:%1m",floor (player distance _x), name _x]), 1, 0.03, "puristaMedium"]
				            };
				        };
                    } foreach playableUnits;
                //};
            }];
        } else {
	       removeAllMissionEventHandlers "Draw3D";
        };
    };
    
    vehiclegod = {
        if(isNil "biggies_vehiclegod") then {
            biggies_vehiclegod = TRUE;
        } else {
            if!(biggies_vehiclegod) then {
                biggies_vehiclegod = TRUE;
            } else {
                biggies_vehiclegod = FALSE;
            };
        };
        while {biggies_vehiclegod} do {
            waitUntil {vehicle player != player};
            vehiclegod_vehicle = vehicle player;
            vehiclegod_vehicle removeAllEventHandlers "handleDamage";
            vehiclegod_vehicle addEventHandler["handleDamage", {false}];
            vehiclegod_vehicle allowDamage false;
            vehiclegod_vehicle setDamage 0;
            vehiclegod_vehicle setFuel 1;
            waitUntil {vehicle player == player};
            vehiclegod_vehicle removeAllEventHandlers "handleDamage";
            vehiclegod_vehicle addEventHandler["handleDamage", {true}];
            vehiclegod_vehicle allowDamage true;
        };
    };
    
    playergod = {
        if(isNil "biggies_playergod") then {
            biggies_playergod = TRUE;
        } else {
            if!(biggies_playergod) then {
                biggies_playergod = TRUE;
            } else {
                biggies_playergod = FALSE;
            };
        };
        if (biggies_playergod) then {
            player allowDamage false;
            player removeAllEventHandlers "handleDamage";
            player addEventHandler["HandleDamage", {false}];
            player setDamage 0;
        } else {
            player allowDamage true;
            player removeAllEventHandlers "handleDamage";
            player addEventHandler["HandleDamage", {true}];
            player setDamage 0;
        };
    };

    //---------------------------------------//
    //            Troll Functions           //
    //--------------------------------------//

    goatfuck = {
        _unit = _this select 0;
        _wPos = screenToWorld [0.5,0.5];
        _goatX = _wPos select 0;
        _goatY = _wPos select 1;
        _goatZ = _wPos select 2;
        _goatZ = _goatZ + .12;
        _wPos = [_goatX,_goatY,_goatZ];
        _localGroup = group _unit;
        _goat = group player createUnit ["Goat_random_F", Position player, [], 0, "FORM"];
        _goat setPosATL _wPos;
        player remotecontrol _goat;
        _goat switchcamera "INTERNAL";

        (findDisplay 46) displayAddEventHandler['KeyDown', 'if ((_this select 1) == 0x44) then {
            [] spawn {
                _goat disableAI "MOVE";
                player switchCamera "EXTERNAL";
            };
            true
        }'];
        _goat allowDamage false;
    };

    //---------------------------------------//
    //            Spawn Functions           //
    //--------------------------------------//

    redoffroad = {
        _vehicle = createVehicle ["I_G_Offroad_01_F",player modelToWorld [0,10,0],[],0,"CAN_COLLIDE"];
        _vehicle setDir (direction player - 90);
        _vehicle setVectorUp surfaceNormal position _vehicle;
        _vehicle setObjectTexture [0, "#(rgb,8,8,3)color(0.5,0,0,1)"];
    };
    
    biggiesloadout = {
        player addUniform "U_I_CombatUniform";
        player addVest "V_PlateCarrierGL_rgr";
        player addHeadgear "H_MilCap_dgtl";
        player addBackpack "B_Carryall_oli";
        player addWeapon "LMG_Zafir_pointer_F";
        player addItem "150Rnd_762x51_Box_Tracer";
        player addItem "150Rnd_762x51_Box_Tracer";
        player addItem "150Rnd_762x51_Box_Tracer";
        player addItem "150Rnd_762x51_Box_Tracer";
        player addItem "ItemGPS";
        player addItem "NVGoggles";
        player addItem "ToolKit";
    };
P.S. you can use if you want, I don't really care for it
since your code is so neat, let me take a look for ya, i will get back to you

EDIT: I had a look, it seems almost all the scripts you use could be detected due to the commands they use. I suggest taking scripts out until you have the bare minimum of what you require to play and then test in server, if your still detected, come back to us. If your undetected with a bare minimum then re-add scripts one by one until you find a set up that works for you.

Also, lets say infistar had seen this script prior to this, he could have detected a variable for example, and now that you have posted this online, he will almost definitely add a variable now. So change all your variables too.

Hope this helps
Quote Originally Posted by Jme View Post
since your code is so neat, let me take a look for ya, i will get back to you

EDIT: I had a look, it seems almost all the scripts you use could be detected due to the commands they use. I suggest taking scripts out until you have the bare minimum of what you require to play and then test in server, if your still detected, come back to us. If your undetected with a bare minimum then re-add scripts one by one until you find a set up that works for you.

Also, lets say infistar had seen this script prior to this, he could have detected a variable for example, and now that you have posted this online, he will almost definitely add a variable now. So change all your variables too.

Hope this helps
Okay, thanks! I'm going to just restart on it as it only took me like half an hour to make this, and maybe I'll find which script is being detected. I'll test each one individually.
Quote Originally Posted by SkruffysDB View Post
Okay, thanks! I'm going to just restart on it as it only took me like half an hour to make this, and maybe I'll find which script is being detected. I'll test each one individually.
Dont forget your variables.

Here is a pro tip, unless you want to code a function to change your variables each time the menu runs. It would be worth adding X1234_ before ALL your variables.

That way if you want to change them all again, you can do so in one go. By simply replacing all instances of X1234_ with X4321_
Quote Originally Posted by Jme View Post
Dont forget your variables.

Here is a pro tip, unless you want to code a function to change your variables each time the menu runs. It would be worth adding X1234_ before ALL your variables.

That way if you want to change them all again, you can do so in one go. By simply replacing all instances of X1234_ with X4321_
Yeah, I just learned the hard way . Thanks for the information. Little simple scroll menu is turning out pretty good for someone new to scripting
Quote Originally Posted by SkruffysDB View Post
Yeah, I just learned the hard way . Thanks for the information. Little simple scroll menu is turning out pretty good for someone new to scripting
Believe this is solved.
/Closed
Posts 1–6 of 6 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Talk with us