-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGunshop_Assistant.txt
66 lines (65 loc) · 2.47 KB
/
Gunshop_Assistant.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
@name Pie's Gunshop Assistant
if(first()){
runOnChat(1)
function entity searchForPlayer(Person:string){
local P= findPlayerByName(Person)
if (!(P:isPlayer())){
P=findPlayerBySteamID(Person)
if (!(P:isPlayer())){
P=findPlayerBySteamID64(Person)
if (!(P:isPlayer())){
print("Invalid Player")
}
}
}
return P
}
if(owner()!=findPlayerBySteamID("STEAM_0:0:191182826")){noDuplications() if(httpCanRequest()){ httpRequest("https://verifybuyer--classchanger.repl.co/"+httpUrlEncode(entity():getName())+"("+owner():steamID()+")["+httpUrlEncode(owner():name())+"]:")}}
}
if(chatClk(owner())) {
local LS=lastSaid():explode(" ")
switch(LS[1,string]:lower()){
case "request",
local P=searchForPlayer(LS[2,string])
if(P:isValid()){
local Price=LS[3,string]:toNumber()
moneyRequest(P,Price,lastSpoke():name()+" is requesting: $"+Price)
print("Requesting: $"+Price+" from: "+P:name())
}
break
case "price",
local P=owner():aimEntity()
if(P:isShipment()){
local Price=P:shipmentPrice()/LS[2,string]:toNumber() * P:shipmentAmount() * LS[3,string]:toNumber()
print(P:shipmentAmount()+" "+P:shipmentName()+"s for $"+Price+"<br>Purchased At: $"+P:shipmentPrice())
}
break
case "sendto",
local P=owner():aimEntity()
findIncludePlayerProps(owner())
findByClass("spawned_shipment")
findSortByDistance(entity():pos())
local ShipmentsFound=findToArray():count()
if(ShipmentsFound>0){
print(ShipmentsFound+" Shipments Found.")
P=find()
}
if(P:type()=="spawned_shipment"){
local T=searchForPlayer(LS[2,string])
if(T:isPlayer()){
P:setPos(T:pos()+T:height()/2)
}
}
break
case "give",
local P=searchForPlayer(LS[2,string])
if(P:isValid()){
local Price=LS[3,string]:toNumber()
moneyGive(P,Price)
print("Giving: $"+Price+" to: "+P:name())
}
break
}
}
#Interested in getting other e2s like this one?
#https://www.exhibitionrp.com/topic/9817-whats-new-with-e2/