if (!ply.isGhost) then
GAMEMODE:PlayerCanHearPlayersVoice(false, false)
end
Do i need to hook this?
[code]hook.Add( "PlayerCanHearPlayersVoice", "forgotThis", function( p1, p2 ) if ( p1.isGhost ) then return false end end )[/code]
[QUOTE=Robotboy655;41774865][lua]hook.Add( "PlayerCanHearPlayersVoice", function( p1, p2 )
if ( p1.isGhost ) then return false end
end )[/lua][/QUOTE]
Getting error on line 2 near hook,my fault :P
Add the name of the hook.
[QUOTE=MeepDarknessM;41775196]Add the name of the hook.[/QUOTE]
I just noticed,derp
[editline]9th August 2013[/editline]
[QUOTE=Hydrogengamin;41775213]I just noticed,derp[/QUOTE]
[CODE]function quiet()
hook.Add( "PlayerCanHearPlayersVoice", function( p1, p2 )
if ( p1.isGhost ) then return false end
end )
quiet()[/CODE]
[QUOTE=>>oubliette<<;41775295]Still wrong
[lua]
hook.Add("HOOK TYPE", "HOOK NAME", function() /* lalalala */ end);
[/lua][/QUOTE]
[CODE]function quiet()
hook.Add("PlayerCanHearPlayersVoice", "PlayerSay", function() end);
if ( ply.isGhost ) then return false end
end )[/CODE]
You're all doing it wrong. Use RobotBoy's method, except after "PlayerCanHearPlayersVoice", add a unique identifier (such as "PlayerSay" as mentioned above).
[CODE]function quiet()
hook.Add( "PlayerCanHearPlayersVoice", "PlayerSay", function( p1, p2 );
if ( p1.isGhost ) then return false end
end )[/CODE]
[QUOTE=Hydrogengamin;41775507][CODE]function quiet()
hook.Add( "PlayerCanHearPlayersVoice", "PlayerSay", function( p1, p2 );
if ( p1.isGhost ) then return false end
end )[/CODE][/QUOTE]
What are you doing? No. Don't add "function quiet()" it has no place here.
[QUOTE=EvacX;41775534]What are you doing? No. Don't add "function quiet()" it has no place here.[/QUOTE]
Ok
So i remove function quiet,okay
[editline]9th August 2013[/editline]
Ill try it in a min. EDIT; Didnt work after i put it like this,error on then
[CODE]hook.Add( "PlayerCanHearPlayersVoice", "PlayerSay", function( p1, p2 ) then
if ( p1.isGhost ) then return false end
end )[/CODE]
Sorry, you need to Log In to post a reply to this thread.