• 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!

Outfit window show everytime when i login [TFS 1.5]

Dran Ryszard

Active Member
Joined
Apr 25, 2023
Messages
136
Reaction score
30
Location
Poland
Hi, Any ideas how to remove outfit window after login? TFS 1.5 8.6 Nekiro (version by @Mateus Robeerto with modal windows)
Im check login.lua and its not here, i was remove few lines and without it, window still showing when i login :(
I search "player:sendOutfitWindow()" in all files of datapack, and it find only in login.lua and in luscript.cpp.. So i don't know why it showing still?

LUA:
    if player:getLastLoginSaved() <= 0 then
        loginStr = loginStr .. " Please choose your outfit."
        player:sendOutfitWindow()
        player:addMount(13)
    else
        if loginStr ~= "" then
            player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
        end

        loginStr = string.format("Your last visit in %s: %s.", serverName, os.date("%d %b %Y %X", player:getLastLoginSaved()))
    end

1746393777466.webp
 
try find in datapack "sendOutfitWindow", maybe you have another script that calls this function
In case this didn't help send the same function in source maybe you add it by mistake why implementing custom cosmetics like (bars here) if 860 then you might have added mounts too sendOutfitWindow as well on source as far as i remember, goodluck
 
@Marko999x
LUA:
function onLogin(player)
    local serverName = configManager.getString(configKeys.SERVER_NAME)
    local loginStr = "Welcome to " .. serverName .. "!"
    if player:getLastLoginSaved() <= 0 then
        loginStr = loginStr .. " Please choose your outfit."
        player:sendOutfitWindow()
        player:addMount(13)
    else
        if loginStr ~= "" then
            player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
        end

        loginStr = string.format("Your last visit in %s: %s.", serverName, os.date("%d %b %Y %X", player:getLastLoginSaved()))
    end
    player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)

    -- Login Mount Toggle
    player:toggleMount()
    -- End Login mount Toggle

    -- Events
    player:registerEvent("PlayerDeath")
    player:registerEvent("DropLoot")
    player:registerEvent("GameStore")


    return true
end
 
Remove
player:sendOutfitWindow()
@Marko999x
LUA:
function onLogin(player)
    local serverName = configManager.getString(configKeys.SERVER_NAME)
    local loginStr = "Welcome to " .. serverName .. "!"
    if player:getLastLoginSaved() <= 0 then
        loginStr = loginStr .. " Please choose your outfit."
        player:sendOutfitWindow()
        player:addMount(13)
    else
        if loginStr ~= "" then
            player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
        end

        loginStr = string.format("Your last visit in %s: %s.", serverName, os.date("%d %b %Y %X", player:getLastLoginSaved()))
    end
    player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)

    -- Login Mount Toggle
    player:toggleMount()
    -- End Login mount Toggle

    -- Events
    player:registerEvent("PlayerDeath")
    player:registerEvent("DropLoot")
    player:registerEvent("GameStore")


    return true
end
Post automatically merged:

I think your character on logout doesn't even get the lastlogin so it read it always as 0 maybe it is iologin.cpp problem try using another one (default nekiro 1.5) and let us know.
 
Remove
player:sendOutfitWindow()

Post automatically merged:

I think your character on logout doesn't even get the lastlogin so it read it always as 0 maybe it is iologin.cpp problem try using another one (default nekiro 1.5) and let us know.

Nope thats not solution, i said yesterday (few post up), i was remove that line and window still showing, i tried remove a lastlogin check, and add storage check and same situation ;/
 
can you share player:toggleMount() cpp code?

Heh, i don't thinked that problem be with mounts :D
Ye in toggleMount() is code:
LUA:
        uint8_t currentMountId = getCurrentMount();
        if (currentMountId == 0) {
            sendOutfitWindow();
            return false;
        }

And it show window if player not have mount, then i have permament window after login :D
When i remove it all good!
 
Last edited:
LUA:
    -- Login Mount Toggle
    player:toggleMount()
    -- End Login mount Toggle

this part in your login.lua makes no sense, source is good.

Its sense, couse i change mounts for use it evrywhere, on pz too and i want toggle mount if player login 😅 But ye, that not problem with source, couse i use function toggleMount every login, when it normal is using when player try use mount without selected any 😅

So ye, that's not problem with sources, i forgott about it. My bad
 
Back
Top