Havoc302 Posted February 8, 2015 Author Report Share Posted February 8, 2015 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 More sharing options...
Guest Posted February 8, 2015 Report Share Posted February 8, 2015 Was curious if you knew how to add rearmed helicopters upon restart? Link to comment Share on other sites More sharing options...
howitzer Posted February 8, 2015 Report Share Posted February 8, 2015 OFF I thought those rearm trucks are not working. I have all types of trucks spawned but only the refueler is working - rearm, repair are not. Link to comment Share on other sites More sharing options...
Havoc302 Posted February 9, 2015 Author Report Share Posted February 9, 2015 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; Nic 1 Link to comment Share on other sites More sharing options...
OfficeGlenn Posted February 20, 2015 Report Share Posted February 20, 2015 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 More sharing options...
Havoc302 Posted February 20, 2015 Author Report Share Posted February 20, 2015 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 More sharing options...
OfficeGlenn Posted February 20, 2015 Report Share Posted February 20, 2015 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 More sharing options...
Havoc302 Posted February 20, 2015 Author Report Share Posted February 20, 2015 Sure I'll be home in 15 and post it up Link to comment Share on other sites More sharing options...
Havoc302 Posted February 20, 2015 Author Report Share Posted February 20, 2015 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"; OfficeGlenn 1 Link to comment Share on other sites More sharing options...
Guest Posted February 20, 2015 Report Share Posted February 20, 2015 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 More sharing options...
OfficeGlenn Posted February 20, 2015 Report Share Posted February 20, 2015 Thank you, that seems to have worked for me. Link to comment Share on other sites More sharing options...
Guest Posted February 20, 2015 Report Share Posted February 20, 2015 Great script! Link to comment Share on other sites More sharing options...
Havoc302 Posted February 20, 2015 Author Report Share Posted February 20, 2015 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. Link to comment Share on other sites More sharing options...
Guest Posted February 20, 2015 Report Share Posted February 20, 2015 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 More sharing options...
Onaabys Posted February 20, 2015 Report Share Posted February 20, 2015 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 More sharing options...
oojerfink Posted March 21, 2015 Report Share Posted March 21, 2015 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 More sharing options...
Havoc302 Posted March 21, 2015 Author Report Share Posted March 21, 2015 Armed Hellcats aren't on the map by default..... Link to comment Share on other sites More sharing options...
oojerfink Posted March 22, 2015 Report Share Posted March 22, 2015 Armed Hellcats aren't on the map by default..... I know... Link to comment Share on other sites More sharing options...
DirtySanchez Posted March 24, 2015 Report Share Posted March 24, 2015 Good stuff Havoc! I noticed your sig shows a down server..... We should get on TS again and chat. Link to comment Share on other sites More sharing options...
Havoc302 Posted March 24, 2015 Author Report Share Posted March 24, 2015 Good stuff Havoc! I noticed your sig shows a down server..... We should get on TS again and chat. Oh, migrated to new hosting provider and forgot to update my sig, doh... Link to comment Share on other sites More sharing options...
Havoc302 Posted March 24, 2015 Author Report Share Posted March 24, 2015 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 More sharing options...
guttall Posted March 26, 2015 Report Share Posted March 26, 2015 Hey guys, does this scripts running at client side pbo or server side pbo ? Thanks! Link to comment Share on other sites More sharing options...
bustedparts Posted May 22, 2015 Report Share Posted May 22, 2015 client side and it goes in a folder that you put in your mission file called custom Link to comment Share on other sites More sharing options...
Inq Posted May 23, 2015 Report Share Posted May 23, 2015 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 More sharing options...
ReDBaroN Posted March 25, 2016 Report Share Posted March 25, 2016 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now