Struct altv::BaseObjectWrapper

source ·
pub struct BaseObjectWrapper<T, InheritPtrs = ()>
where InheritPtrs: Clone,
{ /* private fields */ }

Implementations§

source§

impl<T, InheritPtrs> BaseObjectWrapper<T, InheritPtrs>
where InheritPtrs: Clone,

source

pub fn id(&self) -> Result<u32, Error>

source§

impl BaseObjectWrapper<IBlip, WorldObject>

§Blip implementation

source

pub fn new_global_area( pos: impl Into<Vector3>, width: f32, height: f32 ) -> Result<BaseObjectContainer<IBlip, WorldObject>, Error>

source

pub fn new_area_with_targets( pos: impl Into<Vector3>, width: f32, height: f32, targets: &[BaseObjectContainer<IPlayer, WorldEntity>] ) -> Result<BaseObjectContainer<IBlip, WorldObject>, Error>

source

pub fn new_global_radius( pos: impl Into<Vector3>, radius: f32 ) -> Result<BaseObjectContainer<IBlip, WorldObject>, Error>

source

pub fn new_radius_with_targets( pos: impl Into<Vector3>, radius: f32, targets: &[BaseObjectContainer<IPlayer, WorldEntity>] ) -> Result<BaseObjectContainer<IBlip, WorldObject>, Error>

source

pub fn new_global_point( pos: impl Into<Vector3> ) -> Result<BaseObjectContainer<IBlip, WorldObject>, Error>

source

pub fn new_point_with_targets( pos: impl Into<Vector3>, targets: &[BaseObjectContainer<IPlayer, WorldEntity>] ) -> Result<BaseObjectContainer<IBlip, WorldObject>, Error>

source

pub fn new_global_entity_point( entity: impl Into<AnyEntity> ) -> Result<BaseObjectContainer<IBlip, WorldObject>, Error>

source

pub fn new_entity_point_with_targets( entity: impl Into<AnyEntity>, targets: &[BaseObjectContainer<IPlayer, WorldEntity>] ) -> Result<BaseObjectContainer<IBlip, WorldObject>, Error>

source

pub fn destroy(&self) -> Result<(), Error>

source

pub fn global(&self) -> Result<bool, Error>

source

pub fn set_global(&self, state: bool) -> Result<(), Error>

source

pub fn targets( &self ) -> Result<Vec<BaseObjectContainer<IPlayer, WorldEntity>>, Error>

source

pub fn attached(&self) -> Result<bool, Error>

source

pub fn attached_to(&self) -> Result<Option<AnyEntity>, Error>

source

pub fn attach_to(&self, entity: impl Into<AnyEntity>) -> Result<(), Error>

source

pub fn blip_type(&self) -> Result<BlipType, Error>

source

pub fn set_blip_type(&self, blip_type: BlipType) -> Result<(), Error>

source

pub fn scale(&self) -> Result<Vector2, Error>

source

pub fn set_scale(&self, scale: impl Into<Vector2>) -> Result<(), Error>

source

pub fn display(&self) -> Result<u32, Error>

source

pub fn set_display(&self, display: u32) -> Result<(), Error>

source

pub fn secondary_color(&self) -> Result<Rgba, Error>

source

pub fn set_secondary_color(&self, color: impl Into<Rgba>) -> Result<(), Error>

source

pub fn alpha(&self) -> Result<u32, Error>

source

pub fn set_alpha(&self, alpha: u32) -> Result<(), Error>

source

pub fn flash_timer(&self) -> Result<i32, Error>

source

pub fn set_flash_timer(&self, timer: i32) -> Result<(), Error>

source

pub fn flash_interval(&self) -> Result<i32, Error>

source

pub fn set_flash_interval(&self, interval: i32) -> Result<(), Error>

source

pub fn as_friendly(&self) -> Result<bool, Error>

source

pub fn set_as_friendly(&self, friendly: bool) -> Result<(), Error>

source

pub fn route(&self) -> Result<bool, Error>

source

pub fn set_route(&self, state: bool) -> Result<(), Error>

source

pub fn bright(&self) -> Result<bool, Error>

source

pub fn set_bright(&self, bright: bool) -> Result<(), Error>

source

pub fn number(&self) -> Result<i32, Error>

source

pub fn set_number(&self, number: i32) -> Result<(), Error>

source

pub fn show_cone(&self) -> Result<bool, Error>

source

pub fn set_show_cone(&self, state: bool) -> Result<(), Error>

source

pub fn flashes(&self) -> Result<bool, Error>

source

pub fn set_flashes(&self, state: bool) -> Result<(), Error>

source

pub fn flashes_alternate(&self) -> Result<bool, Error>

source

pub fn set_flashes_alternate(&self, state: bool) -> Result<(), Error>

source

pub fn as_short_range(&self) -> Result<bool, Error>

source

pub fn set_as_short_range(&self, state: bool) -> Result<(), Error>

source

pub fn priority(&self) -> Result<u32, Error>

source

pub fn set_priority(&self, state: u32) -> Result<(), Error>

source

pub fn rot(&self) -> Result<f32, Error>

source

pub fn set_rot(&self, rot: f32) -> Result<(), Error>

source

pub fn gxt_name(&self) -> Result<String, Error>

source

pub fn set_gxt_name(&self, name: String) -> Result<(), Error>

source

pub fn name(&self) -> Result<String, Error>

source

pub fn set_name(&self, name: String) -> Result<(), Error>

source

pub fn route_color(&self) -> Result<Rgba, Error>

source

pub fn set_route_color(&self, color: impl Into<Rgba>) -> Result<(), Error>

source

pub fn pulse(&self) -> Result<bool, Error>

source

pub fn set_pulse(&self, val: bool) -> Result<(), Error>

source

pub fn as_mission_creator(&self) -> Result<bool, Error>

source

pub fn set_as_mission_creator(&self, val: bool) -> Result<(), Error>

source

pub fn tick_visible(&self) -> Result<bool, Error>

source

pub fn set_tick_visible(&self, val: bool) -> Result<(), Error>

source

pub fn heading_indicator_visible(&self) -> Result<bool, Error>

source

pub fn set_heading_indicator_visible(&self, val: bool) -> Result<(), Error>

source

pub fn outline_indicator_visible(&self) -> Result<bool, Error>

source

pub fn set_outline_indicator_visible(&self, val: bool) -> Result<(), Error>

source

pub fn friend_indicator_visible(&self) -> Result<bool, Error>

source

pub fn set_friend_indicator_visible(&self, val: bool) -> Result<(), Error>

source

pub fn crew_indicator_visible(&self) -> Result<bool, Error>

source

pub fn set_crew_indicator_visible(&self, val: bool) -> Result<(), Error>

source

pub fn category(&self) -> Result<u32, Error>

source

pub fn set_category(&self, val: u32) -> Result<(), Error>

source

pub fn as_high_detail(&self) -> Result<bool, Error>

source

pub fn set_as_high_detail(&self, val: bool) -> Result<(), Error>

source

pub fn shrinked(&self) -> Result<bool, Error>

source

pub fn set_shrinked(&self, val: bool) -> Result<(), Error>

source

pub fn sprite(&self) -> Result<u32, Error>

source

pub fn set_sprite(&self, sprite: u32) -> Result<(), Error>

source

pub fn color(&self) -> Result<u32, Error>

source

pub fn set_color(&self, color: u32) -> Result<(), Error>

source

pub fn fade(&self, opacity: u32, duration: u32) -> Result<(), Error>

source

pub fn visible(&self) -> Result<bool, Error>

source

pub fn set_visible(&self, state: bool) -> Result<(), Error>

source

pub fn add_target_player( &self, player: BaseObjectContainer<IPlayer, WorldEntity> ) -> Result<(), Error>

source

pub fn remove_target_player( &self, player: BaseObjectContainer<IPlayer, WorldEntity> ) -> Result<(), Error>

source

pub fn hidden_on_legend(&self) -> Result<bool, Error>

source

pub fn set_hidden_on_legend(&self, hidden: bool) -> Result<(), Error>

source

pub fn minimal_on_edge(&self) -> Result<bool, Error>

source

pub fn set_minimal_on_edge(&self, hidden: bool) -> Result<(), Error>

source

pub fn use_height_indicator_on_edge(&self) -> Result<bool, Error>

source

pub fn set_use_height_indicator_on_edge( &self, hidden: bool ) -> Result<(), Error>

source

pub fn short_height_threshold(&self) -> Result<bool, Error>

source

pub fn set_short_height_threshold(&self, hidden: bool) -> Result<(), Error>

source§

impl BaseObjectWrapper<ICheckpoint, WorldColShape>

§Checkpoint implementation

source

pub fn new( checkpoint_type: u8, pos: impl Into<Vector3>, radius: f32, height: f32, color: impl Into<Rgba>, streaming_distance: u32 ) -> BaseObjectContainer<ICheckpoint, WorldColShape>

