NS
Content:
Notes
The Natural-Selection module was developed by Mahnsawce as NS2AMX.
It has been split and trimmed down for AMXx to fit into our organizational design scheme.
Combined with engine, it still contains all the functionality of NS2AMX. The NS module contains the following constants: Player Mask Constants
enum {
	MASK_NONE = 0,
	MASK_SIGHTED = 1,
	MASK_DETECTED = 2,
	MASK_BUILDABLE = 4,
	MASK_BASEBUILD0 = 8,		// Base build slot #0
	MASK_WEAPONS1 = 8,		// Marine weapons 1
	MASK_CARAPACE = 8,		// Alien carapace
	MASK_WEAPONS2 = 16,		// Marines weapons 2
	MASK_REGENERATION = 16,		// Alien regeneration
	MASK_BASEBUILD1 = 16,		// Base build slot #1
	MASK_WEAPONS3 = 32,		// Marine weapons 3
	MASK_REDEMPTION = 32,		// Alien redemption
	MASK_BASEBUILD2 = 32,		// Base build slot #2
	MASK_ARMOR1 = 64,		// Marine armor 1
	MASK_CELERITY = 64,		// Alien celerity
	MASK_BASEBUILD3 = 64,		// Base build slot #3
	MASK_ARMOR2 = 128,		// Marine armor 2
	MASK_ADRENALINE = 128,		// Alien adrenaline
	MASK_BASEBUILD4 = 128,		// Base build slot #4
	MASK_ARMOR3 = 256,		// Marine armor 3
	MASK_SILENCE = 256,		// Alien silence
	MASK_BASEBUILD5 = 256,		// Base build slot #5
	MASK_JETPACK = 512,		// Marine jetpacks
	MASK_CLOAKING = 512,		// Alien cloaking
	MASK_BASEBUILD6 = 512,		// Base build slot #6
	MASK_FOCUS = 1024,		// Alien focus
	MASK_MOTION = 1024,		// Marine motion tracking
	MASK_BASEBUILD7 = 1024,		// Base build slot #7
	MASK_SCENTOFFEAR = 2048,	// Alien scent of fear
	MASK_DEFENSE2 = 4096,		// Defense level 2
	MASK_DEFENSE3 = 8192,		// Defense level 3
	MASK_ELECTRICITY = 8192,	// Electricy
	MASK_MOVEMENT2 = 16384,		// Movement level 2,
	MASK_MOVEMENT3 = 32768,		// Movement level 3
	MASK_HEAVYARMOR = 32768,	// Marine heavy armor
	MASK_SENSORY2 = 65536,		// Sensory level 2
	MASK_SENSORY3 = 131072,		// Sensory level 3
	MASK_ALIEN_MOVEMENT = 262144,	// Onos is charging
	MASK_WALLSTICKING = 524288,	// Flag for wall-sticking
	MASK_PRIMALSCREAM = 1048576,	// Alien is in range of active primal scream
	MASK_UMBRA = 2097152,		// In umbra
// When set on a visible player, player is digesting.  When set on invisible player, player is being digested
	MASK_DIGESTING = 4194304,	
	MASK_RECYCLING = 8388608,	// Building is recycling
	MASK_TOPDOWN = 16777216,	// Commander view
	MASK_PLAYER_STUNNED = 33554432,	// Player has been stunned by stomp
	MASK_ENSNARED = 67108864,	// Webbed
	MASK_ALIEN_EMBRYO = 268435456,	// Gestating
	MASK_SELECTABLE = 536870912,	// ???
	MASK_PARASITED = 1073741824,	// Parasite flag
	MASK_SENSORY_NEARBY = 2147483648	// Sensory chamber in range

}

Class Constants
enum {
	CLASS_UNKNOWN = 0,
	CLASS_SKULK,
	CLASS_GORGE,
	CLASS_LERK,
	CLASS_FADE,
	CLASS_ONOS,
	CLASS_MARINE,
	CLASS_JETPACK,
	CLASS_HEAVY,
	CLASS_COMMANDER,
	CLASS_GESTATE,
	CLASS_DEAD,
	CLASS_NOTEAM
}

Weapon Constants
enum {
	WEAPON_NONE = 0,
	WEAPON_CLAWS,
	WEAPON_SPIT,
	WEAPON_SPORES,
	WEAPON_SPIKE,
	WEAPON_BITE,
	WEAPON_BITE2,
	WEAPON_SWIPE,
	WEAPON_WEBSPINNER,
	WEAPON_METABOLIZE,
	WEAPON_PARASITE,
	WEAPON_BLINK,
	WEAPON_DIVINEWIND,
	WEAPON_KNIFE,
	WEAPON_PISTOL,
	WEAPON_LMG,
	WEAPON_SHOTGUN,
	WEAPON_HMG,
	WEAPON_WELDER,
	WEAPON_MINE,
	WEAPON_GRENADE_GUN,
	WEAPON_LEAP,
	WEAPON_CHARGE,
	WEAPON_UMBRA,
	WEAPON_PRIMALSCREAM,
	WEAPON_BILEBOMB,
	WEAPON_ACIDROCKET,
	WEAPON_HEALINGSPRAY,
	WEAPON_GRENADE,
	WEAPON_STOMP,
	WEAPON_DEVOUR,
	WEAPON_MAX
}

