VinniZin Posted July 1, 2021 Share Posted July 1, 2021 Estou com um problema em meu servidor de DayZ em que o corpo morto do player não permanece no chão para ser looteado (a única vez que isso acontece é quando eu entro no server pela primeira vez e morro, depois o corpo morto não fica), simplesmente some, alguem pode me ajudar com isso? sabe qual é esse Bug? Link to comment
TrigerSnoop Posted March 1, 2022 Share Posted March 1, 2022 Segue abaixo algumas dicas que podem ajudar: Procure dentro da gamemode: spawnDayZPlayer E subistitua toda a função por essa: function spawnDayZPlayer(player) if isElement ( player ) then local number = math.random(table.size(spawnPositions)) local x,y,z = spawnPositions[number][1],spawnPositions[number][2],spawnPositions[number][3] spawnPlayer (player, x,y,z, math.random(0,360), 0, 0, 0) setElementFrozen(player, true) fadeCamera (player, true) setCameraTarget (player, player) setTimer( function(player) if isElement(player) then setElementFrozen(player, false) end end,500,1,player) playerCol = createColSphere(x,y,z,1.5) setElementData(player,"playerCol",playerCol) attachElements ( playerCol, player, 0, 0, 0 ) setElementData(playerCol,"parent",player) setElementData(playerCol,"player",true) local account = getPlayerAccount(player) setElementData(player,"headless",false) setPedHeadless(player, false) setElementAlpha(player,255) setAccountData(account,"isDead",false) setElementData(player,"Sprints",false) setElementData(player,"isDead",false) setElementData(player,"logedin",true) setElementData(player,"admin",getAccountData(account,"admin") or false) setElementData(player,"supporter",getAccountData(account,"supporter") or false) for i,data in ipairs(playerDataTable) do setElementData(player,data[1],data[2]) end end end Em seguida procure por kilLDayZPlayer E substitua toda a função por essa function kilLDayZPlayer (killer,headshot,weapon) if getElementData(source,"isDead") then return end setElementData(source,"isDead",true) setElementData(source,"pain",0) if getPedOccupiedVehicle ( source ) then removePedFromVehicle ( source ) end pedCol = false local account = getPlayerAccount(source) if not account then return end killPed(source) setElementAlpha(source,0) triggerClientEvent(source,"hideInventoryManual",source) triggerEvent("removeBackWeaponOnDrop",source) if getElementData(source,"repairerTab") == true then triggerEvent("onClientMovesWhileAnimation",source) end if getElementData(source,"alivetime") > 0 then if not isElementInWater(source) then local x,y,z = getElementPosition(source) if getDistanceBetweenPoints3D (x,y,z,6000,6000,0) > 200 then local x,y,z = getElementPosition(source) local rotX,rotY,rotZ = getElementRotation(source) local skin = getElementModel(source) local ped = createPed(skin,x,y,z,rotZ) setPedClothes(ped, 0, getElementData(source,"cloth0") or 0) setPedClothes(ped, 1, getElementData(source,"cloth1") or 0) setPedClothes(ped, 2, getElementData(source,"cloth2") or 0) setPedClothes(ped, 3, getElementData(source,"cloth3") or 0) setPedClothes(ped, 15, getElementData(source,"cloth15") or -1) setPedClothes(ped, 16, getElementData(source,"cloth16") or -1) pedCol = createColSphere(x,y,z,1.5) setTimer(destroyDeadPlayer,3600000*0.75,1,ped,pedCol) attachElements (pedCol,ped,0,0,0) setElementData(pedCol,"parent",ped) setElementData(pedCol,"playername",getPlayerName(source)) setElementData(pedCol,"deadman",true) local time = getRealTime() local hours = time.hour local minutes = time.minute setElementData(pedCol,"deadreason",getPlayerName(source).." dead! Cause of death: "..(weapon or "Unknown")..". Time of death: "..hours..":"..minutes.." hours.") end end end Espero ter ajudado qualquer duvida pode me chamar no discord, abraço. Link to comment
Administrators Tut Posted March 2, 2022 Administrators Share Posted March 2, 2022 Locking this as it has been inactive for 7 months. If you still need help with this, please create another thread Link to comment
Recommended Posts