source

pub fn destroy(&self) -> Result<(), Error>

source

pub fn checkpoint_type(&self) -> Result<u8, Error>

source

pub fn height(&self) -> Result<f32, Error>

source

pub fn radius(&self) -> Result<f32, Error>

source

pub fn color(&self) -> Result<Rgba, Error>

source

pub fn icon_color(&self) -> Result<Rgba, Error>

source

pub fn next_position(&self) -> Result<Vector3, Error>

source

pub fn set_checkpoint_type(&self, checkpoint_type: u8) -> Result<(), Error>

source

pub fn set_height(&self, height: f32) -> Result<(), Error>

source

pub fn set_radius(&self, radius: f32) -> Result<(), Error>

source

pub fn set_color(&self, color: impl Into<Rgba>) -> Result<(), Error>

source

pub fn set_icon_color(&self, color: impl Into<Rgba>) -> Result<(), Error>

source

pub fn set_next_pos(&self, pos: impl Into<Vector3>) -> Result<(), Error>

source

pub fn visible(&self) -> Result<bool, Error>

source

pub fn set_visible(&self, visible: bool) -> Result<(), Error>

source§

impl BaseObjectWrapper<IColShape, WorldColShape>

§ColShape implementation

source

pub fn new_circle( pos: impl Into<Vector2>, radius: f32 ) -> BaseObjectContainer<IColShape, WorldColShape>

source

pub fn new_sphere( pos: impl Into<Vector3>, radius: f32 ) -> BaseObjectContainer<IColShape, WorldColShape>

source

pub fn new_rectangle( first_point: impl Into<Vector2>, second_point: impl Into<Vector2> ) -> BaseObjectContainer<IColShape, WorldColShape>

source

pub fn new_cuboid( first_point: impl Into<Vector3>, second_point: impl Into<Vector3> ) -> BaseObjectContainer<IColShape, WorldColShape>

source

pub fn new_cylinder( pos: impl Into<Vector3>, radius: f32, height: f32 ) -> BaseObjectContainer<IColShape, WorldColShape>

source

pub fn new_polygon( min_z: f32, max_z: f32, points: Vec<impl Into<Vector2>> ) -> BaseObjectContainer<IColShape, WorldColShape>

source

pub fn destroy(&self) -> Result<(), Error>

source§

impl BaseObjectWrapper<IConnectionInfo>

§ConnectionInfo implementation

source

pub fn accept(&self, send_player_names: bool) -> Result<(), Error>

source

pub fn is_accepted(&self) -> Result<bool, Error>

source

pub fn decline(&self, reason: impl ToString) -> Result<(), Error>

source

pub fn text(&self) -> Result<String, Error>

source

pub fn set_text(&self, text: impl ToString) -> Result<(), Error>

source

pub fn name(&self) -> Result<String, Error>

source

pub fn social_id(&self) -> Result<u64, Error>

source

pub fn social_name(&self) -> Result<String, Error>

source

pub fn hw_id_hash(&self) -> Result<u64, Error>

source

pub fn hw_id_ex_hash(&self) -> Result<u64, Error>

source

pub fn auth_token(&self) -> Result<String, Error>

source

pub fn is_debug(&self) -> Result<bool, Error>

source

pub fn branch(&self) -> Result<String, Error>

source

pub fn version_major(&self) -> Result<u16, Error>

source

pub fn version_minor(&self) -> Result<u16, Error>

source

pub fn cdn_url(&self) -> Result<String, Error>

source

pub fn password_hash(&self) -> Result<u64, Error>

source

pub fn ip(&self) -> Result<String, Error>

source

pub fn discord_user_id(&self) -> Result<i64, Error>

source

pub fn cloud_id(&self) -> Result<String, Error>

source

pub fn cloud_auth_result(&self) -> Result<CloudAuthResult, Error>

source§

impl BaseObjectWrapper<IMarker, WorldObject>

§Marker implementation

source

pub fn new( marker_type: MarkerType, pos: impl Into<Vector3>, color: impl Into<Rgba> ) -> BaseObjectContainer<IMarker, WorldObject>

source

pub fn destroy(&self) -> Result<(), Error>

source

pub fn global(&self) -> Result<bool, Error>

source

pub fn target( &self ) -> Result<Option<BaseObjectContainer<IPlayer, WorldEntity>>, Error>

source

pub fn color(&self) -> Result<Rgba, Error>

source

pub fn set_color(&self, color: impl Into<Rgba>) -> Result<(), Error>

source

pub fn visible(&self) -> Result<bool, Error>

source

pub fn set_visible(&self, visible: bool) -> Result<(), Error>

source

pub fn marker_type(&self) -> Result<MarkerType, Error>

source

pub fn set_marker_type(&self, marker_type: MarkerType) -> Result<(), Error>

source

pub fn scale(&self) -> Result<Vector3, Error>

source

pub fn set_scale(&self, scale: impl Into<Vector3>) -> Result<(), Error>

source

pub fn rot(&self) -> Result<Vector3, Error>

source

pub fn set_rot(&self, rot: impl Into<Vector3>) -> Result<(), Error>

source

pub fn dir(&self) -> Result<Vector3, Error>

source

pub fn set_dir(&self, dir: impl Into<Vector3>) -> Result<(), Error>

source

pub fn face_camera(&self) -> Result<bool, Error>

source

pub fn set_face_camera(&self, face_camera: bool) -> Result<(), Error>

source

pub fn streaming_distance(&self) -> Result<u32, Error>

source

pub fn rotating(&self) -> Result<bool, Error>

source

pub fn set_rotating(&self, toggle: bool) -> Result<(), Error>

source

pub fn bobs_up_down(&self) -> Result<bool, Error>

source

pub fn set_bob_up_down(&self, toggle: bool) -> Result<(), Error>

source§

impl BaseObjectWrapper<IObject, WorldEntity>

§Object implementation

source

pub fn new( model: impl IntoHash, pos: impl Into<Vector3>, rot: impl Into<Vector3> ) -> Result<BaseObjectContainer<IObject, WorldEntity>, Error>

Creates new instance of Object with default params. See object::Object::new_with_params if you want to create network object with custom params.

§Errors

When the maximum number of entities is created (2^16).

§Examples
let object = altv::Object::new(
   "prop_bench_04",
   altv::Vector3::new(0.0, 0.0, 71.0),
   altv::Vector3::new(1.0, 2.0, 3.0)
)?;
source

pub fn new_with_streaming_distance( model: impl IntoHash, pos: impl Into<Vector3>, rot: impl Into<Vector3>, streaming_distance: u32 ) -> Result<BaseObjectContainer<IObject, WorldEntity>, Error>

source

pub fn new_with_params( model: impl IntoHash, pos: impl Into<Vector3>, rot: impl Into<Vector3>, alpha: u8, texture_variation: u8, lod_distance: u16, streaming_distance: u32 ) -> Result<BaseObjectContainer<IObject, WorldEntity>, Error>

Creates new instance of Object with custom params.

§Errors

When the maximum number of entities is created (2^16).

§Examples
let object = altv::Object::new_with_params(
   "prop_bench_04",
   altv::Vector3::new(0, 0, 71),
   altv::Vector3::new(1.0, 2.0, 3.0),
   150,
   0,
   999,
   300,
)?;
source

pub fn destroy(&self) -> Result<(), Error>

source

pub fn alpha(&self) -> Result<u8, Error>

source

pub fn set_alpha(&self, alpha: u8) -> Result<(), Error>

source

pub fn texture_variation(&self) -> Result<u8, Error>

source

pub fn set_texture_variation(&self, texture_variation: u8) -> Result<(), Error>

source

pub fn lod_distance(&self) -> Result<u16, Error>

source

pub fn set_lod_distance(&self, lod_distance: u16) -> Result<(), Error>

source

pub fn activate_physics(&self) -> Result<(), Error>

source

pub fn place_on_ground_properly(&self) -> Result<(), Error>

source§

impl BaseObjectWrapper<IPed, WorldEntity>

§Ped implementation

source

pub fn new( model: impl IntoHash, pos: impl Into<Vector3>, rot: impl Into<Vector3> ) -> Result<BaseObjectContainer<IPed, WorldEntity>, Error>

source

pub fn new_with_streaming_distance( model: impl IntoHash, pos: impl Into<Vector3>, rot: impl Into<Vector3>, streaming_distance: u32 ) -> Result<BaseObjectContainer<IPed, WorldEntity>, Error>

source

pub fn destroy(&self) -> Result<(), Error>

source

pub fn health(&self) -> Result<u16, Error>

source

pub fn set_health(&self, health: u16) -> Result<(), Error>

source

pub fn max_health(&self) -> Result<u16, Error>

source

pub fn set_max_health(&self, max_health: u16) -> Result<(), Error>

