Jump to content

Removing Rockets from Pawnee, Hellcat and PO-30


Havoc302

Recommended Posts

I have rearm trucks on the map, only 3 of them, so they're a resource to be fought over, I also have the armed Strider, Ifrit and Hunter on the server too, so if people want to rearm them they have to get their hands on one of the rearming vehicles.

Link to comment
Share on other sites

Got this to work for the Pawnee and Orca, still doesn't work for the Hellcat, something to do with the weapons actually being mounted on a gunners position or something, because of the camera.

 

 

https://community.bistudio.com/wiki/removeWeaponGlobal- second example worked, how I didn't find and try this earlier I have no freaking idea.

 

{ if (typeOf _x == "B_Heli_Light_01_armed_F") then { _x removeWeaponGlobal "missiles_DAR"; }; } forEach vehicles;

{ if (typeOf _x == "O_Heli_Light_02_F") then { _x removeWeaponGlobal "missiles_DAGR"; }; } forEach vehicles;

Link to comment
Share on other sites

  • 2 weeks later...

Maybe this?

if (isClient) then {
	[] spawn {
		if (player != vehicle player) then {
			switch {true} do {
				case ((vehicle player) in ["I_Heli_light_03_F","O_Heli_Light_02_F","B_Heli_Light_01_armed_F"]): {
					(vehicle player) removeWeapon "missiles_DAGR";
					(vehicle player) removeMagazines "12Rnd_PG_missiles";
					(vehicle player) removeMagazines "24Rnd_PG_missiles";
				};
			};
			
			waitUntil{ player == vehicle player };
		};
		
		uiSleep 1;
	};
};

Would go on the clientside, and you would use different cases for different weapon sets.

Hey Vampire, this code looks sound but where do I add it? I've tried at the end of my init.spf, but the rockets are working when another admin and I jump in the pawnee.

Link to comment
Share on other sites

Hey Vampire, this code looks sound but where do I add it? I've tried at the end of my init.spf, but the rockets are working when another admin and I jump in the pawnee.

Um read the thread, I already tested that code and it didn't work and I only just posted the WORKING code right above your post.

Link to comment
Share on other sites

Um read the thread, I already tested that code and it didn't work and I only just posted the WORKING code right above your post.

Thank you Havoc302. I was just confused as to where to which file to put the script in. As well the code you mentioned (copied below) only looks like part of the final script.

 

{ if (typeOf _x == "B_Heli_Light_01_armed_F") then { _x removeWeaponGlobal "missiles_DAR"; }; } forEach vehicles;

{ if (typeOf _x == "O_Heli_Light_02_F") then { _x removeWeaponGlobal "missiles_DAGR"; }; } forEach vehicles;

 

Would you be willing to please share the final full script. I am new to server scripting and would appreciate the assistance. Thank you.

Link to comment
Share on other sites

Ok so I made a new .sqf file (text file renamed is all it is) called remove_heli_weapons.sqf

 

In that I pasted:

 

Diag_log "Starting loading rockets removal script";


{
if (typeOf _x == "O_Heli_Light_02_F") then {
_x removeWeaponGlobal "missiles_DAGR";
};
sleep 1;
} forEach vehicles;


{
if (typeOf _x == "B_Heli_Light_01_armed_F") then {
_x removeWeaponGlobal "missiles_DAR";
};
sleep 1;
} forEach vehicles;


