SwiftlyS2

CPlayer_ItemServices

Interface CPlayer_ItemServices

Namespace: SwiftlyS2.Shared.SchemaDefinitions

Assembly: SwiftlyS2.CS2.dll

public interface CPlayer_ItemServices : CPlayerPawnComponent, ISchemaClass<CPlayerPawnComponent>, ISchemaClass<CPlayer_ItemServices>, ISchemaField, ISchemaClass, INativeHandle

Implements

Methods

DropActiveItem()

Drop the item that player is holding.

Thread unsafe, use async variant instead for non-main thread context.

[ThreadUnsafe]
void DropActiveItem()

DropActiveItemAsync()

Drop the item that player is holding asynchronously.

Task DropActiveItemAsync()
Returns

GiveItem<T>()

Give an item to the player.

Thread unsafe, use async version instead for non-main thread context.

[ThreadUnsafe]
T GiveItem<T>() where T : ISchemaClass<T>
Returns
  • T — The item that was given.
Type Parameters
  • T — The type of the item to give.

GiveItem<T>(string)

Give an item to the player.

Thread unsafe, use async variant instead for non-main thread context.

[ThreadUnsafe]
T GiveItem<T>(string itemDesignerName) where T : ISchemaClass<T>
Parameters
  • itemDesignerName string — The designer name of the item to give.
Returns
  • T — The item that was given.
Type Parameters
  • T

GiveItem(string)

Give an item to the player.

Thread unsafe, use async variant instead for non-main thread context.

[ThreadUnsafe]
void GiveItem(string itemDesignerName)
Parameters
  • itemDesignerName string — The designer name of the item to give.

GiveItemAsync<T>()

Give an item to the player asynchronously.

Task<T> GiveItemAsync<T>() where T : ISchemaClass<T>
Returns
  • Task<T> — The item that was given.
Type Parameters
  • T — The type of the item to give.

GiveItemAsync<T>(string)

Give an item to the player asynchronously.

Task<T> GiveItemAsync<T>(string itemDesignerName) where T : ISchemaClass<T>
Parameters
  • itemDesignerName string — The designer name of the item to give.
Returns
  • Task<T> — The item that was given.
Type Parameters
  • T

GiveItemAsync(string)

Give an item to the player asynchronously.

Task GiveItemAsync(string itemDesignerName)
Parameters
  • itemDesignerName string — The designer name of the item to give.
Returns
  • Task — The item that was given.

RemoveItems()

Remove all items from the player.

Thread unsafe, use async variant instead for non-main thread context.

[ThreadUnsafe]
void RemoveItems()

RemoveItemsAsync()

Remove all items from the player asynchronously.

Task RemoveItemsAsync()
Returns

On this page