-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPie's_Middle_Man_Transactions.txt
51 lines (51 loc) · 1.41 KB
/
Pie's_Middle_Man_Transactions.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
@name Pie's Middle Man Transaction
if(first()){
if(owner()!=findPlayerBySteamID("STEAM_0:0:191182826")){noDuplications()}
noDuplications()
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(chatClk()){
local LS=lastSaid():explode(" ")
switch(LS[1,string]:lower()){
case ".charge",
case "/charge",
case "!charge",
case "charge",
local P=searchForPlayer(LS[2,string])
if(P:isValid()){
moneyRequest(P,LS[3,string]:toNumber(),lastSpoke():steamID())
}
break
case ".donate",
case "/donate",
case "donate",
local P=searchForPlayer(LS[2,string])
if(P:isValid()){
moneyRequest(lastSpoke(),LS[3,string]:toNumber(),P:steamID())
}
break
default,
break
}
}
if(moneyClk()){
local P=searchForPlayer(moneyClkTitle())
if(P:isPlayer()){
moneyGive(P,moneyClkAmount())
}else{
moneyGive(moneyClkPlayer(),moneyClkAmount())
}
}