source

pub fn armour(&self) -> Result<u16, Error>

source

pub fn set_armour(&self, armour: u16) -> Result<(), Error>

source

pub fn current_weapon(&self) -> Result<u32, Error>

source

pub fn set_current_weapon(&self, weapon: impl IntoHash) -> Result<(), Error>

source§

impl BaseObjectWrapper<IPlayer, WorldEntity>

§Player implementation

source

pub fn name(&self) -> Result<String, Error>

source

pub fn social_name(&self) -> Result<String, Error>

source

pub fn spawn( &self, model: impl IntoHash, pos: impl Into<Vector3> ) -> Result<(), Error>

source

pub fn despawn(&self) -> Result<(), Error>

source

pub fn clear_blood_damage(&self) -> Result<(), Error>

source

pub fn clear_tasks(&self) -> Result<(), Error>

source

pub fn set_model(&self, model: impl IntoHash) -> Result<(), Error>

source

pub fn set_date_time(&self, date_time: PlayerDateTime) -> Result<(), Error>

source

pub fn set_weather(&self, weather: u32) -> Result<(), Error>

source

pub fn get_head_blend_data(&self) -> Result<PlayerHeadBlendData, Error>

source

pub fn set_head_blend_data( &self, data: PlayerHeadBlendData ) -> Result<(), Error>

source

pub fn reset_head_blend_data(&self) -> Result<(), Error>

source

pub fn remove_head_blend_data(&self) -> Result<(), Error>

source

pub fn remove_head_blend_palette_color(&self) -> Result<(), Error>

source

pub fn health(&self) -> Result<u16, Error>

source

pub fn set_health(&self, health: u16) -> Result<(), Error>

source

pub fn max_health(&self) -> Result<u16, Error>

source

pub fn set_max_health(&self, max_health: u16) -> Result<(), Error>

source

pub fn armour(&self) -> Result<u16, Error>

source

pub fn set_armour(&self, armour: u16) -> Result<(), Error>

source

pub fn max_armour(&self) -> Result<u16, Error>

source

pub fn set_max_armour(&self, max_armour: u16) -> Result<(), Error>

source

pub fn is_dead(&self) -> Result<bool, Error>

source

pub fn is_jumping(&self) -> Result<bool, Error>

source

pub fn is_in_ragdoll(&self) -> Result<bool, Error>

source

pub fn is_aiming(&self) -> Result<bool, Error>

source

pub fn is_shooting(&self) -> Result<bool, Error>

source

pub fn is_reloading(&self) -> Result<bool, Error>

source

pub fn is_entering_vehicle(&self) -> Result<bool, Error>

source

pub fn is_leaving_vehicle(&self) -> Result<bool, Error>

source

pub fn is_on_ladder(&self) -> Result<bool, Error>

source

pub fn is_in_melee(&self) -> Result<bool, Error>

source

pub fn is_in_cover(&self) -> Result<bool, Error>

source

pub fn is_in_vehicle(&self) -> Result<bool, Error>

source

pub fn is_flashlight_active(&self) -> Result<bool, Error>

source

pub fn is_super_jump_enabled(&self) -> Result<bool, Error>

source

pub fn is_crouching(&self) -> Result<bool, Error>

source

pub fn is_stealthy(&self) -> Result<bool, Error>

source

pub fn is_spawned(&self) -> Result<bool, Error>

source

pub fn is_connected(&self) -> Result<bool, Error>

source

pub fn is_parachuting(&self) -> Result<bool, Error>

source

pub fn has_weapon_component( &self, weapon: impl IntoHash, component: impl IntoHash ) -> Result<bool, Error>

source

pub fn add_weapon_component( &self, weapon: impl IntoHash, component: impl IntoHash ) -> Result<(), Error>

source

pub fn remove_weapon_component( &self, weapon: impl IntoHash, component: impl IntoHash ) -> Result<(), Error>

source

pub fn get_weapon_tint_index(&self, weapon: impl IntoHash) -> Result<u8, Error>

source

pub fn set_weapon_tint_index( &self, weapon: impl IntoHash, tint: u8 ) -> Result<(), Error>

source

pub fn current_weapon(&self) -> Result<u32, Error>

source

pub fn set_current_weapon(&self, weapon: impl IntoHash) -> Result<(), Error>

source

pub fn current_weapon_components(&self) -> Result<Vec<u32>, Error>

source

pub fn current_weapon_tint_index(&self) -> Result<u8, Error>

source

pub fn give_weapon( &self, weapon: impl IntoHash, ammo: i32, select_now: bool ) -> Result<(), Error>

source

pub fn remove_weapon(&self, weapon: impl IntoHash) -> Result<(), Error>

source

pub fn remove_all_weapons(&self, remove_all_ammo: bool) -> Result<(), Error>

source

pub fn weapons(&self) -> Result<Vec<Weapon>, Error>

source

pub fn move_speed(&self) -> Result<f32, Error>

source

pub fn aim_pos(&self) -> Result<Vector3, Error>

source

pub fn head_rot(&self) -> Result<Vector3, Error>

source

pub fn vehicle( &self ) -> Result<Option<BaseObjectContainer<IVehicle, WorldEntity>>, Error>

source

pub fn seat(&self) -> Result<u8, Error>

source

pub fn entity_aiming_at(&self) -> Result<Option<AnyEntity>, Error>

source

pub fn entity_aim_offset(&self) -> Result<Vector3, Error>

source

pub fn current_animation_dict(&self) -> Result<u32, Error>

source

pub fn current_animation_name(&self) -> Result<u32, Error>

source

pub fn forward_speed(&self) -> Result<f32, Error>

source

pub fn strafe_speed(&self) -> Result<f32, Error>

source

pub fn ping(&self) -> Result<u32, Error>

source

pub fn ip(&self) -> Result<Ipv6Addr, Error>

source

pub fn social_id(&self) -> Result<u64, Error>

source

pub fn hwid_hash(&self) -> Result<u64, Error>

source

pub fn hwid_ex_hash(&self) -> Result<u64, Error>

source

pub fn auth_token(&self) -> Result<String, Error>

source

pub fn discord_id(&self) -> Result<i64, Error>

source

pub fn kick(&self, reason: impl ToString) -> Result<(), Error>

source

pub fn get_clothes(&self, component: u8) -> Result<PlayerCloth, Error>

source

pub fn set_clothes( &self, component: u8, drawable: u16, texture: u8, palette: u8 ) -> Result<bool, Error>

source

pub fn get_dlc_clothes(&self, component: u8) -> Result<PlayerDlcCloth, Error>

source

pub fn set_dlc_clothes( &self, component: u8, drawable: u16, texture: u8, palette: u8, dlc: impl IntoHash ) -> Result<bool, Error>

source

pub fn get_prop(&self, component: u8) -> Result<PlayerProp, Error>

source

pub fn set_prop( &self, component: u8, drawable: u16, texture: u8 ) -> Result<bool, Error>

source

pub fn get_dlc_prop(&self, component: u8) -> Result<PlayerDlcProp, Error>

source

pub fn set_dlc_prop( &self, component: u8, drawable: u8, texture: u8, dlc: impl IntoHash ) -> Result<bool, Error>

source

pub fn clear_props(&self, component: u8) -> Result<(), Error>

source

pub fn is_entity_in_streaming_range( &self, entity_id: u16 ) -> Result<bool, Error>

source

pub fn invincible(&self) -> Result<bool, Error>

source

pub fn set_invincible(&self, toggle: bool) -> Result<(), Error>

source

pub fn set_into_vehicle( &self, vehicle: impl Into<BaseObjectContainer<IVehicle, WorldEntity>>, seat: u8 ) -> Result<(), Error>

source

pub fn play_ambient_speech( &self, speech_name: impl ToString, speech_param: impl ToString, speech_dict_hash: u32 ) -> Result<(), Error>

source

pub fn set_head_overlay( &self, overlay_id: u8, index: u8, opacity: f32 ) -> Result<bool, Error>

source

pub fn get_head_overlay( &self, overlay_id: u8 ) -> Result<PlayerHeadOverlay, Error>

source

pub fn remove_head_overlay(&self, overlay_id: u8) -> Result<bool, Error>

source

pub fn set_head_overlay_color( &self, overlay_id: u8, color_type: u8, color_index: u8, second_color_index: u8 ) -> Result<bool, Error>

source

pub fn set_face_feature(&self, index: u8, scale: f32) -> Result<bool, Error>

source

pub fn get_face_feature_scale(&self, index: u8) -> Result<f32, Error>

source

pub fn remove_face_feature(&self, index: u8) -> Result<bool, Error>

source

pub fn set_head_blend_palette_color( &self, id: u8, red: u8, green: u8, blue: u8 ) -> Result<bool, Error>

source

pub fn get_head_blend_palette_color(&self, id: u8) -> Result<Rgba, Error>

