Garry's Mod

Garry's Mod

145 个评价
TylerB's Shipment E2 Functions (v1)
   
奖励
收藏
已收藏
取消收藏
素材类型: 插件
插件类型: 工具
插件标签: 建筑, 角色扮演
文件大小
发表于
更新日期
1.367 KB
2014 年 1 月 17 日 下午 5:25
2018 年 6 月 2 日 下午 1:10
18 项改动说明 ( 查看 )

订阅以下载
TylerB's Shipment E2 Functions (v1)

在 TylerB 的 2 个合集中
boring.builders | BuildRP Content
15 件物品
boring.builders | Lawless Content
15 件物品
描述
Ever wanted to make an "intelligent" gun shop? With this addon, you can do many cool things:

IMPORTANT NOTE: Most functions can take either an entity or a string - Entities are the shipment box entity, and strings are either the name of the shipment, or the class of the weapon inside. (e.g weapon_deagle2)


ent:shipmentName() / shipmentName(str) - Returns the name of the shipment. Something like "Pump shotgun".
ent:shipmentType() / shipmentType(str) - Returns the class of the weapon inside. Something like "weapon_ak47".
ent:shipmentSeparate() / shipmentSeparate(str) - Returns whether or not the shipment is available as singles.
ent:shipmentPriceSep() / shipmentPriceSep(str) - Returns the price of the individual gun.
ent:shipmentPrice() / shipmentPrice(str) - Returns the price of the shipment.
ent:shipmentAmount() - Returns the number of weapons remaining in the shipment.
ent:shipmentSize() / shipmentSize(str) - Returns the default number of weapons in the shipment.
ent:shipmentModel() / shipmentModel(str) - Returns the model of the weapon.
ent:isShipment() - Returns whether the entity is a shipment or not. (equivalent to ent:type() == "spawned_shipment")


Have an error to report? Leave a comment below!

Goes well with my moneyRequest() - E2 Functions for DarkRP addon.

Facepunch thread[facepunch.com]
GitHub[github.com]

91 条留言
TylerB  [作者] 2020 年 4 月 10 日 下午 7:39 
All this script does is expose some useful functions for expression2 - they are to compliment users and rangers, not replace them.
KingOfRand0m 2019 年 10 月 30 日 上午 8:28 
You still need users and rangers with this addon
Lividsubset3 2019 年 10 月 29 日 上午 8:08 
This does not work for custom server with custom shipments, is their any work around for this? or do i just have to deal with users and rangers for the time being?
JudgeRinder 2019 年 4 月 12 日 上午 6:30 
uhhmm could you give a link for a download so we can install it on servers?
tiny hawk 2018 年 9 月 2 日 上午 1:34 
it says invalid shipment
is this because it doesnt support m9k?
0vector 2018 年 8 月 10 日 下午 4:49 
Wire Ranger:entity to Entity on the ranger
Taken Ƹ̵̡Ӝ̵̨̄Ʒ 2017 年 11 月 27 日 下午 4:17 
it keeps saying Invalid Shipment

@name
@inputs Ranger:entity
interval(1)


if(Ranger:isShipment()){

print(Ranger:shipmentName())
BinaryNinja 2017 年 8 月 18 日 上午 12:56 
Interested in potentially hiring you to do some custom e2 extensions.
KingOfRand0m 2016 年 12 月 6 日 上午 4:41 
Hey man! Sorry to bump... But do this work with all gun packs? I can't seem to get CW2 to show the shipment name when i use shipmentName(), it just gives me the name: spawned_shipment. and the price is not showing aswell
/home/fozie 2016 年 5 月 28 日 上午 11:58 
If your getting a invalid shipment error. Just do this
if(Ranger:entity():shipmentName() == "Invalid Shipment"){
EGP:egpText(1,"Out of Stock!",vec2(256))
}
else{
EGP:egpText(1,Ranger:shipmentName(),vec2(256))
}