Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sadly you can't. But there are scripts outthere who puts a grey field about it. So i guess you shall try this out.Hello, can i remove Radar with this script?![]()
hey. thanks for sharing. one small problem i have. its only working for the vodnik, not the other one
//Remove Weapon by SiothieGaming start
if (_object isKindOf "GAZ_Vodnik_HMG") then {
_object removeWeapon "2A42";
_object removeMagazine "1500Rnd_762x54_PKT";
_object addWeapon "M2";
_object addMagazine "100Rnd_127x99_M2";
};
if (_object isKindOf "AH1Z") then {
_object removeWeapon "CMFlareLauncher";
_object removeWeapon "M197";
_object removeWeapon "HellfireLauncher";
_object removeWeapon "FFARLauncher";
_object removeWeapon "SidewinderLaucher_AH1Z";
_object removeMagazine "120Rnd_CMFlareMagazine";
_object removeMagazine "750Rnd_M197_AH1";
_object removeMagazine "8Rnd_Hellfire";
_object removeMagazine "38Rnd_FFAR";
_object removeMagazine "2Rnd_Sidewinder_AH1Z";
};
if (_object isKindOf "AH6X_EP1") then {
_object addWeapon "M240_veh";
_object addMagazine "100Rnd_762x51_M240";
};
i also tried to add some guns to narmal vehicles. different guns. different vehicles. no succes.
i hope u can help me. thanks
if (_object isKindOf "MQ9PredatorB") then {
_object removeWeapon "HellfireLauncher";
_object removeWeapon "HellfireLauncher";
_object removeMagazine "8Rnd_Hellfire";
_object addWeapon "M240_veh";
_object addMagazine "100Rnd_762x51_M240";
_object addMagazine "100Rnd_762x51_M240";
Ok I gave this a shot and I am still running into the problem that I had with the standard script. Vehicles purchased from the trader or spawned in by my admins still have the normal weapons and ammo. Once the server restarts the vehicles change. Any ideas?
_object setVariable ["CharacterID", _ownerID, true];
//Remove Weapon by SiothieGaming start
call fnc_remWepSG;
//Remove Weapon by SiothieGaming end
clearWeaponCargoGlobal _object;
clearMagazineCargoGlobal _object;
// _object setVehicleAmmo DZE_vehicleAmmo;
if ((typeOf _object) in dayz_allowedObjects) then {
server_spawnEvents = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnEvent.sqf";
//server_weather = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_weather.sqf";
fnc_plyrHit = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\fnc_plyrHit.sqf";
//Fnc for removing weapon by SiothieGaming
fnc_remWepSG = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\fnc_remWepSG.sqf";
server_deaths = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerDeaths.sqf";
if(!_donotusekey) then {
// Lock vehicle
_object setvehiclelock "locked";
};
//Remove Weapon by SiothieGaming start
call fnc_remWepSG;
//Remove Weapon by SiothieGaming end
clearWeaponCargoGlobal _object;
clearMagazineCargoGlobal _object;
// _object setVehicleAmmo DZE_vehicleAmmo;
// add items from previous vehicle here
_weapons = getWeaponCargo _object;
_magazines = getMagazineCargo _object;
_backpacks = getBackpackCargo _object;
//Remove Weapon by SiothieGaming start
call fnc_remWepSG;
//Remove Weapon by SiothieGaming end
clearWeaponCargoGlobal _object;
clearMagazineCargoGlobal _object;
clearBackpackCargoGlobal _object;
if (_object isKindOf "AH6J_EP1") then {
_object removeWeapon "TwinM134";
_object removeWeapon "FFARLauncher_14";
_object removeWeapon "M134_2";
};
if (_object isKindOf "AH6J_EP1") then {
_object addWeapon "TwinVickers";
_object addWeapon "MK19";
_object addMagazine "500Rnd_TwinVickers";
_object addMagazine "500Rnd_TwinVickers";
_object addMagazine "48Rnd_40mm_MK19";
};
server_publishvehicle2
Code:if(!_donotusekey) then { // Lock vehicle _object setvehiclelock "locked"; }; //Remove Weapon by SiothieGaming start call fnc_remWepSG; //Remove Weapon by SiothieGaming end clearWeaponCargoGlobal _object; clearMagazineCargoGlobal _object; // _object setVehicleAmmo DZE_vehicleAmmo;
Its working partially. Here is part of the fnc_WepSG.sqf
Code:if (_object isKindOf "AH6J_EP1") then { _object removeWeapon "TwinM134"; _object removeWeapon "FFARLauncher_14"; _object removeWeapon "M134_2"; }; if (_object isKindOf "AH6J_EP1") then { _object addWeapon "TwinVickers"; _object addWeapon "MK19"; _object addMagazine "500Rnd_TwinVickers"; _object addMagazine "500Rnd_TwinVickers"; _object addMagazine "48Rnd_40mm_MK19"; };
When I purchase a AH6J it spawns with the TwinM134s and Hydras. But as soon as the server restarts the weapons switch to the Vickers and Mk19.
if (_object isKindOf "AH6J_EP1") then {
_object removeWeapon "TwinM134";
_object removeWeapon "FFARLauncher_14";
_object removeWeapon "M134_2";
_object addWeapon "TwinVickers";
_object addWeapon "MK19";
_object addMagazine "500Rnd_TwinVickers";
_object addMagazine "500Rnd_TwinVickers";
_object addMagazine "48Rnd_40mm_MK19";
};
Possible maybe, go to it when i got the time.I was wondering if there would be a way to remove ammo from armed vehicles like the salvage menu for removing vehicle parts? It's kinda a bummer to either spend gold to buy ammo for them or spend time searching just to lose them at server restart. This way players could remove any leftover ammo saving it before restarts!
if (_object isKindof "AH6J_EP1") then {
_object magazinesTurret [-1];
_object removeMagazinesTurret ["14Rnd_FFAR",[-1]];
_object removeMagazinesTurret ["4000Rnd_762x51_M134",[-1]];
_object WeaponsTurret [-1];
_object removeWeapon "FFARLauncher_14";
_object removeWeapon "TwinM134";
};
Just download it. You don't have to like it. You also don't need anything to download it or something.Could you upload your script to other place. This mega.co is S**t
I can't download, because in every browser that i have it says that i have old version of browser lol. Yea about megaupload i mistake, i try to say mediafireJust download it. You don't have to like it. You also don't need anything to download it or something.
And i were a little confused (before you edited you post) because megaupload was the precursor of mega.co.
Thank you, Sir!
if (_object isKindof "BRDM2_HQ_Gue") then {
// List all mag of the gunner seat
_mag = _object magazinesTurret [0];
// Give me an array like ["100Rnd_762x54_PK","100Rnd_762x54_PK","100Rnd_762x54_PK","100Rnd_762x54_PK","100Rnd_762x54_PK"]
diag_log ("TEST 1 with BRDM2_HQ_Gue: " + str(_mag));
cpt = 0;
//Here, iterate on _mags and remove the mag !
{
_object removeMagazinesTurret [_mag select cpt,[0]];
cpt = cpt + 1;
} forEach _mag;
};
1:56:47 "TEST 1 with BRDM2_HQ_Gue: []"
if (_object isKindof "AN2_dZ") then {
_object addWeapon "M240_vehicle";
};
Hi.
I've try and made a little upgrade to your script ^^
Here is what i do for now in the fnc_remWepSG.sqf:
Code:if (_object isKindof "BRDM2_HQ_Gue") then { // List all mag of the gunner seat _mag = _object magazinesTurret [0]; // Give me an array like ["100Rnd_762x54_PK","100Rnd_762x54_PK","100Rnd_762x54_PK","100Rnd_762x54_PK","100Rnd_762x54_PK"] diag_log ("TEST 1 with BRDM2_HQ_Gue: " + str(_mag)); cpt = 0; //Here, iterate on _mags and remove the mag ! { _object removeMagazinesTurret [_mag select cpt,[0]]; cpt = cpt + 1; } forEach _mag; };
And it's work great, on server start, and when i buy the vehicle =)
BTW, about the seats, -1 is driver seat, 0 is gunner seat, 0,0 is commander seat, 0,1 is loader seat
Edit : Weird thing, my RPT got spammed with 1319 lines of
for 1 vehicle oOCode:1:56:47 "TEST 1 with BRDM2_HQ_Gue: []"
server_spawnEvents = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_spawnEvent.sqf";
//server_weather = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_weather.sqf";
fnc_plyrHit = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\fnc_plyrHit.sqf";
//Fnc for removing weapon by SiothieGaming
fnc_remWepSG = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\fnc_remWepSG.sqf";
server_deaths = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\server_playerDeaths.sqf";
};
_object setVariable ["CharacterID", _ownerID, true];
//Remove Weapon by SiothieGaming start
call fnc_remWepSG;
//Remove Weapon by SiothieGaming end
clearWeaponCargoGlobal _object;
clearMagazineCargoGlobal _object;
// _object setVehicleAmmo DZE_vehicleAmmo;
_object setdir _dir;
_retry = 100;
};
//Remove Weapon by SiothieGaming start
call fnc_remWepSG;
//Remove Weapon by SiothieGaming end
clearWeaponCargoGlobal _object;
clearMagazineCargoGlobal _object;
// add items from previous vehicle here
_weapons = getWeaponCargo _object;
_magazines = getMagazineCargo _object;
_backpacks = getBackpackCargo _object;
//Remove Weapon by SiothieGaming start
call fnc_remWepSG;
//Remove Weapon by SiothieGaming end
clearWeaponCargoGlobal _object;
clearMagazineCargoGlobal _object;
clearBackpackCargoGlobal _object;
//Remove Weapon SiothieGaming german Youtubechannel: http://www.youtube.com/user/SiothieGaming
//Lines underneath are just a small tutorial
// the Number in the Bracket is Important, -1 means Pilot seat
//Try getting up with these numbers when you want to remove from another seat (e.g. gunner, front gunner, rear gunner etc. pp)
// For every seat you have to do something like i did
//_object magazinesTurret [-1];
//_object removeMagazinesTurret ["14Rnd_FFAR",[-1]]; If you want to remove something from another seat at the same time you need to do something like this:
// _object magazinesTurret [1];
//_object removeMagazinesTurret ["14Rnd_FFAR",[1]]; I'm not completly sure now which number is which seat. I only know that -1 is pilot seat.
{
if (_object isKindof "UH1H_TK_EP1") then {
_object magazinesTurret [0];
_object removeMagazinesTurret ["100Rnd_762x51_M240",[0]];
_object magazinesTurret [1];
_object removeMagazinesTurret ["100Rnd_762x51_M240",[1]];
};
if (_object isKindof "MH60S") then {
_object magazinesTurret [0];
_object removeMagazinesTurret ["100Rnd_762x51_M240",[0]];
_object magazinesTurret [1];
_object removeMagazinesTurret ["100Rnd_762x51_M240",[1]];
};
if (_object isKindof "BAF_Jackal2_GMG_w") then {
_object magazinesTurret [0];
_object removeMagazinesTurret ["200Rnd_762x51_M240",[0]];
_object magazinesTurret [1];
_object removeMagazinesTurret ["48Rnd_40mm_MK19",[1]];
};
if (_object isKindof "BAF_Jackal2_L2A1_w") then {
_object magazinesTurret [0];
_object removeMagazinesTurret ["200Rnd_762x51_M240",[0]];
_object magazinesTurret [1];
_object removeMagazinesTurret ["100Rnd_127x99_M2",[1]];
};
if (_object isKindof "pook_H13_transport") then {
_object magazinesTurret [0];
_object removeMagazinesTurret ["pook_250Rnd_762x51",[0]];
};
if (_object isKindof "HMMWV_Armored") then {
_object magazinesTurret [0];
_object removeMagazinesTurret ["100Rnd_762x51_M240",[0]];
};
if (_object isKindof "M240Nest_DZ") then {
_object magazinesTurret [0];
_object removeMagazinesTurret ["100Rnd_762x51_M240",[0]];
};
if (_object isKindof "M2StaticMG_US_EP1") then {
_object magazinesTurret [0];
_object removeMagazinesTurret ["100Rnd_127x99_M2",[0]];
};
if (_object isKindof "DSHKM_TK_INS_EP1") then {
_object magazinesTurret [0];
_object removeMagazinesTurret ["50Rnd_127x107_DSHKM",[0]];
};
if (_object isKindof "UAZ_AGS30_TK_EP1") then {
_object magazinesTurret [0];
_object removeMagazinesTurret ["29Rnd_30mm_AGS30",[0]];
};
if (_object isKindof "BRDM2_HQ_Gue") then {
_object magazinesTurret [0];
_object removeMagazinesTurret ["100Rnd_762x54_PK",[0]];
};
if (_object isKindof "BTR40_MG_TK_INS_EP1") then {
_object magazinesTurret [0];
_object removeMagazinesTurret ["50Rnd_127x107_DSHKM",[0]];
};
//THIS IS STILL IN TESTING PHASE, IT COULD SCREW UP YOUR WHOLE SERVER
//Just put the Classname of the Vehicle there and it should disable thear vision.
// For example my server runs fine with it (Epoch Panthera) but a friend of mine screwed up his whole database
//if (_object isKindof "AH64D") then {
// _object disableTIEquipment true;
//};
//TESTING STUFF END
} forEach vehicles; //Not completly necessary, it just makes sure no vehicle is left out during the process (e.g. high server load)