Hey,
I want to play a sound when an admin write a message in the chat.
I have made a special command from this (copied from ulx tsay) xD
This is locaeted in the ulx/modules/sh/chat.lua
function ulx.lsay( calling_ply, message)
ULib.tsay( _, message )
end
local lsay = ulx.command( CATEGORY_NAME, "ulx lsay", ulx.lsay, "!l", true )
lsay:addParam{ type=ULib.cmds.StringArg, hint="message", ULib.cmds.takeRestOfLine }
lsay:defaultAccess( ULib.ACCESS_ADMIN )
lsay:help( "Sendet eine Nachricht mit Sound." )
My question is: How can i play a sound, when someone type a message in here?
I tried to put sound.Play( "ambient/explosions/exp1.wav", Vector( 0, 0, 0 ) )
found on a gmod wikia site, but its not working.
Thanks for the help!