Jump to content

Brian Soanes

Member
  • Posts

    494
  • Joined

  • Last visited

  • Days Won

    11

Posts posted by Brian Soanes

  1. And is there an option already in to turn of the rpt logging server side ?

     

    in your startup parameters, add

    -nologs
    

    It won't stop logging in A2, but it cuts down a lot of the rpt, we found it improves performance *slightly* 

    If you have errors in your rpt, the issues will be causing poor server fps, reducing logging won't fix bad scripts.

  2. Someone gave me an idea to just readd them back to the inventory if you move and cancel the script, however even using your fix it isn't removing the items from the inventory soon enough, once the car is attached to the player if you open your inventory they are still in the inventory. I guess I'll try and play around with where that remove items actually belongs.

     

    I would suggest then that you should re-write the spawn script as it is getting to the point of being overly complicated and any fixes added will compound other issues.

  3. It doesnt matter because you can move the toolbox to your backpack and still build the vehicle, so that check doesn't even work. it simply makes sure you have it at the time you select it on your scroll wheel but nothing stops you from deploying it once it's attached to your player.

     

     

    This will fix it, by removing the parts earlier in the script

     

    if !(isNil "isDangerDeploying")exitWith{
        titleText["Already deploying something ...","PLAIN DOWN"];
    };
    isDangerDeploying = true;
     
    deploybike = false; //or whatever you would like to call this variable ;)
     
    _weapons = [currentWeapon player] + (weapons player) + (magazines player);
     
    closeDialog 0;
     
    _toolbox = "ItemToolbox" in _weapons;
     
    if (!_toolbox) then {
    cutText [format["Missing Toolbox"], "PLAIN DOWN"];
    } else {
    cutText ["\n\nPRESS SPACEBAR TO DEPLOY", "PLAIN DOWN"];
    _Offset = [0,5,0]; //change how far from player vehicle spawns
    _worldPos = player modelToWorld _Offset; // spawn in front of player
    _object = "350z_ruben" createVehicle (_worldPos);
    _object setVariable ["ObjectID", "1", true];
    _object setVariable ["ObjectUID", "1", true];
    _object attachTo [player,[-0.2, 5, 1]];
     
    waitUntil {deploybike};
    _object setVariable ["Deployed", "1", true];
     
    //moved removal of required parts here to prevent abuse
    player removeWeapon "ItemToolbox";
    player removeMagazine "PartEngine";
    player removeMagazine "PartGeneric";
     
    player playActionNow "Medic";
    cutText ["\n\nDeploying vehicle. Move from current position to cancel", "PLAIN DOWN"];
     
    [1,1] call dayz_HungerThirst;
    player playActionNow "Medic";
     
    [player,"repair",0,false] call dayz_zombieSpeak;
    [player,50,true,(getPosATL player)] spawn player_alertZombies;
     
    r_interrupt = false;
    _animState = animationState player;
    r_doLoop = true;
    _started = false;
    _finished = false;
     
    while {r_doLoop} do {
    _animState = animationState player;
    _isMedic = ["medic",_animState] call fnc_inString;
    if (_isMedic) then {
    _started = true;
    };
    if (_started and !_isMedic) then {
    r_doLoop = false;
    _finished = true;
    };
    if (r_interrupt) then {
    r_doLoop = false;
    };
    uiSleep 0.1;
    };
    r_doLoop = false;
     
    if (_finished) then {
     
    _dis=10;
    _sfx = "repair";
    [player,_sfx,0,false,_dis] call dayz_zombieSpeak;
    [player,_dis,true,(getPosATL player)] spawn player_alertZombies;
     
    detach _object;
     
    cutText [format["Here's your 350z you lazy bum!"], "PLAIN DOWN"];
    r_interrupt = false;
    player switchMove "";
    player playActionNow "stop";
     
    uiSleep 10;
     
    _object addEventHandler ["GetIn",{
    _nil = [nil,(_this select 2),"loc",rTITLETEXT,"Warning: Spawned 350z DO NOT SAVE after server restart! ","PLAIN DOWN",5] call RE;
    }];
     
    } else {
    r_interrupt = false;
    player switchMove "";
    player playActionNow "stop";
            deleteVehicle _object;
    cutText ["\n\nCanceled deploying vehicle", "PLAIN DOWN"];
    };
    };
     
    isDangerDeploying = nil; 

  4. You can log it with this

    if (vehicle _playerObj != _playerObj) then {
    		_playerObj action ["eject", vehicle _playerObj];
    		_invehicle = true;
    		_playerObj setVariable["NORRN_unconscious",true, true];
    		_playerObj setVariable["unconsciousTime",300,true];
    		diag_log format["LOGOUT IN VEHICLE - GLITCHING?: %1 at location %2", _playerName,(getPosATL _playerObj)];
    		_hint = parseText format["<t align='center' color='#FF0033' shadow='2' size='1.75'>Vehicle Logger</t><br/><t align='center' color='#ffffff'>%1 Disconnected in a vehicle, may be base glitching</t>",_playerName];
    		customRemoteMessage = ['hint', _hint];
    		publicVariable "customRemoteMessage";
    	};
    
×
×
  • Create New...