BetterDeadThanZed Posted March 9, 2015 Report Share Posted March 9, 2015 Anyone know of a way to prevent loot from spawning in plot pole range or within a safe zone? Link to comment Share on other sites More sharing options...
0 SchwEde Posted March 9, 2015 Report Share Posted March 9, 2015 maybe in spawn_loot.sqf? something like: if (!canbuild || _findNearestPole > 0) exitWith {diag_log "exiting loot spawn Near Safezone or Pole)!";}; Needs to be tested though to check for poles: // check for near plot _findNearestPoles = nearestObjects [(vehicle player), ["Plastic_Pole_EP1_DZ"], _distance]; _findNearestPole = []; { if (alive _x) then { _findNearestPole set [(count _findNearestPole),_x]; }; } count _findNearestPoles; _IsNearPlot = count (_findNearestPole); Link to comment Share on other sites More sharing options...
0 GZA Posted March 9, 2015 Report Share Posted March 9, 2015 Posted this months ago http://pastebin.com/ZNNpmPCR. Just create a custom player_spawncheck.sqf. I hope it works ;) Link to comment Share on other sites More sharing options...
0 BetterDeadThanZed Posted March 9, 2015 Author Report Share Posted March 9, 2015 Cool thanks for the answers. I will check both of those out! GZA - That will also prevent loot from spawning in a safe zone? Link to comment Share on other sites More sharing options...
0 Draay Posted March 10, 2015 Report Share Posted March 10, 2015 This will come in handy, thanks man. Link to comment Share on other sites More sharing options...
0 BetterDeadThanZed Posted March 10, 2015 Author Report Share Posted March 10, 2015 GZA - That script isn't working for me. I put it in my "custom" folder in a folder called "disableloot" and called it from my custom compiles: player_spawnCheck = compile preprocessFileLineNumbers "custom\disableloot\player_spawnCheck.sqf"; Loot is still spawning in range of plot poles and in trader safe zones. Link to comment Share on other sites More sharing options...
0 BetterDeadThanZed Posted March 10, 2015 Author Report Share Posted March 10, 2015 This seems to be working to block loot spawning within range of a plot pole, but not the trader safe zones: Hopefully I'll get an answer on that thread that tells me how to expand it to cover trader safe zones. Link to comment Share on other sites More sharing options...
0 SchwEde Posted March 10, 2015 Report Share Posted March 10, 2015 try to edit this line here: if(_canLoot && !isInTraderCity && (_IsNearPlot == 0)) then { with if(_canLoot && !isInTraderCity && (_IsNearPlot == 0) && !canbuild) then { normaly canbuild is the variable which is set to false when entering a trader-city, just look at your mission.sqm and see for yourself Link to comment Share on other sites More sharing options...
0 GZA Posted March 10, 2015 Report Share Posted March 10, 2015 try to edit this line here: if(_canLoot && !isInTraderCity && (_IsNearPlot == 0)) then { with if(_canLoot && (_IsNearPlot == 0) && !canbuild) then { normaly canbuild is the variable which is set to false when entering a trader-city, just look at your mission.sqm and see for yourself Yeah right if you use old mission.sqm you have to use canbuild but your example was wrong canbuild must be true. if(_canLoot && (_IsNearPlot == 0) && canbuild) then { Link to comment Share on other sites More sharing options...
0 BetterDeadThanZed Posted March 10, 2015 Author Report Share Posted March 10, 2015 I'm using the version linked to in my last reply because that one worked, except for trader cities, so it doesn't have the line you guys are quoting. Link to comment Share on other sites More sharing options...
0 SchwEde Posted March 10, 2015 Report Share Posted March 10, 2015 sure it is, i took the line from the pastebin link ;) Link to comment Share on other sites More sharing options...
0 BetterDeadThanZed Posted March 10, 2015 Author Report Share Posted March 10, 2015 sure it is, i took the line from the pastebin link ;) Nope. Not there: http://pastebin.com/XNddFfWU Link to comment Share on other sites More sharing options...
0 SchwEde Posted March 10, 2015 Report Share Posted March 10, 2015 the link GZA posted: http://pastebin.com/ZNNpmPCR line 108 :P Link to comment Share on other sites More sharing options...
0 BetterDeadThanZed Posted March 10, 2015 Author Report Share Posted March 10, 2015 the link GZA posted: http://pastebin.com/ZNNpmPCR line 108 :P GZA's didn't work for me, as I posted, which is why I used the one I linked to in post #7. Link to comment Share on other sites More sharing options...
0 SchwEde Posted March 10, 2015 Report Share Posted March 10, 2015 well then its this line: if (isNull _nearbyPole) then { Simply add the variables to it and you should be done if (isNull _nearbyPole && canbuild && !isInTraderCity ) then { Link to comment Share on other sites More sharing options...
0 Webrene Posted May 1, 2015 Report Share Posted May 1, 2015 still lootspawn in safezones and tradercitys Link to comment Share on other sites More sharing options...
0 BetterDeadThanZed Posted January 25, 2016 Author Report Share Posted January 25, 2016 Going to revive an old topic here because I am attempting this on my Takistan server that I'm reworking. I'm using this bit of code in player_spawnCheck.sqf: if (isNull _nearbyPole && canbuild && !isInTraderCity ) then { With this code: http://pastebin.com/ZNNpmPCR I found loot only 35 meters from the center of the safe zone. Link to comment Share on other sites More sharing options...
Question
BetterDeadThanZed
Anyone know of a way to prevent loot from spawning in plot pole range or within a safe zone?
Link to comment
Share on other sites
16 answers to this question
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