Pickup

Struct Pickup 

Source
pub struct Pickup { /* private fields */ }

Implementations§

Source§

impl Pickup

Source

pub fn get_handle(&self) -> *const c_void

Source

pub fn new(handle: *const c_void) -> Pickup

Source

pub fn create( model: i32, pickup_type: i32, position: Vector3, virtual_world: i32, ) -> Option<Pickup>

This function does exactly the same as AddStaticPickup, except it returns a pickup ID which can be used to destroy it afterwards and be tracked using OnPlayerPickUpPickup.

Source

pub fn create_static( model: i32, pickup_type: i32, position: Vector3, virtual_world: i32, ) -> bool

This function adds a ‘static’ pickup to the game.

Source

pub fn destroy(&self) -> bool

Destroys a pickup created with CreatePickup.

Source

pub fn is_streamed_in(&self, player: &Player) -> bool

Checks if a pickup is streamed in for a specific player.

Source

pub fn get_pos(&self) -> Vector3

Gets the coordinates of a pickup.

Source

pub fn get_model(&self) -> i32

Gets the model ID of a pickup.

Source

pub fn get_type(&self) -> i32

Gets the type of a pickup.

Source

pub fn get_virtual_world(&self) -> i32

Gets the virtual world ID of a pickup.

Source

pub fn set_pos(&self, pos: Vector3, update: bool)

Sets the position of a pickup.

Source

pub fn set_model(&self, model: i32, update: bool) -> bool

Sets the model of a pickup.

Source

pub fn set_type(&self, pickup_type: i32, update: bool) -> bool

Sets the type of a pickup.

Source

pub fn set_virtual_world(&self, virtualworld: i32) -> bool

Sets the virtual world ID of a pickup.

Source

pub fn show_for_player(&self, player: &Player)

Shows a pickup for a specific player.

Source

pub fn hide_for_player(&self, player: &Player) -> bool

Hides a pickup for a specific player.

Source

pub fn is_hidden_for_player(&self, player: &Player) -> bool

Checks if a pickup is hidden for a specific player.

Source

pub fn get_id(&self) -> i32

Get id of the pickup

Source

pub fn get_from_id(pickupid: i32) -> Option<Pickup>

Get a pickup object from an id

Auto Trait Implementations§

§

impl Freeze for Pickup

§

impl RefUnwindSafe for Pickup

§

impl !Send for Pickup

§

impl !Sync for Pickup

§

impl Unpin for Pickup

§

impl UnwindSafe for Pickup

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>,

Source§

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>,

Source§

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.