FakeMeta Functions - Destro-/AMXXEditorV4 GitHub Wiki

EngFunc_PointContents

This function checks an origin and gives us information of its whereabouts.

The constants that this function returns are these:

#define CONTENTS_EMPTY                  -1
#define CONTENTS_SOLID                  -2
#define CONTENTS_WATER                  -3
#define CONTENTS_SLIME                  -4
#define CONTENTS_LAVA                   -5
#define CONTENTS_SKY                    -6
#define CONTENTS_ORIGIN                 -7          // Removed at csg time
#define CONTENTS_CLIP                   -8          // Changed to contents_solid
#define CONTENTS_CURRENT_0              -9
#define CONTENTS_CURRENT_90             -10
#define CONTENTS_CURRENT_180            -11
#define CONTENTS_CURRENT_270            -12
#define CONTENTS_CURRENT_UP             -13
#define CONTENTS_CURRENT_DOWN           -14
#define CONTENTS_TRANSLUCENT            -15
#define CONTENTS_LADDER                 -16
#define CONTENT_FLYFIELD                -17
#define CONTENT_GRAVITY_FLYFIELD        -18
#define CONTENT_FOG                     -19

Usage:

static Float:origin[3]
static result
result = engfunc(EngFunc_PointContents, origin)

If for example result is CONTENTS_SKY then the origin that we see is in the sky we can for example use this to see where a player is aiming. If they are aiming at the sky, this will be the result!.


EngFunc_GetAttachment

Retrieves the position and rotation of a specified attachment point on a model (usually the position of the hands to attach weapon).

Syntax

engfunc(EngFunc_GetAttachment, entity, attachment, Float:position[3], Float:angles[3]);
  • entity: Pointer to the entity (model) with the attachment.
  • attachment: Index of the attachment point to retrieve.
  • position: Output origin vector where the attachment's world position will be stored.
  • angles: Output angles vector where the attachment's rotation angles will be stored.

[!CAUTION] This function is little broken, see Fix, or use ReAPI GetBonePosition()/GetAttachment()


EngFunc_GetBonePosition

This function allows to get the bone positions of an entity. This is best used on getting specific player origin points.

GetAttachment & GetBonePosition fix

[!CAUTION] This function is little broken, see Fix, or use ReAPI GetBonePosition()/GetAttachment()

These are the bones that a player has:

 Bone 1 Name:  "Bip01"
 Bone 2 Name:  "Bip01 Pelvis"
 Bone 3 Name:  "Bip01 Spine"
 Bone 4 Name:  "Bip01 Spine1"
 Bone 5 Name:  "Bip01 Spine2"
 Bone 6 Name:  "Bip01 Spine3"
 Bone 7 Name:  "Bip01 Neck"
 Bone 8 Name:  "Bip01 Head"
 Bone 9 Name:  "Bone01"
 Bone 10 Name: "Bip01 L Clavicle"
 Bone 11 Name: "Bip01 L UpperArm"
 Bone 12 Name: "Bip01 L Forearm"
 Bone 13 Name: "Bip01 L Hand"
 Bone 14 Name: "Bip01 L Finger0"
 Bone 15 Name: "Bip01 L Finger01"
 Bone 16 Name: "Bip01 L Finger1"
 Bone 17 Name: "Bip01 L Finger11"
 Bone 18 Name: "-- L knuckle"
 Bone 19 Name: "-- L Forearm twist"
 Bone 20 Name: "-- L wrist"
 Bone 21 Name: "-- L Elbow"
 Bone 22 Name: "-- L bicep twist"
 Bone 23 Name: "-- L shoulder outside"
 Bone 24 Name: "-- L Shoulder inside"
 Bone 25 Name: "Bip01 R Clavicle"
 Bone 26 Name: "Bip01 R UpperArm"
 Bone 27 Name: "Bip01 R Forearm"
 Bone 28 Name: "Bip01 R Hand"
 Bone 29 Name: "Bip01 R Finger0"
 Bone 30 Name: "Bip01 R Finger01"
 Bone 31 Name: "Bip01 R Finger1"
 Bone 32 Name: "Bip01 R Finger11"
 Bone 33 Name: "-- R knuckle"
 Bone 34 Name: "-- R wrist"
 Bone 35 Name: "-- R forearm twist"
 Bone 36 Name: "-- R Elbow"
 Bone 37 Name: "-- R bicep twist"
 Bone 38 Name: "-- R Shoulder inside"
 Bone 39 Name: "-- R shoulder outside"
 Bone 40 Name: "-- Neck smooth"
 Bone 41 Name: "-- R Butt"
 Bone 42 Name: "-- L butt"
 Bone 43 Name: "Bip01 L Thigh"
 Bone 44 Name: "Bip01 L Calf"
 Bone 45 Name: "Bip01 L Foot"
 Bone 46 Name: "Bip01 L Toe0"
 Bone 47 Name: "-- L ankle"
 Bone 48 Name: "-- L Knee"
 Bone 49 Name: "Bip01 R Thigh"
 Bone 50 Name: "Bip01 R Calf"
 Bone 51 Name: "Bip01 R Foot"
 Bone 52 Name: "Bip01 R Toe0"
 Bone 53 Name: "-- R Ankle"
 Bone 54 Name: "-- R Knee"
 Bone 55 Name: "Bomb"