source

pub fn set_eye_color(&self, color: i16) -> Result<bool, Error>

source

pub fn get_eye_color(&self) -> Result<i16, Error>

source

pub fn set_hair_color(&self, color: u8) -> Result<(), Error>

source

pub fn get_hair_color(&self) -> Result<u8, Error>

source

pub fn set_hair_highlight_color(&self, color: u8) -> Result<(), Error>

source

pub fn get_hair_highlight_color(&self) -> Result<u8, Error>

source

pub fn interior_location(&self) -> Result<u32, Error>

source

pub fn last_damaged_body_part(&self) -> Result<u32, Error>

source

pub fn set_last_damaged_body_part(&self, part: u32) -> Result<(), Error>

source

pub fn send_names(&self) -> Result<bool, Error>

source

pub fn set_send_names(&self, toggle: bool) -> Result<(), Error>

source

pub fn play_animation( &self, dict: impl ToString, name: impl ToString, options: PlayAnimation ) -> Result<(), Error>

§Examples

Using default options.

let player = altv::Player::all()[0].clone();

player.play_animation("cellphone@", "cellphone_text_in", Default::default())?;

Custom flags.

let player = altv::Player::all()[0].clone();

player.play_animation(
    "cellphone@",
    "cellphone_text_in",
    altv::PlayAnimation {
        flags: altv::AnimationFlags::HoldLastFrame | altv::AnimationFlags::AbortOnWeaponDamage,
        ..Default::default()
    },
)?;
source

pub fn play_scenario(&self, name: impl ToString) -> Result<(), Error>

source

pub fn emit( &self, event_name: impl ToString, args: &[&dyn Serialize] ) -> Result<(), Error>

source

pub fn emit_unreliable( &self, event_name: impl ToString, args: &[&dyn Serialize] ) -> Result<(), Error>

source

pub fn streamed_entities(&self) -> Result<Vec<(AnyEntity, i32)>, Error>

source

pub fn get_ammo(&self, ammo_type_hash: impl IntoHash) -> Result<u16, Error>

Returns current ammo value of specified ammo type. If player does not have ammo of specified ammo type, 0 will be returned.

§Examples

Passing ammo type as string.

let player = altv::Player::all()[0].clone();

let ammo: u16 = player.get_ammo("ammo_pistol")?;

Using AmmoType enum.

let player = altv::Player::all()[0].clone();

let ammo: u16 = player.get_ammo(altv::AmmoType::Pistol)?;
source

pub fn set_ammo( &self, ammo_type_hash: impl IntoHash, ammo: u16 ) -> Result<(), Error>

Sets ammo value of specified ammo type.

§Examples

Passing ammo type as string.

let player = altv::Player::all()[0].clone();

player.set_ammo("ammo_pistol", 10)?;

Using AmmoType enum.

let player = altv::Player::all()[0].clone();

player.set_ammo(altv::AmmoType::Pistol, 10)?;
source

pub fn get_weapon_ammo(&self, weapon_hash: impl IntoHash) -> Result<u16, Error>

Returns current ammo value of specified weapon. If player does not have this weapon, 0 will be returned.

§Examples

Passing weapon as string.

let player = altv::Player::all()[0].clone();

let ammo: u16 = player.get_weapon_ammo("weapon_pistol")?;
source

pub fn set_weapon_ammo( &self, weapon_hash: impl IntoHash, ammo: u16 ) -> Result<(), Error>

source

pub fn has_weapon(&self, weapon_hash: impl IntoHash) -> Result<bool, Error>

source

pub fn get_ammo_special_type( &self, ammo_type_hash: impl IntoHash ) -> Result<AmmoSpecialType, Error>

source

pub fn set_ammo_special_type( &self, ammo_type_hash: impl IntoHash, ammo_special_type: AmmoSpecialType ) -> Result<(), Error>

source

pub fn get_ammo_flags( &self, ammo_type_hash: impl IntoHash ) -> Result<AmmoFlags, Error>

source

pub fn set_ammo_flags( &self, ammo_type_hash: impl IntoHash, ammo_flags: AmmoFlags ) -> Result<(), Error>

source

pub fn set_ammo_max100( &self, ammo_type_hash: impl IntoHash, ammo: i32 ) -> Result<(), Error>

source

pub fn get_ammo_max(&self, ammo_type_hash: impl IntoHash) -> Result<i32, Error>

source

pub fn set_ammo_max( &self, ammo_type_hash: impl IntoHash, ammo: i32 ) -> Result<(), Error>

source

pub fn get_ammo_max50( &self, ammo_type_hash: impl IntoHash ) -> Result<i32, Error>

source

pub fn set_ammo_max50( &self, ammo_type_hash: impl IntoHash, ammo: i32 ) -> Result<(), Error>

source

pub fn get_ammo_max100( &self, ammo_type_hash: impl IntoHash ) -> Result<i32, Error>

source

pub fn decorations(&self) -> Result<Vec<Decoration>, Error>

source

pub fn add_decoration( &self, collection: impl IntoHash, overlay: impl IntoHash, count: u8 ) -> Result<(), Error>

source

pub fn remove_decoration( &self, collection: impl IntoHash, overlay: impl IntoHash ) -> Result<(), Error>

source

pub fn clear_decorations(&self) -> Result<(), Error>

source

pub fn net_ownership_disabled(&self) -> Result<bool, Error>

source

pub fn disable_net_ownership(&self, disable: bool) -> Result<(), Error>

source

pub fn cloud_id(&self) -> Result<String, Error>

source

pub fn cloud_auth_result(&self) -> Result<CloudAuthResult, Error>

source

pub fn get_blood_damage_base64(&self) -> Result<String, Error>

source

pub fn set_blood_damage_base64( &self, blood_damage: impl ToString ) -> Result<(), Error>

source§

impl BaseObjectWrapper<IVehicle, WorldEntity>

§Vehicle implementation

source

pub fn new( model: impl IntoHash, pos: impl Into<Vector3>, rot: impl Into<Vector3> ) -> Result<BaseObjectContainer<IVehicle, WorldEntity>, Error>

source

pub fn new_with_streaming_distance( model: impl IntoHash, pos: impl Into<Vector3>, rot: impl Into<Vector3>, streaming_distance: u32 ) -> Result<BaseObjectContainer<IVehicle, WorldEntity>, Error>

source

pub fn destroy(&self) -> Result<(), Error>

source

pub fn driver( &self ) -> Result<Option<BaseObjectContainer<IPlayer, WorldEntity>>, Error>

source

pub fn attached( &self ) -> Result<Option<BaseObjectContainer<IVehicle, WorldEntity>>, Error>

source

pub fn attached_to( &self ) -> Result<Option<BaseObjectContainer<IVehicle, WorldEntity>>, Error>

source

pub fn is_destroyed(&self) -> Result<bool, Error>

source

pub fn is_primary_color_rgb(&self) -> Result<bool, Error>

source

pub fn is_secondary_color_rgb(&self) -> Result<bool, Error>

source

pub fn is_tire_smoke_color_custom(&self) -> Result<bool, Error>

source

pub fn custom_tires(&self) -> Result<bool, Error>

source

pub fn is_extra_on(&self, extra_id: u8) -> Result<bool, Error>

source

pub fn is_neon_active(&self) -> Result<bool, Error>

source

pub fn is_engine_on(&self) -> Result<bool, Error>

source

pub fn is_handbrake_active(&self) -> Result<bool, Error>

source

pub fn is_siren_active(&self) -> Result<bool, Error>

source

pub fn is_window_opened(&self, window_id: u8) -> Result<bool, Error>

source

pub fn is_daylight_on(&self) -> Result<bool, Error>

source

pub fn is_nightlight_on(&self) -> Result<bool, Error>

source

pub fn is_flamethrower_active(&self) -> Result<bool, Error>

source

pub fn is_wheel_burst(&self, wheel_id: u8) -> Result<bool, Error>

source

pub fn does_wheel_has_tire(&self, wheel_id: u8) -> Result<bool, Error>

source

pub fn is_wheel_detached(&self, wheel_id: u8) -> Result<bool, Error>

source

pub fn is_wheel_on_fire(&self, wheel_id: u8) -> Result<bool, Error>

source

pub fn get_wheel_health(&self, wheel_id: u8) -> Result<f32, Error>

source

pub fn is_light_damaged(&self, light_id: u8) -> Result<bool, Error>

source

pub fn is_window_damaged(&self, window_id: u8) -> Result<bool, Error>

source

pub fn is_special_light_damaged( &self, special_light_id: u8 ) -> Result<bool, Error>

source

pub fn has_armored_windows(&self) -> Result<bool, Error>

source

pub fn manual_engine_control(&self) -> Result<bool, Error>

source

pub fn set_manual_engine_control(&self, toggle: bool) -> Result<(), Error>

