Forum
Scripts
Radio
Radio
5 replies
1

1
ADMINS = {1,2732,39045}
1
if string.sub(txt,1,6) == !radio then
and msg2, so only a certain player will see the message.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
ADMINS = {1,245,8529} -- Admins right here
addhook("say","say_")
function say_(id,txt)
	for i = 1, 32 do
		if player(id,"usgn") == ADMINS[i] then
			if (string.sub(txt, 1, 6) == "!radio") then
				pl = string.sub(txt, 8, 9)
				msg = string.sub(txt, 10)
				if pl < "10" then
					pl = string.sub(txt, 8, 8)
					msg = string.sub(txt, 10)
				end
				msg2(pl,""..player(id,"name").." [Private Message]: "..msg.."")
				return 1
			end
		end
	end
end
If anybody find a mistake, correct me!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
ADMINS = {1,245,8529} -- Admins right here
addhook("say","say_")
function say_(id,txt)
	for i = 1, #player(0,"table") do
		if player(id,"usgn") == ADMINS[i] then
			if txt:sub(1,6) == "!radio" then
				pl = tonumber(txt:sub(8,9))
					msg = txt:sub(10)
					if pl < "10" then
						pl = tonumber(txt:sub(8,9))
					msg = txt:sub(10)
					end
			msg2(pl,player(id,"name").." [Private Message]: "..msg)
			return 1
			end
		end
	end
end
1

Offline