Hive Trait Constants
enum {
	HIVETRAIT_NONE	= 0,
	HIVETRAIT_DC	= 92,
	HIVETRAIT_SC	= 93,
	HIVETRAIT_MC	= 94
}

Functions
client_built - Called whenever the client build's a structure.
client_changeclass - Called whenever the client's class is changed.
client_changeteam - Called when a player's team entvar has changed.
client_spawn - Called when a player's deadflag entvar has changed from > 0 to 0 (when they spawn).
get_class - Same as ns_get_class.
get_mask - Same as ns_get_mask.
get_maxspeed - Same as ns_get_maxspeed.
get_res - Same as ns_get_res, except this returns an integer as opposed to a float.
get_spawn - Same as ns_get_spawn.
get_special - DEPRECATED. Same as ns_get_special.
get_speedchange - Same as ns_get_speedchange.
has_weapon - Same as ns_has_weapon.
is_combat - Same as ns_is_combat.
ns2amx_getammo - Same as ns_get_weap_reserve.
ns2amx_getenergy - Same as ns_get_energy, except this returns an integer as opposed to a float.
ns2amx_gethives - Returns total number of hives.
ns2amx_getjpfuel - Same as ns_get_jp_fuel, except this returns an integer as opposed to a float.
ns2amx_giveitem - Same as ns_give_item.
ns2amx_isdigesting - Returns whether or not the player has the MASK_DIGESTING flag set.
ns2amx_nspopup - Same as ns_popup, except length of message parameter.
ns2amx_setammo - Same as ns_set_weap_reserve.
ns2amx_setjpfuel - Same as ns_set_jp_fuel, except this takes value as an integer as opposed to a float.
ns2amx_setres - Same as ns_set_res.
ns_get_build - Returns built/unbuilt structures.
ns_get_class - Returns the class of the player.
ns_get_deaths - Gets a player's death count.
ns_get_energy - Returns a player's percentage of adrenaline. (alien players only)
ns_get_ent - DEPRECATED. Returns the number of specified entities in the map.
ns_get_exp - Returns a player's experience. (combat maps only)
ns_get_hive_trait - Gets the trait type tied to the hive.
ns_get_jpfuel - Returns a player's percentage of JP fuel.
ns_get_mask - Returns whether or not this mask is set from the entity's iuser4 field.
ns_get_maxspeed - Returns a player's maxspeed.
ns_get_points - Gets a player's point spent value in combat.
ns_get_res - Returns a player's resources.
ns_get_score - Gets a player's score.
ns_get_spawn - Gets spawn points for specified team.
ns_get_speedchange - Returns the speed change of a player.
ns_get_struct_owner - Gets the index of the owner of a structure.
ns_get_weap_clip - Gets a weapon's clip ammo.
ns_get_weap_dmg - Gets a weapon's damage.
ns_get_weap_range - Gets a weapon's range.
ns_get_weap_reserve - Gets the player's weapon reserve for the specified type of weapon.
ns_give_item - Give a player an item.
ns_has_weapon - Returns if the player has the weapon or not in their pev->weapons field.
ns_is_combat - Returns 1 if the map is in combat, 0 otherwise.
ns_popup - Sends a popup to a player.
ns_set_deaths - Sets a player's death count.
ns_set_energy - Sets a player's percentage of adrenaline. (alien players only)
ns_set_exp - Set's a player's experience. (combat maps only)
ns_set_fov - Sets the players field of view.
ns_set_hive_trait - Sets the trait type tied to the hive.
ns_set_jpfuel - Sets a player's percentage of JP fuel.
ns_set_mask - Sets or removes the mask from the entity's iuser4 field.
ns_set_menu - DEPRECATED. Configures display of the custom menus.
ns_set_player_body - Sets a player's body.
ns_set_player_model - Sets a player's model.
ns_set_player_skin - Sets a player's skin.
ns_set_points - Sets a player's point spent value in combat.
ns_set_res - Sets a player's resources. (alien players only)
ns_set_score - Sets a player's score.
ns_set_speedchange - Used to change a player's speed change.
ns_set_struct_owner - Sets the index of the owner of a structure.
ns_set_weap_clip - Sets a weapon's clip ammo.
ns_set_weap_dmg - Sets a weapon's damage.
ns_set_weap_range - Sets a weapon's range.
ns_set_weap_reserve - Sets the player's weapon reserve for the specified type of weapon.
ns_show_menu - DEPRECATED. Displays a custom menu.
ns_spawn_player - DEPRECATED. Forces a player to spawn.
set_mask - Same as ns_set_mask.
set_player_body - Same as ns_set_player_body.
set_player_model - Same as ns_set_player_model.
set_player_skin - Same as ns_set_player_skin.
set_speedchange - Same as ns_set_speedchange.