欢迎光临散文网 会员登陆 & 注册

分享一个CSGO头号特训自动匹配/超时重开/热身之后自动退出脚本

2023-06-12 08:28 作者:CSGO头号特训  | 我要投稿

自动匹配,每300秒匹配不到人就重新点取消重匹,如果进了游戏就会在热身之后退出

local ingametime = math.huge

panorama.RunScript([[

if (!LobbyAPI.BIsHost()) {

    LobbyAPI.CreateSession();

}    

LobbyAPI.UpdateSessionSettings({

            update: {

            "options": {

                "anytypemode": "0",

                "action": "custommatch",

                "server": "official"

            },

            "game": {

                "mode": "survival",

                "type": "freeforall",

                "mapgroupname": "mg_dz_blacksite,mg_dz_sirocco,mg_dz_vineyard,mg_dz_ember",

                "gamemodeflags": 0,

                "prime": 1,

                "apr": 1

            }

        }

        }

        );

        ]]);

callbacks.Register('Draw',function()

    if entities.GetLocalPlayer() == nil then

ingametime = math.huge

if math.floor(globals.RealTime()) % 3 == 0 then

    panorama.RunScript([[

    if (LobbyAPI.GetMatchmakingStatusString() == "") {

        LobbyAPI.StartMatchmaking('', '', '', '');

    }

        ]]);


end

if  math.floor(globals.RealTime()) % 10 == 0 then

        panorama.RunScript([[

       if (LobbyAPI.GetTimeSpentMatchmaking() > 300) {

           LobbyAPI.StopMatchmaking()

       }

       ]]);

end

else

if math.floor(globals.RealTime()) % 3 == 0 then

    panorama.RunScript([[

    if (LobbyAPI.GetMatchmakingStatusString() != "") {

        LobbyAPI.StopMatchmaking()

    }

        ]]);

end

end

end)



client.AllowListener("round_poststart");

client.AllowListener("round_prestart");



callbacks.Register("FireGameEvent", function(e)


if e:GetName() == "round_prestart" then

ingametime = math.floor(globals.RealTime())

end

end)


callbacks.Register("FireGameEvent", function(e)

print(math.floor(globals.RealTime()) - ingametime)

if e:GetName() == "round_poststart" and math.floor(globals.RealTime()) - ingametime > 15 then

client.Command("disconnect", true);

end

end)

分享一个CSGO头号特训自动匹配/超时重开/热身之后自动退出脚本的评论 (共 条)

分享到微博请遵守国家法律