Usage:

// ENTITY is the player entity id
// BONE_NUMBER you have to choose from the list above
// bone_origin[3] is the vector where we save the bone origin
// bone_angles[3] the vector that holds the angles of the bone.
engfunc(EngFunc_GetBonePosition, ENTITY, BONE_NUMBER, Float:bone_origin[3], Float:bone_angles[3])

These stocks are made for CS/CZ, you need to port them to other mods.

get_bone_hitgroup(): This gets the hitgroup of the bone.

#define BONE_HIT_HEAD		8
#define BONE_HIT_CHEST		6
#define BONE_HIT_STOMACH	4
#define BONE_HIT_LEFTARM	24
#define BONE_HIT_RIGHTARM	39
#define BONE_HIT_LEFTLEG	48
#define BONE_HIT_RIGHTLEG	54
#define HEAD_NECK		40
#define BONE_L_BUTT		41
#define BONE_R_BUTT		42

stock get_bone_hitgroup(number)
{
    switch (number)
    {
        case HEAD_NECK:
        {
            return HIT_HEAD
        }
        case BONE_L_BUTT:
        {
            return HIT_LEFTLEG
        }
        case BONE_R_BUTT:
        {
            return HIT_RIGHTLEG
        }
    }
    
    if (1 <= number <= BONE_HIT_STOMACH)
        return HIT_STOMACH
    
    if (BONE_HIT_STOMACH < number <= BONE_HIT_CHEST)
        return HIT_CHEST
    
    if (BONE_HIT_CHEST < number <= BONE_HIT_HEAD)
        return HIT_HEAD
    
    if (BONE_HIT_HEAD < number <= BONE_HIT_LEFTARM)
        return HIT_LEFTARM
    
    if (BONE_HIT_LEFTARM < number <= BONE_HIT_RIGHTARM)
        return HIT_RIGHTARM
    
    if (BONE_HIT_RIGHTARM < number <= BONE_HIT_LEFTLEG)
        return HIT_LEFTLEG
    
    if (BONE_HIT_LEFTLEG < number <= BONE_HIT_RIGHTLEG)
        return HIT_RIGHTLEG
    
    return HIT_GENERIC
}

find_closest_bone_to_gunshot(): This gets the closest bone to the gunshot (Use this in FM_TraceLine and Ham_TraceAttack).

#define DISTANCE_CLEAR_HIT        2.0

stock find_closest_bone_to_gunshot(victim, Float:endtrace[3])
{
    new Float:angles[3], Float:origin[3], Float:dist = 9999999.99, Float:curorigin[3], bone_nr
    for (new i=1;i<=54;i++)
    {
        // Get the bone position
        engfunc(EngFunc_GetBonePosition, victim, i, curorigin, angles)
        // Calculate the distance vector
        xs_vec_sub(curorigin, endtrace, angles)
        
        // If this is smaller than the last small distance remember the value!
        if (xs_vec_len(angles) <= dist)
        {
            origin = curorigin
            dist = xs_vec_len(angles)
            bone_nr = i
        }
        
        // If distance is smaller than CLEARHIT! Break (We accept the last value!)
        if (dist <= DISTANCE_CLEAR_HIT)
        {
            break
        }
    }
    
    // Return the bone
    return bone_nr
}

EngFunc_MessageBegin

This function is used to generate client messages.

Syntax:

engfunc(EngFunc_MessageBegin, dest, msg_type, Float:fOrigin[3], player)

MSG DEST:

#define MSG_BROADCAST               0        // Unreliable to all, There is not id
#define MSG_ONE                     1        // Reliable to one (msg_entity)
#define MSG_ALL                     2        // Reliable to all, There is not origin
#define MSG_INIT                    3        // Write to the init datagram (signon datagram)
#define MSG_PVS                     4        // Ents in PVS of org (Potentially Visible Set)
#define MSG_PAS                     5        // Ents in PAS of org (Potentially Audible Set)
#define MSG_PVS_R                   6        // Reliable to PVS (Potentially Visible Set)
#define MSG_PAS_R                   7        // Reliable to PAS (Potentially Audible Set)
#define MSG_ONE_UNRELIABLE          8        // Send to one client, but don't put in reliable stream,
                                             // put in unreliable datagram (could be dropped), there is not origin
#define MSG_SPEC                    9        // Sends to all spectator proxies

Before calling another EngFunc_MessageBegin you must call message_end().

Usage:

MSG_ONE/MSG_ONE_UNRELIABLE

engfunc(EngFunc_MessageBegin, MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, {0, 0, 0}, id)

MSG_ALL/MSG_BROADCAST

engfunc(EngFunc_MessageBegin, MSG_ALL, SVC_TEMPENTITY, {0, 0, 0}, 0)

MSG_PAS/MSG_PVS

new Float:origin[3] // Origin should be a Float
pev(id, pev_origin, origin) // Get user origin
engfunc(EngFunc_MessageBegin, MSG_PAS, SVC_TEMPENTITY, origin, 0) // Pass the origin to calculate PAS/PVS

EngFunc_FindEntityInSphere

Find entities within a radius. The function returns the next entity id after the start entity.

Syntax:

engfunc(EngFunc_FindEntityInSphere, entity_to_start, Float:origin[3], Float:radius)

Example:

stock kill_in_radius(id, Float:radius=200.0)
{
	new Float:origin[3]
	pev(id, pev_origin, origin)
	
	new victim = -1

	while(0 < (victim = engfunc(EngFunc_FindEntityInSphere, victim, origin, radius)) < MAX_PLAYERS)
	{
		if(!is_user_alive(victim) && victim != id)
			continue;
		
		user_kill(victim)
	}
}

EngFunc_EntitiesInPVS

This function checks entities that are in the PVS of an entity. It can't be used on worldspawn.

The function returns the first entity in the PVS and then you can traverse through the results using pev_chain/EV_ENT_chain. A NULL value of pev_chain/EV_ENT_chain indicates the end of the chain.

Syntax:

engfunc(EngFunc_EntitiesInPVS, player)

Example:

public whatisonPVS(id)
{
    static next, chain
    static class[32]
    
    next = engfunc(EngFunc_EntitiesInPVS, id)
    while(next)
    {
        pev(next, pev_classname, class, charsmax(class))
        chain = pev(next, pev_chain)
        
        server_print("Found entity in player (%i) PVS: ent(%i) class(%s)", id, next, class)
        
        if(!chain)
            break
    
        next = chain
    }
}

EngFunc_FindEntityByString

Returns the first entity found that matches the search criteria.

You can use any of the string type attributes of entities:

  • classname: Type of entity
  • globalname: This is the name of the global variable that can be used to control the state of the entity
  • model: The model of the entity
  • target: Entity that this entity is handling
  • targetname: The name given to this entity that another entity searches for to handle it
  • netname: Player or NPC name
  • message: Seems to be used mainly to store sound (string). It happens to store other things, depending on the need of the entity
  • noise: Noise variables do different things for different ents
  • noise1: This is the move sound for doors
  • noise2: This is the stop sound for doors
  • noise3: This is for blocking game_player_equip and player_weaponstrip

Syntax:

findEntity = engfunc(EngFunc_FindEntityByString, startEntity, szAttribute[], szValue[])

Parameters:

  • startEntity: Start searching on this entity (ex: 0 = worldspawn)
  • szAttribute: Name of attribute over which we need to search (ex: "classname")
  • szValue: Text string that we are searching for (ex: "func_breakable")

Example:

stock remove_rotating_doors()
{
	new ent = -1;
	while ((ent = engfunc(EngFunc_FindEntityByString, ent, "classname", "func_door_rotating")) != 0)
	{
		engfunc(EngFunc_SetOrigin, ent, Float:{8192.0 ,8192.0 ,8192.0}) // move to void space
	}
}

EngFunc_FindClientInPVS

Returns the next player entity in someone's PVS using a global loop.

Syntax:

find_player = engfunc(EngFunc_FindClientInPVS, player)

Parameters:

  • player: Source player. Seek someone within find_player's PVS.

