Jump to content

The standard Antihack Tool deleting stuff (I think)


Liqu1dShadow

Recommended Posts

As soon as I log in, the below along with another 2 boats and some Buoys just disappear but if I work out this then I can address the others at the same time

 

This is the item that disappears on restart.

 

_vehicle_4 = objNull;
if (true) then
{
    _this = createVehicle ["Submarine_01_F", [4705.8545, 2503.5955, 7.9696541], [], 0, "CAN_COLLIDE"];
    _vehicle_4 = _this;
    _this setDir 29.708826;
    _this setPos [4705.8545, 2503.5955, 7.9696541];
};

 

I wonder if the AH tool is deciding its a vehicle and not one that's been authorised, so it removes it?

 

Any ideas?

Link to comment
Share on other sites

No idea, just throwing this out there, but does 7.9m Z spawn the item 7.9m over the ground, (underneath the water), or 7.9m over the water? The items could be getting damaged as they fall to the water but not sure. I was guessing that it wasn't being cleaned up only because I have tanks spawning in with my mission ai system. When something goes wrong with my mission I try to make a trigger that manually spawns the item in so I can be there and see exactly what's up. Or try spawning it over land somewhere and see if it still deletes. 

Link to comment
Share on other sites

would this work if I added it to the list and set it as qty 1?

 

