Donator Entities
Jump to navigation
Jump to search
Introduction[edit]
Making shipments or other entities Donator only. Instead of donator you can also make it VIP only or have other constraints.
Details[edit]
The customCheck field can hold a custom function that defines whether a player can buy it or not.
The setup is the same as the donator job thing. Here are a few examples:
Description | Make the Money printer Donator only. |
---|---|
Used on | ![]() |
Code | DarkRP.createEntity("Money printer", {
ent = "money_printer",
model = "models/props_c17/consolebox01a.mdl",
price = 1000,
max = 2,
cmd = "buymoneyprinter",
customCheck = function(ply) return ply:IsUserGroup("Donator") end
})
|
Output | The Money printer is only available to the "Donator" group. |
Description | Make the AK47 shipment Donator only. |
---|---|
Used on | ![]() |
Code | DarkRP.createShipment("AK47", {
model = "models/weapons/w_rif_ak47.mdl",
entity = "weapon_ak472",
price = 2450,
amount = 10,
separate = false,
pricesep = nil,
noship = false,
allowed = {TEAM_GUN},
customCheck = function(ply) return ply:IsUserGroup("Donator") end
})
|
Output | The AK47 shipment is only available to the "Donator" group. |