Skip to content

Starfall DarkRP Library

Logan Learner edited this page May 22, 2020 · 4 revisions

NOTE: These functions only work on the DarkRP gamemode

NOTE: All functions can be ran on the shared realm unless stated otherwise


General Use / QOL Functions

-- Formats a number into a currency format ex. 1000 -> $1,000
darkrp.formatMoney(number amount)

Money Functions

General

-- Getting money of a specific player
player:getMoney()

Give Money (SERVER SIDE ONLY)

-- Giving money to a specified player
player:giveMoney(number amount)

Money Request (SERVER SIDE ONLY)

-- Request money from a player
player:requestMoney(title, amount, 
    *optional* function callbackSuccess(title, player, amount),
    *optional* function callbackFail(reason)
)

NOTE: You can pass a falsey value for the title to use the default title


Shipment Functions

General

-- Tests an entity to see if it is a shipment
entity:isShipment()

Shipment Name

-- Getting the name of a shipment
entity:shipmentName()
darkrp.shipmentName(string class)

Shipment Class

-- Getting the entity class of a shipment
entity:shipmentClass()
darkrp.shipmentClass(string class)

Shipment Size

-- Getting the maximum number of weapons in a shipment
entity:shipmentSize()
darkrp.shipmentSize(string class)

Shipment Amount Left

-- Getting the amount of weapons left in a shipment
entity:shipmentAmountLeft()

Shipment Model

-- Getting the maximum number of weapons in a shipment
entity:shipmentModel()
darkrp.shipmentModel(string class)

Shipment Price

-- Getting the price of a shipment
entity:shipmentPrice()
darkrp.shipmentPrice(string class)

Shipment Price Separate

-- Getting the separate price of each weapon in a shipment
entity:shipmentPriceSeparate()
darkrp.shipmentPriceSeparate(string class)
Clone this wiki locally