
Client Exports
This page serves to outline and explain the developer exports offered by Zea Developments' z_ladders resource. These exports allow you to further integrate z_ladders into your server!
collectLadder(should_animate, network_id, type)
collectLadder(should_animate, network_id, type)
Collect a ladder with optional animation and specified parameters.
Parameters:
should_animate
boolean
Whether to animate the collection process.
network_id
integer
The network ID of the vehicle to collect from.
type
string
The ladder type or category.
Returns: The result from Ladder.collect
.
Example usage:
local success = exports.z_ladders:collectLadder(true, 12345, "9")
if success then
print("Ladder collected successfully!")
end
storeLadder(should_animate, network_id, type)
storeLadder(should_animate, network_id, type)
Store a ladder with optional animation and specified parameters.
Parameters:
should_animate
boolean
Whether to animate the storing process.
network_id
integer
The network ID of the vehicle to store in.
type
string
The ladder type or category.
Returns: The result from Ladder.store
.
Example usage:
local success = exports.z_ladders:storeLadder(false, 12345, "9")
if success then
print("Ladder stored successfully!")
end
climbLadder(network_id)
climbLadder(network_id)
Climb a ladder specified by its network ID. If no valid ID is given, performs a default climb action.
Parameters:
network_id
integer
Network ID of the ladder to climb. If invalid or nil
, performs default climb.
Returns: Result of Ladder.climb
or the default climb action.
Example usage:
-- Climb ladder with network ID 12345
exports.z_ladders:climbLadder(12345)
-- Perform default climb (no ID)
exports.z_ladders:climbLadder(nil)
pickupLadder(network_id)
pickupLadder(network_id)
Pick up a ladder specified by its network ID. If no valid ID is given, performs a default pickup action.
Parameters:
network_id
integer
Network ID of the ladder to pick up. If invalid or nil
, performs default pickup.
Returns: Result of Ladder.pickup
or the default pickup action.
Example usage:
-- Pick up ladder with network ID 12345
exports.z_ladders:pickupLadder(12345)
-- Perform default pickup (no ID)
exports.z_ladders:pickupLadder(0)
isCarrying()
isCarrying()
Check if the user is currently carrying a ladder.
Returns: true
if carrying a ladder, otherwise false
.
Example usage:
if exports.z_ladders:isCarrying() then
print("User is carrying a ladder")
else
print("User is not carrying any ladder")
end
getCarryingData()
getCarryingData()
Get data about the ladder currently being carried.
Returns: An object containing:
handle
(integer): Identifier of the ladder.type
(string, optional): Ladder type/category.
Example usage:
local data = exports.z_ladders:getCarryingData()
print("Carrying ladder handle:", data.handle)
if data.type then
print("Ladder type:", data.type)
end
Last updated