added datamap property offset native

added clientofuserid native for fast userid to client id translation
fixed a memory leek (some tries weren't being deleted)
added createdialog native
added 2 million inetchannelinfo wrappers

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40688
This commit is contained in:
Borja Ferrer
2007-04-12 00:45:53 +00:00
parent 4ecb7a985f
commit 21923d7871
16 changed files with 757 additions and 33 deletions
+7 -7
View File
@@ -229,13 +229,13 @@ namespace SourceMod
virtual bool AddFunction(IPluginContext *ctx, funcid_t index) =0;
/**
* @brief Removes a function from the call list.
* NOTE: Only removes one instance.
*
* @param ctx Context to use as a look-up.
* @param index Function id to add.
* @return Whether or not the function was removed.
*/
* @brief Removes a function from the call list.
* NOTE: Only removes one instance.
*
* @param ctx Context to use as a look-up.
* @param index Function id to add.
* @return Whether or not the function was removed.
*/
virtual bool RemoveFunction(IPluginContext *ctx, funcid_t index) =0;
};
+8
View File
@@ -244,6 +244,14 @@ namespace SourceMod
* @return Current number of connected clients.
*/
virtual int GetNumPlayers() =0;
/**
* @brief Returns the client index by its userid.
*
* @param userid Userid of the client.
* @return Client index, or 0 if invalid userid passed.
*/
virtual int GetClientOfUserId(int userid) =0;
};
}
+28 -12
View File
@@ -23,13 +23,18 @@
* @brief Defines miscellanious helper functions useful to extensions.
*/
#include <IShareSys.h>
#include <IHandleSys.h>
#include <sp_vm_api.h>
#include <IDataPack.h>
#define SMINTERFACE_SOURCEMOD_NAME "ISourceMod"
#define SMINTERFACE_SOURCEMOD_VERSION 1
/**
* @brief Forward declaration of the KeyValues class.
*/
class KeyValues;
namespace SourceMod
{
/**
@@ -133,18 +138,29 @@ namespace SourceMod
*/
virtual void FreeDataPack(IDataPack *pack) =0;
/**
* @brief Returns the automated data pack handle type.
*
* The readonly data type is the parent of the writable type.
* Note that calling CloseHandle() on either type will release the data pack.
* The readonly type is inheritable, but due to limitations of the Handle System,
* the writable type is not.
*
* @param readonly If true, the readonly type will be returned.
* @return The Handle type for storing generic data packs.
*/
/**
* @brief Returns the automated data pack handle type.
*
* The readonly data type is the parent of the writable type.
* Note that calling CloseHandle() on either type will release the data pack.
* The readonly type is inheritable, but due to limitations of the Handle System,
* the writable type is not.
*
* @param readonly If true, the readonly type will be returned.
* @return The Handle type for storing generic data packs.
*/
virtual HandleType_t GetDataPackHandleType(bool readonly=false) =0;
/**
* @brief Retrieves a KeyValues pointer from a handle.
*
* @param hndl Handle_t from which to retrieve contents.
* @param err Optional address to store a possible handle error.
* @param root If true it will return the root KeyValues pointer for the whole structure.
*
* @return The KeyValues pointer, or NULL for any error encountered.
*/
virtual KeyValues *ReadKeyValuesHandle(Handle_t hndl, HandleError *err=NULL, bool root=false) =0;
};
}