• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

The Player stands after death

Crystals

Member
Joined
Sep 28, 2024
Messages
51
Reaction score
9
TFS 142 otcv8

Hello,Maybe someone will be able to help me with this. After death, the character "stands" instead of only seeing the dead body. If someone is standing next to you, they see everything normally. Only the owner sees as on the screen. Does anyone know how to solve this problem?
 

Attachments

you replaced /data/lib files that have the stamina functions. or changed them leading to your creaturescripts stamina onlogin logout getting corrupted or using functions that are not properly functioning because of different functions of that tfs version
:) i know because that is what happens for example if you copy orts2 into tfs 1.4.2
hehe
Post automatically merged:

data/global.lua
LUA:
if not nextUseStaminaTime then
    nextUseStaminaTime = {}
end


-- Stamina
if nextUseStaminaTime == nil then
    nextUseStaminaTime = {}
end

events/scripts/player.lua

LUA:
local function useStamina(player)
    local staminaMinutes = player:getStamina()
    if staminaMinutes == 0 then
        return
    end

    local playerId = player:getId()
    if not nextUseStaminaTime[playerId] then
        nextUseStaminaTime[playerId] = 0
    end

    local currentTime = os.time()
    local timePassed = currentTime - nextUseStaminaTime[playerId]
    if timePassed <= 0 then
        return
    end

    if timePassed > 60 then
        if staminaMinutes > 2 then
            staminaMinutes = staminaMinutes - 2
        else
            staminaMinutes = 0
        end
        nextUseStaminaTime[playerId] = currentTime + 120
    else
        staminaMinutes = staminaMinutes - 1
        nextUseStaminaTime[playerId] = currentTime + 60
    end
    player:setStamina(staminaMinutes)
end
Post automatically merged:

so yeah please add your global.lua the stamina functions from top then in events ensure u hve the using stamina functions\

how do I know?
Season 2 Andy GIF by Parks and Recreation
 
Last edited:
Solved. Problem was in features.lua

After removing the green "g_game.enableFeature(GameExtendedOpcode)" suddenly the protocolgame 0x00 errors stopped popping up, the store works, and when the character dies it's 100% :D

I'm leaving the information, maybe it will be useful to someone :)
 

Attachments

Solved. Problem was in features.lua

After removing the green "g_game.enableFeature(GameExtendedOpcode)" suddenly the protocolgame 0x00 errors stopped popping up, the store works, and when the character dies it's 100% :D

I'm leaving the information, maybe it will be useful to someone :)
its server side issue. you removing a line that was redundant and already commented there is nothing to do with it.
 
Last edited:
Back
Top