extensions/sdktools/vnatives.cpp
changeset 1151 71424ad456bc
parent 1106 dde0f433f650
child 1152 419824987e06
     1.1 --- a/extensions/sdktools/vnatives.cpp	Mon Jul 23 20:20:45 2007 +0000
     1.2 +++ b/extensions/sdktools/vnatives.cpp	Mon Jul 23 21:01:58 2007 +0000
     1.3 @@ -274,6 +274,26 @@
     1.4  	return 1;
     1.5  }
     1.6  
     1.7 +static cell_t ForcePlayerSuicide(IPluginContext *pContext, const cell_t *params)
     1.8 +{
     1.9 +	static ValveCall *pCall = NULL;
    1.10 +	if (!pCall)
    1.11 +	{
    1.12 +		if (!CreateBaseCall("CommitSuicide", ValveCall_Player, NULL, NULL, 0, &pCall))
    1.13 +		{
    1.14 +			return pContext->ThrowNativeError("\"CommitSuicide\" not supported by this mod");
    1.15 +		} else if (!pCall) {
    1.16 +			return pContext->ThrowNativeError("\"CommitSuicide\" wrapper failed to initialized");
    1.17 +		}
    1.18 +	}
    1.19 +
    1.20 +	START_CALL();
    1.21 +	DECODE_VALVE_PARAM(1, thisinfo, 0);
    1.22 +	FINISH_CALL_SIMPLE(NULL);
    1.23 +
    1.24 +	return 1;
    1.25 +}
    1.26 +
    1.27  static cell_t SetClientViewEntity(IPluginContext *pContext, const cell_t *params)
    1.28  {
    1.29  	IGamePlayer *player = playerhelpers->GetGamePlayer(params[1]);
    1.30 @@ -301,6 +321,7 @@
    1.31  {
    1.32  	{"ExtinguishPlayer",	ExtinguishPlayer},
    1.33  	{"ExtinguishEntity",	ExtinguishPlayer},
    1.34 +	{"ForcePlayerSuicide",	ForcePlayerSuicide},
    1.35  	{"GivePlayerItem",		GiveNamedItem},
    1.36  	{"GetPlayerWeaponSlot",	GetPlayerWeaponSlot},
    1.37  	{"IgnitePlayer",		IgnitePlayer},