GetAiNavigationBlockers
getAiNavigationBlockers
AVAILABLE FROM UPDATE 0.1.2
This function is available in G1R:MP 0.1.2 and later. The contract below includes the compatibility guarantees introduced in that update.
Lists every navigation blocker owned by the calling resource.
Syntax
table getAiNavigationBlockers()
Parameters
This function does not accept parameters.
Returns
Returns a deterministic ID-sorted array of canonical blocker tables. The array is empty when the resource owns no blockers.
Examples
Disable every blocker owned by the current resource:
for _, blocker in ipairs(getAiNavigationBlockers()) do
setAiNavigationBlockerEnabled(blocker.id, false)
end
Notes
- Available only in server-side resource scripts.
- Each entry has the same fields as
getAiNavigationBlockerData, including disabled blockers. - Ownership isolation means the list never exposes blockers created by another resource.