rw_buckets API
Bucket management system for routing players and vehicles into specific routing buckets (dimensions).
Client Exports
exports.rw_buckets:getBucket()
Returns the current bucket key the player is assigned to.
local bucketKey = exports.rw_buckets:getBucket()
print(bucketKey)- Returns:
string|nil— The current bucket key if assigned, otherwisenil.
exports.rw_buckets:setMe(bucketKey)
Assign the local player to a routing bucket.
exports.rw_buckets:setMe('mission_alpha')- bucketKey:
string— The bucket identifier.
exports.rw_buckets:remMe()
Remove the local player from any current bucket assignment.
exports.rw_buckets:remMe()exports.rw_buckets:setVeh(vehicle, bucketKey)
Assign a vehicle to a routing bucket.
local veh = GetVehiclePedIsIn(cache.ped, false)
exports.rw_buckets:setVeh(veh, 'mission_alpha')- vehicle:
number— Local vehicle entity ID (not network ID). - bucketKey:
string— The bucket identifier.
exports.rw_buckets:remVeh(vehicle)
Remove a vehicle from its current bucket.
local veh = GetVehiclePedIsIn(cache.ped, false)
exports.rw_buckets:remVeh(veh)- vehicle:
number— Local vehicle entity ID.
exports.rw_buckets:setMeWithVehicle(bucketKey)
Assign both the player and their current vehicle to a routing bucket.
exports.rw_buckets:setMeWithVehicle('mission_alpha')- bucketKey:
string— The bucket identifier.
exports.rw_buckets:remMeWithVehicle()
Remove both the player and their current vehicle from any bucket assignment.
exports.rw_buckets:remMeWithVehicle()