Стим ID и серверная часть игры.

Novichek

Активный
18 Фев 2020
123
14
Проект
Evo Land
подскажите пожалуйста.
Почему код в хамере выполняется а в самой доте нет?
проверку на сервера добавляю а ничего не происходит.
Все файлы подгружены и активированы, и работают, но вот конкретно он не хочет почему то.
Lua:
player_id = {
    ["76561199569876451"] = "Shram",
    ["76561198807008073"] = "Разраб",
    ["76561198301403669"] = "Карась",
}
if id_players == nil then
    _G.id_players = class({})
end
function id_players:InitGameMode()
    if not IsServer() then return end
    print("ПЕРЕХОД К CheckId")
    Timers:CreateTimer(25, function()
        GameMode:CheckId()
    end)
end
function GameMode:CheckId()
    if not IsServer() then return end
    print("CheckId РАБОТАЕТ")
    local heroes = HeroList:GetAllHeroes()
    for _, hero in pairs(heroes) do
        local playerID = hero:GetPlayerID()
        print(playerID)
        local steamID = tostring(PlayerResource:GetSteamID(playerID))
        if player_id[steamID] ~= nil then
            if player_id[steamID] == "Разраб" then
                local item = CreateItem("item_sf_don", hero, hero)
                hero:AddItem(item)
            end
        end
    end
end
1715442573902.png
 
Реклама: