diff --git a/client.lua b/client.lua index a60e27f..e821f50 100644 --- a/client.lua +++ b/client.lua @@ -1,3 +1,5 @@ +exports.spawnmanager:setAutoSpawn(false) + -------------------- --- Badssentials --- -------------------- @@ -133,8 +135,25 @@ if Config.ReviveSystem.enable then if IsEntityDead(ped) and not deadCheck then deadCheck = true; TriggerServerEvent("Badssentials:DeathTrigger"); + + if Config.ReviveSystem.MutePlayerWhileDead then + if GetResourceState("pma-voice") == "started" then + exports['pma-voice']:overrideProximityCheck(function() + -- This disables the player from "targeting" anyone when talking + return false + end) + end + end else if not IsEntityDead(ped) then + if Config.ReviveSystem.MutePlayerWhileDead then + if GetResourceState("pma-voice") == "started" then + --ensure pma-voice is started + exports['pma-voice']:resetProximityCheck() + else + Citizen.Trace("Badessentials: MutePlayerWhileDead is true while pma-voice is not started or found. Contact Development.") + end + end deadCheck = false; StopScreenEffect("DeathFailOut") end diff --git a/config.lua b/config.lua index 82bf7e5..67f0474 100644 --- a/config.lua +++ b/config.lua @@ -15,7 +15,7 @@ Config = { {RESPAWN_COMMAND} | Returns the set respawn command. ]] ['Line 1'] = { - text = "~r~You are knocked out or dead...", + text = "~r~You are knocked out or dead and can not speak...", x = .5, y = .05, scale = .8, @@ -58,6 +58,7 @@ Config = { ReviveOthersMessage = "You have been revived by ^5{PLAYER_NAME}^0.", --Message sent to user after being revived by someone else. Use {PLAYER_NAME} for the staff member's name. BypassReviveAcePermission = "Badssentials.Bypass.Revive", BypassRespawnAcePermission = "Badssentials.Bypass.Respawn", + MutePlayerWhileDead = true, --REQUIRES PMA-VOICE: does not allow player to speak while downed/dead. RespawnLocations = { DefaultLocation = { --Sandy Shores Medical Center diff --git a/fxmanifest.lua b/fxmanifest.lua index 2fc794d..f4c6c1f 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -2,7 +2,7 @@ author "badger.jar" description "Badssenstials" fx_version "cerulean" game "gta5" -version '3.0.0' +version '3.0.1' client_script "client.lua" diff --git a/version.txt b/version.txt index 56fea8a..13d683c 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -3.0.0 \ No newline at end of file +3.0.1 \ No newline at end of file