Unlike EntitiesInPVS, it does not return a series of chained entities. Instead, it works like a global loop of entities. No matter which source entity you use, this function maintains the last index used and returns the next entity in the source entity PVS.

This function must be called several times to find every entity in PVS and can also return the source entity, but it can't be called twice inside the same function because it will return the same entity.

Notes It's not clear what the main purpose of this function is because you can get similar results with EntitiesInPVS.

CheckVisibility and EntitiesInPVS are better functions to use.


EngFunc_CheckVisibility

This function is used to check if an entity is in your PVS.

It can be used on all entities except worldspawn.

Usage: This function has a parameter that must be obtained in a special way, the pset parameter.
Note: The parameter is player only, which means that if you get pset for a player with the ID 1, when you use this function on an entity, it will check whether that entity is in the PVS of the player with ID 1.

new g_cl_pset[33]

public plugin_init(id)
{
    register_forward(FM_AddToFullPack, "pfw_atfp", 1)
}

public pfw_atfp(es, e, ent, host, flags, player, set)
{
    g_cl_pset[host] = set
    
    return FMRES_IGNORED
}

stock is_ent_in_player_pvs(id, entity)
{
    return engfunc(EngFunc_CheckVisibility, entity, g_cl_pset[id])
}

stock get_pvs_players(id, players[32], num, flags[], team[])
{
    if (!is_user_connected(id))
        return 0    

    get_players(players, num, flags, team)
    
    for (new i=0; i<num; i++)
    {
        if (!is_ent_in_player_pvs(id, players[i]))
        {
            num--;
            
            for (new j=i; j<num; j++)
            {
                players[j] = players[j+1]
            }
            
            i--
        }
    }
    
    return 1
}

EngFunc_SetModel

Properly sets a new model on an entity.

Syntax:

engfunc(EngFunc_SetModel, iEnt, sModel)
  • iEnt = Entity index
  • sModel = Model file name to set on entity (ex: "models/player/vip/vip.mdl")

Engine Alternative:

entity_set_model(entity, model[])

EngFunc_ModelIndex

Returns a unique index of the model name provided.
It's actually the same number that precache_model() returns.

A model index is used, for example, in some TE_* messages (TE_LIGHTNING, TE_GLOWSPRITE, etc.). See the message_const.inc file.

The model index of an entity is stored in pev_modelindex.

Usage:

ModelIndex = engfunc(EngFunc_ModelIndex, "models/MyModel.mdl")

ModelIndex will have the model index for "models/MyModel.mdl" after the function call.


EngFunc_ModelFrames

Returns the frames count of a sprite (.spr).

Usage:

ModelFrames = engfunc(EngFunc_ModelFrames, model_precache_index)
  • model_precache_index = The model precache index. Value you can get from precache_model() or EngFunc_ModelIndex.

EngFunc_DecalIndex

Returns a unique index of the decal name provided.

A decal index is used, for example, in some TE_* messages (TE_PLAYERDECAL, TE_DECAL, etc.). See the message_const.inc file.

All the available decals are stored in the decals.wad file (located at your mod root directory).

See the Decals List.

Usage:

DecalIndex = engfunc(EngFunc_DecalIndex, "{bigshot1")

DecalIndex will have the decal index for "{bigshot1" after the function call.

Engine Alternative:

DecalIndex = get_decal_index("{bigshot1")

EngFunc_AnimationAutomove

Plays the selected animation on an entity.

Usage:

entity_set_float(iEnt, EV_FL_framerate, fFrameRate);
entity_set_int(iEnt, EV_INT_sequence, iSequence);
engfunc(EngFunc_AnimationAutomove, iEnt, fTime);
  • fFrameRate: Frame rate of the desired animation.
  • iSequence: Sequence to play.
  • iEnt: Source entity.
  • fTime: It seems to not affect the animation. Maybe for internal use.

First, you have to select the sequence and the desired frame rate. Then you can start the animation.
It will run in an endless loop.

It seems to work only on non-player entities.


EngFunc_NumberOfEntities

Returns the number of entities in the world.

Usage:

ents = engfunc(EngFunc_NumberOfEntities);

Engine alternative:

ents = entity_count();

EngFunc_SetSize

Sets the bounds of an entity.

Usage:

engfunc(EngFunc_SetSize, iEnt, Float:fMins[3], Float:fMaxs[3]);
  • iEnt: Entity index
  • fMins[3]: Minimum bounding values (x,y,z)
  • fMaxs[3]: Maximum bounding values (x,y,z)

Engine alternative:

entity_set_size(index, Float:mins[3], Float:maxs[3]);

EngFunc_SetOrigin

Properly sets a new origin on an entity.

Usage:

engfunc(EngFunc_SetOrigin, iEnt, Float:Origin[3]);
  • iEnt: Entity index
  • Origin[3]: New origin for the entity (x,y,z)

Engine alternative:

entity_set_origin(index, Float:NewOrigin[3]);

EngFunc_MoveToOrigin

Moves an entity a defined distance toward a coordinate.

If the distance between the entity and destination is less than the required distance, the entity will pass over that point.

Usage:

engfunc(EngFunc_MoveToOrigin, iEnt, Float:Destination[3], Float:Distance, iMoveType);
  • iEnt: Entity index
  • Destination[3]: A coordinate toward which the entity moves
  • Distance: The distance to move the entity
  • iMoveType: This is the MOVE_* option used for monsters and players to change the behavior of the movement

Move type possible values:

#define MOVE_NORMAL          0   // normal move in the direction monster is facing
#define MOVE_STRAFE          1   // moves in direction specified, no matter which way monster is facing
#define MOVE_STUCK_DIST      32  // if a monster can't step this far, it is stuck.
#define MOVE_START_TURN_DIST 64  // when this far away from moveGoal, start turning to face next goal

EngFunc_WalkMove

Used to move an NPC entity in steps

It is recommended to use MOVETYPE_STEP

Usage:

engfunc(EngFunc_WalkMove, entity, Float:yaw, dist, iMode)

You get yaw using EngFunc_VecToYaw to convert vector to yaw (it returns a float value)

iMode possible values:

#define WALKMOVE_NORMAL                 0           // Normal walkmove
#define WALKMOVE_WORLDONLY              1           // Doesn't hit ANY entities, no matter what the solid type
#define WALKMOVE_CHECKONLY              2           // Move, but don't touch triggers 

EngFunc_PrecacheModel

Precaches a model or sprite files (see EngFunc_PrecacheGeneric).

EngFunc_PrecacheSound

Precaches a sound, only for *.wav files (see EngFunc_PrecacheGeneric).

EngFunc_PrecacheGeneric

Precache all files except for the following:

  • Files with extensions: .rc, .cfg, .lst, .exe, .vbs, .com, .bat, .dll, .ini, .so, .dylib, .sys, .asi, .mix, .flt
  • Specific files: halflife.wad, pak0.pak, xeno.wad, autoexec.cfg

Note:

  • This should be used only when you would need to postpone the precache process in plugin_init() or plugin_cfg(). Otherwise, you should use precache_(model/sound/generic)() native directly in the plugin_precache() forward.
  • It can be useful, for example, when you want to manage models with cvars and avoid registering them in plugin_precache() to prevent any issues. You could manage this outside of that forward.

Usage:

engfunc(EngFunc_PrecacheModel, "models/MyModel.mdl")
engfunc(EngFunc_PrecacheModel, "sprites/MySprite.spr")

engfunc(EngFunc_PrecacheSound, "sound/MySound.wav")
engfunc(EngFunc_PrecacheSound, "MySound2.wav") // Auto-Add "sound/" prefix

engfunc(EngFunc_PrecacheGeneric, "sound/MySound3.mp3")

It returns the precached index if successful; otherwise, it returns 0.


EngFunc_AlertMessage

Prints an alert message.

Usage:

engfunc(EngFunc_AlertMessage, AlertType, const Message)

AlertType can be:

  • at_notice - shows a message box with the message
  • at_console - same as at_notice, but forces a ConPrintf, printing output to the server console only if 'developer' is 1.
  • at_aiconsole - same as at_console, but only shown if 'developer' is 2.
  • at_warning -
  • at_error -
  • at_logged - prints output to server logs and console.

EngFunc_GetCurrentPlayer

Get global variable indicating the current or most recent client that triggered the chain of function calls. Ideal for use in Orpheu hooks where it is sometimes difficult to convert client_t to an index.

player = engfunc(EngFunc_GetCurrentPlayer) + 1

EngFunc_CanSkipPlayer

Returns 1 or 0 depending of client's cl_lw cvar value (if cl_lw different from 0, returns 1). This functions is used by the mod for checking if player has weapon prediction enabled. Mod uses CanSkipPlayer on weapons, directly on SendWeaponAnim function.

If client haves cl_lw cvar enabled, it means that haves weapon prediction enabled = no need to send weapons animations.

Usage:

if(engfunc(EngFunc_CanSkipPlayer(index))
{
    // client has weapon prediction enabled
}
else
{
    // client has weapon prediction disabled, server will sent him everything from his weapons.
} 

EngFunc_Time

Returns time in seconds (float) since the game started. Rather the same as tickcount(). It seems to not be used by the mod (it's useless anyway).

Usage:

new Float:flElapsedTime = Float:engfunc(EngFunc_Time)
server_print("%.2f seconds passed since the server started", flElapsedTime) 

EngFunc_CrosshairAngle

Adjust HL crosshair position by angles (used for autoaim). In CS, it only works for zoom crosshair (FOV < 90).

Usage:

engfunc(EngFunc_CrosshairAngle, player, Float:pitch, Float:yaw)

EngFunc_FadeClientVolume

It doesn't work, it's not implemented, source engine prototype.


EngFunc_SetClientMaxspeed

Set player's max speed (same as set pev_maxspeed).

Resets on weapon change; need to hook item deploy.

Usage:

engfunc(EngFunc_SetClientMaxspeed, Float:maxspeed)

EngFunc_NumberOfEntities

Returns the current number of entities in the world.

Usage:

engfunc(EngFunc_SetClientMaxspeed, Float:maxspeed)

Engine alternative:

native entity_count();

EngFunc_StaticDecal

Add TE_BSPDECAL to init message (signon datagram)

Usage:

engfunc(EngFunc_StaticDecal, Float:origin[3], decalIndex, entityIndex, modelIndex)

EngFunc_EmitSound

EngFunc_BuildSoundMsg

Based on svc_sound, same as emit_sound(),

engfunc(EngFunc_EmitSound, entity, channel, const sound[], Float:volume, Float:attenuation, flags, pitch)

// Same, but custom msg dest.
engfunc(EngFunc_BuildSoundMsg, entity, channel, const sound[], Float:volume, Float:attenuation, flags, pitch, msg_dest, msg_type, const Float:origin[3] = {0,0,0}, player = 0)

EngFunc_EmitAmbientSound

Based on svc_spawnstaticsound

engfunc(EngFunc_EmitAmbientSound, entity, Float:origin[3], const sound[], Float:volume, Float:attenuation, flags, pitch)

// Flags:
#define SND_SPAWNING        (1<<8)      // we're spawing, used in some cases for ambients (add to init message, signon datagram)
#define SND_STOP            (1<<5)      // stop sound
#define SND_CHANGE_VOL      (1<<6)      // change sound vol
#define SND_CHANGE_PITCH    (1<<7)      // change sound pitch


EngFunc_SetGroupMask

That function determines visibility and collision between entities.

  • Entity Grouping: Each entity has a groupinfo variable (of type int) that categorizes it into different groups.

  • Group Mask and Operation:

    • The function PF_SetGroupMask sets the global variables g_groupmask and g_groupop, which define how collisions are handled based on groupinfo.
  • Collision Logic:

    • AND Operation (g_groupop == GROUP_OP_AND): An entity will continue processing if its groupinfo does not match the groupinfo of the invoking entity. In other words, it will only interact with entities that share no common bits in their groupinfo.
    • NAND Operation (g_groupop == GROUP_OP_NAND): An entity will continue processing if there is any overlap in groupinfo between the invoking entity and the other entity. Essentially, entities with the same groupinfo will not collide.
enum
{
	GROUP_OP_AND = 0,
	GROUP_OP_NAND
};

engfunc(EngFunc_SetGroupMask, mask, op)

EngFunc_GetClientListening

EngFunc_SetClientListening

See a mutemenu plugin.

engfunc(EngFunc_GetClientListening, iReceiver, iSender)
engfunc(EngFunc_SetClientListening, iReceiver, iSender, bool:Listen)

EngFunc_ChangePitch

Smoothly adjusts entity's pitch (vertical rotation) towards target angle.

engfunc(EngFunc_ChangePitch, entity)
  • pev_idealpitch: Target angle.
  • pev_pitch_speed: Rotation speed.

EngFunc_ChangeYaw

Smoothly adjusts entity's yaw (horizontal rotation) towards target angle.

engfunc(EngFunc_ChangeYaw, entity)
  • pev_ideal_yaw: Target angle.
  • pev_yaw_speed: Rotation speed.

EngFunc_GetEntityIllum

Return pev_light_level. Amount of light shining on the entity. (0=No light, 180=Fully Lit)

[!NOTE] Only Players. Read only, calculated on client-side and sent to server.

engfunc(EngFunc_GetEntityIllum, player)