added amb1620 - ActivateEntity

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402068
This commit is contained in:
David Anderson
2008-04-16 23:29:03 +00:00
parent 726aa68be9
commit 946834b868
3 changed files with 103 additions and 3 deletions
+23
View File
@@ -894,6 +894,28 @@ static cell_t WeaponEquip(IPluginContext *pContext, const cell_t *params)
return 1;
}
static cell_t ActivateEntity(IPluginContext *pContext, const cell_t *params)
{
static ValveCall *pCall = NULL;
if (!pCall)
{
if (!CreateBaseCall("Activate", ValveCall_Entity, NULL, NULL, 0, &pCall))
{
return pContext->ThrowNativeError("\"Activate\" not supported by this mod");
}
else if (!pCall)
{
return pContext->ThrowNativeError("\"Activate\" wrapper failed to initialized");
}
}
START_CALL();
DECODE_VALVE_PARAM(1, thisinfo, 0);
FINISH_CALL_SIMPLE(NULL);
return 1;
}
sp_nativeinfo_t g_Natives[] =
{
{"ExtinguishEntity", ExtinguishEntity},
@@ -919,5 +941,6 @@ sp_nativeinfo_t g_Natives[] =
{"GetPlayerDecalFile", GetPlayerDecalFile},
{"GetServerNetStats", GetServerNetStats},
{"EquipPlayerWeapon", WeaponEquip},
{"ActivateEntity", ActivateEntity},
{NULL, NULL},
};