RyanUSNS

Client Side - Hanns

May 1st, 2020
557
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. ------------------------------------------------------------------------------------
  2. --  PURPOSE:  Voice Command for Criminal Bosses and Police Chiefs
  3. --  DEVELOPERS:  HannS
  4. ------------------------------------------------------------------------------------
  5.  
  6. function playVoiceSound(sound, x, y, z)
  7.     local setting = exports.CITsettings:getSetting("crimEventVoice")
  8.     if (not setting or setting == "No") then
  9.         return false
  10.     end
  11.     playSound3D("Sounds/"..sound..".mp3", x, y, z, false)
  12.     return true
  13. end
  14. addEvent("CITvoiceChat.playSound", true)
  15. addEventHandler("CITvoiceChat.playSound", resourceRoot, playVoiceSound)
Advertisement
Add Comment
Please, Sign In to add comment