SetEntPropVector Function

Sets a vector of floats in an entity, given a named network property.

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

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

Parameters

int entity

Entity/edict index.

PropType type

Property type.

const char[] prop

Property name.

const float[3] vec

Vector to set.

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.