Engine functions
Type: Reference type
Declaration | Description |
---|---|
int ModelIndex(const string& in szModelName) | Gets the model index of a model. |
int ModelFrames(int iModelIndex) | Gets the number of frames in a model. |
void ChangeLevel(const string& in szLevelName) | Changes the current level to the one specified. |
float VecToYaw(const Vector& in vec) | Vector to yaw |
void VecToAngles(const Vector& in vec, Vector& out angles) | Vector to angles |
void MoveToOrigin(edict_t@ pEntity, const Vector& in vecGoal, float flDist, int iMoveType) | Move entity to origin. |
void ChangeYaw(edict_t@ pEntity) | Change yaw. This updates entvars_t::angles[ 1 ] to approach entvars_t::ideal_yaw, at entvars_t::yaw_speed degrees speed. |
void ChangePitch(edict_t@ pEntity) | Change pitch. This updates entvars_t::angles[ 0 ] to approach entvars_t::idealpitch, at entvars_t::pitch_speed degrees speed. |
int GetEntityIllum(edict_t@ pEntity) | Get entity illumination. This is a weighted value between 0 and 255, inclusive. |
edict_t@ FindClientInPVS(edict_t@ pStartEntity) | Find client in Potentially Visible Set. |
edict_t@ EntitiesInPVS(edict_t@ pStartEntity) | Find entities in Potentially Visible Set. Edict::vars::chain is used for this list, and is temporary. |
void MakeVectors(const Vector& in vec) | Make vectors. The results are stored in g_Engine::v_forward, v_right, and v_up. |
void AngleVectors(const Vector& in vecIn, Vector& out vecForward, Vector& out vecRight, Vector& out vecUp) | Angle vectors |
void MakeStatic(edict_t@ pEntity) | Make entity static. This moves the entity to the client.Its current visual state is copied over, and the entity is removed on the server side.Only valid while the level is loading. |
int EntIsOnFloor(edict_t@ pEntity) | Returns whether entity is on the floor. |
int DropToFloor(edict_t@ pEntity) | Drop entity to floor. |
int WalkMove(edict_t@ pEntity, float flYaw, float flDist, int iMove) | Make entity walk. See WALKMOVE enum |
void GetAimVector(edict_t@ pEntity, float flSpeed, Vector& out vecReturn) | Get aim vector for entity. |
void ServerCommand(const string& in szCommand) | Issues a command to the server. Plugins only. |
void ServerExecute() | Executes all pending server commands. Plugins only. |
void ParticleEffect(const Vector& in vecOrigin, const Vector& in vecDir, float flColor, float flCount) | Emit a particle effect. |
void LightStyle(int iStyle, const string& in szVal) | Set a light style. |
int DecalIndex(const string& in szName) | Get decal index. |
CONTENTS PointContents(const Vector& in vecPoint) | Check if point is in contents. |
float CVarGetFloat(const string& in szCvar) | Get cvar float value. |
string CVarGetString(const string& in szCvar) | Get cvar string value. |
void CVarSetFloat(const string& in szCvar, float flValue) | Set cvar float value. |
void CVarSetString(const string& in szCvar, const string& in szValue) | Set cvar string value. |
entvars_t@ GetVarsOfEnt(edict_t@ pEdict) | Gets entity variables of entity. |
int IndexOfEdict(const edict_t@ pEdict) | Get index of edict. |
edict_t@ PEntityOfEntIndex(int iIndex) | Get entity by entity index. |
edict_t@ FindEntityByVars(entvars_t@ pVars) | Find entity by variables. |
void GetBonePosition(const edict_t@ pEdict, int iBone, Vector& out vecOrigin, Vector& out vecAngles) | Get bone position. |
void ClientPrintf(CBasePlayer@ pPlayer, PRINT_TYPE printType, const string& in szMessage) | Client print |
void ServerPrint(const string& in szMessage) | Server print |
string Cmd_Args() | Get command arguments. |
string Cmd_Argv(int iIndex) | Get command argument by index. |
int Cmd_Argc() | Get number of command arguments. |
void GetAttachment(const edict_t@ pEdict, int iAttachment, Vector& out vecOrigin, Vector& out vecAngles) | Get attachment position. |
void SetView(const edict_t@ pEdict, const edict_t@ pViewEntity) | Set view. |
float Time() | Get current time. |
void CrosshairAngle(const edict_t@ pEdict, float flPitch, float flYaw) | Sets the angles of the given player's crosshairs to the given settings. Set both to 0 to disable. May not have any effect in SC. |
string GetGameDir() | Get game directory. |
void RunPlayerMove(edict_t@ pEdict, const Vector& in vecViewAngles, float flFowardMove, float flSideMove, float flUpMove, uint16 iButtons, uint8 iImpulse, uint8 iMsec) | Run player move. |
int NumberOfEntities() | Get number of entities. |
KeyValueBuffer@ GetInfoKeyBuffer(edict_t@ pEdict) | Get info key buffer. |
KeyValueBuffer@ GetPhysicsKeyBuffer(edict_t@ pEdict) | Get physics key buffer. |
bool IsMapValid(const string& in szMapName) const | Returns whether the given map is valid. |
void StaticDecal(const Vector& in vecOrigin, int iDecalIndex, int iEntityIndex, int iModelIndex) | Project a static decal. |
int GetPlayerUserId(edict_t@ pEdict) | Get player user ID. This is a unique id generated when a player connects. It remains valid as long as the player stays connected to the server. |
bool IsDedicatedServer() const | Returns whether this is a dedicated server. |
const Cvar@ CVarGetPointer(const string& in szCvar) const | Gets a pointer to a cvar. |
void GetPlayerStats(const edict_t@ pEdict, int& out iPing, int& out iPacketLoss) | Get player stats. |
bool Voice_GetClientListening(int iReceiver, int iSender) | Voice system - Get client listening. |
bool Voice_SetClientListening(int iReceiver, int iSender, bool fListen) | Voice system - Set client listening. |
string GetPlayerAuthId(edict_t@ pEdict) | Get the player's Auth ID. (WON/Steam ID) |