Diag_log "Finished loading rockets removal script";
In the init.sqf I just called it like below (note mine is in a folder called "custom".
 
// Remove rockets from armed Pawnee & Orca
execVM "custom\remove_heli_weapons.sqf";
Link to comment
Share on other sites

tried

 

 

Ok so I made a new .sqf file (text file renamed is all it is) called remove_heli_weapons.sqf

 

In that I pasted:

 

Diag_log "Starting loading rockets removal script";


{
if (typeOf _x == "O_Heli_Light_02_F") then {
_x removeWeaponGlobal "missiles_DAGR";
};
sleep 1;
} forEach vehicles;


{
if (typeOf _x == "B_Heli_Light_01_armed_F") then {
_x removeWeaponGlobal "missiles_DAR";
};
sleep 1;
} forEach vehicles;


Diag_log "Finished loading rockets removal script";
In the init.sqf I just called it like below (note mine is in a folder called "custom".
 
// Remove rockets from armed Pawnee & Orca
execVM "custom\remove_heli_weapons.sqf";

 

tried it. still spawning with rockets.. maybe im putting it in the wrong spot in the init? 

Link to comment
Share on other sites

I don't know what you're doing wrong mate, all mine have the weapon completely removed. Do you have the script in a custom folder? FYI spawning it in through infistar it'll still be fully armed until next restart.

 

I PM'd you what I have Havoc32 . :)

 

Disregard. It was me being a silly goat... It works awesome!!!

Link to comment
Share on other sites

Thx for this script Havoc, works like a charm!!

 

Best thing i think is to add them to the vehicle spawn list so they will spawn the right way, then it works. I even have put a 30 sec sleep time at the start of the script just so it should execute after the vehicle spawn and then server startup and go through all the vehicles.

Sleep 30; 
Link to comment
Share on other sites

  • 1 month later...

Got this to work for the Pawnee and Orca, still doesn't work for the Hellcat, something to do with the weapons actually being mounted on a gunners position or something, because of the camera.

 

 

https://community.bistudio.com/wiki/removeWeaponGlobal- second example worked, how I didn't find and try this earlier I have no freaking idea.

 

{ if (typeOf _x == "B_Heli_Light_01_armed_F") then { _x removeWeaponGlobal "missiles_DAR"; }; } forEach vehicles;

{ if (typeOf _x == "O_Heli_Light_02_F") then { _x removeWeaponGlobal "missiles_DAGR"; }; } forEach vehicles;

 

I've used the above code and adapted it to remove the rockets from the Pawnee and both types of Orca, but still not getting it to work for the Hellcat.

 

{ if (typeOf _x == "B_Heli_Light_01_armed_F") then { _x removeWeaponGlobal "missiles_DAR"; }; } forEach vehicles;
{ if (typeOf _x == "O_Heli_Light_02_F") then { _x removeWeaponGlobal "missiles_DAGR"; }; } forEach vehicles;
{ if (typeOf _x == "O_Heli_Light_02_v2_F") then { _x removeWeaponGlobal "missiles_DAR"; }; } forEach vehicles;
{ if (typeOf _x == "I_Heli_light_03_F") then { _x removeWeaponGlobal "missiles_DAR"; }; } forEach vehicles;
 

Best I can think of is to just take the Hellcats off the map!

Link to comment
Share on other sites

Not to mention the interest in A3 Epoch has died right off, there's about half the servers in Aus now that there was 2 months ago and a lot of them have very low populations most of the time, even during peak hours there's only a couple of thousand people playing in Aus. Believe it or not interest in my A2 Overpoch server has increased considerably.

Link to comment
Share on other sites

  • 1 month later...

Got this to work for the Pawnee and Orca, still doesn't work for the Hellcat, something to do with the weapons actually being mounted on a gunners position or something, because of the camera.

 

 

https://community.bistudio.com/wiki/removeWeaponGlobal- second example worked, how I didn't find and try this earlier I have no freaking idea.

 

{ if (typeOf _x == "B_Heli_Light_01_armed_F") then { _x removeWeaponGlobal "missiles_DAR"; }; } forEach vehicles;

{ if (typeOf _x == "O_Heli_Light_02_F") then { _x removeWeaponGlobal "missiles_DAGR"; }; } forEach vehicles;

 

 

For Hellcat it is:

 

{ if (typeOf _x == "I_Heli_light_03_F") then { _x removeWeaponTurret ["missiles_DAR",[-1]]; }; } forEach vehicles;

 

This format also works for Pawnee and Orca. Eg:

 

{ if (typeOf _x == "B_Heli_Light_01_armed_F") then { _x removeWeaponTurret ["missiles_DAR",[-1]]; }; } forEach vehicles;

Link to comment
Share on other sites

  • 10 months later...
On 5/23/2015 at 1:18 PM, Inq said:

 

For Hellcat it is:

 

{ if (typeOf _x == "I_Heli_light_03_F") then { _x removeWeaponTurret ["missiles_DAR",[-1]]; }; } forEach vehicles;

 

This format also works for Pawnee and Orca. Eg:

 

{ if (typeOf _x == "B_Heli_Light_01_armed_F") then { _x removeWeaponTurret ["missiles_DAR",[-1]]; }; } forEach vehicles;

Sorry to refresh an old thread but, that doesn't seem to work for me on the hellcat Inq...

Does it still work for you?

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...