--- @param playerId number
--- @param image string
--- @return nil
function tm.playerUI.ReplaceMapImage(playerId, image) end```
Replaces the current map image with a new one, loaded through tm.physics.AddTexture(path, id), useful for custom maps, or even additions to existing maps.
```--- Resets the current map to the default (restores teleport points and re-centres map to default)
--- @param playerId number
--- @return nil
function tm.playerUI.ResetMap(playerId) end```
Resets the current map to the default, removing any custom map textures, restoring teleport points, and re-centring the map to it's default, useful for a dynamically changing environment that requires being visible on the map, or maybe you just want to be able to reset the current map to load in a new one with the same mod.
```--- Recentres the map to a new position.
--- @param playerId number
--- @param x number
--- @param z number
--- @return nil
function tm.playerUI.RecentreMap(playerId, x, z) end```
Recentres the map to a new position, useful for aligning custom maps.
```--- Registers a callback for a click within the map containing the click's world position (ignoring y axis)
--- @param playerId
--- @param callback
--- @return nil
function tm.playerUI.RegisterMouseDownMapPositionCallback(playerId, callback) end```
Registers a callback for a click within the map containing the click's world position (ignoring y axis) structured as "(x, 0, z)", useful for teleport points in a custom map, or calling airstrikes at from inside the map UI.
```--- Deregisters a callback for world click position in map UI
--- @param playerId
--- @param callback
--- @return nil
function tm.playerUI.DeregisterMouseDownMapPositionCallback(playerId, callback) end```
Deregisters a callback for world click position in map UI, for optimisation when one doesn't need to get the click position in map.
#Replace/Reset Map, Re-centre Map Position & Map Click Position
3 messages · Page 1 of 1 (latest)