Forum
Scripts
How can I play sounds using tables
How can I play sounds using tables
3 replies
1

1
2
3
4
5
6
7
2
3
4
5
6
7
a = {"a.ogg", "b.ogg"}
function whatever(p)
	parse ("sv_sound /"..a[p])
end
whatever(1)
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
sounds = {"a.ogg", "b.ogg"}
function whatever()
	for k, v in pairs(sounds) do
		parse("sv_sound \"..v);
	end
end
whatever()
1

Offline