CPlayer_WeaponServices
Interface CPlayer_WeaponServices
Namespace: SwiftlyS2.Shared.SchemaDefinitions
Assembly: SwiftlyS2.CS2.dll
public interface CPlayer_WeaponServices : CPlayerPawnComponent, ISchemaClass<CPlayerPawnComponent>, ISchemaClass<CPlayer_WeaponServices>, ISchemaField, ISchemaClass, INativeHandleImplements
- CPlayerPawnComponent
- ISchemaClass<CPlayerPawnComponent>
- ISchemaClass<CPlayer_WeaponServices>
- ISchemaField
- ISchemaClass
- INativeHandle
Properties
ActiveWeapon
ref CHandle<CBasePlayerWeapon> ActiveWeapon { get; }Ammo
ISchemaFixedArray<ushort> Ammo { get; }LastWeapon
ref CHandle<CBasePlayerWeapon> LastWeapon { get; }MyValidWeapons
IEnumerable<CBasePlayerWeapon> MyValidWeapons { get; }MyWeapons
ref CUtlVector<CHandle<CBasePlayerWeapon>> MyWeapons { get; }PreventWeaponPickup
ref bool PreventWeaponPickup { get; }Methods
ActiveWeaponUpdated()
void ActiveWeaponUpdated()AmmoUpdated()
void AmmoUpdated()DropWeapon(CBasePlayerWeapon)
Drop a weapon.
Thread unsafe, use async variant instead for non-main thread context.
[ThreadUnsafe]
void DropWeapon(CBasePlayerWeapon weapon)- weapon CBasePlayerWeapon — The weapon to drop.
DropWeaponAsync(CBasePlayerWeapon)
Drop a weapon asynchronously.
Task DropWeaponAsync(CBasePlayerWeapon weapon)- weapon CBasePlayerWeapon — The weapon to drop.
DropWeaponByClass<T>()
Drop all weapons with the specified class.
Thread unsafe, use async variant instead for non-main thread context.
[ThreadUnsafe]
void DropWeaponByClass<T>() where T : class, ISchemaClass<T>- T — The weapon class.
DropWeaponByClassAsync<T>()
Drop all weapons with the specified class asynchronously.
Task DropWeaponByClassAsync<T>() where T : class, ISchemaClass<T>- T — The weapon class.
DropWeaponByDesignerName(string)
Drop a weapon by designer name.
Thread unsafe, use async variant instead for non-main thread context.
[ThreadUnsafe]
void DropWeaponByDesignerName(string designerName)- designerName string — The designer name of the weapon to drop.
DropWeaponByDesignerNameAsync(string)
Drop a weapon by designer name asynchronously.
Task DropWeaponByDesignerNameAsync(string designerName)- designerName string — The designer name of the weapon to drop.
DropWeaponBySlot(gear_slot_t)
Drop a weapon by slot.
Thread unsafe, use async variant instead for non-main thread context.
[ThreadUnsafe]
void DropWeaponBySlot(gear_slot_t slot)- slot gear_slot_t — The slot to drop the weapon from.
DropWeaponBySlotAsync(gear_slot_t)
Drop a weapon by slot asynchronously.
Task DropWeaponBySlotAsync(gear_slot_t slot)- slot gear_slot_t — The slot to drop the weapon from.
LastWeaponUpdated()
void LastWeaponUpdated()MyWeaponsUpdated()
void MyWeaponsUpdated()RemoveWeapon(CBasePlayerWeapon)
Drop and remove a weapon.
Thread unsafe, use async variant instead for non-main thread context.
[ThreadUnsafe]
void RemoveWeapon(CBasePlayerWeapon weapon)- weapon CBasePlayerWeapon — The weapon to remove.
RemoveWeaponAsync(CBasePlayerWeapon)
Remove a weapon asynchronously.
Task RemoveWeaponAsync(CBasePlayerWeapon weapon)- weapon CBasePlayerWeapon — The weapon to remove.
RemoveWeaponByClass<T>()
Drop and remove all weapons with the specified class.
Thread unsafe, use async variant instead for non-main thread context.
[ThreadUnsafe]
void RemoveWeaponByClass<T>() where T : class, ISchemaClass<T>- T — The weapon class.
RemoveWeaponByClassAsync<T>()
Remove all weapons with the specified class asynchronously.
Task RemoveWeaponByClassAsync<T>() where T : class, ISchemaClass<T>- T — The weapon class.
RemoveWeaponByDesignerName(string)
Remove a weapon by designer name.
Thread unsafe, use async variant instead for non-main thread context.
[ThreadUnsafe]
void RemoveWeaponByDesignerName(string designerName)- designerName string — The designer name of the weapon to remove.
RemoveWeaponByDesignerNameAsync(string)
Remove a weapon by designer name asynchronously.
Task RemoveWeaponByDesignerNameAsync(string designerName)- designerName string — The designer name of the weapon to remove.
RemoveWeaponBySlot(gear_slot_t)
Remove a weapon by slot.
Thread unsafe, use async variant instead for non-main thread context.
[ThreadUnsafe]
void RemoveWeaponBySlot(gear_slot_t slot)- slot gear_slot_t — The slot to remove the weapon from.
RemoveWeaponBySlotAsync(gear_slot_t)
Remove a weapon by slot asynchronously.
Task RemoveWeaponBySlotAsync(gear_slot_t slot)- slot gear_slot_t — The slot to remove the weapon from.
SelectWeapon(CBasePlayerWeapon)
Make player select a weapon.
Thread unsafe, use async variant instead for non-main thread context.
void SelectWeapon(CBasePlayerWeapon weapon)- weapon CBasePlayerWeapon — The weapon to select.
SelectWeaponAsync(CBasePlayerWeapon)
Make player select a weapon asynchronously.
Task SelectWeaponAsync(CBasePlayerWeapon weapon)- weapon CBasePlayerWeapon — The weapon to select.
SelectWeaponByClass<T>()
Select a weapon by class.
Thread unsafe, use async variant instead for non-main thread context.
[ThreadUnsafe]
void SelectWeaponByClass<T>() where T : class, ISchemaClass<T>- T — The weapon class.
SelectWeaponByClassAsync<T>()
Select a weapon by class asynchronously.
Task SelectWeaponByClassAsync<T>() where T : class, ISchemaClass<T>- T — The weapon class.
SelectWeaponByDesignerName(string)
Select a weapon by designer name.
Thread unsafe, use async variant instead for non-main thread context.
[ThreadUnsafe]
void SelectWeaponByDesignerName(string designerName)- designerName string — The designer name of the weapon to select.
SelectWeaponByDesignerNameAsync(string)
Select a weapon by designer name asynchronously.
Task SelectWeaponByDesignerNameAsync(string designerName)- designerName string — The designer name of the weapon to select.
SelectWeaponBySlot(gear_slot_t)
Select a weapon by slot.
Thread unsafe, use async variant instead for non-main thread context.
[ThreadUnsafe]
void SelectWeaponBySlot(gear_slot_t slot)- slot gear_slot_t — The slot to select the weapon from.
SelectWeaponBySlotAsync(gear_slot_t)
Select a weapon by slot asynchronously.
Task SelectWeaponBySlotAsync(gear_slot_t slot)- slot gear_slot_t — The slot to select the weapon from.