Question. Not sure if this is an issue on my end. But I am using RP Revive in my server. I am trying to replace the old notification with this, but I am running into an issue.
When I die in game, I hear the tone of the label popping up, but nothing shows on screen.
Here’s my current code:
while true do
Citizen.Wait(0)
ped = GetPlayerPed(-1)
if IsEntityDead(ped) then
-- ShowInfoRevive('~r~You Are Dead ~w~Please wait ~y~'.. tostring(reviveWait) ..' Seconds ~w~ before choosing an action')
SetPlayerInvincible(ped, true)
SetEntityHealth(ped, 1)
ShowInfoRevive()
if ( IsControlJustReleased( 0, 38 ) or IsDisabledControlJustReleased( 0, 38 ) ) and GetLastInputMethod( 0 ) then
revivePed(ped)
elseif ( IsControlJustReleased( 0, 65 ) or IsDisabledControlJustReleased( 0, 65 ) ) and GetLastInputMethod( 0 ) then
local coords = spawnPoints[math.random(1,#spawnPoints)]
respawnPed(ped, coords)
allowRespawn = false
respawnCount = respawnCount + 1
math.randomseed( playerIndex * respawnCount )
end
end
end
end)
function revivePed(ped)
local playerPos = GetEntityCoords(ped, true)
NetworkResurrectLocalPlayer(playerPos, true, true, false)
SetPlayerInvincible(ped, false)
ClearPedBloodDamage(ped)
end
function ShowInfoRevive()
BeginTextCommandDisplayHelp("STRING")
AddTextComponentSubstringPlayerName("~r~You have died! ~w~Use ~INPUT_PICKUP~ to revive.")
AddTextComponentFloat(100.3948, 2)
EndTextCommandDisplayHelp(0, 0, 1, -1)
end
Hope someone can help. Thanks in advance!