GetEntPropVector Function

Retrieves a vector of floats from an entity, given a named network property.

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

void GetEntPropVector(int entity, PropType type, const char[] prop, float vec[3], int element)

Parameters

int entity

Entity/edict index.

PropType type

Property type.

const char[] prop

Property name.

float[3] vec

Vector buffer to store data in.

int element

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

Errors

Invalid entity, property not found, or property not actually a vector data type.