rage-helper
v2.1.0
Published
Helper functions to make the usage of RAGE.MP easier
Downloads
4
Readme
Rage Helper
Installation
npm install rage-helper
Configuration
In order to use the types, you should add it to your TSConfig compilerOptions.
{
"compilerOptions": {
"types": ["rage-helper"]
}
}
Usage
World Objects
- Bus Stops, example:
import { busStops } from 'rage-helper'
busStops.forEach(busStop => {
console.log(busStop.Name)
console.log(busStop.Position) // X, Y, Z
console.log(busStop.Rotation) // X, Y, Z
console.log(busStop.Meta) // flipped, setback
})
- worldObjects.binsDumpsters
- worldObjects.gasPumps
- worldObjects.postBoxes
- worldObjects.recycleBins
Vehicles
import { vehicles } from 'rage-helper'
Available functions for vehicles:
- vehicles.getVehicleByName(name: string)
- vehicles.getVehicleByHash(hash: number)
- vehicles.getVehiclesByFlag(flag: string)
- vehicles.getVehiclesByFlags(flags: string[])