pub struct Pickup { /* private fields */ }Implementations§
Source§impl Pickup
impl Pickup
pub fn get_handle(&self) -> *const c_void
pub fn new(handle: *const c_void) -> Pickup
Sourcepub fn create(
model: i32,
pickup_type: i32,
position: Vector3,
virtual_world: i32,
) -> Option<Pickup>
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.
Sourcepub fn create_static(
model: i32,
pickup_type: i32,
position: Vector3,
virtual_world: i32,
) -> bool
pub fn create_static( model: i32, pickup_type: i32, position: Vector3, virtual_world: i32, ) -> bool
This function adds a ‘static’ pickup to the game.
Sourcepub fn is_streamed_in(&self, player: &Player) -> bool
pub fn is_streamed_in(&self, player: &Player) -> bool
Checks if a pickup is streamed in for a specific player.
Sourcepub fn get_virtual_world(&self) -> i32
pub fn get_virtual_world(&self) -> i32
Gets the virtual world ID of a pickup.
Sourcepub fn set_virtual_world(&self, virtualworld: i32) -> bool
pub fn set_virtual_world(&self, virtualworld: i32) -> bool
Sets the virtual world ID of a pickup.
Sourcepub fn show_for_player(&self, player: &Player)
pub fn show_for_player(&self, player: &Player)
Shows a pickup for a specific player.
Sourcepub fn hide_for_player(&self, player: &Player) -> bool
pub fn hide_for_player(&self, player: &Player) -> bool
Hides a pickup for a specific player.
Checks if a pickup is hidden for a specific player.
Sourcepub fn get_from_id(pickupid: i32) -> Option<Pickup>
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more