CItemInventory

Item_inventory entity class
Collection rules -- DENY/CAN'T have rules take precedence over REQUIRE/MUST
All string filters can be tokenized with a semi-colon ';'

Type: Reference type

Methods

Declaration Description
CBaseEntity@ opImplCast() Implicitly casts to base type.
const Vector& GetOrigin() const Gets the entity's (absolute) origin.
void SetOrigin(const Vector& in vecOrigin) Sets this entity's (absolute) origin
bool KeyValue(const string& in szKeyName, const string& in szValue) Sets keyvalue data on this entity
void TraceAttack(entvars_t@ pevAttacker, float flDamage, const Vector& in vecDir, TraceResult& in traceResult, int bitsDamageType) Traces an attack by the given entity to this entity.
void TraceBleed(float flDamage, const Vector& in vecDir, TraceResult& in traceResult, int bitsDamageType) Traces entity bleed event.
int GiveAmmo(int iAmount, const string& in szName, int iMax, const bool fFromWeapon = true) Gives ammo to this entity.
bool HasTarget(const string& in szTarget) Returns whether this entity has the given target.
string TeamID() Returns this entity's team ID.
string GetClassname() const Returns this entity's class name.
string GetTargetname() const Returns this entity's target name.
bool FVisibleFromPos(const Vector& in vecTarget, const Vector& in vecStart) Returns whether this entity is visible from the given position.
string SOUNDREPLACEMENT_Find(const string& in szFilename) Find sound replacement for the given file.
int FindMonstersInWorld(array<CBaseEntity@>@ pArray, int flagMask) Finds monsters in the world
bool IsPlayerAlly() const Returns whether this entity is allied to players.
void SetPlayerAlly(bool fState) Sets this entity's player ally status.
void SetPlayerAllyDirect(bool fState) Sets this entity's player ally status.
Use this only if you need the setting to be exactly what you give it (e.g. when copying from another monster)
bool opEquals(CBaseEntity@ pOther) Compares 2 entities for equality.
void Precache() Precaches the entity. Do not call directly.
int ObjectCaps() Gets this entity's objects caps. See the FCAP enum.
void SetObjectCollisionBox() Sets up the object collision box.
int GetClassification(int cl) Gets this entity's classification. Returns the given value if none is set. See the CLASSIFICATION enum.
const string& GetClassificationTag() Gets this entity's classification tag.
const string& GetClassificationName() Gets this entity's classification name.
void SetClassification(int cl) Sets this entity's classification override. Can override the entity's player ally setting.
void SetClassificationFromEntity(CBaseEntity@ pEntity) Sets this entity's classification override to the classification override set on the given entity. Can override the entity's player ally setting.
void ClearClassification() Clears this entity's classification override.
int IRelationship(CBaseEntity@ other, bool ignoreNoTarget = false) Gets the relationship between this entity and the given entity. See the RELATIONSHIP enum.
int IRelationshipByClass(CLASS iClass) Gets the relationship between this entity and the given entity classification. See the RELATIONSHIP enum.
int Classify() Gets this entity's classification.
int TakeDamage(entvars_t@ pevInflictor, entvars_t@ pevAttacker, float flDamage, int bitsDamageType) Causes this entity to take damage. Returns 1 if it took damage, 0 otherwise.
bool TakeHealth(float flHealth, int bitsDamageType, int health_cap = 0) Takes health from this entity. Note: flHealth is added to entity health. Use negative values to subtract.If health_cap is non-zero, won't add more than health_cap. Returns true if it took damage, false otherwise.
bool TakeArmor(float flArmor, int bitsDamageType, int armor_cap = 0) Takes armor from this entity. Note: flArmor is added to entity armor. Use negative values to subtract.If armor_cap is non-zero, won't add more than armor_cap. Returns 1 if it took damage, 0 otherwise.
void Killed(entvars_t@pevAtttacker, int iGibbed) Tells this entity it's been killed. See the GIB enum for possible values.
int BloodColor() Returns the blood color. See the BLOOD_COLOR enum.
bool IsTriggered(CBaseEntity@ pActivator) Returns whether this entity is triggered by the given entity.
CBaseMonster@ MyMonsterPointer() Returns this entity as its monster entity, if it is a monster.
CustomKeyvalues@ GetCustomKeyvalues() Gets this entity's custom keyvalues.
bool BlockedByEntity(CBaseEntity@ pOther, float flDamage) Returns true if you should be blocked by the entity, false otherwise. Also deals blocking damage to the entity, if applicable.
void SUB_Remove() Think function. Delay-removes this entity.
void SUB_DoNothing() Think function. Explicitly does nothing.
void SUB_StartFadeOut() Think function. Starts fading this entity.
void SUB_FadeOut() Think function. Fades this entity.
void SUB_CallUseToggle() Think function. Calls use toggle on this entity.
bool ShouldToggle(USE_TYPE useType, const bool currentState) Returns whether this entity should toggle.
void FireBullets(uint cShots, Vector vecSrc, Vector vecDirShooting, Vector vecSpread,float flDistance, Bullet iBulletType, int iTracerFreq = 4, int iDamage = 0, entvars_t@ pevAttacker = null, FireBulletsDrawMode fDraw = FBDM_DRAW) Fires bullets. Must call CMath::MakeAimVectors with an angle vector first.
void SUB_UseTargets(CBaseEntity@ pActivator, USE_TYPE useType, float flValue) Calls use on targets.
bool Intersects(CBaseEntity@ pOther) Returns whether this entity intersects with the given entity.
void MakeDormant() Makes this entity dormant.
bool IsDormant() Returns whether this entity is dormant.
bool IsLockedByMaster() Returns whether this entity is locked by its master.
edict_t@ edict() Returns this entity's edict.
int entindex() Returns this entity's index.
bool SetupModel() Sets up the model.
int GetToggleState() Gets the toggle state.
See the TOGGLE_STATE enum.
void AddPoints(int score, const bool bAllowNegativeScore) Adds points to this entity.
void AddPointsToTeam(int score, const bool bAllowNegativeScore) Adds points to this entity's team.
AddPlayerItemResult AddPlayerItem(CBasePlayerItem@ pItem) Adds the given player item to this entity.
bool RemovePlayerItem(CBasePlayerItem@ pItem) Removes the given player item to this entity.
float GetDelay() Gets this entity's trigger delay.
bool IsMoving() Returns whether this entity is moving.
void OverrideReset() Resets this entity.
int DamageDecal(int bitsDamageType) Returns the damage decal
See decal_e.
void SetToggleState(int state) Sets this entity's toggle state.
void StartSneaking() Starts sneaking.
void StopSneaking() Stops sneaking.
bool OnControls(entvars_t@ pev) Reacts to controls set on the pev.
bool IsSneaking() Returns whether this entity is sneaking.
bool IsAlive() Returns whether this entity is alive.
bool IsBSPModel() Returns whether this entity is a BSP model.
bool ReflectGauss() Returns whether this entity reflects gauss shots.
bool IsInWorld() Returns whether this entity is in the world.
bool IsMonster() Returns whether this entity is a monster.
bool IsPlayer() Returns whether this entity is a player.
bool IsNetClient() Returns whether this is a net client.
bool IsPointEnt() Returns whether this is a point entity.
bool IsBreakable() Returns whether this is a breakable brush entity.
bool IsMachine() Returns whether this is a machine.
bool CriticalRemove() Removes this entity in critical situations.
CBaseEntity@ GetNextTarget() Gets the next target to trigger.
void Think() Makes this entity think. Do not call directly.
void Touch(CBaseEntity@ pOther) Triggers this entity's touch function.
void Use(CBaseEntity@ pActivator, CBaseEntity@ pCaller, USE_TYPE useType, float flValue = 0.0f) Trigger's this entity's use function.
void Blocked(CBaseEntity@ pOther) Triggers this entity's blocked function.
void UpdateOnRemove() Updates this entity when removed.
CBaseEntity@ Respawn() Respawns this entity.
bool FBecomeProne(CBaseEntity@ pOther) Makes this entity become prone.
Vector Center() Returns this entity's center.
Vector EyePosition() Returns this entity's eye position.
Vector EarPosition() Returns this entity's ear position.
Vector BodyTarget(const Vector& in posSrc) Returns this entity's body target for shooting.
int Illumination() Returns this entity's illumination.
bool FVisible(CBaseEntity@ pEntity, bool fIgnoreGlass) Returns whether this entity is visible to the given entity.
bool FVisible(const Vector& in vecOrigin) Returns whether this entity is visible from the given origin.
bool IsFacing(entvars_t@ pevTest, float flDotProduct = VIEW_FIELD_ULTRA_NARROW) Returns whether this entity is facing the given entity, within the given view field.
float GetPointsForDamage(float flDamage) Returns the points received for damage done.
void GetDamagePoints(entvars_t@ pevAttacker, entvars_t@ pevInflictor, float flDamage) Adds damage points to the inflicting entity.
void OnCreate() Entity constructor.
void OnDestroy() Entity destructor.
bool IsRevivable() Returns whether this entity is revivable at this time.
void BeginRevive(float flTimeUntilRevive) Prepares this entity for revival. flTimeUntilRevive is the time until the revive action completes.
void EndRevive(float flTimeUntilRevive) Called when this entity should be revived. flTimeUntilRevive is the time until the revival should start.
dictionary@ GetUserData() Gets the user data on this entity. Do not keep references to this data, the object might be removed from this entity.
Only map scripts can use this.
dictionaryValue& GetUserData(const string& in szKey) Gets the user data stored under the specified key on this entity.
Do not keep references to this data, the object might be removed from this entity.
Only map scripts can use this.
void ClearUserData() Clears the user data on this entity. WARNING: clears all data.
Only map scripts can use this.
bool CanCollect(CBaseEntity@ pOther) Returns whether this item can be collected by the given entity.
bool Drop(bool fForce = false, CBaseEntity@ pCaller = null) Drops this item, if it's being carried.
void Return() Returns this item to its original spawn location.
void Destroy() Destroys this item.
void AddItemEffects() Prepares to add effects to holder.
void RemoveItemEffects() Prepares to remove effects from holder.

