1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/plugins/include/entity.inc Fri Mar 02 00:52:55 2007 +0000
1.3 @@ -0,0 +1,66 @@
1.4 +/**
1.5 + * vim: set ts=4 :
1.6 + * ===============================================================
1.7 + * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
1.8 + * ===============================================================
1.9 + *
1.10 + * This file is part of the SourceMod/SourcePawn SDK. This file may only be used
1.11 + * or modified under the Terms and Conditions of its License Agreement, which is found
1.12 + * in LICENSE.txt. The Terms and Conditions for making SourceMod extensions/plugins
1.13 + * may change at any time. To view the latest information, see:
1.14 + * http://www.sourcemod.net/license.php
1.15 + *
1.16 + * Version: $Id$
1.17 + */
1.18 +
1.19 +#if defined _entity_included
1.20 + #endinput
1.21 +#endif
1.22 +#define _entity_included
1.23 +
1.24 +/**
1.25 + * Returns the maximum number of entities.
1.26 + *
1.27 + * @return Maximum number of entities.
1.28 + */
1.29 +native GetMaxEntities();
1.30 +
1.31 +/**
1.32 + * Returns the number of entities in the server.
1.33 + *
1.34 + * @return Number of entities in the server.
1.35 + */
1.36 +native GetEntityCount();
1.37 +
1.38 +/**
1.39 + * Returns whether or not an entity is valid. Returns false
1.40 + * if there is no matching CBaseEntity for this edict index.
1.41 + *
1.42 + * @param edict Index of the entity.
1.43 + * @return True if valid, false otherwise.
1.44 + */
1.45 +native bool:IsValidEntity(edict);
1.46 +
1.47 +/**
1.48 + * Returns whether or not an edict index is valid.
1.49 + *
1.50 + * @param edict Index of the edict.
1.51 + * @return True if valid, false otherwise.
1.52 + */
1.53 +native bool:IsValidEdict(edict);
1.54 +
1.55 +/**
1.56 + * Creates a new edict (the basis of a networkable entity)
1.57 + *
1.58 + * @return Index of the entity, 0 on failure.
1.59 + */
1.60 +native CreateEdict();
1.61 +
1.62 +/**
1.63 + * Removes an edict from the world.
1.64 + *
1.65 + * @param edict Index of the entity.
1.66 + * @noreturn
1.67 + * @error Invalid entity index.
1.68 + */
1.69 +native RemoveEdict(edict);