You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
979 B
Lua
34 lines
979 B
Lua
/*---------------------------------------------------------—
|
|
CleanRP SoundMaster
|
|
|
|
Copyright © 2017 Jonas Hogeback / UltimateRP
|
|
All Rights Reserved
|
|
Website: UltimateRP.net
|
|
—-----------------------------------------------------------*/
|
|
|
|
SoundMaster = SoundMaster or {}
|
|
|
|
function SoundMaster.EatSound(activator,rulps)
|
|
local sounds =
|
|
{
|
|
{"soundmaster/food/yumyum.mp3", 2.3},
|
|
{"soundmaster/food/yumyum2.mp3", 3}
|
|
}
|
|
|
|
local rand = math.random(1, #sounds)
|
|
activator:EmitSound(sounds[rand][1], 100, math.random(70, 130))
|
|
|
|
if rulps then
|
|
timer.Simple(sounds[rand][2],function()
|
|
local sounds = {
|
|
"soundmaster/food/rulps1.mp3",
|
|
"soundmaster/food/rulps2.mp3",
|
|
"soundmaster/food/rulps3.mp3",
|
|
"soundmaster/food/rulps4.mp3",
|
|
"soundmaster/food/rulps5.mp3"
|
|
}
|
|
local rand = math.random(1, #sounds)
|
|
activator:EmitSound(sounds[rand], 100, math.random(50, 130))
|
|
end)
|
|
end
|
|
end |