shadowndacorner

Untitled

Oct 11th, 2011
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. // SERVERSIDE - add to terrortown/gamemode/init.lua
  2. function _R.Player:PlaySound(sound)
  3.     umsg.Start("playsound", self)
  4.         umsg.String(sound)
  5.     umsg.End()
  6. end
  7.  
  8. hook.Add("PlayerInitialSpawn", "IntroSound", function(ply)
  9.     timer.Simple(1, function()
  10.         ply:PlaySound("rvgttt/intro.mp3")
  11.     end)
  12. end)
  13.  
  14. // CLIENTSIDE - add to terrortown/gamemode/cl_init.lua
  15.  
  16. usermessage.Hook("playsound", function(data)
  17.     local sfile=data:ReadString()
  18.     surface.PlaySound(sfile)
  19. end)
Advertisement
Add Comment
Please, Sign In to add comment