GetEntPropFloat Function

Retrieves a float value from an entity's property.

This function is considered safer and more robust over GetEntDataFloat, because it performs strict offset checking and typing rules.

float GetEntPropFloat(int entity, PropType type, const char[] prop, int element)


int entity

Entity/edict index.

PropType type

Property type.

const char[] prop

Property name.

int element

Element # (starting from 0) if property is an array.

Return Value

Value at the given property offset.


Invalid entity or offset out of reasonable bounds.