Rust+.py Docs
  • Getting Started
    • Welcome to the Rust+.py Docs!
    • Quick Start
    • Getting Player Details
      • FCM Listener
      • Getting Entity ID's
    • RustSocket
      • Rate Limiting
  • API methods
    • Removing Listeners
    • Getting Team Info
    • Getting Team Chat
    • Getting Server Info
    • Getting the Map
    • Sending Messages
    • Getting the Time
    • Getting Entity Information
    • Getting Map Markers
    • Getting Contents of Monitors
    • Promoting Players to Team Leader
  • Command System
    • Commands Overview
    • Command Options
    • Command Decorator
    • Hanging The Socket
  • Event System
    • Events Overview
  • Cameras
    • Camera Managers
Powered by GitBook
On this page

Was this helpful?

  1. API methods

Getting Map Markers

Calling rust_socket.get_markers() returns a List[RustMarker] with the following data:

class RustMarker with fields:

id: int
type: int
x: float
y: float
steam_id: int
rotation: float
radius: float
colour1 : RustColour
colour2 : RustColour
alpha: float
name: str
sell_orders : List[RustSellOrder]

class RustColour with fields:

x: float
y: float
z: float
w: float

class RustSellOrder with fields:

item_id: int
quantity: int
currency_id: int
cost_per_item: int
item_is_blueprint: bool
currency_is_blueprint: bool
amount_in_stock: int

These are the types of the RustMarker

Types:
	Player = 1
	Explosion = 2
	VendingMachine = 3
	CH47 = 4
	CargoShip = 5
	Crate = 6
	GenericRadius = 7
	PatrolHelicopter = 8

Converting to Grid Reference

from rustplus import convert_coordinates

info = await rust_socket.get_info()
if isinstance(info, RustError):
    print(f"Error Occurred, Reason: {info.reason}")

grid = convert_coordinates((x, y), info.map_size)
print(f"Grid Reference: {grid}")
PreviousGetting Entity InformationNextGetting Contents of Monitors

Last updated 2 months ago

Was this helpful?