1
2
3
4
5
6
7
ms.colours={
["White"]="\169255255255",
["Red"]="\169255000000",
["Green"]="\169000255000",
["Blue"]="\169000000255",
["Orange"]="\169255075000",
}
so you can use them in the code below: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
ms={}
ms.adminlist={42632,114940}
ms.colours={
	["White"]="\169255255255",
	["Red"]="\169255000000",
	["Green"]="\169000255000",
	["Blue"]="\169000000255",
	["Orange"]="\169255075000",
}
function initArray(m)
local array = {}
for i = 1, m do
array[i]=0
end
return array
end
ms.money=initArray(32)
function ms.moneyshow(id)
	parse('hudtxt2 '..id..' 1 "'..ms.colours["Orange"]..' Jail Packs: '..ms.money[id]..' " 13 400')
end
function ms.addmoney(id, amount)
	ms.money[id] = ms.money[id] + amount
	ms.moneyshow(id)
end
addhook("say","ms.say")
function ms.say(id,txt)
	if string.sub(txt,1,10)=="!addmoney " then
		for _,usgn in ipairs(ms.adminlist) do
			if player(id,"usgn")==usgn then
				local pid, amount=string.match(txt,"!addmoney (.*) (.*)")
				pid=tonumber(pid)
				amount=tonumber(amount)
				if pid~=0 and pid~=nil then
					if amount~=0 and amount~=nil then
						if player(pid,"exists") then
							ms.addmoney(pid, amount)
							msg2(id,ms.colours["Green"].."Successfuly added "..amount.." money to "..player(pid,"name"))
							msg2(pid,ms.colours["Green"]..player(id,"name").." used to !addmoney command and added you "..amount.." money")
						else
							msg2(id,ms.colours["Red"].."Error: player is not exists")
						end
					else
						msg2(id,ms.colours["Red"].."Error: incorrect money value")
					end
				else
					msg2(id,ms.colours["Red"].."Error: incorrect player id")
				end
			break
			end
		end
	return 1
	end
end