EmitSound ?

Hi every one !
Me again …
I’ve added a lot of sounds functions to my DarkRP and it’s so funny now!
But every sounds launch by the “play Soundpath” command.
I want to when the player say attention
A sound is emitted by him.
Here’s my function
[lua]
local function DireAttention()
ent:EmitSound(“stylefrance/attention.mp3”, 500, 200)
end
return “”
end
AddChatCommand(“attention”, DireAttention)
[/lua]
The base function is :
[lua]
local function Garde(ply)
if ply:Team() == TEAM_MAYOR then
for k,v in pairs(player.GetAll()) do
v:ConCommand(“play stylefrance/gardes.mp3
“)
end
PrintMessageAll(HUD_PRINTCENTER , “LE MAIRE A APPELE UN GARDE!”)
NotifyAll(0, 3, “Le maire demande un garde!”)
end
return “”
end
concommand.Add(“rp_garde”, Garde)
AddChatCommand(”/garde”, Garde)
[/lua]
My first function doesn’t work, Why ?
P.S : I want to make the >player< emit the sound !
Thanks (Maybe try (ply) !


(User was banned for this post ("Wrong section" - mahalis))

[lua]local function DireAttention(ply)
ply:EmitSound(“stylefrance/attention.mp3”, 500, 200)
return “”
end
AddChatCommand(“attention”, DireAttention)[/lua]

Thanks (I was banned, so there was any way to say thanks…)