Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions client.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
exports.spawnmanager:setAutoSpawn(false)

--------------------
--- Badssentials ---
--------------------
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.0
3.0.1