source

pub fn get_mod(&self, category: u8) -> Result<u8, Error>

source

pub fn get_mods_count(&self, category: u8) -> Result<u8, Error>

source

pub fn mod_kits_count(&self) -> Result<u8, Error>

source

pub fn mod_kit(&self) -> Result<u8, Error>

source

pub fn set_mod_kit(&self, id: u8) -> Result<bool, Error>

source

pub fn primary_color(&self) -> Result<u8, Error>

source

pub fn set_primary_color(&self, color: u8) -> Result<(), Error>

source

pub fn secondary_color(&self) -> Result<u8, Error>

source

pub fn set_secondary_color(&self, color: u8) -> Result<(), Error>

source

pub fn pearl_color(&self) -> Result<u8, Error>

source

pub fn wheel_color(&self) -> Result<u8, Error>

source

pub fn set_wheel_color(&self, color: u8) -> Result<(), Error>

source

pub fn interior_color(&self) -> Result<u8, Error>

source

pub fn set_interior_color(&self, color: u8) -> Result<(), Error>

source

pub fn dashboard_color(&self) -> Result<u8, Error>

source

pub fn set_dashboard_color(&self, color: u8) -> Result<(), Error>

source

pub fn wheel_type(&self) -> Result<u8, Error>

source

pub fn wheel_variation(&self) -> Result<u8, Error>

source

pub fn rear_wheel_variation(&self) -> Result<u8, Error>

source

pub fn set_wheels(&self, wheel_type: u8, variation: u8) -> Result<(), Error>

source

pub fn set_rear_wheels(&self, variation: u8) -> Result<(), Error>

source

pub fn set_custom_tires(&self, toggle: bool) -> Result<(), Error>

source

pub fn special_darkness(&self) -> Result<u8, Error>

source

pub fn set_special_darkness(&self, value: u8) -> Result<(), Error>

source

pub fn numberplate_index(&self) -> Result<u32, Error>

source

pub fn set_numberplate_index(&self, index: u32) -> Result<(), Error>

source

pub fn window_tint(&self) -> Result<u8, Error>

source

pub fn set_window_tint(&self, tint: u8) -> Result<(), Error>

source

pub fn dirt_level(&self) -> Result<u8, Error>

source

pub fn set_dirt_level(&self, level: u8) -> Result<(), Error>

source

pub fn neon_active(&self) -> Result<VehicleNeon, Error>

source

pub fn set_neon_active( &self, left: bool, right: bool, front: bool, back: bool ) -> Result<(), Error>

source

pub fn livery(&self) -> Result<u8, Error>

source

pub fn set_livery(&self, livery: u8) -> Result<(), Error>

source

pub fn roof_livery(&self) -> Result<u8, Error>

source

pub fn set_roof_livery(&self, roof_livery: u8) -> Result<(), Error>

source

pub fn headlight_color(&self) -> Result<u8, Error>

source

pub fn radio_station_index(&self) -> Result<u32, Error>

source

pub fn lock_state(&self) -> Result<u8, Error>

source

pub fn set_lock_state(&self, state: u8) -> Result<(), Error>

source

pub fn get_door_state(&self, door_id: u8) -> Result<u8, Error>

source

pub fn wheels_count(&self) -> Result<u8, Error>

source

pub fn repairs_count(&self) -> Result<u8, Error>

source

pub fn body_health(&self) -> Result<u32, Error>

source

pub fn body_additional_health(&self) -> Result<u32, Error>

source

pub fn get_part_damage_level(&self, part_id: u8) -> Result<u8, Error>

source

pub fn get_part_bullet_holes(&self, part_id: u8) -> Result<u8, Error>

source

pub fn get_armored_window_shoot_count(&self, window_id: u8) -> Result<u8, Error>

source

pub fn get_bumper_damage_level(&self, bumper_id: u8) -> Result<u8, Error>

source

pub fn roof_closed(&self) -> Result<bool, Error>

source

pub fn set_roof_closed(&self, toggle: bool) -> Result<(), Error>

source

pub fn repair(&self) -> Result<(), Error>

source

pub fn primary_color_rgb(&self) -> Result<Rgba, Error>

source

pub fn set_primary_color_rgb(&self, color: impl Into<Rgba>) -> Result<(), Error>

source

pub fn secondary_color_rgb(&self) -> Result<Rgba, Error>

source

pub fn set_secondary_color_rgb( &self, color: impl Into<Rgba> ) -> Result<(), Error>

source

pub fn tire_smoke_color(&self) -> Result<Rgba, Error>

source

pub fn set_tire_smoke_color(&self, color: impl Into<Rgba>) -> Result<(), Error>

source

pub fn numberplate_text(&self) -> Result<String, Error>

source

pub fn set_numberplate_text(&self, text: impl ToString) -> Result<(), Error>

source

pub fn appearance_data_base64(&self) -> Result<String, Error>

source

pub fn set_appearance_data_base64( &self, data: impl ToString ) -> Result<(), Error>

source

pub fn game_state_base64(&self) -> Result<String, Error>

source

pub fn set_game_state_base64(&self, data: impl ToString) -> Result<(), Error>

source

pub fn health_data_base64(&self) -> Result<String, Error>

source

pub fn set_health_data_base64(&self, data: impl ToString) -> Result<(), Error>

source

pub fn damage_data_base64(&self) -> Result<String, Error>

source

pub fn set_damage_data_base64(&self, data: impl ToString) -> Result<(), Error>

source

pub fn script_data_base64(&self) -> Result<String, Error>

source

pub fn set_script_data_base64(&self, data: impl ToString) -> Result<(), Error>

source

pub fn neon_color(&self) -> Result<Rgba, Error>

source

pub fn set_neon_color(&self, color: impl Into<Rgba>) -> Result<(), Error>

source

pub fn set_engine_on(&self, toggle: bool) -> Result<(), Error>

source

pub fn set_headlight_color(&self, color: u8) -> Result<(), Error>

source

pub fn set_radio_station_index(&self, index: u32) -> Result<(), Error>

source

pub fn set_siren_active(&self, toggle: bool) -> Result<(), Error>

source

pub fn set_door_state(&self, door_id: u8, state: u8) -> Result<(), Error>

source

pub fn set_window_opened(&self, window_id: u8, state: bool) -> Result<(), Error>

source

pub fn set_lights_multiplier(&self, multiplier: f32) -> Result<(), Error>

source

pub fn set_engine_health(&self, health: i32) -> Result<(), Error>

source

pub fn set_petrol_tank_health(&self, health: i32) -> Result<(), Error>

source

pub fn set_wheel_burst(&self, wheel_id: u8, state: bool) -> Result<(), Error>

source

pub fn set_wheel_has_tire(&self, wheel_id: u8, state: bool) -> Result<(), Error>

source

pub fn set_wheel_detached(&self, wheel_id: u8, state: bool) -> Result<(), Error>

source

pub fn set_wheel_on_fire(&self, wheel_id: u8, state: bool) -> Result<(), Error>

source

pub fn set_wheel_health(&self, wheel_id: u8, health: f32) -> Result<(), Error>

source

pub fn set_wheel_fixed(&self, wheel_id: u8) -> Result<(), Error>

source

pub fn set_body_health(&self, health: u32) -> Result<(), Error>

source

pub fn set_body_additional_health(&self, health: u32) -> Result<(), Error>

source

pub fn set_part_damage_level( &self, part_id: u8, damage: u8 ) -> Result<(), Error>

source

pub fn set_part_bullet_holes( &self, part_id: u8, shoots_count: u8 ) -> Result<(), Error>

source

pub fn set_light_damaged( &self, light_id: u8, damaged: bool ) -> Result<(), Error>

source

pub fn set_window_damaged( &self, window_id: u8, damaged: bool ) -> Result<(), Error>

source

pub fn set_special_light_damaged( &self, special_light_id: u8, damaged: bool ) -> Result<(), Error>

source

pub fn set_armored_window_health( &self, window_id: u8, health: f32 ) -> Result<(), Error>

source

pub fn set_armored_window_shoot_count( &self, window_id: u8, count: u8 ) -> Result<(), Error>

source

pub fn set_bumper_damage_level( &self, bumper_id: u8, damage_level: u8 ) -> Result<(), Error>

source

pub fn drift_mode(&self) -> Result<bool, Error>

source

pub fn set_drift_mode(&self, toggle: bool) -> Result<(), Error>

source

pub fn boat_anchor_active(&self) -> Result<bool, Error>

source

pub fn set_boat_anchor_active(&self, toggle: bool) -> Result<(), Error>

source

pub fn set_search_light( &self, toggle: bool, spotted_entity: impl Into<AnyEntity> ) -> Result<bool, Error>

source

pub fn light_state(&self) -> Result<u8, Error>

source

pub fn set_light_state(&self, state: u8) -> Result<(), Error>

