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.

27 lines
832 B
Lua

/*---------------------------------------------------------
CleanRP SoundMaster
Copyright © 2017 Jonas Hogeback / UltimateRP
All Rights Reserved
Website: UltimateRP.net
-----------------------------------------------------------*/
SoundMaster = SoundMaster or {}
-- SoundMaster.BoughtSound(Player(), Typ String, Mode String)
-- Example:
-- SoundMaster.BoughtSound(ply,"ca_ching", "local")
function SoundMaster.BoughtSound(activator,typ,mode)
-- Sound Type
if (typ == "ca_ching") then
pitch = math.random(70, 130)
sound = "soundmaster/bought/cash.mp3"
end
-- Local or Global
if (mode == "global") then
activator:EmitSound(sound, 100, pitch)
elseif (mode == "local") then
activator:SendLua("LocalPlayer():EmitSound('"..sound.."', 100, "..pitch..")");
end
end