<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alliedmods.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=WOOw</id>
	<title>AlliedModders Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alliedmods.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=WOOw"/>
	<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/Special:Contributions/WOOw"/>
	<updated>2026-06-06T03:43:29Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.6</generator>
	<entry>
		<id>https://wiki.alliedmods.net/index.php?title=FakeMeta_Functions_Detailed_Descriptions&amp;diff=10777</id>
		<title>FakeMeta Functions Detailed Descriptions</title>
		<link rel="alternate" type="text/html" href="https://wiki.alliedmods.net/index.php?title=FakeMeta_Functions_Detailed_Descriptions&amp;diff=10777"/>
		<updated>2019-08-04T18:38:46Z</updated>

		<summary type="html">&lt;p&gt;WOOw: /* is_wall_between_points */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Point Functions ==&lt;br /&gt;
=== EngFunc_PointContents ===&lt;br /&gt;
This function checks an origin and gives us information of its whearabouts.&lt;br /&gt;
&lt;br /&gt;
The constants that this function returns are these:&lt;br /&gt;
 #define	CONTENTS_EMPTY                  -1&lt;br /&gt;
 #define	CONTENTS_SOLID                  -2&lt;br /&gt;
 #define	CONTENTS_WATER                  -3&lt;br /&gt;
 #define	CONTENTS_SLIME                  -4&lt;br /&gt;
 #define	CONTENTS_LAVA                   -5&lt;br /&gt;
 #define	CONTENTS_SKY                    -6&lt;br /&gt;
 #define	CONTENTS_ORIGIN                 -7          // Removed at csg time&lt;br /&gt;
 #define	CONTENTS_CLIP                   -8          // Changed to contents_solid&lt;br /&gt;
 #define	CONTENTS_CURRENT_0              -9&lt;br /&gt;
 #define	CONTENTS_CURRENT_90             -10&lt;br /&gt;
 #define	CONTENTS_CURRENT_180            -11&lt;br /&gt;
 #define	CONTENTS_CURRENT_270            -12&lt;br /&gt;
 #define	CONTENTS_CURRENT_UP             -13&lt;br /&gt;
 #define	CONTENTS_CURRENT_DOWN           -14&lt;br /&gt;
 #define	CONTENTS_TRANSLUCENT            -15&lt;br /&gt;
 #define	CONTENTS_LADDER                 -16&lt;br /&gt;
 #define	CONTENT_FLYFIELD                -17&lt;br /&gt;
 #define	CONTENT_GRAVITY_FLYFIELD        -18&lt;br /&gt;
 #define	CONTENT_FOG                     -19&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
&amp;lt;pawn&amp;gt;static Float:origin[3]&lt;br /&gt;
static result&lt;br /&gt;
result = engfunc(EngFunc_PointContents, origin)&lt;br /&gt;
// if for example result is CONTENTS_SKY&lt;br /&gt;
// then the origin that we see is in the sky we can for example use this to see where a player is aming if he is aiming at sky this will be the result!  &amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== EngFunc_GetBonePosition ===&lt;br /&gt;
[[Image:PlayerSkeleton.jpg|frame|This image shows the locations of the bones, they are marked through blue points. The red point is the player origin.]]&lt;br /&gt;
This function allows to get the bone positions of an entity. This is best used on getting specific player origin points.&lt;br /&gt;
&lt;br /&gt;
These are the bones that a player has:&lt;br /&gt;
&lt;br /&gt;
 Bone 1 Name:  &amp;quot;Bip01&amp;quot;&lt;br /&gt;
 Bone 2 Name:  &amp;quot;Bip01 Pelvis&amp;quot;&lt;br /&gt;
 Bone 3 Name:  &amp;quot;Bip01 Spine&amp;quot;&lt;br /&gt;
 Bone 4 Name:  &amp;quot;Bip01 Spine1&amp;quot;&lt;br /&gt;
 Bone 5 Name:  &amp;quot;Bip01 Spine2&amp;quot;&lt;br /&gt;
 Bone 6 Name:  &amp;quot;Bip01 Spine3&amp;quot;&lt;br /&gt;
 Bone 7 Name:  &amp;quot;Bip01 Neck&amp;quot;&lt;br /&gt;
 Bone 8 Name:  &amp;quot;Bip01 Head&amp;quot;&lt;br /&gt;
 Bone 9 Name:  &amp;quot;Bone01&amp;quot;&lt;br /&gt;
 Bone 10 Name: &amp;quot;Bip01 L Clavicle&amp;quot;&lt;br /&gt;
 Bone 11 Name: &amp;quot;Bip01 L UpperArm&amp;quot;&lt;br /&gt;
 Bone 12 Name: &amp;quot;Bip01 L Forearm&amp;quot;&lt;br /&gt;
 Bone 13 Name: &amp;quot;Bip01 L Hand&amp;quot;&lt;br /&gt;
 Bone 14 Name: &amp;quot;Bip01 L Finger0&amp;quot;&lt;br /&gt;
 Bone 15 Name: &amp;quot;Bip01 L Finger01&amp;quot;&lt;br /&gt;
 Bone 16 Name: &amp;quot;Bip01 L Finger1&amp;quot;&lt;br /&gt;
 Bone 17 Name: &amp;quot;Bip01 L Finger11&amp;quot;&lt;br /&gt;
 Bone 18 Name: &amp;quot;-- L knuckle&amp;quot;&lt;br /&gt;
 Bone 19 Name: &amp;quot;-- L Forearm twist&amp;quot;&lt;br /&gt;
 Bone 20 Name: &amp;quot;-- L wrist&amp;quot;&lt;br /&gt;
 Bone 21 Name: &amp;quot;-- L Elbow&amp;quot;&lt;br /&gt;
 Bone 22 Name: &amp;quot;-- L bicep twist&amp;quot;&lt;br /&gt;
 Bone 23 Name: &amp;quot;-- L shoulder outside&amp;quot;&lt;br /&gt;
 Bone 24 Name: &amp;quot;-- L Shoulder inside&amp;quot;&lt;br /&gt;
 Bone 25 Name: &amp;quot;Bip01 R Clavicle&amp;quot;&lt;br /&gt;
 Bone 26 Name: &amp;quot;Bip01 R UpperArm&amp;quot;&lt;br /&gt;
 Bone 27 Name: &amp;quot;Bip01 R Forearm&amp;quot;&lt;br /&gt;
 Bone 28 Name: &amp;quot;Bip01 R Hand&amp;quot;&lt;br /&gt;
 Bone 29 Name: &amp;quot;Bip01 R Finger0&amp;quot;&lt;br /&gt;
 Bone 30 Name: &amp;quot;Bip01 R Finger01&amp;quot;&lt;br /&gt;
 Bone 31 Name: &amp;quot;Bip01 R Finger1&amp;quot;&lt;br /&gt;
 Bone 32 Name: &amp;quot;Bip01 R Finger11&amp;quot;&lt;br /&gt;
 Bone 33 Name: &amp;quot;-- R knuckle&amp;quot;&lt;br /&gt;
 Bone 34 Name: &amp;quot;-- R wrist&amp;quot;&lt;br /&gt;
 Bone 35 Name: &amp;quot;-- R forearm twist&amp;quot;&lt;br /&gt;
 Bone 36 Name: &amp;quot;-- R Elbow&amp;quot;&lt;br /&gt;
 Bone 37 Name: &amp;quot;-- R bicep twist&amp;quot;&lt;br /&gt;
 Bone 38 Name: &amp;quot;-- R Shoulder inside&amp;quot;&lt;br /&gt;
 Bone 39 Name: &amp;quot;-- R shoulder outside&amp;quot;&lt;br /&gt;
 Bone 40 Name: &amp;quot;-- Neck smooth&amp;quot;&lt;br /&gt;
 Bone 41 Name: &amp;quot;-- R Butt&amp;quot;&lt;br /&gt;
 Bone 42 Name: &amp;quot;-- L butt&amp;quot;&lt;br /&gt;
 Bone 43 Name: &amp;quot;Bip01 L Thigh&amp;quot;&lt;br /&gt;
 Bone 44 Name: &amp;quot;Bip01 L Calf&amp;quot;&lt;br /&gt;
 Bone 45 Name: &amp;quot;Bip01 L Foot&amp;quot;&lt;br /&gt;
 Bone 46 Name: &amp;quot;Bip01 L Toe0&amp;quot;&lt;br /&gt;
 Bone 47 Name: &amp;quot;-- L ankle&amp;quot;&lt;br /&gt;
 Bone 48 Name: &amp;quot;-- L Knee&amp;quot;&lt;br /&gt;
 Bone 49 Name: &amp;quot;Bip01 R Thigh&amp;quot;&lt;br /&gt;
 Bone 50 Name: &amp;quot;Bip01 R Calf&amp;quot;&lt;br /&gt;
 Bone 51 Name: &amp;quot;Bip01 R Foot&amp;quot;&lt;br /&gt;
 Bone 52 Name: &amp;quot;Bip01 R Toe0&amp;quot;&lt;br /&gt;
 Bone 53 Name: &amp;quot;-- R Ankle&amp;quot;&lt;br /&gt;
 Bone 54 Name: &amp;quot;-- R Knee&amp;quot;&lt;br /&gt;
 Bone 55 Name: &amp;quot;Bomb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