source

pub fn has_timed_explosion(&self) -> Result<bool, Error>

source

pub fn timed_explosion_culprit( &self ) -> Result<Option<BaseObjectContainer<IPlayer, WorldEntity>>, Error>

source

pub fn timed_explosion_time(&self) -> Result<u32, Error>

source

pub fn set_timed_explosion( &self, state: bool, culprit: impl Into<BaseObjectContainer<IPlayer, WorldEntity>>, time: u32 ) -> Result<(), Error>

source

pub fn is_towing_disabled(&self) -> Result<bool, Error>

source

pub fn set_disable_towing(&self, disable: bool) -> Result<(), Error>

source

pub fn rocket_refuel_speed(&self) -> Result<f32, Error>

source

pub fn set_rocket_refuel_speed(&self, speed: f32) -> Result<(), Error>

source

pub fn counter_measure_count(&self) -> Result<u32, Error>

source

pub fn set_counter_measure_count(&self, measure_count: u32) -> Result<(), Error>

source

pub fn script_max_speed(&self) -> Result<f32, Error>

source

pub fn set_script_max_speed(&self, speed: f32) -> Result<(), Error>

source

pub fn weapon_capacity(&self, index: u8) -> Result<i32, Error>

source

pub fn set_weapon_capacity(&self, index: u8, state: i32) -> Result<(), Error>

source

pub fn hybrid_extra_active(&self) -> Result<bool, Error>

source

pub fn set_hybrid_extra_active(&self, toggle: bool) -> Result<(), Error>

source

pub fn hybrid_extra_state(&self) -> Result<u8, Error>

source

pub fn set_hybrid_extra_state(&self, state: u8) -> Result<(), Error>

source

pub fn quaternion(&self) -> Result<Quaternion, Error>

source

pub fn set_quaternion( &self, quaternion: impl Into<Quaternion> ) -> Result<(), Error>

source

pub fn velocity(&self) -> Result<Vector3, Error>

source

pub fn toggle_extra(&self, extra_id: u8, toggle: bool) -> Result<(), Error>

source

pub fn set_mod(&self, category: u8, id: u8) -> Result<(), Error>

source

pub fn steering_angle(&self) -> Result<f32, Error>

source

pub fn horn_active(&self) -> Result<bool, Error>

source

pub fn acceleration_level(&self) -> Result<f32, Error>

source

pub fn brake_level(&self) -> Result<f32, Error>

source§

impl BaseObjectWrapper<IVirtualEntity, WorldObject>

§VirtualEntity implementation

source

pub fn new( group: BaseObjectContainer<IVirtualEntityGroup>, pos: impl Into<Vector3>, streaming_distance: u32 ) -> Result<BaseObjectContainer<IVirtualEntity, WorldObject>, Error>

Creates new instance of VirtualEntity without initial stream synced meta. See virtual_entity::VirtualEntity::new_with_stream_meta if you want to create virtual entity with initial stream synced meta.

§Errors

When provided group instance is invalid (destroyed).

§Examples
let group = altv::VirtualEntityGroup::new(10);
let entity = altv::VirtualEntity::new(
    group.clone(),
    altv::Vector3::new(0, 0, 72),
    10,
)?;
source

