added amb444 - ForcePlayerSuicide()
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401157
This commit is contained in:
parent
30b475ef35
commit
a57acce746
@ -274,6 +274,26 @@ static cell_t TeleportPlayer(IPluginContext *pContext, const cell_t *params)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static cell_t ForcePlayerSuicide(IPluginContext *pContext, const cell_t *params)
|
||||||
|
{
|
||||||
|
static ValveCall *pCall = NULL;
|
||||||
|
if (!pCall)
|
||||||
|
{
|
||||||
|
if (!CreateBaseCall("CommitSuicide", ValveCall_Player, NULL, NULL, 0, &pCall))
|
||||||
|
{
|
||||||
|
return pContext->ThrowNativeError("\"CommitSuicide\" not supported by this mod");
|
||||||
|
} else if (!pCall) {
|
||||||
|
return pContext->ThrowNativeError("\"CommitSuicide\" wrapper failed to initialized");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
START_CALL();
|
||||||
|
DECODE_VALVE_PARAM(1, thisinfo, 0);
|
||||||
|
FINISH_CALL_SIMPLE(NULL);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static cell_t SetClientViewEntity(IPluginContext *pContext, const cell_t *params)
|
static cell_t SetClientViewEntity(IPluginContext *pContext, const cell_t *params)
|
||||||
{
|
{
|
||||||
IGamePlayer *player = playerhelpers->GetGamePlayer(params[1]);
|
IGamePlayer *player = playerhelpers->GetGamePlayer(params[1]);
|
||||||
@ -301,6 +321,7 @@ sp_nativeinfo_t g_Natives[] =
|
|||||||
{
|
{
|
||||||
{"ExtinguishPlayer", ExtinguishPlayer},
|
{"ExtinguishPlayer", ExtinguishPlayer},
|
||||||
{"ExtinguishEntity", ExtinguishPlayer},
|
{"ExtinguishEntity", ExtinguishPlayer},
|
||||||
|
{"ForcePlayerSuicide", ForcePlayerSuicide},
|
||||||
{"GivePlayerItem", GiveNamedItem},
|
{"GivePlayerItem", GiveNamedItem},
|
||||||
{"GetPlayerWeaponSlot", GetPlayerWeaponSlot},
|
{"GetPlayerWeaponSlot", GetPlayerWeaponSlot},
|
||||||
{"IgnitePlayer", IgnitePlayer},
|
{"IgnitePlayer", IgnitePlayer},
|
||||||
|
@ -134,6 +134,11 @@
|
|||||||
"windows" "98"
|
"windows" "98"
|
||||||
"linux" "99"
|
"linux" "99"
|
||||||
}
|
}
|
||||||
|
"CommitSuicide"
|
||||||
|
{
|
||||||
|
"windows" "357"
|
||||||
|
"linux" "358"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -172,6 +177,11 @@
|
|||||||
"windows" "98"
|
"windows" "98"
|
||||||
"linux" "99"
|
"linux" "99"
|
||||||
}
|
}
|
||||||
|
"CommitSuicide"
|
||||||
|
{
|
||||||
|
"windows" "356"
|
||||||
|
"linux" "357"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -210,6 +220,11 @@
|
|||||||
"windows" "97"
|
"windows" "97"
|
||||||
"linux" "98"
|
"linux" "98"
|
||||||
}
|
}
|
||||||
|
"CommitSuicide"
|
||||||
|
{
|
||||||
|
"windows" "356"
|
||||||
|
"linux" "357"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -249,6 +264,11 @@
|
|||||||
"windows" "100"
|
"windows" "100"
|
||||||
"linux" "101"
|
"linux" "101"
|
||||||
}
|
}
|
||||||
|
"CommitSuicide"
|
||||||
|
{
|
||||||
|
"windows" "343"
|
||||||
|
"linux" "344"
|
||||||
|
}
|
||||||
|
|
||||||
/* Temp Entities */
|
/* Temp Entities */
|
||||||
"TE_GetServerClass"
|
"TE_GetServerClass"
|
||||||
@ -296,6 +316,11 @@
|
|||||||
"windows" "100"
|
"windows" "100"
|
||||||
"linux" "101"
|
"linux" "101"
|
||||||
}
|
}
|
||||||
|
"CommitSuicide"
|
||||||
|
{
|
||||||
|
"windows" "360"
|
||||||
|
"linux" "361"
|
||||||
|
}
|
||||||
|
|
||||||
/* Offset into CBaseTempEntity constructor.
|
/* Offset into CBaseTempEntity constructor.
|
||||||
* On Windows Dsytopia is heavily inlined; we use the function
|
* On Windows Dsytopia is heavily inlined; we use the function
|
||||||
@ -399,6 +424,11 @@
|
|||||||
"windows" "98"
|
"windows" "98"
|
||||||
"linux" "99"
|
"linux" "99"
|
||||||
}
|
}
|
||||||
|
"CommitSuicide"
|
||||||
|
{
|
||||||
|
"windows" "356"
|
||||||
|
"linux" "357"
|
||||||
|
}
|
||||||
|
|
||||||
/* Temp Entities */
|
/* Temp Entities */
|
||||||
"s_pTempEntities"
|
"s_pTempEntities"
|
||||||
|
@ -84,6 +84,15 @@ native ExtinguishEntity(client);
|
|||||||
*/
|
*/
|
||||||
native TeleportEntity(entity, const Float:origin[3], const Float:angles[3], const Float:velocity[3]);
|
native TeleportEntity(entity, const Float:origin[3], const Float:angles[3], const Float:velocity[3]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Forces a player to commit suicide.
|
||||||
|
*
|
||||||
|
* @param client Client index.
|
||||||
|
* @noreturn
|
||||||
|
* @error Invalid entity or client not in game, or lack of mod support.
|
||||||
|
*/
|
||||||
|
native ForcePlayerSuicide(client);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user