1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
addhook("serveraction","my_serveraction")
function my_serveraction(id,action)
	if(action ==1)then
		menu(id, "Radio Sounds!, Hit em up, Prepare for fight, Unstoppable")
	end
end
radioButtons = { {title = "Hit me up!", sound=" \"fun/hitemup.wav\""},{title = "Prepare for war!",sound= " \"fun/prepare.wav\""},{title = "Unstoppable!", sound =" \"fun/unstoppable.wav\""}}
addhook("menu","my_menu")
function my_menu(id, title, button)
	if(title == "Radio Sounds!")then
		if(button >0 and button <4)then
			for p in ipairs(player(0,"table"))do
				if(player(p,"team")==player(id,"team"))then
					parse("sv_sound2 "..p.." "..radioButtons[button].sound)
					msg2(p,player(id,"name").."(radio): "..radioButtons[button].title)
				end
			end
		end
	end
end