Skip to content

Commit

Permalink
- move startup class
Browse files Browse the repository at this point in the history
- add teleport to pits event to allow track scripts to teleport cars to pits
  • Loading branch information
compujuckel committed Mar 16, 2024
1 parent 758912e commit 8644e66
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions AssettoServer/Server/Lua/assettoserver.lua
Original file line number Diff line number Diff line change
Expand Up @@ -232,3 +232,12 @@ local function window_AssettoServer()
end

ui.registerOnlineExtra(ui.Icons.Info, "AssettoServer", function () return true end, window_AssettoServer, nil, ui.OnlineExtraFlags.Tool)

local teleportToPitsEvent = ac.OnlineEvent({
ac.StructItem.key("AS_TeleportToPits"),
dummy = ac.StructItem.byte()
}, function (sender, message)
if sender.index == 0 and ac.INIConfig.onlineExtras():get("EXTRA_RULES", "NO_BACK_TO_PITS", 0) == 0 then
physics.teleportCarTo(0, ac.SpawnSet.Pits)
end
end)
File renamed without changes.

0 comments on commit 8644e66

Please sign in to comment.