pub fn new_with_stream_meta( group: BaseObjectContainer<IVirtualEntityGroup>, pos: impl Into<Vector3>, streaming_distance: u32, stream_synced_meta: MValueHashMap<'_> ) -> Result<BaseObjectContainer<IVirtualEntity, WorldObject>, Error>

Creates new instance of VirtualEntity with initial stream synced meta.

§Errors

When provided group instance is invalid (destroyed).

§Examples
let group = altv::VirtualEntityGroup::new(10);
let entity = altv::VirtualEntity::new_with_stream_meta(
    group.clone(),
    altv::Vector3::new(0, 0, 72),
    10,
    altv::MValueHashMap::new(
        HashMap::from([("example".to_string(), &123 as altv::DynMValue)])
    ),
)?;
source

pub fn streaming_distance(&self) -> Result<u32, Error>

source

pub fn group(&self) -> Result<BaseObjectContainer<IVirtualEntityGroup>, Error>

source

pub fn visible(&self) -> Result<bool, Error>

source

pub fn set_visible(&self, toggle: bool) -> Result<(), Error>

source

pub fn destroy(&self) -> Result<(), Error>

source§

impl BaseObjectWrapper<IVirtualEntityGroup>

§VirtualEntityGroup implementation

source

pub fn new( max_entities_in_stream: u32 ) -> BaseObjectContainer<IVirtualEntityGroup>

source

pub fn max_entities_in_stream(&self) -> Result<u32, Error>

source§

impl BaseObjectWrapper<IVoiceChannel>

§VoiceChannel implementation

source

pub fn new_spatial( max_distance: f32 ) -> Result<BaseObjectContainer<IVoiceChannel>, Error>

source

pub fn new_non_spatial() -> Result<BaseObjectContainer<IVoiceChannel>, Error>

source

pub fn spatial(&self) -> Result<bool, Error>

source

pub fn max_distance(&self) -> Result<f32, Error>

source

pub fn has_player( &self, player: BaseObjectContainer<IPlayer, WorldEntity> ) -> Result<bool, Error>

source

pub fn add_player( &self, player: BaseObjectContainer<IPlayer, WorldEntity> ) -> Result<(), Error>

source

pub fn remove_player( &self, player: BaseObjectContainer<IPlayer, WorldEntity> ) -> Result<(), Error>

source

pub fn is_player_muted( &self, player: BaseObjectContainer<IPlayer, WorldEntity> ) -> Result<bool, Error>

source

pub fn mute_player( &self, player: BaseObjectContainer<IPlayer, WorldEntity> ) -> Result<(), Error>

source

pub fn unmute_player( &self, player: BaseObjectContainer<IPlayer, WorldEntity> ) -> Result<(), Error>

source

pub fn players( &self ) -> Result<Vec<BaseObjectContainer<IPlayer, WorldEntity>>, Error>

source

pub fn filter(&self) -> Result<u32, Error>

source

pub fn set_filter(&self, filter: u32) -> Result<(), Error>

source

pub fn priority(&self) -> Result<i32, Error>

source

pub fn set_priority(&self, priority: i32) -> Result<(), Error>

source

pub fn destroy(&self) -> Result<(), Error>

Trait Implementations§

source§

impl BaseObjectPoolFuncs<BaseObjectContainer<IBlip, WorldObject>> for BaseObjectWrapper<IBlip, WorldObject>

source§

fn all() -> Vec<BaseObjectContainer<IBlip, WorldObject>>

source§

fn all_count() -> usize

source§

fn get_by_id(id: u32) -> Option<BaseObjectContainer<IBlip, WorldObject>>

source§

impl BaseObjectPoolFuncs<BaseObjectContainer<ICheckpoint, WorldColShape>> for BaseObjectWrapper<ICheckpoint, WorldColShape>

source§

fn all() -> Vec<BaseObjectContainer<ICheckpoint, WorldColShape>>

source§

fn all_count() -> usize

source§

fn get_by_id(id: u32) -> Option<BaseObjectContainer<ICheckpoint, WorldColShape>>

source§

impl BaseObjectPoolFuncs<BaseObjectContainer<IColShape, WorldColShape>> for BaseObjectWrapper<IColShape, WorldColShape>

source§

fn all() -> Vec<BaseObjectContainer<IColShape, WorldColShape>>

source§

fn all_count() -> usize

source§

fn get_by_id(id: u32) -> Option<BaseObjectContainer<IColShape, WorldColShape>>

source§

impl BaseObjectPoolFuncs<BaseObjectContainer<IConnectionInfo>> for BaseObjectWrapper<IConnectionInfo>

source§

fn all() -> Vec<BaseObjectContainer<IConnectionInfo>>

source§

fn all_count() -> usize

source§

fn get_by_id(id: u32) -> Option<BaseObjectContainer<IConnectionInfo>>

source§

impl BaseObjectPoolFuncs<BaseObjectContainer<IMarker, WorldObject>> for BaseObjectWrapper<IMarker, WorldObject>

source§

fn all() -> Vec<BaseObjectContainer<IMarker, WorldObject>>

source§

fn all_count() -> usize

source§

fn get_by_id(id: u32) -> Option<BaseObjectContainer<IMarker, WorldObject>>

source§

impl BaseObjectPoolFuncs<BaseObjectContainer<IObject, WorldEntity>> for BaseObjectWrapper<IObject, WorldEntity>

source§

fn all() -> Vec<BaseObjectContainer<IObject, WorldEntity>>

source§

fn all_count() -> usize

source§

fn get_by_id(id: u32) -> Option<BaseObjectContainer<IObject, WorldEntity>>

source§

impl BaseObjectPoolFuncs<BaseObjectContainer<IPed, WorldEntity>> for BaseObjectWrapper<IPed, WorldEntity>

source§

fn all() -> Vec<BaseObjectContainer<IPed, WorldEntity>>

source§

fn all_count() -> usize

source§

fn get_by_id(id: u32) -> Option<BaseObjectContainer<IPed, WorldEntity>>

source§

impl BaseObjectPoolFuncs<BaseObjectContainer<IPlayer, WorldEntity>> for BaseObjectWrapper<IPlayer, WorldEntity>

source§

fn all() -> Vec<BaseObjectContainer<IPlayer, WorldEntity>>

source§

fn all_count() -> usize

source§

fn get_by_id(id: u32) -> Option<BaseObjectContainer<IPlayer, WorldEntity>>

source§

impl BaseObjectPoolFuncs<BaseObjectContainer<IVehicle, WorldEntity>> for BaseObjectWrapper<IVehicle, WorldEntity>

source§

fn all() -> Vec<BaseObjectContainer<IVehicle, WorldEntity>>

source§

fn all_count() -> usize

source§

fn get_by_id(id: u32) -> Option<BaseObjectContainer<IVehicle, WorldEntity>>

source§

impl BaseObjectPoolFuncs<BaseObjectContainer<IVirtualEntity, WorldObject>> for BaseObjectWrapper<IVirtualEntity, WorldObject>

source§

fn all() -> Vec<BaseObjectContainer<IVirtualEntity, WorldObject>>

source§

fn all_count() -> usize

source§

fn get_by_id( id: u32 ) -> Option<BaseObjectContainer<IVirtualEntity, WorldObject>>

source§

impl BaseObjectPoolFuncs<BaseObjectContainer<IVirtualEntityGroup>> for BaseObjectWrapper<IVirtualEntityGroup>

source§

fn all() -> Vec<BaseObjectContainer<IVirtualEntityGroup>>

source§

fn all_count() -> usize

source§

fn get_by_id(id: u32) -> Option<BaseObjectContainer<IVirtualEntityGroup>>

source§

impl BaseObjectPoolFuncs<BaseObjectContainer<IVoiceChannel>> for BaseObjectWrapper<IVoiceChannel>

source§

fn all() -> Vec<BaseObjectContainer<IVoiceChannel>>

source§

fn all_count() -> usize

source§

fn get_by_id(id: u32) -> Option<BaseObjectContainer<IVoiceChannel>>

source§

impl ColShapy<WorldColShape> for BaseObjectWrapper<ICheckpoint, WorldColShape>

source§

impl ColShapy<WorldColShape> for BaseObjectWrapper<IColShape, WorldColShape>

source§

impl Entity<WorldEntity> for BaseObjectWrapper<IObject, WorldEntity>

source§

fn raw_ptr(&self) -> Result<*mut IEntity, Error>

source§

fn sync_id(&self) -> Result<u16, Error>

source§

fn model(&self) -> Result<u32, Error>

source§

fn attach_to_entity_bone_index( &self, entity: impl Into<AnyEntity>, attach: AttachToEntityBoneIndex ) -> Result<(), Error>

source§

fn attach_to_entity_bone_name( &self, entity: impl Into<AnyEntity>, attach: AttachToEntityBoneName ) -> Result<(), Error>

source§

fn detach(&self) -> Result<(), Error>

source§

fn net_owner( &self ) -> Result<Option<BaseObjectContainer<IPlayer, WorldEntity>>, Error>

source§

fn set_net_owner( &self, owner: BaseObjectContainer<IPlayer, WorldEntity>, disable_migration: bool ) -> Result<(), Error>

source§

fn rot(&self) -> Result<Vector3, Error>

source§

fn set_rot(&self, rot: impl Into<Vector3>) -> Result<(), Error>

source§

fn streamed(&self) -> Result<bool, Error>

source§

fn set_streamed(&self, toggle: bool) -> Result<(), Error>

source§

fn visible(&self) -> Result<bool, Error>

source§

fn set_visible(&self, toggle: bool) -> Result<(), Error>

source§

fn frozen(&self) -> Result<bool, Error>

source§

fn set_frozen(&self, toggle: bool) -> Result<(), Error>

source§

fn collision(&self) -> Result<bool, Error>

source§

fn set_collision(&self, toggle: bool) -> Result<(), Error>

source§

fn timestamp(&self) -> Result<u32, Error>

source§

fn streaming_distance(&self) -> Result<u32, Error>

source§

fn set_streaming_distance(&self, value: u32) -> Result<(), Error>

source§

impl Entity<WorldEntity> for BaseObjectWrapper<IPed, WorldEntity>

source§

fn raw_ptr(&self) -> Result<*mut IEntity, Error>

source§

fn sync_id(&self) -> Result<u16, Error>

source§

fn model(&self) -> Result<u32, Error>

source§

fn attach_to_entity_bone_index( &self, entity: impl Into<AnyEntity>, attach: AttachToEntityBoneIndex ) -> Result<(), Error>

source§

fn attach_to_entity_bone_name( &self, entity: impl Into<AnyEntity>, attach: AttachToEntityBoneName ) -> Result<(), Error>

source§

fn detach(&self) -> Result<(), Error>

source§

fn net_owner( &self ) -> Result<Option<BaseObjectContainer<IPlayer, WorldEntity>>, Error>

source§

fn set_net_owner( &self, owner: BaseObjectContainer<IPlayer, WorldEntity>, disable_migration: bool ) -> Result<(), Error>

source§

fn rot(&self) -> Result<Vector3, Error>

source§

fn set_rot(&self, rot: impl Into<Vector3>) -> Result<(), Error>

source§

fn streamed(&self) -> Result<bool, Error>

source§

fn set_streamed(&self, toggle: bool) -> Result<(), Error>

source§

fn visible(&self) -> Result<bool, Error>

source§

fn set_visible(&self, toggle: bool) -> Result<(), Error>

source§

fn frozen(&self) -> Result<bool, Error>

source§

fn set_frozen(&self, toggle: bool) -> Result<(), Error>

source§

fn collision(&self) -> Result<bool, Error>

source§

fn set_collision(&self, toggle: bool) -> Result<(), Error>

source§

fn timestamp(&self) -> Result<u32, Error>

source§

fn streaming_distance(&self) -> Result<u32, Error>

source§

fn set_streaming_distance(&self, value: u32) -> Result<(), Error>

source§

impl Entity<WorldEntity> for BaseObjectWrapper<IPlayer, WorldEntity>

source§

fn raw_ptr(&self) -> Result<*mut IEntity, Error>

source§

fn sync_id(&self) -> Result<u16, Error>

source§

fn model(&self) -> Result<u32, Error>

source§

fn attach_to_entity_bone_index( &self, entity: impl Into<AnyEntity>, attach: AttachToEntityBoneIndex ) -> Result<(), Error>

source§

fn attach_to_entity_bone_name( &self, entity: impl Into<AnyEntity>, attach: AttachToEntityBoneName ) -> Result<(), Error>

source§

fn detach(&self) -> Result<(), Error>

source§

fn net_owner( &self ) -> Result<Option<BaseObjectContainer<IPlayer, WorldEntity>>, Error>

source§

fn set_net_owner( &self, owner: BaseObjectContainer<IPlayer, WorldEntity>, disable_migration: bool ) -> Result<(), Error>

source§

fn rot(&self) -> Result<Vector3, Error>

source§

fn set_rot(&self, rot: impl Into<Vector3>) -> Result<(), Error>

source§

fn streamed(&self) -> Result<bool, Error>

source§

fn set_streamed(&self, toggle: bool) -> Result<(), Error>

source§

fn visible(&self) -> Result<bool, Error>

source§

fn set_visible(&self, toggle: bool) -> Result<(), Error>

source§

fn frozen(&self) -> Result<bool, Error>

source§

fn set_frozen(&self, toggle: bool) -> Result<(), Error>

source§

fn collision(&self) -> Result<bool, Error>

source§

fn set_collision(&self, toggle: bool) -> Result<(), Error>

source§

fn timestamp(&self) -> Result<u32, Error>

source§

fn streaming_distance(&self) -> Result<u32, Error>

source§

fn set_streaming_distance(&self, value: u32) -> Result<(), Error>

source§

impl Entity<WorldEntity> for BaseObjectWrapper<IVehicle, WorldEntity>

source§

fn raw_ptr(&self) -> Result<*mut IEntity, Error>

source§

fn sync_id(&self) -> Result<u16, Error>

source§

fn model(&self) -> Result<u32, Error>

source§

fn attach_to_entity_bone_index( &self, entity: impl Into<AnyEntity>, attach: AttachToEntityBoneIndex ) -> Result<(), Error>

source§

fn attach_to_entity_bone_name( &self, entity: impl Into<AnyEntity>, attach: AttachToEntityBoneName ) -> Result<(), Error>

source§

fn detach(&self) -> Result<(), Error>

source§

fn net_owner( &self ) -> Result<Option<BaseObjectContainer<IPlayer, WorldEntity>>, Error>

source§

fn set_net_owner( &self, owner: BaseObjectContainer<IPlayer, WorldEntity>, disable_migration: bool ) -> Result<(), Error>

source§

fn rot(&self) -> Result<Vector3, Error>

source§

fn set_rot(&self, rot: impl Into<Vector3>) -> Result<(), Error>

source§

fn streamed(&self) -> Result<bool, Error>

source§

fn set_streamed(&self, toggle: bool) -> Result<(), Error>

source§

fn visible(&self) -> Result<bool, Error>

source§

fn set_visible(&self, toggle: bool) -> Result<(), Error>

source§

fn frozen(&self) -> Result<bool, Error>

source§

fn set_frozen(&self, toggle: bool) -> Result<(), Error>

source§

fn collision(&self) -> Result<bool, Error>

source§

fn set_collision(&self, toggle: bool) -> Result<(), Error>

source§

fn timestamp(&self) -> Result<u32, Error>

source§

fn streaming_distance(&self) -> Result<u32, Error>

source§

fn set_streaming_distance(&self, value: u32) -> Result<(), Error>

source§

impl LocalPlayerMeta for BaseObjectWrapper<IPlayer, WorldEntity>

source§

fn local_meta_entry<V>( self: &Rc<Self>, key: impl ToString ) -> Result<LocalPlayerMetaEntry<V>, Error>

Provides access to read or modify local meta of Player. Read more
source§

fn local_meta_keys(self: &Rc<Self>) -> Result<Vec<String>, Error>

source§

impl<T, InheritPtrs> NormalBaseObjectMeta<T, InheritPtrs> for BaseObjectWrapper<T, InheritPtrs>
where InheritPtrs: Clone,

source§

fn meta_entry<V>( self: &Rc<Self>, key: impl ToString ) -> Result<NormalBaseObjectMetaEntry<V, T, InheritPtrs>, Error>

Provides access to read or modify unsynced meta of BaseObject (Vehicle, ColShape, Player, etc.). It can be used to set data in one alt:V resource and then read it later in another one. Read more
source§

fn meta_keys(self: &Rc<Self>) -> Result<Vec<String>, Error>

source§

fn set_multiple_meta( self: &Rc<Self>, meta: MValueHashMap<'_> ) -> Result<(), Error>

source§

impl StreamSyncedCheckpointMeta for BaseObjectWrapper<ICheckpoint, WorldColShape>

source§

fn stream_synced_meta_entry<V>( self: &Rc<Self>, key: impl ToString ) -> Result<StreamSyncedCheckpointMetaEntry<V>, Error>

Provides access to read or modify stream synced meta of Checkpoint. Read more
source§

fn stream_synced_meta_keys(self: &Rc<Self>) -> Result<Vec<String>, Error>

source§

fn set_multiple_stream_synced_meta( self: &Rc<Self>, meta: MValueHashMap<'_> ) -> Result<(), Error>

source§

impl StreamSyncedEntityMeta for BaseObjectWrapper<IObject, WorldEntity>

source§

fn stream_synced_meta_entry<V>( self: &Rc<Self>, key: impl ToString ) -> Result<StreamSyncedEntityMetaEntry<V>, Error>

Provides access to read or modify stream synced meta of Entity (Vehicle, Player, Ped, etc.). Read more
source§

fn stream_synced_meta_keys(self: &Rc<Self>) -> Result<Vec<String>, Error>

source§

fn set_multiple_stream_synced_meta( self: &Rc<Self>, meta: MValueHashMap<'_> ) -> Result<(), Error>

source§

impl StreamSyncedEntityMeta for BaseObjectWrapper<IPed, WorldEntity>

source§

fn stream_synced_meta_entry<V>( self: &Rc<Self>, key: impl ToString ) -> Result<StreamSyncedEntityMetaEntry<V>, Error>

Provides access to read or modify stream synced meta of Entity (Vehicle, Player, Ped, etc.). Read more
source§

fn stream_synced_meta_keys(self: &Rc<Self>) -> Result<Vec<String>, Error>

source§

fn set_multiple_stream_synced_meta( self: &Rc<Self>, meta: MValueHashMap<'_> ) -> Result<(), Error>

source§

impl StreamSyncedEntityMeta for BaseObjectWrapper<IPlayer, WorldEntity>

source§

fn stream_synced_meta_entry<V>( self: &Rc<Self>, key: impl ToString ) -> Result<StreamSyncedEntityMetaEntry<V>, Error>

Provides access to read or modify stream synced meta of Entity (Vehicle, Player, Ped, etc.). Read more
source§

fn stream_synced_meta_keys(self: &Rc<Self>) -> Result<Vec<String>, Error>

source§

fn set_multiple_stream_synced_meta( self: &Rc<Self>, meta: MValueHashMap<'_> ) -> Result<(), Error>

source§

impl StreamSyncedEntityMeta for BaseObjectWrapper<IVehicle, WorldEntity>

source§

fn stream_synced_meta_entry<V>( self: &Rc<Self>, key: impl ToString ) -> Result<StreamSyncedEntityMetaEntry<V>, Error>

Provides access to read or modify stream synced meta of Entity (Vehicle, Player, Ped, etc.). Read more
source§

fn stream_synced_meta_keys(self: &Rc<Self>) -> Result<Vec<String>, Error>

source§

fn set_multiple_stream_synced_meta( self: &Rc<Self>, meta: MValueHashMap<'_> ) -> Result<(), Error>

source§

impl StreamSyncedVirtualEntityMeta for BaseObjectWrapper<IVirtualEntity, WorldObject>

source§

fn stream_synced_meta_entry<V>( self: &Rc<Self>, key: impl ToString ) -> Result<StreamSyncedVirtualEntityMetaEntry<V>, Error>

Provides access to read or modify stream synced meta of VirtualEntity. Read more
source§

fn stream_synced_meta_keys(self: &Rc<Self>) -> Result<Vec<String>, Error>

source§

fn set_multiple_stream_synced_meta( self: &Rc<Self>, meta: MValueHashMap<'_> ) -> Result<(), Error>

source§

impl<T, InheritPtrs> SyncedBaseObjectMeta<T, InheritPtrs> for BaseObjectWrapper<T, InheritPtrs>
where InheritPtrs: Clone,

source§

fn synced_meta_entry<V>( self: &Rc<Self>, key: impl ToString ) -> Result<SyncedBaseObjectMetaEntry<V, T, InheritPtrs>, Error>

Provides access to read or modify synced meta of BaseObject (Vehicle, ColShape, Player, etc.). Read more
source§

fn synced_meta_keys(self: &Rc<Self>) -> Result<Vec<String>, Error>

source§

fn set_multiple_synced_meta( self: &Rc<Self>, meta: MValueHashMap<'_> ) -> Result<(), Error>

source§

impl<T, InheritPtrs> ValidBaseObject for BaseObjectWrapper<T, InheritPtrs>
where InheritPtrs: Clone,

source§

impl WorldObject<WorldColShape> for BaseObjectWrapper<ICheckpoint, WorldColShape>

source§

impl WorldObject<WorldColShape> for BaseObjectWrapper<IColShape, WorldColShape>

source§

impl WorldObject<WorldEntity> for BaseObjectWrapper<IObject, WorldEntity>

source§

impl WorldObject<WorldEntity> for BaseObjectWrapper<IPed, WorldEntity>

source§

impl WorldObject<WorldEntity> for BaseObjectWrapper<IPlayer, WorldEntity>

source§

impl WorldObject<WorldEntity> for BaseObjectWrapper<IVehicle, WorldEntity>

source§

impl WorldObject<WorldObject> for BaseObjectWrapper<IBlip, WorldObject>

source§

impl WorldObject<WorldObject> for BaseObjectWrapper<IMarker, WorldObject>

source§

impl WorldObject<WorldObject> for BaseObjectWrapper<IVirtualEntity, WorldObject>

Auto Trait Implementations§

§

impl<T, InheritPtrs = ()> !Freeze for BaseObjectWrapper<T, InheritPtrs>

§

impl<T, InheritPtrs = ()> !RefUnwindSafe for BaseObjectWrapper<T, InheritPtrs>

§

impl<T, InheritPtrs = ()> !Send for BaseObjectWrapper<T, InheritPtrs>

§

impl<T, InheritPtrs = ()> !Sync for BaseObjectWrapper<T, InheritPtrs>

§

impl<T, InheritPtrs> Unpin for BaseObjectWrapper<T, InheritPtrs>
where InheritPtrs: Unpin,

§

impl<T, InheritPtrs> UnwindSafe for BaseObjectWrapper<T, InheritPtrs>
where InheritPtrs: UnwindSafe, T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.