Syntax: Select all
from core import GameEngine
from Source import Shared
def server_spawn(GameEvent):
#in this event i usally precached 'sprites/laserbeam.vmt'
#How would i go for a custom sound file do i precache it? and how would i add it to downloadables
Recipients = Shared.MRecipientFilter()
index = Player.IndexOfUserid(userid)
Recipients.AddRecipient(index)
UserMessage = GameEngine.UserMessageBegin(Recipients, 17, None)
UserMessage.WriteString(audio)
GameEngine.MessageEnd()
Thanks in advance