Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- AUTHOR: aeroson
- NAME: onetimeCleanup.sqf
- VERSION: 2.0.1
- DESCRIPTION:
- one call deletes stuff within radius from player that is not really needed:
- dead bodies, dropped items, smokes, chemlights, explosives
- beware: if weapons on ground is intentional e.g. fancy weapons stack, it will delete them too
- beware: if dead bodies are intentional it will delete them to
- USAGE:
- put this into init of anything:
- this addAction ["Cleanup around you", "onetimeCleanup.sqf", [300]];
- where 300 is radius of cleanup, default is 1000
- */
- private ["_start", "_args", "_radius"];
- _start = diag_tickTime;
- _args = _this;
- _args = [_args, 3, [], [[]]] call BIS_fnc_param;
- _radius = [_args, 0, 1000, [0]] call BIS_fnc_param;
- {
- {
- deleteVehicle _x;
- } forEach ((getPos player) nearObjects [_x, _radius]);
- } forEach ["WeaponHolder","GroundWeaponHolder","WeaponHolderSimulated","TimeBombCore","SmokeShell"];
- {
- if(!alive _x) then {
- deleteVehicle _x;
- };
- } forEach ((getPos player) nearObjects ["Man", _radius]);
- hint format ["Cleanup took %1 seconds",diag_tickTime - _start];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement