Textlabel

class pysamp.textlabel.TextLabel(text: str, color: int, x: float, y: float, z: float, drawDistance: float, virtualworld: int, testLOS: bool = False)

Bases: object

Create and adjust 3D-Textlabels that can be attached to vehicles, players or world coordinates.

attach_to_player(player: Player, offset_x: float, offset_y: float, offset_z: float) bool

Attach a 3D Textlabel to a player.

Parameters
  • player (Player) – The player to attach to.

  • offset_x (float) – The relative X coordinate offset on the player.

  • offset_y (float) – The relative Y coordinate offset on the player.

  • offset_z (float) – The relative Z coordinate offset on the player.

Returns

This method does not return anything.

attach_to_vehicle(vehicle: Vehicle, offset_x: float, offset_y: float, offset_z: float) bool

Attach a 3D Textlabel to a vehicle.

Parameters
  • vehicle (Vehicle) – The vehicle to attach to.

  • offset_x (float) – The relative X coordinate offset on the vehicle.

  • offset_y (float) – The relative Y coordinate offset on the vehicle.

  • offset_z (float) – The relative Z coordinate offset on the vehicle.

Returns

This method does not return anything.

delete() bool

Deletes a 3D text label.

Returns

This method does not return any value.

update_text(color: int, text: str) bool

Update the 3D Textlabel text.

Parameters
  • color (int) – The color you would like the text to have.

  • text (str) – The text you want to show.

Returns

This method does not return anything.