Join the Game4Freak Discord Get exclusive plugin sneak peeks, talk directly with VisEntities, never miss important updates, and unlock special discount codes!
Better Line Of Sight Teleport

Better Line Of Sight Teleport 1.1.0

Sign in to download
A better and smarter version of the teleportlos command
The default teleportlos command teleports admins to wherever their crosshair points, but it has no awareness of water surfaces or what's actually in front of you. Better Line Of Sight Teleport replaces it with a smarter version that scans along the line of sight, snaps to nearby vehicles and entities like Bradley Apcs, helicopters, and boats when they're in view, falls back to terrain when nothing is found, and automatically raises the destination to water level when needed.


How It Works

When an admin uses the teleportlos command, the plugin casts a ray from the player's head in the direction they're looking. It divides that ray into a number of evenly spaced checkpoints (controlled by Teleport Checkpoints) and works through them one at a time:
  1. At each checkpoint, the plugin scans a sphere of radius Entity Detection Radius for any entities matching the Prioritized Entities list.
  2. If a matching entity is found, the admin is teleported directly to it, no further scanning needed.
  3. If no matching entity is found, the plugin checks whether a terrain, world, or construction surface is hit between the current checkpoint and the next.
  4. If a surface is hit, the admin is teleported to that hit point.
  5. If nothing is hit across all checkpoints, the admin is teleported to the full extent of the ray (the maximum distance).
  6. After determining the destination, if the point is below the water surface, it is raised to water level.

Commands

This plugin does not add a new command. It intercepts and replaces the existing teleportlos console command, which is built into Rust and available to admins.
  • teleportlos -- Teleports the admin toward their crosshair using the plugin's enhanced logic

Configuration

JSON:
{
  "Version": "1.1.0",
  "Maximum Teleport Distance (meters)": 900.0,
  "Prioritized Entities (short prefab names)": [
    "bradleyapc",
    "patrolhelicopter",
    "supply_drop",
    "minicopter.entity",
    "scraptransporthelicopter",
    "rhib",
    "rowboat",
    "cargoshiptest",
    "ch47scientists.entity",
    "playerboat"
  ],
  "Entity Detection Radius (meters)": 40.0,
  "Teleport Checkpoints (higher = more precise)": 15,
  "Enable Debug Mode": false
}
  • Maximum Teleport Distance -- How far along the ray the plugin looks for a destination. Admins cannot teleport further than this distance in a single use
  • Prioritized Entities -- List of entity short prefab names that the plugin will snap to when detected along the ray. When one of these is found near a checkpoint, the teleport goes directly to it instead of continuing to scan terrain
  • Entity Detection Radius -- The radius of the sphere scanned at each checkpoint when looking for prioritized entities. Increase this if you want the plugin to detect entities that aren't directly in the line of sight
  • Teleport Checkpoints -- How many evenly spaced points the ray is divided into. More checkpoints means finer terrain detection and more accurate entity snapping, but slightly more work per command use
  • Enable Debug Mode -- When set to true, draws visual markers in-world showing the ray, each checkpoint sphere, and the final teleport destination. Useful for understanding how the plugin is resolving a teleport. Visible only to the admin who used the command
Author
VisEntities
Downloads
29
First release
Last update

Ratings

0.00 star(s) 0 reviews

Also by VisEntities

  • Seedless Food
    Seedless Food
    Prevents seeds from being produced when players eat fruits or vegetables
  • Rotating Gear
    Rotating Gear
    Equips players with a random loadout at set intervals
  • Horse Equipment
    Horse Equipment
    Allows horses to be equipped with random gear when they spawn

Latest updates

  1. 1.1.0

    Teleporting to water/ocean now lands you at the surface instead of sending you deep underwater...
  2. 1.0.1

    Please wait until the Rust update goes live before downloading. Patched for the upcoming...
Back
Top
Chat commands start with a /, while console commands can be entered directly in the F1 console or server console. Use find <keyword> in console to search for available commands related to the plugin. Parameters in < > are required, while [ ] are optional.
This plugin uses Oxide's permission system. Grant or revoke permissions using oxide.grant and oxide.revoke. You can assign them to individual players or groups using their Steam id or group name.
Settings are stored in the config file found under the config/ directory. You can edit this file manually, then reload the plugin to apply your changes.
Persistent data is saved in the data/ directory. This includes things like saved settings, usage stats, or player progress depending on the plugin. Deleting a data file will reset stored progress or customizations.
Language files are located in the lang/ folder. To translate messages, copy the en.json file into your target language folder (e.g. fr, de) and edit the values. Reload the plugin after changes to apply new messages.
This section lists public methods exposed by the plugin for use in other plugins. You can call these via the CallHook method. Ensure the plugin is loaded before calling its API to avoid null reference errors.
These are custom hooks that other plugins can listen for. Simply define a method with the same name and expected parameters in your plugin to handle the event. Hooks are triggered at key moments and are useful for extending or reacting to plugin behavior.
These hooks are injected into the game's code using Harmony. They let the plugin run code at key points in the game's internal logic. You can return values to block or modify behavior. Use with caution — these are powerful and can affect core mechanics.
Cart