Jump to content

theduke

Member
  • Posts

    868
  • Joined

  • Last visited

  • Days Won

    27

Posts posted by theduke

  1. you didnt read far enough in that thread :P

    You will need to change the variable cashMoney

    _cash = _player getVariable ["cashMoney",0];

    to Z_MoneyVariable ... like so, WITHOUT the brackets

    _cash = _player getVariable [Z_MoneyVariable,0];

    and do this in all AI scripts you use it with

    although this will automatically give you the coins, like humanity. instead of having to check wallet. Its also random from 0 to 5k

  2. 47 minutes ago, salival said:

    @thedukeThere are checks in ZSC to stop this happening when you pick up coins. For some reason the coins amount is not a number sometimes or can be null.

    https://github.com/oiad/ZSC/blob/master/scripts/zsc/checkWallet.sqf#L16-L17

    I will admit this was an issue with 1051. I didnt test it with 1061, I went straight to my old method because players were used to it.  If it does become an issue for any reason, let me know and ill send it. Or you can try searching for it in the original WAI thread, but its probably buried somewhere lol

  3. @JasonTM I was poking through your files and noticed the config still contained most of the old classnames from 1051 for items and vehicles

    for example 30m_plot_kit is still there and it should be plot_pole_kit. same thing for the kamaz and other vehicles.

    I also didnt find 

    ai_hasMoney

    in the config.sqf

    Maybe you uploaded the wrong files?

  4. On 3/30/2017 at 11:43 PM, Birgitte said:

    So if I change this: 

     
    // 40 minutes = how long a player corpse stays on the map

    if (diag_tickTime - _deathTime > 40*60) then {

    to this:

     
    // 60 minutes = how long a player corpse stays on the map

    if (diag_tickTime - _deathTime > 60*60) then {

    I can increase the time to an hour?

    this is what i did since the corpse does not turn into bones anymore. Players havnt complained yet lol

  5. If you want Jason, I can send you my method for giving coins to players. Although i run PVE servers, this method might not be best for PVP servers

    When you kill an AI, you receive the coins automatically. No need to check wallet.  It gives you a random amount of between 0 and 5000.

    We had an issue with the check wallet in 1051 where it would give you the "null" option, then your character didnt save from there on out.

    this is what we did to prevent that and it worked well.

    Since we've always had it that way, we've kept it for this version of epoch as well.

    I've managed to get it working for all 3 scripts of AIs, DZAI, WAI and DZMS.

    It could always be a true or false config also if players choose not to use it.

    Anyways let me know if you want it :)

    Duke

  6. Ok so yes i've been trying to get the locked vehicles in god mode with gear and over the map...

    So i was trying way too hard to try to accomplish this lol

    Simply remove the check for plot pole, done lol

    if (locked _unit && (count(crew _unit)) == 0) exitWith {};

    I've tested this, and it works great even with gear (one weapon and one magazine)

    I was so overthinking it trying to use zupas old script haha

    Thx @BigEgg

  7. 10 hours ago, Corpulio_Hun said:

    hi,

    I have a big problem with VG. When the server have a lag (some player have always lag because dont have good pc), u multiple hit "get vehicle " button(u use makro button in mouse), then duplicate VG  the vehicle but multiple time. Only one key open ca 5-6 same time spawned vehicle.

    Someone have the solution? I need this quick! A half server player duplicate the vehicle :(

    Pls help me. Thx!

     

    Corpulio_Hun

    honestly the best solution for that is when you catch them, delete the extra vehicles, or ban them... always trying so hard to fix the issues shitheads like to take advantage of is a waste of effort and time. its easier to ban them.

    Thx @juandayz for the fix though.

    As for infistar number, if in the instructions

  8. well im back on this subject myself.   While i thank @BigEgg for his fix.  I still wanted to get zupas old script working. Zupas script allows for gear to be in in and also locked all over the map is in god mode. As i run pve servers, its easier for us rather than sitting and watching for trolls 24/7.

    Since we did the move to 1061, and havnt had locked vehicles in godmod all over the map, we've already had more than enough trolls blowing out tires on locked vehicles....

    So i FINALLY got zupas old script working. But i have a RPT issue that i cant get by.

    Im hoping someone can help me figure this out.

    if (_allFixed && !_totalDmg) then {_object setDamage 0;};>
    11:26:49   Error position: <!_totalDmg) then {_object setDamage 0;};>
    11:26:49   Error Generic error in expression
    11:26:49 File z\addons\dayz_server\compile\server_updateObject.sqf, line 133
    11:26:49 Error in expression

     

    these are zupas original files, but modified a bit for the new variables

    vehicle_handleDamage.sqf

    Spoiler

    private["_selection","_state","_strH","_total","_unit"];


    //***Zupa Config ****//


    _godmodeVechilesEverywhere = true; // Godmode on all locked vehicles
    _onlyLockedVehicles = false;         //Plotarea: Godmode for Only locked vehicles (true) or locked and unlocked(false)
    _onlyVehicleWithoutGear = false;     // Only godmode on vehicles that hold no gear.
    _safeZoneGodVehicle = true;         // Godmode vehicles in safezones. (or specific zone's)


    // donator plotpole only works with PLOT FOR LIFE, set FALSE if you dont have it.
    _donatorsPlots = false;             // True = only godmode vehicles for donaters in the list, False = godmode for every guy.
    _plotDonators = ["0","0"];             // PUID's of poeple who donated for plotpole


    // Chernarus safezone area's - change these to other coordinates for other maps. ( You can also add specific locations on the map.
    _safezones = [ 
        [[5070.75,9729.54],100,"Air"],
        [[1606.6443,7803.5156],100,"Bandit"],
        [[4063.4226,11664.19],100,"Bash"],
        [[12944.227,12766.889],100,"Hero"],
        [[11447.472,11364.504],100,"Klen"],
        [[6315.88,7791.3],100,"Stary"] // [[x,y],distance,"just name"]
    ];


    //***END Config ****//


    _unit = _this select 0;
    _selection = _this select 1;
    _total = _this select 2;
    _state = true;


    _HPBefore = -1;


    if (_selection != "") then {
    _strH = "hit_" + _selection;
    _HPBefore = [_unit,_strH] call object_getHit; 
    _totalDmg = false;

    } else {
    _strH = "totalDmg";
    _HPBefore = getDammage _unit;


    };


    if(_total > _HPBefore)then{


    if((locked _unit && _godmodeVechilesEverywhere  && (count (crew _unit)) < 1))then{_state = false;
    };


    if(_state)then{
    if(_safeZoneGodVehicle )then{
    {if ((_unit distance (_x select 0)) < (_x select 1)) then {_state = false;
    };} forEach _safezones;
    };
    };


    _totalDmg = true;

    if(_state)then{
    _gearCount = 0;
    if(_onlyVehicleWithoutGear)then{
    //_weaps = count(getWeaponCargo _unit);
    //_mags = count(getMagazineCargo _unit);
    //_backs = count(getBackpackCargo _unit);
    //_gearCount = _gearCount + _weaps + _mags + _backs;
    };
    _plots = nearestObjects [_unit, ["Plastic_Pole_EP1_DZ"], DZE_PlotPole select 0];    
    if((count(_plots) > 0))then{        
        _thePlot = _plots select 0;
        _plotOwner = _thePlot getVariable ["ownerPUID",0];
    if ( (_gearCount == 0) &&(locked _unit || !(_onlyLockedVehicles) ) && (count (crew _unit)) < 1 && (  !(_donatorsPlots) || (_plotOwner in _plotDonators))) then {_state = false;

    };
    };
    };

    }; //fix
    if(_state)then{


    if (_total >= 0.98) then {
            _total = 1.0;
    };


    if (local _unit) then {
    if (_total > 0) then {
            if (!_totalDmg) then {

    _unit setVariable [_strH, _total, true];
            };
    _unit setHit [_selection, _total];

            PVDZ_veh_Save = [_unit,"damage",false,_totalDmg];
            if (!isServer) then {
                publicVariableServer "PVDZ_veh_Save";
            } else {
                PVDZ_veh_Save call server_updateObject;
    };
    };
    } else {
    // vehicle is not local to this client, ask the client which vehicle is local to set damage
    /* PVS/PVC - Skaronator */
    PVDZ_send = [_unit,"VehHandleDam",_this];
    publicVariableServer "PVDZ_send";
    };


    }else{
    _total = _HPBefore;
    };
    // all "HandleDamage event" functions should return the effective damage that the engine will record for that part


    _total

    fn_damageHandlerVehicle.sqf

    Spoiler

    scriptName "Functions\misc\fn_damageHandler.sqf";
    /***********************************************************
        PROCESS DAMAGE TO A UNIT
        - Function
        - [unit, selectionName, damage, source, projectile] call fnc_usec_damageHandler;
    ************************************************************/
    private ["_unit","_hit","_damage","_total"];
    _unit = _this select 0;
    _hit = _this select 1;
    _damage = _this select 2;
    //_source = _this select 3;
    //_ammo = _this select 4;
    _total = _damage;
    _state = true;

    //***Zupa Config ****//

    _godmodeVechilesEverywhere = false; // Godmode on all locked vehicles
    _onlyLockedVehicles = true;         //Plotarea: Godmode for Only locked vehicles (true) or locked and unlocked(false)
    _onlyVehicleWithoutGear = false;     // Only godmode on vehicles that hold no gear.
    _safeZoneGodVehicle = false;         // Godmode vehicles in safezones. (or specific zone's)

    // donator plotpole only works with PLOT FOR LIFE, set FALSE if you dont have it.
    _donatorsPlots = false; // True = only godmode vehicles for donaters in the list, False = godmode for every guy.
    _plotDonators = ["0","0"]; // PUID's of poeple who donated for plotpole

    // Chernarus safezone area's - change these to other coordinates for other maps. ( You can also add specific locations on the map.
    _safezones = [ 
        [[5070.75,9729.54],100,"Air"],
        [[1606.6443,7803.5156],100,"Bandit"],
        [[4063.4226,11664.19],100,"Bash"],
        [[12944.227,12766.889],100,"Hero"],
        [[11447.472,11364.504],100,"Klen"],
        [[6315.88,7791.3],100,"Stary"] // [[x,y],distance,"just name"]
    ];

    //***END Config ****//


    systemChat "checks";
    if((locked _unit && _godmodeVechilesEverywhere  && (count (crew _unit)) < 1))then{_state = false;
    };

    if(_state)then{
    if(_safeZoneGodVehicle )then{
    {if ((_unit distance (_x select 0)) <  (_x select 1)) then {_state = false;

    };} forEach _safezones;
    };
    };


    if(_state)then{
    _gearCount = 0;
    if(_onlyVehicleWithoutGear)then{
    //_weaps = count(getWeaponCargo _unit);
    //_mags = count(getMagazineCargo _unit);
    //_backs = count(getBackpackCargo _unit);
    //_gearCount = _gearCount + _weaps + _mags + _backs;
    };
    _plots = nearestObjects [_unit, ["Plastic_Pole_EP1_DZ"], DZE_PlotPole select 0];    
    if((count(_plots) > 0))then{        
        _thePlot = _plots select 0;
        _plotOwner = _thePlot getVariable ["ownerPUID",0];
    if ( (_gearCount == 0) &&(locked _unit || !(_onlyLockedVehicles) ) && (count (crew _unit)) < 1 && (  !(_donatorsPlots) || (_plotOwner in _plotDonators))) then {_state = false;

    };
    };
    };

    //diag_log ("DAMAGE VEH: " + typeof(_unit) + " / " + str(_hit) + " / " + str(_damage) + " / " + str(getDammage _unit));

    if (local _unit && _state) then {
        _total = [_unit,_hit,_damage] call object_setHitServer;
    };
    _total

    and because 1061 has different calls, this needs to be added also (pulled from 1051) < this might be my issue, but above my head
    also changed to suit the new variables

    object_setHitServer.sqf

    Spoiler

    private["_unit","_selection","_damage","_strH","_dam","_total"];
    _unit =            _this select 0;
    _selection =    _this select 1;
    _damage =        _this select 2;
    if ((_selection != "") && local _unit) then {
        _strH = "hit_" + (_selection);
        _dam = _unit getVariable [_strH,0];
        _total = (_dam + _damage);
        if (_total > 1) then {
            _total = 1;
        };
        _unit setVariable [_strH,_total,true];
        
        if (_damage >= 1) then {
            //["PVDZE_veh_Update",[_unit,"damage"]] call callRpcProcedure;
            PVDZ_veh_Save = [_unit,"damage"];
            publicVariableServer "PVDZ_veh_Save";
        };
        
    } else {
        _damage = 0;
    };
    _damage

    these are called in the compiles.sqf like so around line 630

    fnc_veh_handleDam = compile preprocessFileLineNumbers "custom\vehgod\vehicle_handleDamage.sqf";
    object_setHitServer = compile preprocessFileLineNumbers "custom\vehgod\object_setHitServer.sqf";

    and if you have trader safe zones, the call is there also

    Any help would be greatly appreciated

    Thanks

  9. I use this one for master key also. I have 2 options on my GPS.

    Thing is, if you have more than one key on you it wont work, but if you're only carrying your masterkey, this works great

    I didnt create this, it was buried in that original thread somewhere

    Spoiler

    private ["_inv","_searchString","_ID","_found","_targetColor","_finalID","_targetPosition","_targetVehicle","_count","_key","_keyName","_showMapMarker","_markerColour"];

    //**************************************************************************************************************************************
    // CONFIG

    _showMapMarker = True;            // True = display the map markers, False = just identify the keys
    _markerColour = "ColorOrange";    // Alternatives = "ColorBlack", "ColorRed", "ColorGreen", "ColorBlue", "ColorYellow", "ColorWhite"

    //**************************************************************************************************************************************

    _inv = [player] call BIS_fnc_invString;
    if (_showMapMarker && !("ItemGPS" in _inv)) exitWith { systemChat "You need a GPS to locate your vehicles!";};
    _vehicleType = [];
    _vehiclePos = [];
    _count = 0;

    closedialog 0;
    {
        for "_i" from 1 to 2500 do {
            _searchString = format ["ItemKey%1%2",_x,str(_i)];
            if ((_searchString in _inv)) then {
                _count = _count + 1;
                _targetColor = _x;
                _ID = str(_i);
                _ID = parseNumber _ID;
                if (_targetColor == "Green") then { _finalID = _ID; };
                if (_targetColor == "Red") then { _finalID = _ID + 2500; };
                if (_targetColor == "Blue") then { _finalID = _ID + 5000; };
                if (_targetColor == "Yellow") then { _finalID = _ID + 7500; };
                if (_targetColor == "Black") then { _finalID = _ID + 10000; };
            };
        };
    } forEach ["Black","Yellow","Blue","Green","Red"];

    _i = 0;
    for "_i" from 0 to 10 do {deleteMarkerLocal ("vehicleMarker"+ (str _i));};

    if (_count == 0) exitWith { systemChat "No key found!";};
    if (_count > 1) exitWith { systemChat "You have too many keys!";};
    if (_count == 1) then { systemChat "vehicle key found!";};

    _key = format["ItemKey%1%2",_targetColor,_ID];
    _keyName = getText (configFile >> "CfgWeapons" >> _key >> "displayName");
    _found = 0;
    _numberOfVehicles = 0;
        
    {
        private ["_tID","_vehicle_type"];
        _vehicle_type = typeOf _x;
        _tID = parseNumber (_x getVariable ["CharacterID","0"]);
        if ((_tID == _finalID) && ((_vehicle_type isKindOf "Air") || (_vehicle_type isKindOf "LandVehicle") || (_vehicle_type isKindOf "Ship"))) then {
            _targetPosition = getPosATL _x;
            _targetVehicle = _x;
            _found = 1;
            _numberOfVehicles = _numberOfVehicles + 1;
            _vehicleType = _vehicleType + [_targetVehicle];
            _vehiclePos = _vehiclePos + [_targetPosition];
        };
    } forEach vehicles;
        
    systemChat format ["Key has %1 vehicles",_numberOfVehicles];
        
    if (_found != 0) then {
        _i = 0;
        for "_i" from 0 to _numberOfVehicles - 1 do {
            _targetVehicle = _vehicleType select _i;
            _targetPosition = _vehiclePos select _i;
            _vehicleName = gettext (configFile >> "CfgVehicles" >> (typeof _targetVehicle) >> "displayName");
            if (_showMapMarker) then {
                _Marker = "vehicleMarker" + (str _i);
                _vehicleMarker = createMarkerLocal [_Marker,[(_targetPosition select 0),(_targetPosition select 1)]];
                _vehicleMarker setMarkerShapeLocal "ICON";
                _vehicleMarker setMarkerTypeLocal "DOT";
                _vehicleMarker setMarkerColorLocal _markerColour;
                _vehicleMarker setMarkerSizeLocal [1.0, 1.0];
                _vehicleMarker setMarkerTextLocal format ["Here is your: %1",_vehicleName];
                systemChat format ["%1 belongs to %2 - %3",_keyName,_vehicleName,_finalID];
            } else { systemChat format ["%1 belongs to %2 - %3",_keyName,_vehicleName,_finalID];};
        };
    };        

    if (_showMapMarker) then {
        if (_numberOfVehicles == 1) then { systemChat "Check the map to locate your vehicle!";}
        else {systemChat "Check the map to locate your vehicles!";};
    };

     

  10. 1 hour ago, McPimpin said:

    I have gone through the instructions 4 times and I cannot get a scroll option on the vehicle traders for a Garage option.

    I have even tried it without infistar to rule out the antihack.

    Any suggestions.

    make sure your vehicle traders are in fact the ones in the dze_garagist group... if you are using cherno, they should be the correct ones unless you customized your traders.

    if that is fine, then double check and make sure you properly did the fn_selfactions.sqf part

  11. Just a FYI, GTX is better than Vilayer, but dont expect much better. They reply faster, but for the most part they have no clue what they are doing.  And they might not be able to find your backups even though you pay for them...

    And AWFUL doesnt even begin to explain Vilayer.... Im extremely  surprised they are still in business. I tried and tried and tried to look for a BBB for the UK and report them.. no dice
    I have TONS of proof that would have these guys investigated at least...

    anyways im getting off topic lol...

    Heres what i suggest, if your PC can handle it, install a TEST server on your pc, then from there you can upload your files to ANY host. Thats what i did with vilayer and GTX and when it got the time to get a dedicated box, the knowledge was already there.  Plus having it on your PC is much easier to test scripts.

  12. 1 minute ago, LunatikCH said:

    are you sure you added

    
    fnc_veh_handleDam = compile preprocessFileLineNumbers "FILE\PATH\HERE\veh_handleDam.sqf";

     

    BELOW the isdedicated block? So after the };

    it needs to get compiled on both to work, i made this mistake with the first test, i put it inside the { }; from it, it didnt work that way but works if you put it below it

     

    yes i did

×
×
  • Create New...