extensions/sdktools/vnatives.cpp
changeset 1720 6a9ff57fb9f9
parent 1628 3fd76ba845b8
child 1769 7a3f09643820
     1.1 --- a/extensions/sdktools/vnatives.cpp	Sat Nov 24 03:28:33 2007 +0000
     1.2 +++ b/extensions/sdktools/vnatives.cpp	Sat Nov 24 18:17:00 2007 +0000
     1.3 @@ -802,6 +802,29 @@
     1.4  	return GetClientAimTarget(pPlayer->GetEdict(), params[2] ? true : false);
     1.5  }
     1.6  
     1.7 +static cell_t sm_SetEntityModel(IPluginContext *pContext, const cell_t *params)
     1.8 +{
     1.9 +	static ValveCall *pCall = NULL;
    1.10 +	if (!pCall)
    1.11 +	{
    1.12 +		ValvePassInfo pass[1];
    1.13 +		InitPass(pass[0], Valve_String, PassType_Basic, PASSFLAG_BYVAL);
    1.14 +		if (!CreateBaseCall("SetEntityModel", ValveCall_Entity, NULL, pass, 1, &pCall))
    1.15 +		{
    1.16 +			return pContext->ThrowNativeError("\"SetEntityModel\" not supported by this mod");
    1.17 +		} else if (!pCall) {
    1.18 +			return pContext->ThrowNativeError("\"SetEntityModel\" wrapper failed to initialized");
    1.19 +		}
    1.20 +	}
    1.21 +
    1.22 +	START_CALL();
    1.23 +	DECODE_VALVE_PARAM(1, thisinfo, 0);
    1.24 +	DECODE_VALVE_PARAM(2, vparams, 0);
    1.25 +	FINISH_CALL_SIMPLE(NULL);
    1.26 +
    1.27 +	return 1;
    1.28 +}
    1.29 +
    1.30  sp_nativeinfo_t g_Natives[] = 
    1.31  {
    1.32  	{"ExtinguishPlayer",		ExtinguishEntity},
    1.33 @@ -826,5 +849,6 @@
    1.34  	{"DispatchKeyValueFloat",	DispatchKeyValueFloat},
    1.35  	{"DispatchKeyValueVector",	DispatchKeyValueVector},
    1.36  	{"GetClientAimTarget",		sm_GetClientAimTarget},
    1.37 +	{"SetEntityModel",			sm_SetEntityModel},
    1.38  	{NULL,						NULL},
    1.39  };