initial files

This commit is contained in:
Samuele Lorefice
2025-05-24 16:17:33 +02:00
commit 9e023649ac
477 changed files with 118566 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
/*
File: fn_getNearestFob.sqf
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
Date: 2019-12-03
Last Update: 2019-12-05
License: MIT License - http://www.opensource.org/licenses/MIT
Description:
Gets the nearest FOB position to given position.
Parameter(s):
_pos - Position to find the nearest FOB from [POSITION, defaults to getPos player]
Returns:
Nearest FOB position [POSITION]
*/
params [
["_pos", getPos player, [[]], [2, 3]]
];
if !(GRLIB_all_fobs isEqualTo []) then {
private _fobs = GRLIB_all_fobs apply {[_pos distance2d _x, _x]};
_fobs sort true;
(_fobs select 0) select 1
} else {
[]
};