Jump to content

Hooty

Member
  • Posts

    432
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by Hooty

  1. I got them all fixed thanks. Love it! I have noticed that my markers dont refresh, and if using a debug monitor the message only shows for a split second.

    So I changed the messages to this, they work perfect now.

    Spoiler

    _txt = "BattleField Kamenka secure the area and wait for the loot!";
    _colortask = [1,0,0,1];
    _tasktype = "taskNew";
    fnc_show_colorMiddleMsg = [_txt,_colortask,_tasktype];
    publicVariable 'fnc_show_colorMiddleMsg';

     

  2. Quote

    That is odd.  It is still working on my server.  Also, I was under the impression "moveOut" was the same thing as ejecting, just without an animation.  Like I stated in my first post, it can take longer to eject players if the server hasn't restarted in a while, or has a lot of players online.  On my test server, it ejects players instantly.  On my live server, with 70 people online, it can take 10+ seconds.  Let me know if anyone has gotten this to work on their server.  Thanks.

    Works great for me except air vehicles atm not giving a para.  At low pop time on my sever its pretty quick and high pop 50-60 players it does take longer, that's to be expected though. 

  3. Ok I've added this _countplayers to my private.

    So it looks like 

    Spoiler

    private ["_loot","_ObjVault","_ObjSign","_countplayers","_aiGroup"];

    This 

    Spoiler

    if (_countplayers > 1) exitWith { cutText [format["Cannot perform this action if a player or zombie is within 5m!"], "PLAIN DOWN"]; };

    Under

    Spoiler

    if(script_in_progress)exitwith{
            systemChat "This script is only useable once (untill restart)!";
    };

    It has prevented robbing the bank at the same time with another player.

    Cant seem to get the only once per restart to work. It only does it for that player that has already robbed the bank. Once they relog they are able to rob again.

    Here is what my robbank.sqf looks like

    Spoiler

    //------------>CREDITS<----------------
    //Halvhjearne 
    //Spodermayt
    //Coco-Nuts
    //-------------------------------------


    private ["_loot","_ObjVault","_ObjSign","_countplayers"];


    // Checks if script is active, thanks Halvhjearne <3
    if(isNil "script_in_progress")then{
            script_in_progress = false;
    };
     
    if(script_in_progress)exitwith{
            systemChat "This script is only useable once (untill restart)!";
    };

    if (_countplayers > 1) exitWith { cutText [format["Cannot perform this action if a player or zombie is within 5m!"], "PLAIN DOWN"]; };

    script_in_progress = true;
    // End Checks if Script is active

        [nil,nil,rTitleText,"The Bank is getting robbed!", "PLAIN",6] call RE;
        systemChat "You are robbing the bank! Police and Players have been alerted.";
        sleep 2;
        systemChat "You will got the money in 5 minutes !";
        sleep 2;
        
        //Spawn red sign arrow to show where the vault will appear
        if (true) then
       {
       sleep 10;
       systemChat "The Vault will be at the same location of the red arrow...";
       _ObjSign = createVehicle ["Sign_arrow_down_large_EP1", [7021.36,7637.97,1.350], [], 0, "CAN_COLLIDE"];
       sleep 10;
       deleteVehicle _ObjSign;
       };
        sleep 10;
        cutText [format["4 minutes left..."], "PLAIN DOWN"];
        systemChat "4 minutes left...";
        sleep 60;
        cutText [format["3 minutes left..."], "PLAIN DOWN"];
        systemChat "3 minutes left...";
        sleep 60;
        cutText [format["2 minutes left..."], "PLAIN DOWN"];
        systemChat "2 minutes left...";
        sleep 60;
        cutText [format["1 minute left..."], "PLAIN DOWN"];
        systemChat "1 minute left...";
        sleep 60;
        execVM "rob\ai.sqf";  //Spawn AI
        cutText [format["The Vault is spawning."], "PLAIN DOWN"];
        sleep 5;
        _robComplete = 1;
        
        
    if (_robComplete == 1) then {

        _loot=floor(random 6);
            if (_loot == 0) then {
                systemChat "The bank robbery is over!";
                [nil,nil,rTitleText,"The bank robbery is over!", "PLAIN",6] call RE;
                
            if (true) then {
            _ObjVault = objNull;
            _ObjVault = createVehicle ["VaultStorage", [7021.36,7637.97,0.409], [], 0, "CAN_COLLIDE"];
            _ObjVault setPos [7021.36,7637.97,0.409];  
            _ObjVault setDir 70;
            clearWeaponCargoGlobal _ObjVault;
            clearMagazineCargoGlobal _ObjVault;

            _ObjVault addMagazineCargoGlobal ["ItemBriefcase100oz",5];
            _ObjVault setVariable ["ObjectID","1",true];
            _ObjVault setVariable ["permaLoot",true,true];
              
            sleep 1800;
            deleteVehicle _ObjVault;          
              
             };
            };
            if (_loot == 1) then {
                systemChat "The bank robbery is over!!";
                [nil,nil,rTitleText,"The bank robbery is over!!", "PLAIN",6] call RE;
                
                if (true) then {
            _ObjVault = objNull;
            _ObjVault = createVehicle ["VaultStorage", [7021.36,7637.97,0.409], [], 0, "CAN_COLLIDE"];
            _ObjVault setPos [7021.36,7637.97,0.409];  
            _ObjVault setDir 70;
            clearWeaponCargoGlobal _ObjVault;
            clearMagazineCargoGlobal _ObjVault;

            _ObjVault addMagazineCargoGlobal ["ItemBriefcase100oz",6];
            _ObjVault setVariable ["ObjectID","1",true];
            _ObjVault setVariable ["permaLoot",true,true];
              
            sleep 1800;
            deleteVehicle _ObjVault;          
              
             };
            };    
            if (_loot == 2) then {
                systemChat "The bank robbery is over!!";
                [nil,nil,rTitleText,"The bank robbery is over!!", "PLAIN",6] call RE;
                
                if (true) then {
            _ObjVault = objNull;
            _ObjVault = createVehicle ["VaultStorage", [7021.36,7637.97,0.409], [], 0, "CAN_COLLIDE"];
            _ObjVault setPos [7021.36,7637.97,0.409];  
            _ObjVault setDir 70;
            clearWeaponCargoGlobal _ObjVault;
            clearMagazineCargoGlobal _ObjVault;

            _ObjVault addMagazineCargoGlobal ["ItemBriefcase100oz",8];
            _ObjVault setVariable ["ObjectID","1",true];
            _ObjVault setVariable ["permaLoot",true,true];
              
            sleep 1800;
            deleteVehicle _ObjVault;          
              
             };
            };
            if (_loot == 3) then {
                systemChat "The bank robbery is over!!";
                [nil,nil,rTitleText,"The bank robbery is over!!", "PLAIN",6] call RE;
                
                if (true) then {
            _ObjVault = objNull;
            _ObjVault = createVehicle ["VaultStorage", [7021.36,7637.97,0.409], [], 0, "CAN_COLLIDE"];
            _ObjVault setPos [7021.36,7637.97,0.409];  
            _ObjVault setDir 70;
            clearWeaponCargoGlobal _ObjVault;
            clearMagazineCargoGlobal _ObjVault;

            _ObjVault addMagazineCargoGlobal ["ItemBriefcase100oz",7];
            _ObjVault setVariable ["ObjectID","1",true];
            _ObjVault setVariable ["permaLoot",true,true];
              
            sleep 1800;
            deleteVehicle _ObjVault;          
              
             };
            };        
            if (_loot == 4) then {
                systemChat "The bank robbery is over!!";
                [nil,nil,rTitleText,"The bank robbery is over!!", "PLAIN",6] call RE;
                
                if (true) then {
            _ObjVault = objNull;
            _ObjVault = createVehicle ["VaultStorage", [7021.36,7637.97,0.409], [], 0, "CAN_COLLIDE"];
            _ObjVault setPos [7021.36,7637.97,0.409];  
            _ObjVault setDir 70;
            clearWeaponCargoGlobal _ObjVault;
            clearMagazineCargoGlobal _ObjVault;

            _ObjVault addMagazineCargoGlobal ["ItemBriefcase100oz",9];
            _ObjVault setVariable ["ObjectID","1",true];
            _ObjVault setVariable ["permaLoot",true,true];
              
            sleep 1800;
            deleteVehicle _ObjVault;          
              
             };
            };
            if (_loot == 5) then {
                cutText [format["Jack.. Jack.. Pot!!"], "PLAIN DOWN"];
                systemChat "The bank lost everything during the robbery !";
                [nil,nil,rTitleText,"The bank lost everything during the robbery, JACK POT !", "PLAIN",6] call RE;
                
                if (true) then {
            _ObjVault = objNull;
            _ObjVault = createVehicle ["VaultStorage", [7021.36,7637.97,0.409], [], 0, "CAN_COLLIDE"];
            _ObjVault setPos [7021.36,7637.97,0.409];  
            _ObjVault setDir 70;
            clearWeaponCargoGlobal _ObjVault;
            clearMagazineCargoGlobal _ObjVault;

            _ObjVault addMagazineCargoGlobal ["ItemBriefcase100oz",15];
            _ObjVault setVariable ["ObjectID","1",true];
            _ObjVault setVariable ["permaLoot",true,true];
              
            sleep 1800;
            deleteVehicle _ObjVault;          
              
             };
            };
        };
        
        

     

    If anyone knows how to fix please share. I'll keep working on this as well and update.

  4. Here is my hemp.sqf aswell. Warning for mature.

    Spoiler

    private ["_inVehicle","_vehicle","_gearmenu","_playerPos","_nearWeed","_weed","_countplayers","_objectID","_objectUID"];
    _playerPos = getPosATL player;
    _hempqty = {_x == "ItemKiloHemp"} count magazines player;
    _nearWeed = count nearestObjects [_playerPos, ["fiberplant"], 4] > 0;
    _weed = nearestObject [player, "fiberplant"];
    _countplayers = count nearestObjects [player, ["CAManBase"], 5];
    _vehicle = vehicle player;
    _inVehicle = (_vehicle != player);

    if (_inVehicle) exitWith {
     cutText [format["Nah dude, get your ass out and harvest pussy!!"], "PLAIN DOWN"]; 
     };

    //prevent same plant at same time with multi players

    if (_countplayers > 1) exitWith { cutText [format["Cannot perform this action if a some bitch is within 5 metres!"], "PLAIN DOWN"]; };

    if !(_nearWeed) exitWith {
        cutText [format["Gotta get closer to gather the Kush bro."], "PLAIN DOWN"];
    };

    //prevent macro dupe set 0
    if (_hempqty > 0) exitWith { 
        cutText [format["WARNING: %1, You have maximum amount of weed in your inventory! Stash it in your bag. Hurry Fucker!!! ;)", name player], "PLAIN DOWN"];
    };
    if (dayz_combat == 1) then { 
        cutText [format["You are in Combat and Cannot Gather the Kush."], "PLAIN DOWN"];
    } else {
        disableSerialization;
        _gearmenu = FindDisplay 106;
        _gearmenu CloseDisplay 106;
        r_interrupt = false;
        _objectID = _weed getVariable["ObjectID","0"];
        _objectUID = _weed getVariable["ObjectUID","0"];
        deleteVehicle _weed;
        [_objectID,_objectUID] call server_deleteObj;
        _weed setDamage 1;
        player addMagazine "ItemKiloHemp";
        sleep 2;
        cutText [format["You've Gathered Some Of That Fuck You Up Stupid Slap Yo Granny Kush! Smoke that shit or sell it at the Risky Ass Gem Trader !!"], "PLAIN DOWN"];    
    };

     

  5. Copy and replace hemp.sqf. Don't know if anyone else has fixed the dupes but i did. Players removing plant at same time. Macro Dupe As well as multi click on same plant untill it is harvested.

     

    Spoiler

    private ["_gearmenu","_playerPos","_nearWeed","_weed","_countplayers","_objectID","_objectUID"];
    _playerPos = getPosATL player;
    _hempqty = {_x == "ItemKiloHemp"} count magazines player;
    _nearWeed = count nearestObjects [_playerPos, ["fiberplant"], 4] > 0;
    _weed = nearestObject [player, "fiberplant"];
    _countplayers = count nearestObjects [player, ["CAManBase"], 15];
    if (_countplayers > 1) exitWith { cutText [format["Cannot perform this action if a player or zombie is within 15 metres!"], "PLAIN DOWN"]; };

    if !(_nearWeed) exitWith {
        cutText [format["You need to be near the good shit in order to gather the Kush bro."], "PLAIN DOWN"];
    };
    if (_hempqty > 0) exitWith { 
        cutText [format["WARNING: %1, You have maximum amount of weed in your inventory! Stash it in your bag. Hurry!!! ;)", name player], "PLAIN DOWN"];
    };
    if (dayz_combat == 1) then { 
        cutText [format["You are in Combat and Cannot Gather the Kush."], "PLAIN DOWN"];
    } else {
        disableSerialization;
        _gearmenu = FindDisplay 106;
        _gearmenu CloseDisplay 106;
        r_interrupt = false;
        _objectID = _weed getVariable["ObjectID","0"];
        _objectUID = _weed getVariable["ObjectUID","0"];
        deleteVehicle _weed;
        [_objectID,_objectUID] call server_deleteObj;
        _weed setDamage 1;
        player addMagazine "ItemKiloHemp";
        sleep 2;
        cutText [format["You got the weed!!"], "PLAIN DOWN"];    
    };

     

  6. Thank you very much works Great!!! I have the advanced set up for my missions just could not figure out how to make custom crates with the editor. Working on a weaponstash.sqf  since i had to do away with my ai island to increase fps.

    Thanks again!

     

    P.s

    If i leave out the clear section will it just add weapons to the box?

    clearweaponcargoGlobal _this;
    			clearmagazinecargoGlobal _this;
  7. So i would take this

    Spoiler

    _vehicle_213 = objNull;
    if (true) then
    {
      _this = createVehicle ["RULaunchersBox", [2065.8647, 5222.1279, -4.5776367e-005], [], 0, "CAN_COLLIDE"];
      _vehicle_213 = _this;
      _this setDir -15.726418;
      _this setPos [2065.8647, 5222.1279, -4.5776367e-005];
      _this setVariable ["permaLoot",true];
    };

    and change it to this

    Spoiler

    _crate1 = objNull;

                        _vehicle_213 = objNull;
                       if (true) then
                       {
                      _this = createVehicle ["RULaunchersBox", [2065.8647, 5222.1279, -4.5776367e-005], [], 0, "CAN_COLLIDE"];
                      _crate1 = _this;
                      _this setDir -15.726418;
                    clearWeaponCargoGlobal _crate1;
                     clearMagazineCargoGlobal _crate1;  
                    _crate1 addWeaponCargoGlobal ["ItemToolbox", 2];
                    _crate1 addWeaponCargoGlobal ["ItemSledge", 1];
                    _crate1 addWeaponCargoGlobal ["ItemShovel", 1];    
                    _crate1 addWeaponCargoGlobal ["M24_des_EP1", 2];
                    _crate1 addWeaponCargoGlobal ["SCAR_H_LNG_Sniper", 1];
                    _crate1 addmagazinecargoglobal ["bulk_ItemWire",2];
                    _crate1 addmagazinecargoglobal ["ItemAntibiotic",2];
                    _crate1 addmagazinecargoglobal ["ItemBriefcase100oz",1];
                    _crate1 addmagazinecargoglobal ["forest_large_net_kit",2];
                    _crate1 addmagazinecargoglobal ["bulk_ItemSandbag",2];
                    _crate1 addmagazinecargoglobal ["CinderBlocks",10];
                    _crate1 addmagazinecargoglobal ["Skin_GUE_Commander_DZ",1];
                    _crate1 addmagazinecargoglobal ["20Rnd_762x51_B_SCAR",3];
                    _crate1 addmagazinecargoglobal ["20Rnd_762x51_DMR",3];

                    _this setVariable ["permaLoot",true];

    };

    Just change the items to my liking? Do I need to remove the permaloot?

×
×
  • Create New...