Properties

Declaration Description
entvars_t@ pev Entity variables
bool m_fOverrideClass Whether this entity overrides the classification.
int m_iClassSelection The overridden classification.
float m_flMaximumFadeWait Maximum fade wait time.
float m_flMaximumFadeWaitB Maximum fade wait time B.
bool m_fCanFadeStart Whether fading can start.
bool m_fCustomModel Whether a custom model is used.
Vector m_vecLastOrigin Last origin vector
string_t targetnameOutFilterType Target name out filter type.
string_t classnameOutFilterType Class name out filter type.
string_t targetnameInFilterType Target name in filter type.
string_t classnameInFilterType Class name in filter type.
int m_iOriginalRenderMode Original render model.
int m_iOriginalRenderFX Original render FX.
float m_flOriginalRenderAmount Original render amount.
Vector m_vecOriginalRenderColor Original render color.
EHandle m_hHolder The monster or player holding this item.
Vector m_vecSpawnOrigin Spawn-time origin.
Vector m_vecSpawnAngles Spawn-time angles.
int m_iMoveType Spawn-time move type.
string_t m_szItemName Item name referred to by triggers, doesn't need to be unique -- remember the targetname refers to the entity itself only.
string_t m_szItemGroup Group name referred to by triggers.
string m_szDisplayName Friendly item name for client-side UI.
string_t m_szDescription Friendly item description for client-side UI.
int m_iCollectLimit How many times the item can be picked up, destroyed when limit is reached (0 = infinite).
float m_flWeight How heavy the item is (0-100),
holders can hold multiple items up to a total weight 100, think of this as KG if you like (though what person can carry 100KG!?).
bool m_fHiddenWhenCarried Model is hidden while it is being carried.
int m_iIdleSkin Model skin while IDLE (not carried).
int m_iIdleBody Model body while IDLE.
string_t m_szIdleSequenceName Model sequence name while IDLE.
int m_iIdleSequence Model sequence number while IDLE.
int m_iCarriedSkin Model skin while CARRIED.
int m_iCarriedBody Model body while CARRIED.
string_t m_szCarriedSequenceName Model sequence name while CARRIED.
int m_iCarriedSequence Model sequence number while CARRIED.
string_t m_szAllowedTargetNames CBaseEntity target name filters
string_t m_szAllowedClassNames CBaseEntity class name filters
string_t m_szAllowedTeams Team filters
int m_iAllowedNpcClassify NPC classification filter
string_t m_szRequiresItemName Require these item(s)
string_t m_szRequiresItemGroup Require an item from these group(s)
int m_iRequiresItemGroupNum Number of item(s) from the required group(s) required (0 = all)
string_t m_szItemNameMoved These item(s) must have moved
string_t m_szCantHaveItemName Must not have these item(s)
string_t m_szCantHaveItemGroup Must not have an item in these group(s)
int m_iCantHaveItemGroupNum Number of item(s) from the can't have group(s) (0 = all)
string_t m_szItemNameNotMoved These item(s) must NOT have moved
float m_flMaximumHoldTime Limit to how long this item can be held for, forcibly dropped after (0 = no limit)
float m_flWearOutTime Perform a trigger prior to this item being forcibly dropped (0 = none)
bool m_fCanBeDropped Holder is allowed to drop this item by choice
float m_flReturnTime How long this item returns to its' original location when dropped (-1 = never, 0 = instant)
bool m_fDelayedRespawn Delayed respawn on return (like with weapons/ammo/pickups)
bool m_fKeepOnDeath Holder still has the item after dying (i.e. so they can keep it while being revived)
bool m_fKeepOnRespawn Holder still has the item after respawning (only applies to players -- re-equip NPC's manually)
string_t m_szTriggerOnCollectSelf On successful collection (for collector)
string_t m_szTriggerOnCollectTeam On successful collection (for collector's team)
string_t m_szTriggerOnCollectOther On successful collection (for everyone else)
string_t m_szTriggerOnCantCollectSelf On failed collection (for collector)
string_t m_szTriggerOnCantCollectTeam On failed collection (for collector's team)
string_t m_szTriggerOnCantCollectOther On failed collection (for everyone else)
string_t m_szTriggerOnDropSelf On successful drop (for collector)
string_t m_szTriggerOnDropTeam On successful drop (for collector's team)
string_t m_szTriggerOnDropOther On successful drop (for everyone else)
string_t m_szTriggerOnCantDropSelf On failed drop (for collector)
string_t m_szTriggerOnCantDropTeam On failed drop (for collector's team)
string_t m_szTriggerOnCantDropOther On failed drop (for everyone else)
string_t m_szTriggerOnUseSelf On use by trigger (for collector)
string_t m_szTriggerOnUseTeam On use by trigger (for collector's team)
string_t m_szTriggerOnUseOther On use by trigger (for everyone else)
string_t m_szTriggerOnWearingOutSelf On wearing out (for collector)
string_t m_szTriggerOnWearingOutTeam On wearing out (for collector's team)
string_t m_szTriggerOnWearingOutOther On wearing out (for everyone else)
string_t m_szTriggerOnReturnSelf On return (for collector)
string_t m_szTriggerOnReturnTeam On return (for collector's team)
string_t m_szTriggerOnReturnOther On return (for everyone else)
string_t m_szTriggerOnMaterialise On materialise after return
string_t m_szTriggerOnDestroy On destroy
bool m_fEffectsPermanent Holder keeps effects after dropping the item
Vector m_vecEffectGlowColor Holder has a glow shell
bool m_fEffectBlockWeapons Holder can't use weapons
bool m_fEffectInvulnerable Holder is invulnerable (god mode)
bool m_fEffectInvisible Holder is invisible (render + non-targetable)
bool m_fEffectNonSolid Holder is non-solid
float m_flEffectRespiration Extra/less breathing time underwater in seconds
float m_flEffectGravity Gravity modifier (%)
float m_flEffectFriction Movement friction modifier (%)
float m_flEffectSpeed Movement speed modifier (%)
float m_flEffectDamage Damage modifier (%)
int m_iCollectCount Number of times the item has been collected
float m_flTouchedTime Time the item was last touched
float m_flCollectTime Time the item was last collected
float m_flDropTime Time the item was last dropped
bool m_fRemovedByForced Item was just removed by force