local sonerhealcheck = nil
local sonerarmorcheck = nil
local sonerdelay = false
local PlayerProps = {}
RegisterCommand("yenile", function()
local xPed = PlayerPedId()
if sonerdelay == false then
if not IsPedSwimming(PlayerPedId()) and not IsEntityPlayingAnim(PlayerPedId(), "re@construction", "out_of_breath", 1) and not IsEntityInWater(PlayerPedId()) and not IsPedFalling(PlayerPedId()) and not exports["tgiann-mekanikv2"]:inMechanicMenu() and not IsPedRagdoll(PlayerPedId()) then
sonerdelay = true
QBCore.Functions.Notify("KARAKTERİNİ DÜZELTME İŞLEMİ BAŞLADI LÜTFEN BU BİLDİRİM GİDENE KADAR HERHANGİBİ BİR İŞLEM YAPMA VE SABİT KAL!", "error", 4000)
ExecuteCommand("e c")
sonerhealcheck = GetEntityHealth(xPed)
sonerarmorcheck = GetPedArmour(xPed)
print("Oyuncunun çekilen canı:" ..sonerhealcheck.."")
print("Oyuncunun çekilen armoru:" ..sonerarmorcheck.."")
ClearPedTasks(xPed)
DestroyAllProps()
ClearAllPedProps(xPed)
SetCurrentPedWeapon(xPed, GetHashKey("WEAPON_UNARMED"), true)
ClearPedTasksImmediately(xPed)
ClearPedScubaGearVariation(xPed)
ClearPedBloodDamage(xPed)
ResetPedVisibleDamage(xPed)
RemoveAllPedWeapons(xPed, false)
ClearPedSecondaryTask(xPed)
SetPedCanPlayGestureAnims(ped, true)
SetPedIsDrunk(PlayerPedId(), false)
StopScreenEffect("DrugsMichaelAliensFightIn")
StopScreenEffect("DrugsMichaelAliensFight")
ClearPedSecondaryTask(PlayerPedId())
ShakeGameplayCam("DRUNK_SHAKE", 0.0)
ResetPedMovementClipset(PlayerPedId(), 0)
Citizen.Wait(500)
QBCore.Functions.TriggerCallback('fivem-appearance:getPlayerSkin', function(appearance)
exports['fivem-appearance']:setPlayerAppearance(appearance)
end)
for k, v in pairs(GetGamePool('CObject')) do
if IsEntityAttachedToEntity(PlayerPedId(), v) then
SetEntityAsMissionEntity(v, true, true)
DeleteObject(v)
DeleteEntity(v)
end
end
Citizen.Wait(1000)
SetEntityHealth(PlayerPedId(), sonerhealcheck)
SetPedArmour(PlayerPedId(), sonerarmorcheck)
print("Oyuncunun ayarlanan canı:" ..sonerhealcheck.."")
Citizen.Wait(1000)
QBCore.Functions.Notify("Karakter yenileme ve düzeltme işlemin başarıyla tamamlandı.")
sonerdelay = false
end
else
QBCore.Functions.Notify("Karakterin zaten yenileniyor, Bekle!", "error", 2500)
end
end)
function DestroyAllProps()
for _,v in pairs(PlayerProps) do
DeleteEntity(v)
end
end