Pool::forEachFast
Jump to navigation
Jump to search
Server-Side Function
![]() |
---|
Calling for each entity in a pool. Same as forEach except faster at lookups. Do not use this for destroying entities.
JavaScript Syntax

Syntax
mp.pool.forEachFast(function)
Parameters
- function - Function to be called
Examples
Loops through printing out every vehicle ID in the server.
Server-Side
mp.vehicles.forEachFast((car) => { console.log(`Car ID: ${car.id}`) });
See Also
- Functions
- Properties
- Arrays