allowedVehiclesList[] = {
    {"C_Offroad_01_EPOCH",15},
    {"C_Quadbike_01_EPOCH",8},
    {"C_Hatchback_01_EPOCH",10},
    {"C_Hatchback_02_EPOCH",10},

    {"Submarine_01_F",1},
    {"C_SUV_01_EPOCH",10},
    {"C_Rubberboat_EPOCH",2},
    {"C_Rubberboat_02_EPOCH",2},
    {"C_Rubberboat_03_EPOCH",2},
    {"C_Rubberboat_04_EPOCH",2},
    {"C_Van_01_box_EPOCH",8},
    {"C_Van_01_transport_EPOCH",9},
    {"C_Boat_Civil_01_EPOCH",2},
    {"C_Boat_Civil_01_police_EPOCH",2},
    {"C_Boat_Civil_01_rescue_EPOCH",2},
    {"B_Heli_Light_01_EPOCH",4},
    {"B_SDV_01_EPOCH",2},

Link to comment
Share on other sites

would this work if I added it to the list and set it as qty 1?

 

allowedVehiclesList[] = {

    {"C_Offroad_01_EPOCH",15},

    {"C_Quadbike_01_EPOCH",8},

    {"C_Hatchback_01_EPOCH",10},

    {"C_Hatchback_02_EPOCH",10},

    {"Submarine_01_F",1},

    {"C_SUV_01_EPOCH",10},

    {"C_Rubberboat_EPOCH",2},

    {"C_Rubberboat_02_EPOCH",2},

    {"C_Rubberboat_03_EPOCH",2},

    {"C_Rubberboat_04_EPOCH",2},

    {"C_Van_01_box_EPOCH",8},

    {"C_Van_01_transport_EPOCH",9},

    {"C_Boat_Civil_01_EPOCH",2},

    {"C_Boat_Civil_01_police_EPOCH",2},

    {"C_Boat_Civil_01_rescue_EPOCH",2},

    {"B_Heli_Light_01_EPOCH",4},

    {"B_SDV_01_EPOCH",2},

 

No, that will cause it to spawn on the map.

 

Most likely what is happening (since all the objects are above water) is you set them to spawn so far above ground level, and arma is spawning them relative to sea level, meaning they are spawning underwater.

 

There are differences between getPos, getPosATL, and getPosASL.

 

Go Scuba Diving for them.

Link to comment
Share on other sites

No, that will cause it to spawn on the map.

 

Most likely what is happening (since all the objects are above water) is you set them to spawn so far above ground level, and arma is spawning them relative to sea level, meaning they are spawning underwater.

 

There are differences between getPos, getPosATL, and getPosASL.

 

Go Scuba Diving for them.

 

here is a video of it, i put it in slow motion so you can see its defo there one second then gone the next with everything else :/

 

Link to comment
Share on other sites

LiquidShadow,

 

Go at least 400m away from where you are having these objects spawn and log out log out.

restart server, and log back in.

Turn on your admin tools to see if the vehicles are present.

 

Walk toward the vehicles, if at around 300m they despawn, your issue is with registering the vehicles with the call to vToken.

 

I have not tested enough to minimize the code yet, but the following will make a vehicle that will at least stay around until the next server reboot.

  _veh = createVehicle [_type, _pos, _markers, _dist, _mode];
    //_vehicle call EPOCH_server_setVToken;
    clearWeaponCargoGlobal    _veh;
    clearMagazineCargoGlobal  _veh;
    clearBackpackCargoGlobal  _veh;
    clearItemCargoGlobal	  _veh;
    _veh disableTIEquipment true; // disables thermal and NV equipment
    // _veh lock true;
    //_veh setVariable ["LOCK_OWNER", "-1"];
    //_veh setVariable ["LOCKED_TILL", serverTime];
    
    addToRemainsCollector[_veh];
    _veh setVariable["LASTLOGOUT_EPOCH",1000000000000];
    _veh setVariable["LAST_CHECK",1000000000000];
    EPOCH_VehicleSlotsLimit = EPOCH_VehicleSlotsLimit + 1;
    EPOCH_VehicleSlots pushBack str(EPOCH_VehicleSlotsLimit);
    _slot = EPOCH_VehicleSlots select 0;
    _veh setVariable ['VEHICLE_SLOT',_slot,true];
    EPOCH_VehicleSlots = EPOCH_VehicleSlots - [_slot];
    EPOCH_VehicleSlotCount = count EPOCH_VehicleSlots;
    publicVariable 'EPOCH_VehicleSlotCount';
    clearWeaponCargoGlobal    _veh;
    clearMagazineCargoGlobal  _veh;
    clearBackpackCargoGlobal  _veh;
    clearItemCargoGlobal       _veh;
    _veh call EPOCH_server_setVToken;
    _veh call EPX_server_setVToken;

 This code has to be run by the server, so if you are using a HC, or a script running on a player's machine, you will need to set up a PVEH to call the code.  

Link to comment
Share on other sites

 This code has to be run by the server, so if you are using a HC, or a script running on a player's machine, you will need to set up a PVEH to call the code.  

 

I have this server side via PVEH:

_veh call EPOCH_server_setVToken;

 

and that was all it took for me to have tanks and helis, (that aren't in the allowed list in Liquid's post). Haven't yet seen any issues with things being deleted outright.

Link to comment
Share on other sites

LiquidShadow,

 

Go at least 400m away from where you are having these objects spawn and log out log out.

restart server, and log back in.

Turn on your admin tools to see if the vehicles are present.

 

Walk toward the vehicles, if at around 300m they despawn, your issue is with registering the vehicles with the call to vToken.

 

I have not tested enough to minimize the code yet, but the following will make a vehicle that will at least stay around until the next server reboot.

  _veh = createVehicle [_type, _pos, _markers, _dist, _mode];
    //_vehicle call EPOCH_server_setVToken;
    clearWeaponCargoGlobal    _veh;
    clearMagazineCargoGlobal  _veh;
    clearBackpackCargoGlobal  _veh;
    clearItemCargoGlobal	  _veh;
    _veh disableTIEquipment true; // disables thermal and NV equipment
    // _veh lock true;
    //_veh setVariable ["LOCK_OWNER", "-1"];
    //_veh setVariable ["LOCKED_TILL", serverTime];
    
    addToRemainsCollector[_veh];
    _veh setVariable["LASTLOGOUT_EPOCH",1000000000000];
    _veh setVariable["LAST_CHECK",1000000000000];
    EPOCH_VehicleSlotsLimit = EPOCH_VehicleSlotsLimit + 1;
    EPOCH_VehicleSlots pushBack str(EPOCH_VehicleSlotsLimit);
    _slot = EPOCH_VehicleSlots select 0;
    _veh setVariable ['VEHICLE_SLOT',_slot,true];
    EPOCH_VehicleSlots = EPOCH_VehicleSlots - [_slot];
    EPOCH_VehicleSlotCount = count EPOCH_VehicleSlots;
    publicVariable 'EPOCH_VehicleSlotCount';
    clearWeaponCargoGlobal    _veh;
    clearMagazineCargoGlobal  _veh;
    clearBackpackCargoGlobal  _veh;
    clearItemCargoGlobal       _veh;
    _veh call EPOCH_server_setVToken;
    _veh call EPX_server_setVToken;

 This code has to be run by the server, so if you are using a HC, or a script running on a player's machine, you will need to set up a PVEH to call the code.  

 

I don't have a HC,

 

So where would I put this into the server?

Link to comment
Share on other sites

yes they are,

 

so would that be....

 

// Balota Shipyard Base by Liqu1dShadow
// www.ASMGamers.com


if (isServer) then {   };
 
_vehicle_0 = objNull;
if (true) then
{
    _this = createVehicle ["Land_BoatSmall_2b", [4657.9702, 2556.6101, 0.75468636], [], 0, "CAN_COLLIDE"];
    _vehicle_0 = _this;
    _this setPos [4657.9702, 2556.6101, 0.75468636];
};

_vehicle_1 = objNull;
if (true) then
{
    _this = createVehicle ["Land_BuoyBig_F", [4632.13,2556.23,0], [], 0, "CAN_COLLIDE"];
    _vehicle_1 = _this;
    _this setPos [4632.13,2556.23,0];
};

_vehicle_2 = objNull;
if (true) then
{
    _this = createVehicle ["C_Boat_Civil_04_F", [4659.6602, 2523.48, 7.4972706], [], 0, "CAN_COLLIDE"];
    _vehicle_2 = _this;
    _this setDir 216.948;
    _this setPos [4659.6602, 2523.48, 7.4972706];
};
 

Link to comment
Share on other sites

yea, try slapping that code in there for each one, or make a function you can call to stream line things.

 

That should resolve your issue.  

 

Note, vehicles will despawn on a server reset.  I added a GetIn EH to notify players when they enter the vehicle of this fact.

Link to comment
Share on other sites

For each one? so would it be ....

 

Change this.....

 

_vehicle_1 = objNull;
if (true) then
{
    _this = createVehicle ["Land_BuoyBig_F", [4632.13,2556.23,0], [], 0, "CAN_COLLIDE"];
    _vehicle_1 = _this;
    _this setPos [4632.13,2556.23,0];
};

 

for this?

 

 

_vehicle_1 = objNull;
if (isServer) then {   };
{
    _this = createVehicle ["Land_BuoyBig_F", [4632.13,2556.23,0], [], 0, "CAN_COLLIDE"];
    _vehicle_1 = _this;
    _this setPos [4632.13,2556.23,0];
};

 

or is it just once at the top of the script?

Link to comment
Share on other sites

When your classname is kindOf Vehicle/Landvehicle does it get deleted by the vehicle check (to delete hacked vehicles) you need to set it as secure vehicle so just do:

if (isDedicated) then {
	_vehicle = createVehicle ["Submarine_01_F", [4705.8545, 2503.5955, 7.9696541], [], 0, "CAN_COLLIDE"];
	_vehicle setDir 29.708826;
	_vehicle setPos [4705.8545, 2503.5955, 7.9696541];
	_vehicle call EPOCH_server_setVToken;
};
Link to comment
Share on other sites

 

When your classname is kindOf Vehicle/Landvehicle does it get deleted by the vehicle check (to delete hacked vehicles) you need to set it as secure vehicle so just do:

if (isDedicated) then {
	_vehicle = createVehicle ["Submarine_01_F", [4705.8545, 2503.5955, 7.9696541], [], 0, "CAN_COLLIDE"];
	_vehicle setDir 29.708826;
	_vehicle setPos [4705.8545, 2503.5955, 7.9696541];
	_vehicle call EPOCH_server_setVToken;
};

 

Thank you :)

Link to comment
Share on other sites

still doing it :( I get 300m away and they disappear

 

 

 

 

// Balota Shipyard Base by Liqu1dShadow
// www.ASMGamers.com


if (isServer) then {
 
_vehicle_0 = objNull;
if (isDedicated) then {
    _vehicle = createVehicle ["Land_BoatSmall_2b", [4657.9702, 2556.6101, 0.75468636], [], 0, "CAN_COLLIDE"];
    _vehicle setPos [4657.9702, 2556.6101, 0.75468636];
    _vehicle call EPOCH_server_setVToken;
};

_vehicle_1 = objNull;
if (isDedicated) then {
    _vehicle = createVehicle ["Land_BuoyBig_F", [4632.13,2556.23,0], [], 0, "CAN_COLLIDE"];
    _vehicle setPos [4632.13,2556.23,0];
    _vehicle call EPOCH_server_setVToken;
};

_vehicle_2 = objNull;
if (isDedicated) then {
    _vehicle = createVehicle ["C_Boat_Civil_04_F", [4659.6602, 2523.48, 7.4972706], [], 0, "CAN_COLLIDE"];
    _vehicle setDir 216.948;
    _vehicle setPos [4659.6602, 2523.48, 7.4972706];
    _vehicle call EPOCH_server_setVToken;
};

_vehicle_3 = objNull;
if (isDedicated) then {
    _vehicle = createVehicle ["Land_RowBoat_V3_F", [4653.7637, 2555.9209, 1.3099985], [], 0, "CAN_COLLIDE"];
    _vehicle setPos [4653.7637, 2555.9209, 1.3099985];
    _vehicle call EPOCH_server_setVToken;
};

_vehicle_4 = objNull;
if (isDedicated) then {
    _vehicle = createVehicle ["Submarine_01_F", [4705.8545, 2503.5955, 7.9696541], [], 0, "CAN_COLLIDE"];
    _vehicle setDir 29.708826;
    _vehicle setPos [4705.8545, 2503.5955, 7.9696541];
    _vehicle call EPOCH_server_setVToken;
};

Link to comment
Share on other sites

Try using it server side. Would be similiar to this.  used that to rebuild SectorFNG with Arma 3 building in Chernarus. I have not tested with vehicle but should work. Simply edit the mainbase.sqf with your objects or create your own and add the line to call it in fn_init

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
  • Advertisement
  • Discord

×
×
  • Create New...