Pool::forEachFast

From RAGE Multiplayer Wiki
Jump to navigation Jump to search

Server-Side
Function

Js.png JavaScript



Calling for each entity in a pool. Same as forEach except faster at lookups. Do not use this for destroying entities.

JavaScript Syntax
Jslogo.png

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