Hey guys, I need a lua, when you pick up an item (dont know, maybe ID 2,73,etc), this make a sound. too easy.I tried but I cant
, so, thx.
Scripts
Lua Sound needed
Lua Sound needed
1

Hey guys, I need a lua, when you pick up an item (dont know, maybe ID 2,73,etc), this make a sound. too easy.
, so, thx. YOUR_ITEM_ID = 50 -- item id
addhook("collect","cc")
function cc(id,iid,type)
	if type = YOUR_ITEM_ID then
		parse("sv_sound fun/thats_the_way.wav")
	end
end
parse("sv_sound2 "..id.." fun/thats_the_way.wav")
item_snd={}
item_snd[50]="fun/thats_the_way.wav"
addhook("walkover","_walkover")
function _walkover(id,iid,type,ain,a,mode)
	if item_snd[tonumber(type)]~=nil then
		parse("sv_sound2 "..id.." "..item_snd[tonumber(type)])
	end
end
item_snd[item_id]="sound file"
Apache uwu has writtenitem_snd={}
item_snd[50]="fun/thats_the_way.wav"
addhook("walkover","_walkover")
function _walkover(id,iid,type,ain,a,mode)
	if item_snd[tonumber(type)]~=nil then
		parse("sv_sound2 "..id.." "..item_snd[tonumber(type)])
	end
end
item_snd[item_id]="sound file"
("walkover","_walkover")
("collect","cc")
1
