Jump to content
  • 0

Anti glitch wall


Ghostman

Question

8 answers to this question

Recommended Posts

  • 0
1 minute ago, A Man said:

@Ghostman can you show us your solution? I have the same problem perhaps I can implement your solution.

try use it in deploybike.sqf if you use Deploy Anything

Spoiler

private ["_finished","_finishedTime","_posplr","_dirplr","_object"];

_plots = nearestObjects [[player] call FNC_getPos, ["Plastic_Pole_EP1_DZ"],(DZE_PlotPole select 0)];
//if (count _plots > 0) exitWith { "You cannot deploy a bike on Plot Pole!" call dayz_rollingMessages; };
if (count _plots > 0) exitWith { cutText ["You cannot deploy a bike on Plot Pole!","PLAIN DOWN"]; };

if (player getVariable["inCombat",false]) then {
    cutText [format["You are in Combat and cannot build a bike."], "PLAIN DOWN"];
} else {
    player removeAction s_player_deploybike;
    
    closeDialog 602;
    player playActionNow "Medic";
    [player,"repair",0,false,10] call dayz_zombieSpeak;
    [player,10,true,(getPosATL player)] spawn player_alertZombies;

    r_interrupt = false;
    r_doLoop = true;

    _finished = false;
    _finishedTime = diag_tickTime+3;

    while {r_doLoop} do {
        if (diag_tickTime >= _finishedTime) then {
            r_doLoop = false;
            _finished = true;
        };
        if (r_interrupt) then {
            r_doLoop = false;
        };
        uiSleep 0.1;
    };

    if (_finished) then {
        _posplr = [((getPos player) select 0) + 2, ((getPos player) select 1) + 2, 0];
        _dirplr = getDir player;
        player removeWeapon "ItemToolbox";

        _object = "Old_bike_TK_CIV_EP1" createVehicle (_posplr);
        _object setVariable ["ObjectID", "1", true];
        _object setVariable ["ObjectUID", "1", true];
        _object setVariable ["SpawnedBike",1,true];
        _object setVariable ["mission",1,true];
        _object call fnc_veh_ResetEH;
        PVDZE_veh_Init = _object;
        publicVariable "PVDZE_veh_Init";

        player reveal _object;

        cutText [format["You've used your toolbox to build a bike! How magical!"], "PLAIN DOWN"];
        uiSleep 10;
        cutText [format["Warning: Spawned Bikes DO NOT SAVE after server restart!"], "PLAIN DOWN"];
    } else {
        r_interrupt = false;
        player switchMove "";
        player playActionNow "stop";
        cutText ["\n\nCanceled building a bike.", "PLAIN DOWN"];
    };
};

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...