Garry's Mod

Garry's Mod

TylerB's Shipment E2 Functions (v1)
91 Comments
TylerB  [author] 10 Apr, 2020 @ 7:39pm 
All this script does is expose some useful functions for expression2 - they are to compliment users and rangers, not replace them.
KingOfRand0m 30 Oct, 2019 @ 8:28am 
You still need users and rangers with this addon
Lividsubset3 29 Oct, 2019 @ 8:08am 
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 12 Apr, 2019 @ 6:30am 
uhhmm could you give a link for a download so we can install it on servers?
tiny hawk 2 Sep, 2018 @ 1:34am 
it says invalid shipment
is this because it doesnt support m9k?
0vector 10 Aug, 2018 @ 4:49pm 
Wire Ranger:entity to Entity on the ranger
Taken Ƹ̵̡Ӝ̵̨̄Ʒ 27 Nov, 2017 @ 4:17pm 
it keeps saying Invalid Shipment

@name
@inputs Ranger:entity
interval(1)


if(Ranger:isShipment()){

print(Ranger:shipmentName())
BinaryNinja 18 Aug, 2017 @ 12:56am 
Interested in potentially hiring you to do some custom e2 extensions.
KingOfRand0m 6 Dec, 2016 @ 4:41am 
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 28 May, 2016 @ 11:58am 
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))
}
keet 27 May, 2016 @ 1:23pm 
@space cookies no im trying to setup a sever so stfu
zeWuzard 25 May, 2016 @ 5:44pm 
i can't press f4 it single player :I i've never been a admin or owner so idk how to spawn it in please just tell me
TylerB  [author] 25 May, 2016 @ 2:13pm 
As per the questions asking why it returns -1 instead of 0, it's so you know that the function didn't detect a shipment, instead of detecting a shipment with a cost of 0.
TylerB  [author] 25 May, 2016 @ 2:12pm 
The same way you would use it in multiplayer.
zeWuzard 23 May, 2016 @ 1:57pm 
+wrecker291 #my exact thoughts ( how do i use it in single player just for rp with myself ;-;)
keet 22 Apr, 2016 @ 3:10pm 
how do i use this ?
Lex 27 Mar, 2016 @ 5:30pm 
Is this no longer updated? When using this, it all says Invalid Shipment.
Dadi Dango 5 Jan, 2016 @ 11:39am 
Probably a stupid question... but it doesn't work with M9K weapons with me; anyway of getting this to work?
AmstelL 14 Nov, 2015 @ 10:07am 
cool addon also my name is Tyler 2
:steamhappy:
Masubi 12 Nov, 2015 @ 1:35pm 
Tyler , thanks for the great addon. One question why does it set a negative one to the shipmentPrice() if there is no shipment in there? Is this something with lua not be able to recognize zero? I understand that the math could be done to fix this but why not set it to zero?
TylerB  [author] 30 Aug, 2015 @ 3:54am 
obviously this addon is for making a gunshop, not shipments.
crazy 28 Aug, 2015 @ 11:09pm 
k
TylerB  [author] 28 Aug, 2015 @ 8:43pm 
"Ever wanted to make an "intelligent" gun shop?"
crazy 26 Aug, 2015 @ 7:08pm 
i did read the description...
TylerB  [author] 26 Aug, 2015 @ 4:34pm 
helps to read the description.
crazy 26 Aug, 2015 @ 10:52am 
Is this basically a mod for admins to make shipments in game or something?
.djrx 7 Aug, 2015 @ 6:48am 
Hi this is Sammy from Microsoft Tech Support.. Have you tried restarting your computer!
TylerB  [author] 6 Aug, 2015 @ 5:17pm 
No problem.
GoodOnYaLad 6 Aug, 2015 @ 1:06am 
Oh wow, i feel so dumb! Thanks :/ My ranger wasn't set to output ent
TylerB  [author] 4 Aug, 2015 @ 7:50am 
Yeah, that's the problem: The ranger input is LITERALLY the ranger, so of course it's not going to be a valid shipment. Is "Output Entity" checked on the ranger, and are you wiring the Ranger:entity input to said output?
TylerB  [author] 2 Aug, 2015 @ 8:41am 
Do me a favor and print(Ranger) and tell me what it says in chat.
TylerB  [author] 2 Aug, 2015 @ 4:04am 
Read the error. You are trying to get the shipmentName() of a number.

Your ranger inputs are numbers when they need to be entities.
GoodOnYaLad 1 Aug, 2015 @ 5:32pm 
Yeah I still can't seem to get the shipment function to work
AnonymousSilent 1 Aug, 2015 @ 5:21pm 
Does not seem to work at all on my server (no functions at all but the money functions work...)
TylerB  [author] 1 Aug, 2015 @ 4:41pm 
...it works fine?
AnonymousSilent 1 Aug, 2015 @ 2:05pm 
Does this just no longer work?????
GoodOnYaLad 2 Jul, 2015 @ 1:46pm 
Tyler, I need some help with your E2 shipment request. I do http://pastebin.com/VLtV5pvq
But all it says is Invalid shipment, Event when the AK shipment is in the rangers range.
TylerB  [author] 16 May, 2015 @ 12:30am 
um... those aren't a part of this pack dude. read the damn description.
꧁ Mr.lRoberth- ꧂ 15 May, 2015 @ 11:09pm 

if(R1:isShipment())
{
EPrice=R1:shipmentPricePerUnit()
EPrice=ceil(EPrice+EPrice*(Profit/100))
Scr:egpText(24, "1. " + R1:shipmentName() + " - $" + EPrice, vec2(120, 30))
Scr:egpAlign(24, 1, 1)
Prices[1, number] = EPrice
}
elseif(!R1:isShipment())
꧁ Mr.lRoberth- ꧂ 15 May, 2015 @ 11:09pm 
No such function: entity:shipmentPricePerUnit(void) at line 247, char 23
꧁ Mr.lRoberth- ꧂ 15 May, 2015 @ 10:37pm 
When i spawn a e2 give me errors
AnonymousSilent 17 Apr, 2015 @ 1:17pm 
HELP: If a shipment is not located (not in front of the ranger) it will say "Invalid Shipment"why wont this work?

if (!R1:isShipment())
{
R1NAME = "Out Of Stock"
}
else
{
R1NAME = R1:shipmentName()
}
SirRanjid 13 Apr, 2015 @ 1:27am 
How about a table to see who blocked you. So if a player in front of my atm accidently blocked me and cluelessly clicks anything I can give him the information to unblock me if he did so.
AnonymousSilent 16 Mar, 2015 @ 1:17pm 
Did not even see that... Whoops thanks!
TylerB  [author] 15 Mar, 2015 @ 7:21pm 
shipmentAmount()?
AnonymousSilent 15 Mar, 2015 @ 4:34pm 
--POSTING AGAIN-- Maybe make a function that calls how many guns there are in the shipment... Like for automatic gunshops
TylerB  [author] 15 Mar, 2015 @ 12:19pm 
are you stupid