Pool::forEachFast

From RAGE Multiplayer Wiki

Server-Side
Function

 JavaScript



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