rust-samp-sdk 3.6.0

Low-level FFI bindings for the SA-MP AMX virtual machine and open.mp native component ABI. Used internally by `rust-samp`; depend on it directly only if you need raw access without the higher-level macros and lifecycle.
Documentation
//! `ITextLabelsComponent` — generated by `cargo xtask gen-omp` from `Server/Components/TextLabels/textlabels.hpp`.
//! Implemented by `TextLabelsComponent` in the server's `TextLabels`.
//!
//! Do not edit: change `xtask/omp-wrappers.toml` or the generator and
//! regenerate. Slots are clang's layout of the header for each ABI, checked
//! against the official binaries by `cargo xtask check-abi --generated`.

#![allow(unused_imports)]

use crate::omp::containers::{FlatSet, HybridString, Pair, Span};
use crate::omp::types::{
    Colour, GTAQuat, Hours, Microseconds, Milliseconds, Minutes, Seconds, StringView, TimePoint,
    UID, Vector2, Vector3, Vector4, WorldTimePoint,
};
use crate::omp::vtable::{call_vtable_small_struct, opaque, slots, virtual_fns};
use crate::omp::*;

slots! {
    /// `ITextLabel * ITextLabelsComponent::create(StringView, Colour, Vector3, float, int, bool)`
    SLOT_CREATE: usize = 18, 18;
    /// `ITextLabel * ITextLabelsComponent::create(StringView, Colour, Vector3, float, int, bool, IPlayer &)`
    SLOT_CREATE_ON_PLAYER: usize = 19, 17;
    /// `ITextLabel * ITextLabelsComponent::create(StringView, Colour, Vector3, float, int, bool, IVehicle &)`
    SLOT_CREATE_ON_VEHICLE: usize = 20, 16;
}

virtual_fns! {
    /// `ITextLabel * ITextLabelsComponent::create(StringView, Colour, Vector3, float, int, bool)`.
    ///
    /// # Safety
    /// `component` must be a live `ITextLabelsComponent`.
    #[must_use]
    pub fn textlabels_create(
        component: ITextLabelsComponent,
        text: StringView,
        colour: Colour,
        pos: Vector3,
        draw_dist: f32,
        vw: i32,
        los: bool,
    ) -> *mut ITextLabel = [0, SLOT_CREATE] or std::ptr::null_mut();

    /// `ITextLabel * ITextLabelsComponent::create(StringView, Colour, Vector3, float, int, bool, IPlayer &)`.
    ///
    /// # Safety
    /// `component` must be a live `ITextLabelsComponent`.
    #[must_use]
    pub fn textlabels_create_on_player(
        component: ITextLabelsComponent,
        text: StringView,
        colour: Colour,
        pos: Vector3,
        draw_dist: f32,
        vw: i32,
        los: bool,
        attach: *mut IPlayer,
    ) -> *mut ITextLabel = [0, SLOT_CREATE_ON_PLAYER] or std::ptr::null_mut();

    /// `ITextLabel * ITextLabelsComponent::create(StringView, Colour, Vector3, float, int, bool, IVehicle &)`.
    ///
    /// # Safety
    /// `component` must be a live `ITextLabelsComponent`.
    #[must_use]
    pub fn textlabels_create_on_vehicle(
        component: ITextLabelsComponent,
        text: StringView,
        colour: Colour,
        pos: Vector3,
        draw_dist: f32,
        vw: i32,
        los: bool,
        attach: *mut IVehicle,
    ) -> *mut ITextLabel = [0, SLOT_CREATE_ON_VEHICLE] or std::ptr::null_mut();
}