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 Entity Information

Calling rust_socket.get_entity_info(entity_id: int) will return a RustEntityInfo object with the following data:

class RustEntityInfo with fields:

type: int
value: bool
items : RustEntityInfoItem
capacity: int
has_protection: bool
protection_expiry: int

class RustEntityInfoItem with fields:

item_id: int
quantity: int
item_is_blueprint: bool

The entity type is an integer value which corresponds to these values:

Switch = 1
Alarm = 2
StorageMonitor = 3

Setting Entity Information

Calling rust_socket.set_entity_value(entity_id: int, value: bool) will set the value of the entity with the given ID to the given value.

PreviousGetting the TimeNextGetting Map Markers

Last updated 8 months ago

Was this helpful?