- Initiateur de la discussion
Benleosky37
Geek suprême
- Messages
- 65
- Score réaction
- 3
- Points
- 115
Bonjour j'ai ajouter un script sur mon serveur qui permet que des quon commence a parler sa lance un son mes comment faire pour que sela fonctionne pour certaint job ?
resource.AddFile( "sound/MC/on1.wav" )
resource.AddFile( "sound/MC/on2.wav" )
resource.AddFile( "sound/MC/off1.wav" )
resource.AddFile( "sound/MC/off2.wav" )
resource.AddFile( "sound/MC/off3.wav" )
resource.AddFile( "sound/MC/off4.wav" )
local function PlayerStartVoice( ply )
local client = LocalPlayer()
if ( ply:IsPlayer() ) then
client:EmitSound("MC/on2.wav")
end
end
hook.Add( "PlayerStartVoice", "PlayerStartedTheirVoice", PlayerStartVoice)
local function PlayerEndVoice( ply )
local client = LocalPlayer()
if ( ply:IsPlayer() ) then
client:EmitSound("MC/off2.wav")
end
end
hook.Add( "PlayerEndVoice", "PlayerEndedTheirVoice", PlayerEndVoice)
resource.AddFile( "sound/MC/on1.wav" )
resource.AddFile( "sound/MC/on2.wav" )
resource.AddFile( "sound/MC/off1.wav" )
resource.AddFile( "sound/MC/off2.wav" )
resource.AddFile( "sound/MC/off3.wav" )
resource.AddFile( "sound/MC/off4.wav" )
local function PlayerStartVoice( ply )
local client = LocalPlayer()
if ( ply:IsPlayer() ) then
client:EmitSound("MC/on2.wav")
end
end
hook.Add( "PlayerStartVoice", "PlayerStartedTheirVoice", PlayerStartVoice)
local function PlayerEndVoice( ply )
local client = LocalPlayer()
if ( ply:IsPlayer() ) then
client:EmitSound("MC/off2.wav")
end
end
hook.Add( "PlayerEndVoice", "PlayerEndedTheirVoice", PlayerEndVoice)