Created
May 28, 2017 18:02
-
-
Save moonexpr/bc6cd45995c820a38fdc489f06d860cd to your computer and use it in GitHub Desktop.
Assists with sound assets over HTTP[s]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
util.AddNetworkString ("ISoundManager/Play") | |
soundmanager = {} | |
function soundmanager:Broadcast (strURL) | |
net.Start ("ISoundManager/Play") | |
net.WriteString (strURL) | |
net.Broadcast () | |
end | |
function soundmanager:Send (strURL, mxClients) | |
net.Start ("ISoundManager/Play") | |
net.WriteString (strURL) | |
if type (mxClients) == "table" then | |
for i = 1, #mxClients do | |
net.Send (mxClients [i]) | |
end | |
elseif type (mxClients) == "Player" then | |
net.Send (mxClients) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment