Garry's Mod

Garry's Mod

Garry's Mod Stranded: Extended
 This topic has been pinned, so it's probably important
denomito  [developer] 14 Dec, 2023 @ 4:23am
Location settings.
!Remark!

If you use sqlite, then you should run servers with the same ip or use mysql, then it is possible to use different servers (note that you need one database)

Location register
Registration and configuration are in the file cfg/location.lua. To register a location
write like this: GM.RegisterLocation("location name", "location map", "server IP address")

Transitions locations.

GM.AddTransitions("Map", "Location", maxs vector, mins vector)

The min or max point can be found using the command: get_trace_pos (the point will be where you are looking) or getpos (where are you located)

Checking the boundaries of the transition cube can be done through the command: developer 2 (if you are a super admin)

Mins Maxs:
https://www.upload.ee/image/16050845/cube.png

Example
https://www.upload.ee/image/16050893/location.png

Translation of location names.

translation is in the file language/lang_name.lua

AddLangPhrase("location.LocationName", "Location name")

Example: AddLangPhrase("location.rollinghills", "Rolling hills")
Last edited by denomito; 14 Dec, 2023 @ 5:17am