&amp;lt;pawn&amp;gt;// ENTITY is the player entity id&lt;br /&gt;
// BONE_NUMBER you have to choose from the list above&lt;br /&gt;
// bone_origin[3] is the vector where we save the bone origin&lt;br /&gt;
// bone_angles[3] the vector that holds the angles of the bone.&lt;br /&gt;
engfunc(EngFunc_GetBonePosition, ENTITY, BONE_NUMBER, Float:bone_origin[3], Float:bone_angles[3])&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Useful Stocks ====&lt;br /&gt;
These stocks are made for CS/CZ, you need to port them to other mods.&lt;br /&gt;
===== get_bone_hitgroup =====&lt;br /&gt;
This gets the hitgroup of the bone:&lt;br /&gt;
&amp;lt;pawn&amp;gt;#define BONE_HIT_HEAD		8&lt;br /&gt;
#define BONE_HIT_CHEST		6&lt;br /&gt;
#define BONE_HIT_STOMACH	4&lt;br /&gt;
#define BONE_HIT_LEFTARM	24&lt;br /&gt;
#define BONE_HIT_RIGHTARM	39&lt;br /&gt;
#define BONE_HIT_LEFTLEG	48&lt;br /&gt;
#define BONE_HIT_RIGHTLEG	54&lt;br /&gt;
#define HEAD_NECK		40&lt;br /&gt;
#define BONE_L_BUTT		41&lt;br /&gt;
#define BONE_R_BUTT		42&lt;br /&gt;
&lt;br /&gt;
stock get_bone_hitgroup(number)&lt;br /&gt;
{&lt;br /&gt;
    switch (number)&lt;br /&gt;
    {&lt;br /&gt;
        case HEAD_NECK:&lt;br /&gt;
        {&lt;br /&gt;
            return HIT_HEAD&lt;br /&gt;
        }&lt;br /&gt;
        case BONE_L_BUTT:&lt;br /&gt;
        {&lt;br /&gt;
            return HIT_LEFTLEG&lt;br /&gt;
        }&lt;br /&gt;
        case BONE_R_BUTT:&lt;br /&gt;
        {&lt;br /&gt;
            return HIT_RIGHTLEG&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    if (1 &amp;lt;= number &amp;lt;= BONE_HIT_STOMACH)&lt;br /&gt;
        return HIT_STOMACH&lt;br /&gt;
    &lt;br /&gt;
    if (BONE_HIT_STOMACH &amp;lt; number &amp;lt;= BONE_HIT_CHEST)&lt;br /&gt;
        return HIT_CHEST&lt;br /&gt;
    &lt;br /&gt;
    if (BONE_HIT_CHEST &amp;lt; number &amp;lt;= BONE_HIT_HEAD)&lt;br /&gt;
        return HIT_HEAD&lt;br /&gt;
    &lt;br /&gt;
    if (BONE_HIT_HEAD &amp;lt; number &amp;lt;= BONE_HIT_LEFTARM)&lt;br /&gt;
        return HIT_LEFTARM&lt;br /&gt;
    &lt;br /&gt;
    if (BONE_HIT_LEFTARM &amp;lt; number &amp;lt;= BONE_HIT_RIGHTARM)&lt;br /&gt;
        return HIT_RIGHTARM&lt;br /&gt;
    &lt;br /&gt;
    if (BONE_HIT_RIGHTARM &amp;lt; number &amp;lt;= BONE_HIT_LEFTLEG)&lt;br /&gt;
        return HIT_LEFTLEG&lt;br /&gt;
    &lt;br /&gt;
    if (BONE_HIT_LEFTLEG &amp;lt; number &amp;lt;= BONE_HIT_RIGHTLEG)&lt;br /&gt;
        return HIT_RIGHTLEG&lt;br /&gt;
    &lt;br /&gt;
    return HIT_GENERIC&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== find_closest_bone_to_gunshot =====&lt;br /&gt;
This gets the closest bone to the gunshot (Use this in FM_TraceLine and Ham_TraceAttack):&lt;br /&gt;
&amp;lt;pawn&amp;gt;#define DISTANCE_CLEAR_HIT        2.0&lt;br /&gt;
&lt;br /&gt;
stock find_closest_bone_to_gunshot(victim, Float:endtrace[3])&lt;br /&gt;
{&lt;br /&gt;
    new Float:angles[3], Float:origin[3], Float:dist = 9999999.99, Float:curorigin[3], bone_nr&lt;br /&gt;
    for (new i=1;i&amp;lt;=54;i++)&lt;br /&gt;
    {&lt;br /&gt;
        // Get the bone position&lt;br /&gt;
        engfunc(EngFunc_GetBonePosition, victim, i, curorigin, angles)&lt;br /&gt;
        // Calculate the distance vector&lt;br /&gt;
        xs_vec_sub(curorigin, endtrace, angles)&lt;br /&gt;
        &lt;br /&gt;
        // If this is smaller than the last small distance remember the value!&lt;br /&gt;
        if (xs_vec_len(angles) &amp;lt;= dist)&lt;br /&gt;
        {&lt;br /&gt;
            origin = curorigin&lt;br /&gt;
            dist = xs_vec_len(angles)&lt;br /&gt;
            bone_nr = i&lt;br /&gt;
        }&lt;br /&gt;
        &lt;br /&gt;
        // If distance is smaller than CLEARHIT! Break (We accept the last value!)&lt;br /&gt;
        if (dist &amp;lt;= DISTANCE_CLEAR_HIT)&lt;br /&gt;
        {&lt;br /&gt;
            break&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    // Return the bone&lt;br /&gt;
    return bone_nr&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Messaging Functions ==&lt;br /&gt;
=== EngFunc_MessageBegin ===&lt;br /&gt;
This function is used to generate client messages.&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
Syntax:&lt;br /&gt;
&amp;lt;pawn&amp;gt;engfunc(EngFunc_MessageBegin, dest, msg_type, origin[3] = {0, 0, 0}, player = 0)&amp;lt;/pawn&amp;gt;&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pawn&amp;gt;static Float:origin[3] // Origin should be a Float&lt;br /&gt;
pev(id, pev_origin, origin) // Get user origin&lt;br /&gt;
engfunc(EngFunc_MessageBegin,MSG_BROADCAST,SVC_TEMPENTITY,origin,0) // Create message&amp;lt;/pawn&amp;gt;&lt;br /&gt;
With MSG_ONE_UNRELIABLE:&lt;br /&gt;
&amp;lt;pawn&amp;gt;engfunc(EngFunc_MessageBegin,MSG_ONE_UNRELIABLE,SVC_TEMPENTITY,_,id) // Create message&amp;lt;/pawn&amp;gt;&lt;br /&gt;
With MSG_ALL:&lt;br /&gt;
&amp;lt;pawn&amp;gt;engfunc(EngFunc_MessageBegin,MSG_ONE_UNRELIABLE,SVC_TEMPENTITY,_,id) // Create message&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
dest can be:&lt;br /&gt;
&lt;br /&gt;
 #define    MSG_BROADCAST               0        // Unreliable to all, There is not id&lt;br /&gt;
 #define    MSG_ONE                     1        // Reliable to one (msg_entity)&lt;br /&gt;
 #define    MSG_ALL                     2        // Reliable to all, There is not origin&lt;br /&gt;
 #define    MSG_INIT                    3        // Write to the init string&lt;br /&gt;
 #define    MSG_PVS                     4        // Ents in PVS of org&lt;br /&gt;
 #define    MSG_PAS                     5        // Ents in PAS of org&lt;br /&gt;
 #define    MSG_PVS_R                   6        // Reliable to PVS&lt;br /&gt;
 #define    MSG_PAS_R                   7        // Reliable to PAS&lt;br /&gt;
 #define    MSG_ONE_UNRELIABLE          8        // Send to one client, but don't put in reliable stream,&lt;br /&gt;
                                                 // put in unreliable datagram (could be  dropped), there is not origin&lt;br /&gt;
 #define    MSG_SPEC                    9        // Sends to all spectator proxies&lt;br /&gt;
&lt;br /&gt;
'''Before calling another EngFunc_MessageBegin you must call message_end().'''&lt;br /&gt;
&lt;br /&gt;
== Entity Search Functions ==&lt;br /&gt;
=== EngFunc_FindEntityInSphere ===&lt;br /&gt;
Find entities within a radius. '''The function returns the next entity id after the start entity.'''&lt;br /&gt;
&lt;br /&gt;
[[Image:FindEntityInSphere.png|thumb|3D diagram to show how the function works.]]&lt;br /&gt;
If we use&lt;br /&gt;
&amp;lt;pawn&amp;gt;engfunc(EngFunc_FindEntityInSphere, -1, origin, radius)&amp;lt;/pawn&amp;gt;&lt;br /&gt;
In the situation described on the picture the function call above will return 1,&lt;br /&gt;
&amp;lt;pawn&amp;gt;engfunc(EngFunc_FindEntityInSphere, 20, origin, radius)&amp;lt;/pawn&amp;gt;&lt;br /&gt;
will return 30 and&lt;br /&gt;
&amp;lt;pawn&amp;gt;engfunc(EngFunc_FindEntityInSphere, 100, origin, radius)&amp;lt;/pawn&amp;gt;&lt;br /&gt;
will return 0, meaning that it didn't find an entity with an id grater than 100.&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
&amp;lt;pawn&amp;gt;engfunc(EngFunc_FindEntityInSphere, ent_to_start, origin, radius)&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== EngFunc_EntitiesInPVS ===&lt;br /&gt;
&lt;br /&gt;
This function checks entities that are in the [[PVS]] of an entity.&lt;br /&gt;
'''It can't be used on worldspawn.'''&lt;br /&gt;
&lt;br /&gt;
The function returns the first entity on the [[PVS]] and then you can traverse through the results using pev_chain/EV_ENT_chain.&lt;br /&gt;
A NULL value of pev_chain/EV_ENT_chain indicates the end of the chain.&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
&amp;lt;pawn&amp;gt;public whatisonPVS(id)&lt;br /&gt;
{&lt;br /&gt;
    static next, chain&lt;br /&gt;
    static class[32]&lt;br /&gt;
    &lt;br /&gt;
    next = engfunc(EngFunc_EntitiesInPVS, id)&lt;br /&gt;
    while(next)&lt;br /&gt;
    {&lt;br /&gt;
        pev(next, pev_classname, class, charsmax(class))&lt;br /&gt;
        chain = pev(next, pev_chain)&lt;br /&gt;
        &lt;br /&gt;
        server_print(&amp;quot;Found entity in player (%i) PVS: ent(%i) class(%s)&amp;quot;, id, next, class)&lt;br /&gt;
        &lt;br /&gt;
        if(!chain)&lt;br /&gt;
            break&lt;br /&gt;
    &lt;br /&gt;
        next = chain&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== EngFunc_FindEntityByString ===&lt;br /&gt;
Returns the first entity found that matches the search criteria.&lt;br /&gt;
&lt;br /&gt;
You can use any of string type attributes of entities:&lt;br /&gt;
&lt;br /&gt;
 classname	Type of entity&lt;br /&gt;
 globalname	This is the name of the global variable that can be used to control the state of the entity&lt;br /&gt;
 model	 	The model of the entity&lt;br /&gt;
 target	 	Entity that this entity is handling&lt;br /&gt;
 targetname	The name given to this entity that another entity searches for to handle it&lt;br /&gt;
 netname		Player or NPC name&lt;br /&gt;
 message		Seems to be used mainly to store sound (string). It happens to store others things, depending the need of the entity&lt;br /&gt;
 noise		Noise variables do different things for different ents&lt;br /&gt;
 noise1		This is the move sound for doors&lt;br /&gt;
 noise2		This is the stop sound for doors&lt;br /&gt;
 noise3		This is for blocking game_player_equip and player_weaponstrip&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
&amp;lt;pawn&amp;gt;iEnt = engfunc(EngFunc_FindEntityByString, iStartEnt, sAttribute, sValue)&amp;lt;/pawn&amp;gt;&lt;br /&gt;
Parameters:&lt;br /&gt;
* iStartEnt: Start searching on this entity (ex: 0 = worldspawn)&lt;br /&gt;
* sAttribute: Name of attribute over which we need to search (ex: classname)&lt;br /&gt;
* sValue: Text string that we are searching for (ex: func_breakable)&lt;br /&gt;
&lt;br /&gt;
The function returns the first entity matching the criteria.&lt;br /&gt;
&lt;br /&gt;
=== EngFunc_FindClientInPVS ===&lt;br /&gt;
Returns the next &amp;quot;player&amp;quot; entity in someone's [[PVS]] using a global loop.&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
&amp;lt;pawn&amp;gt;iEnt2 = engfunc(EngFunc_FindClientInPVS, iEnt)&amp;lt;/pawn&amp;gt;&lt;br /&gt;
Parameters:&lt;br /&gt;
* iEnt		Source entity. Seek someone within iEnt's [[PVS]]&lt;br /&gt;
&lt;br /&gt;
Unlike [[#EngFunc_EntitiesInPVS|EntitiesInPVS]], it does not return a series of chained entities. Instead, it works like a global loop of entities.&lt;br /&gt;
No matter which source entity you use, this function maintains the last index used and returns the next entity in source entity [[PVS]].&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
==== Notes ====&lt;br /&gt;
It's not clear the main purpose of this function because you can get similar results with [[#EngFunc_EntitiesInPVS|EntitiesInPVS]].&lt;br /&gt;
&lt;br /&gt;
[[#EngFunc_CheckVisibility|CheckVisibility]] and [[#EngFunc_EntitiesInPVS|EntitiesInPVS]] are better functions to use.&lt;br /&gt;
&lt;br /&gt;
== Trace Functions ==&lt;br /&gt;
=== EngFunc_TraceLine ===&lt;br /&gt;
This function traces between 2 origins and gives us information about it.&lt;br /&gt;
&lt;br /&gt;
These are the constants we can use as flags:&lt;br /&gt;
&lt;br /&gt;
 #define DONT_IGNORE_MONSTERS            0&lt;br /&gt;
 #define IGNORE_MONSTERS                 1&lt;br /&gt;
 #define IGNORE_MISSILE                  2&lt;br /&gt;
 #define IGNORE_GLASS                    0x100&lt;br /&gt;
&lt;br /&gt;
'''These constants can be used together.'''&lt;br /&gt;
&lt;br /&gt;
Ex: IGNORE_MISSILE | IGNORE_MONSTERS | IGNORE_GLASS - This makes the traceline ignore missiles, monsters (players) and glass.&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
&lt;br /&gt;
Example of doing a traceline between two origins, and ignoring glass:&lt;br /&gt;
&amp;lt;pawn&amp;gt;engfunc(EngFunc_TraceLine, start, end, IGNORE_GLASS, 0, tr)&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now considering glass:&lt;br /&gt;
&amp;lt;pawn&amp;gt;engfunc(EngFunc_TraceLine, start, end, DONT_IGNORE_MONSTERS, 0, tr)&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
File:Traceline1.jpg|Traceline result if glass is ignored. The entity is ignored because of its solid flag&lt;br /&gt;
File:Traceline2.jpg|Traceline result if glass is not ignored.&lt;br /&gt;
File:Traceline3.jpg|Traceline result if glass is ignored but there's an entity with blocking solid flags in the way&lt;br /&gt;
File:Traceline4.jpg|Traceline result if glass is ignored, and the entity in the way has non-blocking flags&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Other Traceline functions ====&lt;br /&gt;
This creates a trace handle. It's important to do this because we don't want our plugins to mess with eachothers info.&lt;br /&gt;
&amp;lt;pawn&amp;gt;new ptr = create_tr2()&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And this frees the trace handle:&lt;br /&gt;
&amp;lt;pawn&amp;gt;free_tr2(ptr)&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Getter and setter:&lt;br /&gt;
&amp;lt;pawn&amp;gt;[g|s]et_tr2(trace_handle, CONSTANT, argument_if_setting)&amp;lt;/pawn&amp;gt;&lt;br /&gt;
Where CONSTANT can be one of the following enumerations:&lt;br /&gt;
&amp;lt;pawn&amp;gt;enum TraceResult&lt;br /&gt;
{&lt;br /&gt;
	TR_AllSolid,		// int&lt;br /&gt;
	TR_StartSolid,		// int&lt;br /&gt;
	TR_InOpen,		// int&lt;br /&gt;
	TR_InWater,		// int&lt;br /&gt;
	TR_flFraction,		// float&lt;br /&gt;
	TR_vecEndPos,		// float array[3]&lt;br /&gt;
	TR_flPlaneDist,		// float&lt;br /&gt;
	TR_vecPlaneNormal,	// float array[3]&lt;br /&gt;
	TR_pHit,		// int (edict_t*)&lt;br /&gt;
	TR_iHitgroup,		// int&lt;br /&gt;
};&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Getting the array and Float values require the third parameter to be passed.'''&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pawn&amp;gt;&lt;br /&gt;
    new startsolid = get_tr2(trace, TR_StartSolid)&lt;br /&gt;
    // TR_StartSolid is a boolean that says whether you were &amp;quot;inside&amp;quot; something &lt;br /&gt;
    // (usually the world) when the trace started (point A)&lt;br /&gt;
    // TR_AllSolid tells you if you ever got out of the &amp;quot;inside&amp;quot; or not.&lt;br /&gt;
    &lt;br /&gt;
    new inopen = get_tr2(trace, TR_InOpen)&lt;br /&gt;
    // TR_InOpen means that the start point is in Open&lt;br /&gt;
    // That means in the world and not in an ent or something&lt;br /&gt;
    &lt;br /&gt;
    new hit = get_tr2(trace, TR_pHit)&lt;br /&gt;
    // What was hit by the traceline. It will either be a player index,&lt;br /&gt;
    // entity index, 0 (part of map), or -1 (didn't hit anything; &lt;br /&gt;
    // doesn't happen with player tracelines).&lt;br /&gt;
    &lt;br /&gt;
    new hitgroup = get_tr2(trace, TR_iHitgroup)&lt;br /&gt;
    // If the traceline hit another player, returns will be HIT_HEAD,&lt;br /&gt;
    // HIT_CHEST, HIT_LEFTLEG... etc. If the traceline hit part of the&lt;br /&gt;
    // map, this returns HIT_GENERIC.&lt;br /&gt;
    &lt;br /&gt;
    new Float:fraction&lt;br /&gt;
    get_tr2(trace, TR_flFraction, fraction)&lt;br /&gt;
    // Returns a number between 0.0 and 1.0, indicating how far the&lt;br /&gt;
    // traceline traveled start to end before it hit something. Depending&lt;br /&gt;
    // on what conditions were passed to this traceline forward function,&lt;br /&gt;
    // it could either be a wall or another entity.&lt;br /&gt;
    &lt;br /&gt;
    new Float:end_origin[3]&lt;br /&gt;
    get_tr2(trace, TR_vecEndPos, end_origin)&lt;br /&gt;
    // The official end of the traceline. Not necesarily the same as the&lt;br /&gt;
    // second argument passed to this traceline forward function.&lt;br /&gt;
    &lt;br /&gt;
    new Float:normal[3]&lt;br /&gt;
    get_tr2(trace, TR_vecPlaneNormal, normal)&lt;br /&gt;
    // Returns a 1 unit long vector normal to the spot that it hit. Note&lt;br /&gt;
    // that &amp;quot;normal&amp;quot; has a special connotation here. It doesn't mean &amp;quot;regular.&amp;quot;&lt;br /&gt;
&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Useful Stocks ====&lt;br /&gt;
===== is_wall_between_points =====&lt;br /&gt;
This returns true if there's a wall between ''start'' and ''end''.&lt;br /&gt;
&amp;lt;pawn&amp;gt;stock is_wall_between_points(Float:start[3], Float:end[3], ignore_ent)&lt;br /&gt;
{&lt;br /&gt;
    // Create the trace handle! It is best to create it!&lt;br /&gt;
    new ptr = create_tr2()&lt;br /&gt;
    &lt;br /&gt;
    // The main traceline function!&lt;br /&gt;
    // This function ignores GLASS, MISSILE and MONSTERS!&lt;br /&gt;
    // Here is an example of how you should combine all the flags!&lt;br /&gt;
    engfunc(EngFunc_TraceLine, start, end, IGNORE_GLASS | IGNORE_MONSTERS | IGNORE_MISSILE, ignore_ent, ptr)&lt;br /&gt;
    &lt;br /&gt;
    // We are interested in the fraction parameter&lt;br /&gt;
    new Float: fraction&lt;br /&gt;
    get_tr2(ptr, TR_flFraction, fraction)&lt;br /&gt;
    &lt;br /&gt;
    // Free the trace handle (don't forget to do this!)&lt;br /&gt;
    free_tr2(ptr)&lt;br /&gt;
    &lt;br /&gt;
    // If = 1.0 then it didn't hit anything!&lt;br /&gt;
    return (fraction != 1.0)&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Extra Info ====&lt;br /&gt;
[[http://developer.valvesoftware.com/wiki/TraceLines Description of tracelines on the Valve Developer Community]]&lt;br /&gt;
&lt;br /&gt;
[[http://forums.alliedmods.net/showthread.php?t=66076 Traceline tutorial by Nomexous]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting (AMX Mod X)]]&lt;br /&gt;
&lt;br /&gt;
=== EngFunc_TraceTexture, DLLFunc_PM_FindTextureType ===&lt;br /&gt;
The TraceTexture function detects the texture of an entity from a direction&lt;br /&gt;
&lt;br /&gt;
The FindTextureType function allows to get the type of the material of the texture.&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
&amp;lt;pawn&amp;gt;engfunc(EngFunc_TraceTexture, ent, Float:start[3], Float:end[3], texture_name, len)&amp;lt;/pawn&amp;gt;&lt;br /&gt;
* ent is the entity that we want to get the texture&lt;br /&gt;
* start is the point from where the trace starts&lt;br /&gt;
* end is the point where the trace ends&lt;br /&gt;
* texture_name - here we save the texture name&lt;br /&gt;
* len - the texture_name string length&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;dllfunc(DLLFunc_PM_FindTextureType, texture_name)&amp;lt;/pawn&amp;gt;&lt;br /&gt;
* texture_name is the name of the texture that we have gotten with TraceTexture&lt;br /&gt;
&lt;br /&gt;
The function returns the material of the texture, which can be one of the following:&lt;br /&gt;
&lt;br /&gt;
* C : concrete        &lt;br /&gt;
* D : dirt    &lt;br /&gt;
* G : grate     &lt;br /&gt;
* M : metal &lt;br /&gt;
* N : snow&lt;br /&gt;
* P : computer    &lt;br /&gt;
* S : slosh     &lt;br /&gt;
* T : tile     &lt;br /&gt;
* V : ventilation          &lt;br /&gt;
* W : wood        &lt;br /&gt;
* Y : glass&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;new texture_name[64], texture_type&lt;br /&gt;
    engfunc(EngFunc_TraceTexture, 0, start, end, texture_name, charsmax(texture_name))&lt;br /&gt;
    texture_type = dllfunc(DLLFunc_PM_FindTextureType, texture_name)&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Notes ====&lt;br /&gt;
'''Improper use of these functions may crash the server!'''&lt;br /&gt;
&lt;br /&gt;
To avoid crashing the server use the TraceTexture:&lt;br /&gt;
* on any entities (even worldspawn) except players&lt;br /&gt;
* when there is at least one player connected&lt;br /&gt;
* with a big distance between the two points (&amp;gt; 2000.0)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== EngFunc_TraceModel ===&lt;br /&gt;
This function traces between 2 origins a model and gives us properties about it.&lt;br /&gt;
It acts just like a TraceLine but it ignores all the entities except the one we want to hit!&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
&amp;lt;pawn&amp;gt;engfunc(EngFunc_TraceModel, const Float:start[3], const Float:end[3], hull, ent_to_hit, ptr)&amp;lt;/pawn&amp;gt;&lt;br /&gt;
* start - start origin&lt;br /&gt;
* end - end origin&lt;br /&gt;
* hull - the hull that is moved check above to see them&lt;br /&gt;
* ent_to_hit - the entity that you want to hit (this is a must!)&lt;br /&gt;
* ptr - the trace handle pointer, acts the same as the one in trace line!&lt;br /&gt;
&lt;br /&gt;
The constants that we can use in hull:&lt;br /&gt;
&lt;br /&gt;
 #define HULL_POINT                      0  // This means that we are moving a point from the start to the end&lt;br /&gt;
 #define HULL_HUMAN                      1  // That means that we move a cube of a player from start to end&lt;br /&gt;
 #define HULL_LARGE                      2  // That means that we move a bigger cube that one of the player from start to end&lt;br /&gt;
                                            // (used in HL for big monsters!)&lt;br /&gt;
 #define HULL_HEAD                       3  // This means that we move from start to end the hull of a ducked player&lt;br /&gt;
&lt;br /&gt;
==== Extra Info ====&lt;br /&gt;
[[http://forums.alliedmods.net/showthread.php?p=850698 TraceModel example]]&lt;br /&gt;
&lt;br /&gt;
[[#EngFunc_TraceLine|TraceLine explanation]]&lt;br /&gt;
&lt;br /&gt;
=== EngFunc_TraceToss ===&lt;br /&gt;
Trace the point where some entity movement will finish.&lt;br /&gt;
If for some reason the entity movement must be blocked for other entity (or worldspawn), TraceToss will detect that situation taking in account the original entity bounding boxes.&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
&amp;lt;pawn&amp;gt;engfunc(EngFunc_TraceToss, ent, skipent, tr)&amp;lt;/pawn&amp;gt;&lt;br /&gt;
* ent = The entity which movement we want to trace&lt;br /&gt;
* skipent = The entity to skip in trace&lt;br /&gt;
* tr = trace handle to store the result&lt;br /&gt;
&lt;br /&gt;
[[Image:Tracetoss.jpg|thumb|EngFunc_TraceToss example]]&lt;br /&gt;
==== Example ====&lt;br /&gt;
&lt;br /&gt;
In the image you can see a player jumping and 2 points.&lt;br /&gt;
&lt;br /&gt;
''Start Point'' is the origin of the player when TraceToss was called.&lt;br /&gt;
&lt;br /&gt;
''End Point'' is the point returned in TR result.&lt;br /&gt;
&lt;br /&gt;
So the player is making a parabola from START to END.&lt;br /&gt;
The green line is only for testing purposes and show from where to where the trace is.&lt;br /&gt;
This was tested with gravity = 400.&lt;br /&gt;
&lt;br /&gt;
== Model/Decal/Texture Functions ==&lt;br /&gt;
=== EngFunc_SetModel ===&lt;br /&gt;
Properly sets a new model on an entity.&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
&amp;lt;pawn&amp;gt;engfunc(EngFunc_SetModel, iEnt, sModel)&amp;lt;/pawn&amp;gt;&lt;br /&gt;
* iEnt = Entity index&lt;br /&gt;
* sModel = Model file name to set on entity (ex: &amp;quot;models/player/vip/vip.mdl&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==== Engine Alternative ====&lt;br /&gt;
&amp;lt;pawn&amp;gt;entity_set_model(entity, model[])&amp;lt;/pawn&amp;gt;&lt;br /&gt;
[[http://www.amxmodx.org/funcwiki.php?go=func&amp;amp;id=354 FuncWiki page for entity_set_model]]&lt;br /&gt;
&lt;br /&gt;
=== EngFunc_ModelIndex ===&lt;br /&gt;
Returns an unique index of the model name provided.&lt;br /&gt;
It's actually the same number that precache_model() returns.&lt;br /&gt;
&lt;br /&gt;
A model index is used for example in some TE_* messages. ( TE_LIGHTNING, TE_GLOWSPRITE, etc.. See message_const.inc file ).&lt;br /&gt;
&lt;br /&gt;
The model index of an entity is stored in pev_modelindex.&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
&amp;lt;pawn&amp;gt;ModelIndex = engfunc(EngFunc_ModelIndex, &amp;quot;models/MyModel.mdl&amp;quot;)&amp;lt;/pawn&amp;gt;&lt;br /&gt;
ModelIndex will have the model index for &amp;quot;models/MyModel.mdl&amp;quot; after the function call.&lt;br /&gt;
&lt;br /&gt;
=== EngFunc_ModelFrames ===&lt;br /&gt;
Returns the frames count of a model.&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
&amp;lt;pawn&amp;gt;ModelFrames = engfunc(EngFunc_ModelFrames, ModelIndex)&amp;lt;/pawn&amp;gt;&lt;br /&gt;
* ModelIndex = The model index. Value you can get from precache_model() or [[#EngFunc_ModelIndex|EngFunc_ModelIndex]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== EngFunc_DecalIndex ===&lt;br /&gt;
Returns an unique index of the decal name provided.&lt;br /&gt;
&lt;br /&gt;
A decal index is used for example in some TE_* messages. ( TE_PLAYERDECAL, TE_DECAL, etc.. See message_const.inc file ).&lt;br /&gt;
&lt;br /&gt;
All the available decals are stored in the decals.wad file. ( Located at your mod root directory )&lt;br /&gt;
&lt;br /&gt;
As side-note a plugin [[http://forums.alliedmods.net/showthread.php?p=247677 &amp;quot;Decals/Models Lister&amp;quot;]] is available to see a list of decals/models index/name. ( Only CS and HL )&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
&amp;lt;pawn&amp;gt;DecalIndex = engfunc(EngFunc_DecalIndex, &amp;quot;{bigshot1&amp;quot;)&amp;lt;/pawn&amp;gt;&lt;br /&gt;
DecalIndex will have the decal index for &amp;quot;{bigshot1&amp;quot; after the function call.&lt;br /&gt;
&lt;br /&gt;
==== Engine alternative ====&lt;br /&gt;
&amp;lt;pawn&amp;gt;DecalIndex = get_decal_index( &amp;quot;{bigshot1&amp;quot; )&amp;lt;/pawn&amp;gt;&lt;br /&gt;
[[http://www.amxmodx.org/funcwiki.php?go=func&amp;amp;id=329 FuncWiki page for get_decal_index()]]&lt;br /&gt;
&lt;br /&gt;
=== EngFunc_AnimationAutomove ===&lt;br /&gt;
Plays the selected animation on entity&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
&amp;lt;pawn&amp;gt;entity_set_float(iEnt, EV_FL_framerate, fFrameRate);&lt;br /&gt;
entity_set_int(iEnt, EV_INT_sequence, iSequence);&lt;br /&gt;
engfunc(EngFunc_AnimationAutomove, iEnt, fTime);&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* fFrameRate = Frame rate of desired animation.&lt;br /&gt;
* iSequence = Sequence to play.&lt;br /&gt;
* iEnt = Source entity.&lt;br /&gt;
* fTime = '''It seems to not affect the animation. Maybe for internal use.'''&lt;br /&gt;
&lt;br /&gt;
First you have to select the sequence and the desired frame rate. Then you can start the animation.&lt;br /&gt;
It will run in an endless loop.&lt;br /&gt;
&lt;br /&gt;
It seems to work only on non-player entities.&lt;br /&gt;
&lt;br /&gt;
== Entity/Global Functions ==&lt;br /&gt;
=== EngFunc_NumberOfEntities ===&lt;br /&gt;
Returns the number of entities in the world.&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
&amp;lt;pawn&amp;gt;ents = engfunc(EngFunc_NumberOfEntities)&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Engine alternative ====&lt;br /&gt;
&amp;lt;pawn&amp;gt;ents = entity_count()&amp;lt;/pawn&amp;gt;&lt;br /&gt;
[[http://www.amxmodx.org/funcwiki.php?go=func&amp;amp;id=356 FuncWiki page for entity_count]]&lt;br /&gt;
&lt;br /&gt;
=== EngFunc_SetSize ===&lt;br /&gt;
Sets the bounds of an entity.&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
&amp;lt;pawn&amp;gt;engfunc(EngFunc_SetSize, iEnt, Float:fMins[3], Float:fMaxs[3])&amp;lt;/pawn&amp;gt;&lt;br /&gt;
* iEnt = Entity index&lt;br /&gt;
* fMins[3] = Mins boundings values (x,y,z)&lt;br /&gt;
* fMaxs[3] = Maxs boundings values (x,y,z)&lt;br /&gt;
&lt;br /&gt;
==== Engine alternative ====&lt;br /&gt;
&amp;lt;pawn&amp;gt;entity_set_size(index, Float:mins[3], Float:maxs[3])&amp;lt;/pawn&amp;gt;&lt;br /&gt;
[[http://www.amxmodx.org/funcwiki.php?go=func&amp;amp;id=328 FuncWiki page for entity_set_size]]&lt;br /&gt;
&lt;br /&gt;
=== EngFunc_SetOrigin ===&lt;br /&gt;
Properly sets a new origin on an entity.&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
&amp;lt;pawn&amp;gt;engfunc(EngFunc_SetOrigin, iEnt, Float:Origin[3])&amp;lt;/pawn&amp;gt;&lt;br /&gt;
* iEnt = Entity index&lt;br /&gt;
* Origin[3] = New origin for the entity (x,y,z)&lt;br /&gt;
&lt;br /&gt;
==== Engine alternative ====&lt;br /&gt;
&amp;lt;pawn&amp;gt;entity_set_origin(index, Float:NewOrigin[3])&amp;lt;/pawn&amp;gt;&lt;br /&gt;
[[http://www.amxmodx.org/funcwiki.php?go=func&amp;amp;id=353 FuncWiki page for entity_set_origin]]&lt;br /&gt;
&lt;br /&gt;
=== EngFunc_MoveToOrigin ===&lt;br /&gt;
Moves an entity a defined distance toward a coordinate.&lt;br /&gt;
&lt;br /&gt;
If the distance between Entity and Destination is less than the required distance, the entity will pass over that point.&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
&amp;lt;pawn&amp;gt;engfunc(EngFunc_MoveToOrigin, iEnt, Float:Destination[3], Float:Distance, iMoveType)&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* iEnt = Entity index&lt;br /&gt;
* Destination[3] = A Coordinate toward which the entity moves&lt;br /&gt;
* Distance = The distance to move the entity&lt;br /&gt;
* iMoveType = This is the MOVE_* option used for monsters and players to change the behaviour of the movement&lt;br /&gt;
&lt;br /&gt;
Move type possible values:&lt;br /&gt;
&lt;br /&gt;
 #define MOVE_NORMAL		0	// normal move in the direction monster is facing&lt;br /&gt;
 #define MOVE_STRAFE		1	// moves in direction specified, no matter which way monster is facing&lt;br /&gt;
 #define MOVE_STUCK_DIST		32	// if a monster can't step this far, it is stuck.&lt;br /&gt;
 #define MOVE_START_TURN_DIST	64	// when this far away from moveGoal, start turning to face next goal&lt;br /&gt;
&lt;br /&gt;
==== Caveats ====&lt;br /&gt;
&lt;br /&gt;
* iEnt must be on ground&lt;br /&gt;
* If there's an object closer than Distance that iEnt could collide then the movement is not done&lt;br /&gt;
* If there's a ramp, it works like an object and the movement is not done&lt;br /&gt;
&lt;br /&gt;
== Visibility Functions ==&lt;br /&gt;
=== EngFunc_CheckVisibility ===&lt;br /&gt;
This function is used to check if an entity is in your [[PVS]].&lt;br /&gt;
&lt;br /&gt;
'''It can be used on all entities except worldspawn.'''&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
This function has a parameter that must be obtained in a special way, the ''pset'' parameter.&lt;br /&gt;
'''Note:''' The parameter is player only, that means that if you get pset for example for a player that has the id ''1''. When you use this function on an entity it will check whether that entity is in [[PVS]] of the Player id ''1''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pawn&amp;gt;new g_cl_pset[33]&lt;br /&gt;
&lt;br /&gt;
public plugin_init(id)&lt;br /&gt;
{&lt;br /&gt;
    register_forward(FM_AddToFullPack, &amp;quot;pfw_atfp&amp;quot;, 1)&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public pfw_atfp(es, e, ent, host, flags, player, set)&lt;br /&gt;
{&lt;br /&gt;
    g_cl_pset[host] = set&lt;br /&gt;
    &lt;br /&gt;
    return FMRES_IGNORED&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
stock is_ent_in_player_pvs(id, entity)&lt;br /&gt;
{&lt;br /&gt;
    return engfunc(EngFunc_CheckVisibility, entity, g_cl_pset[id])&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
stock get_pvs_players(id, players[32], num, flags[], team[])&lt;br /&gt;
{&lt;br /&gt;
    if (!is_user_connected(id))&lt;br /&gt;
        return 0    &lt;br /&gt;
&lt;br /&gt;
    get_players(players, num, flags, team)&lt;br /&gt;
    &lt;br /&gt;
    for (new i=0;i&amp;lt;num;i++)&lt;br /&gt;
    {&lt;br /&gt;
        if (!is_ent_in_player_pvs(id, players[i]))&lt;br /&gt;
        {&lt;br /&gt;
            num--;&lt;br /&gt;
            &lt;br /&gt;
            for (new j=i;j&amp;lt;num;j++)&lt;br /&gt;
            {&lt;br /&gt;
                players[j] = players[j+1]&lt;br /&gt;
            }&lt;br /&gt;
            &lt;br /&gt;
            i--&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    return 1&lt;br /&gt;
}&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Other Functions ==&lt;br /&gt;
=== EngFunc_PrecacheModel ===&lt;br /&gt;
Precaches a model or sprite file.&lt;br /&gt;
&lt;br /&gt;
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() native directly in plugin_precache() forward.&lt;br /&gt;
&lt;br /&gt;
It can be useful for example when you want to manage models with cvars and to avoid registering them in plugin_precache() then getting some trouble, you could manage out of this forward.&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
&amp;lt;pawn&amp;gt;engfunc(EngFunc_PrecacheModel, &amp;quot;models/MyModel.mdl&amp;quot;)&amp;lt;/pawn&amp;gt;&lt;br /&gt;
&amp;lt;pawn&amp;gt;engfunc(EngFunc_PrecacheModel, &amp;quot;sprites/MySprite.spr&amp;quot;)&amp;lt;/pawn&amp;gt;&lt;br /&gt;
It returns the precached model/sprite index if successful, otherwise 0.&lt;br /&gt;
&lt;br /&gt;
=== EngFunc_PrecacheSound ===&lt;br /&gt;
Precaches a sound, only *.wav file. ( for mp3, see EngFunc_PrecacheGeneric )&lt;br /&gt;
&lt;br /&gt;
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_sound() native directly in plugin_precache() forward.&lt;br /&gt;
&lt;br /&gt;
It can be useful for example when you want to manage sounds with cvars and to avoid registering them in plugin_precache() then getting some trouble, you could manage out of this forward.&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
&amp;lt;pawn&amp;gt;engfunc(EngFunc_PrecacheSound, &amp;quot;sound/MySound.wav&amp;quot;)&amp;lt;/pawn&amp;gt;&lt;br /&gt;
It returns the precached sound index if successful, otherwise 0.&lt;br /&gt;
&lt;br /&gt;
=== EngFunc_AlertMessage ===&lt;br /&gt;
Prints an alert message.&lt;br /&gt;
&lt;br /&gt;
==== Usage ====&lt;br /&gt;
&amp;lt;pawn&amp;gt;engfunc(EngFunc_AlertMessage, AlertType, const Message)&amp;lt;/pawn&amp;gt;&lt;br /&gt;
AlertType can be:&lt;br /&gt;
&lt;br /&gt;
 at_notice - shows a message box with the message&lt;br /&gt;
 at_console - same as at_notice, but forces a ConPrintf, not a message box, prints output to server console, but only if 'developer' is 1.&lt;br /&gt;
 at_aiconsole - same as at_console, but only shown if 'developer' is 2.&lt;br /&gt;
 at_warning -&lt;br /&gt;
 at_error -&lt;br /&gt;
 at_logged - prints output to server logs and console.&lt;/div&gt;</summary>
		<author><name>WOOw</name></author>
		
	</entry>
</feed>