• DarkRP Custom ChatSounds for a specific Job
    4 replies, posted
Hello, I've been trying to make a script that makes it so only a CERTAIN JOB would have Custom chatsounds. I did the following: function PoliceSounds( ply ) if ply:Team() == TEAM_POLICE then DarkRP.setChatSound("roger that", {"npc/metropolice/vo/rodgerthat.wav"})  end end hook.Add("OnPlayerChangedTeam", "MetroPoliceSounds", PoliceSounds) ALL jobs can use the DarkRP.setChatSound in this code, any help?
Hooks/Server/canChatSound
Hey. thanks for replying, I've tried doing this in several ways (I'm not the best coder), yet none of them worked. I've tried this: function Example( ply, cht, txt ) if ply:Team() == TEAM_EXAMPLE then DarkRP.setChatSound("test", {"npc/metropolice/vo/prepareforjudgement.wav"}) return true else return false end end hook.Add("canChatSound", "Test", Example) I've also tried using if cht == test yet it did not work (at least the way I did it), am I using the hook wrong?; Thanks again.
Very
Not very helpful, can you be a bit more detailed so I can understand what I did wrong? As I'm quite sure I've done everything correctly.
Sorry, you need to Log In to post a reply to this thread.