Jump to content

MG-Maximus

Member
  • Posts

    128
  • Joined

  • Last visited

Posts posted by MG-Maximus

  1.  

    Great script !

     

    Is there a way to get this working with the gems sell?

    Like ["ArmoredSUV_PMC_DZ",2] 83 [1,"ItemRuby",1] [7,"ItemBriefcase100oz",1] 0 479 trade_any_vehicle_old

     

    The other all show up great but the vehicles in the database with " trade_any_vehicle_old " don't show the option to press F5.

    Thx

     

     

    Add the following to your player_traderMenuConfig.sqf and player_traderMenuHive.sqf:

     

    find:

    if ((_item select 9) == "YOURFOLDERNAME\trade_any_vehicle_old.sqf") then {

     

    and change this to:

    if ((_item select 9) == "YOURFOLDERNAME\trade_any_vehicle.sqf" or (_item select 9) == "YOURFOLDERNAME\trade_any_vehicle_old.sqf") then {

     

    *change YOURFOLDERNAME to the location of the file (ie - custom\)

  2. I have actually started using this script along side the =BTC= Lift (which is awesome) instead of the logistics tow and lift because players were glitching through bases too easily. However, there are even a few issues with this one. I've looked at the previous posts but still cant seem to find a couple of answers to my questions.

     

    Ive got it working so that if u tow a vehicle it is locked, but if u tow a vehicle that has a key you can unlock it and get in,leaving it open to exploit into bases. Can anyone help me on a fix for this?

     

    And how do you get the colour option for the scoll menu? ( I tried the suggestion on a previous post but it wont work).

     

    Cheers

    Max

  3. Its great to see you're passionate about making a server man :). The best way to get this done is by learning from the information here on the forums. However, as you said this could be difficult due to your busy lives. You will need to establish a name for yourself in order to be successful, get a great (trustworthy) admin team together, and ways to communicate with your players (ie website, teamspeak?) and listen to their needs.

     

    I currently have a server running (hosted by verthosting) and its hard work indeed. It takes patience and time. If you ever need any help with scripts or general tips please dont hesitate to contact me.

     

    Wishing you a warm welcome to Dayz Epoch from us at mercsgaming :)

  4. Hi all.

    I was just wondering if anyone knows an easy way to add scripts to my server without affecting restart? Is it possible?

     

    At the moment, i try to stay up as late as possible when the server population is low or zero and then i can add them fine. However, as the server gets busier its hard to to do without affecting the restart time (it puts it out of synch - restarts too early). This is causing problems as a few players have complained that they lose gear because they dont log out in time.

     

    How do you add scripts? Shutdown the server? Anything possible while its live?

     

    Any feedback would be great :)

  5. i've done a completely fresh install on my test server to test this out without infistar installed and using your code from the pastebin and it does work and is showing the red orbs as expected so there is nothing wrong with the script.

     

    All i can think of is that one of your other scripts is interfering with this. I do remember having a similar problem before but i cant for the life of me remember how i fixed it. Are you sure the script is actually running and its just the 'orbs' not showing?

  6. No you dont need infistar to use the safezone script. I just tested it. If you're still having problems you can use my safezone.sqf as example and just edit as requred.

     

    Max

     

     

    /*


    by: http://infiSTAR.de || http://DayzAntiHack.com
    *updated on 08.08.2014

    Instructions:
    1. Copy paste this pastebin code into a file called SafeZone.sqf - save the file.
    2. Now extract your mpmission pbo and put the SafeZone.sqf into the extracted folder.
    3. Open the init.sqf of the mpmission.
    4. At the bottom of the file add
    [] execVM 'SafeZone.sqf';
    5. Save the init.sqf, repack your mpmission, upload it to your gameserver and restart your server
    */
    USE_CANBUILD = true; // if you don't want to define your own positions
    USE_TraderCity = true; // if you don't want to define your own positions (Epoch 1.0.5)
    USE_POSITIONS = true; // to use own positions and radius
    USE_AI_REMOVER = false; // use this to remove Missionbots (AI) within 100m of a player if the player is in a SafeZone
    USE_AntiSteal = true; // use this to block opening gear if another player is within 3m!
    USE_SPEEDLIMIT = false; // very secret function, nobody is supposed to find out what it does.
    SPEEDLIMIT = 20; // Only used if USE_SPEEDLIMIT is true.
    USE_SIGNS = true; // use this to build signs around the SafeZone
    LOG_EnterLeave = true; // This will log to your .rpt when a player enters or leaves a SafeZone! (only works with infiSTAR.de Admintools / AntiHack)
    /* You can use USE_CANBUILD or/and (works together) the custom positions below (USE_POSITIONS) [position or zone,radius] */
    _infiSZ =
    [
    [[6325.6772,7807.7412],150,true],
    [[4063.4226,11664.19],150,true],
    [[11447.472,11364.504],150,true],
    [[1606.6443,7803.5156],100,true],
    [[12944.227,12766.889],100,true]
    ];
    if (isServer) exitWith
    {
    if (USE_SIGNS) then
    {
    {
    _center = _x select 0;
    _radius = _x select 1;
    _lSign = _x select 2;
    if (_lSign) then
    {
    for '_i' from 0 to 360 step (270 / _radius)*2 do
    {
    _location = [(_center select 0) + ((cos _i) * _radius), (_center select 1) + ((sin _i) * _radius),0];
    _dir = ((_center select 0) - (_location select 0)) atan2 ((_center select 1) - (_location select 1));
    _object = createVehicle ['Sign_sphere100cm_EP1', _location, [], 0, 'CAN_COLLIDE'];
    // _object = createVehicle ['SignM_FARP_Winchester_EP1', _location, [], 0, 'CAN_COLLIDE'];
    // _object setVehicleInit 'this setObjectTexture [0,''Addons\SafeZones\sign.paa''];';
    _object setDir _dir;
    };
    };
    } forEach _infiSZ;
    };
    };
    waitUntil { !isNil 'dayz_animalCheck' };
    if (isNil 'inSafezone') then {inSafezone = false;};
    [_infiSZ] spawn {
    _infiSZ = _this select 0;
    _startSafeZone =
    {
    if (isNil 'outNow') then
    {
    _msg = 'You entered a Safe Zone! No Ramming or stealing! Read rules at www.mercsgaming.com';
    hint _msg;
    taskHint [_msg, [0,1,0,1], 'taskDone'];
    inNow = nil;
    outNow = true;

    if (LOG_EnterLeave) then
    {
    PVDZE_send = [player,'SafeZoneState',[1]];
    publicVariableServer 'PVDZE_send';
    };
    };
    player_fired2 = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\player_fired.sqf';
    player_fired = {
    _this call player_fired2;
    deleteVehicle (nearestObject [_this select 0,_this select 4]);
    cutText ['You can not fire in a SafeZone!','WHITE IN'];
    };
    fnc_usec_damageHandler = {};
    player removeAllEventHandlers 'handleDamage';
    player addEventHandler ['handleDamage', {false}];
    player allowDamage false;
    _veh = vehicle player;
    if (player != _veh) then
    {
    _szs = _veh getVariable ['inSafeZone',0];
    if (_szs == 0) then
    {
    _veh removeAllEventHandlers 'Fired';
    _veh addEventHandler ['Fired', {_this call player_fired;}];
    {
    _x removeAllEventHandlers 'Fired';
    _x addEventHandler ['Fired', {_this call player_fired;}];
    } forEach (crew _veh);
    _veh setVariable ['inSafeZone', 1, true];
    _veh removeAllEventHandlers 'HandleDamage';
    _veh addEventHandler ['HandleDamage', {false}];
    _veh allowDamage false;
    };
    };

    _cwep = currentWeapon player;
    if (_cwep in ['MAAWS']) then
    {
    _swep = '';
    {
    if ((getNumber (configFile >> 'CfgWeapons' >> _x >> 'Type')) == 2) exitWith
    {
    _swep = _x;
    };
    } forEach (weapons player);
    if (_swep == '') then
    {
    player playActionNow 'PutDown';
    _iPos = getPosATL player;
    _radius = 1;
    _removed = ([player,_cwep,1] call BIS_fnc_invRemove);
    if (_removed == 1) then
    {
    _item = createVehicle ['WeaponHolder', _iPos, [], _radius, 'CAN_COLLIDE'];
    _item addWeaponCargoGlobal [_cwep,1];
    };
    }
    else
    {
    player selectweapon _swep;
    };
    };
    if (isNil 'oR3F_TIRED_FNCT_Voile_Noir') then {oR3F_TIRED_FNCT_Voile_Noir = R3F_TIRED_FNCT_Voile_Noir;};
    if (isNil 'oR3F_TIRED_FNCT_DoBlackVanish') then {oR3F_TIRED_FNCT_DoBlackVanish = R3F_TIRED_FNCT_DoBlackVanish;};
    R3F_TIRED_FNCT_Voile_Noir = {};
    R3F_TIRED_FNCT_DoBlackVanish = {};
    };
    _endSafeZone =
    {
    if (isNil 'inNow') then
    {
    if (str fnc_usec_damageHandler == '{}') then
    {
    _msg = 'You left the Safe Zone. Have a nice day!';
    hint _msg;
    taskHint [_msg, [1,0,0.1,1], 'taskFailed'];
    };
    inNow = true;
    outNow = nil;

    if (LOG_EnterLeave) then
    {
    PVDZE_send = [player,'SafeZoneState',[0]];
    publicVariableServer 'PVDZE_send';
    };
    };
    player_fired = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\player_fired.sqf';
    player_zombieCheck = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\player_zombieCheck.sqf';
    fnc_usec_unconscious = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\fn_unconscious.sqf';
    object_monitorGear = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\object_monitorGear.sqf';

    _veh = vehicle player;
    if (player != _veh) then
    {
    _szs = _veh getVariable ['inSafeZone',0];
    if (_szs == 1) then
    {
    _veh setVariable ['inSafeZone', 0, true];
    _veh removeAllEventHandlers 'HandleDamage';
    _veh addeventhandler ['HandleDamage',{ _this call vehicle_handleDamage } ];
    _veh allowDamage true;
    };
    };

    _end = false;
    if (isNil 'gmadmin') then
    {
    _end = true;
    }
    else
    {
    if (gmadmin == 0) then
    {
    _end = true;
    };
    };
    if (_end) then
    {
    player allowDamage true;
    fnc_usec_damageHandler = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\fn_damageHandler.sqf';
    player removeAllEventHandlers 'HandleDamage';
    player addeventhandler ['HandleDamage',{_this call fnc_usec_damageHandler;} ];
    };
    if (!isNil 'oR3F_TIRED_FNCT_Voile_Noir') then {R3F_TIRED_FNCT_Voile_Noir = oR3F_TIRED_FNCT_Voile_Noir;};
    if (!isNil 'oR3F_TIRED_FNCT_DoBlackVanish') then {R3F_TIRED_FNCT_DoBlackVanish = oR3F_TIRED_FNCT_DoBlackVanish;};
    };
    while {1 == 1} do
    {
    _state = false;
    _obj = vehicle player;

    if (isNil 'inSafeZone') then { inSafeZone = false; } else { if (typename inSafeZone != 'BOOL') then { inSafeZone = false; }; };
    if (isNil 'canbuild') then { canbuild = true; } else { if (typename canbuild != 'BOOL') then { canbuild = true; }; };
    if (isNil 'USE_POSITIONS') then { USE_POSITIONS = false; } else { if (typename USE_POSITIONS != 'BOOL') then { USE_POSITIONS = false; }; };
    if (isNil 'USE_CANBUILD') then { USE_CANBUILD = true; } else { if (typename USE_CANBUILD != 'BOOL') then { USE_CANBUILD = true; }; };
    if (isNil 'USE_TraderCity') then { USE_TraderCity = true; } else { if (typename USE_TraderCity != 'BOOL') then { USE_TraderCity = true; }; };
    if (USE_POSITIONS) then
    {
    {
    _z = _x select 0;
    _r = _x select 1;
    if (_obj distance _z < _r) exitWith {_state = true;};
    } forEach _infiSZ;
    };
    if (USE_CANBUILD) then
    {
    if (!canbuild) then {_state = true;};
    };
    if (USE_TraderCity) then
    {
    if (isInTraderCity) then {_state = true;};
    };
    if (_state) then
    {
    inSafeZone = true;
    call _startSafeZone;
    {
    if (!isNull _x) then
    {
    if !(isPlayer _x) then
    {
    deletevehicle _x;
    };
    };
    } forEach (_obj nearEntities ['zZombie_Base',15]);

    if (isNil 'USE_AI_REMOVER') then { USE_AI_REMOVER = false; } else { if (typename USE_AI_REMOVER != 'BOOL') then { USE_AI_REMOVER = false; }; };
    if (USE_AI_REMOVER) then
    {
    {
    if ((!isNull group _x) && (getPlayerUID _x == '')) then
    {
    deleteVehicle _x;
    };
    } forEach (player nearEntities ['Man',100]);
    };
    }
    else
    {
    inSafeZone = false;
    };
    uiSleep 2;
    if (!inSafeZone) then
    {
    call _endSafeZone;
    };
    };
    };
    if ((USE_AntiSteal) || (USE_SPEEDLIMIT)) then
    {
    [] spawn {
    _USE_AntiSteal = USE_AntiSteal;
    _USE_SPEEDLIMIT = USE_SPEEDLIMIT;
    _speedlimit = SPEEDLIMIT;
    while {1 == 1} do
    {
    if (inSafezone) then
    {
    if (_USE_AntiSteal) then
    {
    _cnt = {isPlayer _x && _x != player} count (player nearEntities [['CAManBase'], 3]);
    if ((_cnt > 0) && (!isNull (findDisplay 106))) then
    {
    (findDisplay 106) closedisplay 0;
    closeDialog 0;
    _log = format['%1 You are not allowed to open Gear while near another player!',name player];
    cutText [_log,'PLAIN'];
    hint _log;
    };
    };
    if (_USE_SPEEDLIMIT) then
    {
    _obj = vehicle player;
    if !(_obj isKindOf 'Plane') then
    {
    _speed = abs speed _obj;
    if ((_obj != player) && (_speed > _speedlimit)) then
    {
    _vel = velocity _obj;
    _x = 0.8;
    if (_speed > 50) then {_x = 0.1;};
    _velNew = [(_vel select 0) * _x, (_vel select 1) * _x,(_vel select 2) * _x];
    _obj SetVelocity _velNew;
    };
    };
    };
    }
    else
    {
    uiSleep 2;
    };
    uiSleep 0.1;
    };
    };
    };

  7. Other relevant scripts that could be useful for this would be DZMS, WAI, Handcuff scripts and prison buildings. My idea would be that if say u don't get away in time, the police will arrest u and put u in a prison (handcuffed) and a teammate must break u out of jail. Also, it would probably be possible to have police car chases and roaming helis.. like I said.. lots of potential.

    On the other hand, one of my admins stated 'this isn't payday 2' xD

     

    max

  8. well I've been tweaking this again and see a lot of potential and its quite easy to customise. Not sure if I'm doing it right but to get the item positions I just a new editor map, add in the bank, and add npcs around the bank area and have put 2 police cars in. Then saved the file and copied the coordinates from the mission.sqf into the ai.sqf.

     

    Here is an example of the way I've added a police car:

    _object = createVehicle ["policecar", [6978.8037, 7655.5488, -0.043676388], [], 0, "CAN_COLLIDE"];

    _object setvariable ["objectID, "1", true];

    _object setvariable ["objectUID", "1", true];

    _object setDir -4.3177242;

     

    this will spawn the police car and sets its direction, adds id to database so that it doesn't disappear straight away (it will despawn on restart). Had to also add policecar to custom variables.sqf.

     

    max

  9. nice caesium.

    I'm trying to learn as much as possible with scripts but I wouldn't even know how to begin testing this.

     

    What about running an animation like player playActionNow "PutDown"; (the one from trading) and put it in a loop until the police arrive and if you move it cancels the robbery?

     

    A quick solution would be to have police arrive as soon as successful and just make them tougher to deal with.

     

    Been playing about with this bank script but now my head hurts XD

  10. ahh does broke mean lost?

     

    An idea I thought was maybe to fix the bug of running away while it counts down would be to lock the player in place (make them static?) when robbing the bank?

     

    Or maybe play the vanilla animation like when u trade? so that if u move u cancel the action of robbing the bank?

     

    or maybe the countdown stops if leave the specified area?

×
×
  • Create New...