Forum

> > CS2D > General > "Spawn" Sounds.
Forums overviewCS2D overviewGeneral overviewLog in to reply

English "Spawn" Sounds.

1 reply
To the start Previous 1 Next To the start

old closed "Spawn" Sounds.

Marijuana
User Off Offline

Quote
Is it possible to play a sound when a certain TYPE of player spawns?

By TYPE I mean, Seal Team 6 or GIGN. I have a different sound dedicated to all types of Terrorists and Counter-Terrorists within the game, but I'm not sure what the LUA function or command is.

Looking at the SMOD Server LUA coding provided with the SMOD mod, I've noticed something involving different looks of CT and T. But when I tried to make it run a sound file, it wouldn't run.

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
addhook("spawn","pl_spawn")
function pl_spawn(id)
	if (player(p,"team")==1) then
		elseif (player(p,"look")==0) then
		parse("sv_sound2 "..id.." sfx/mod/spawn/t_phoenix.wav")
		elseif (player(p,"look")==1) then
		parse("sv_sound2 "..id.." sfx/mod/spawn/t_leet.wav")
		elseif (player(p,"look")==2) then
		parse("sv_sound2 "..id.." sfx/mod/spawn/t_arctic.wav")
		elseif (player(p,"look")==3) then
		parse("sv_sound2 "..id.." sfx/mod/spawn/t_guerilla.wav")
		end
		end
	
function pl_spawn(id)
	if (player(p,"team")==2) then
		elseif (player(p,"look")==0) then
		parse("sv_sound2 "..id.." sfx/mod/spawn/ct_st6.wav")
		elseif (player(p,"look")==1) then
		parse("sv_sound2 "..id.." sfx/mod/spawn/ct_gsg9.wav")
		elseif (player(p,"look")==2) then
		parse("sv_sound2 "..id.." sfx/mod/spawn/ct_sas.wav")
		elseif (player(p,"look")==3) then
		parse("sv_sound2 "..id.." sfx/mod/spawn/ct_gign.wav")
		end
		end

What needs to be edited, removed, or possibly added?
edited 2×, last 19.07.10 10:00:49 pm
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview