Added EquipPlayerWeapon to SDKTools. Offsets for CS:S and TF2 added.
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401975
This commit is contained in:
parent
b9bd1b1037
commit
fbe46934a4
@ -871,6 +871,29 @@ static cell_t GetServerNetStats(IPluginContext *pContext, const cell_t *params)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static cell_t WeaponEquip(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
static ValveCall *pCall = NULL;
|
||||
if (!pCall)
|
||||
{
|
||||
ValvePassInfo pass[1];
|
||||
InitPass(pass[0], Valve_CBaseEntity, PassType_Basic, PASSFLAG_BYVAL);
|
||||
if (!CreateBaseCall("WeaponEquip", ValveCall_Player, NULL, pass, 1, &pCall))
|
||||
{
|
||||
return pContext->ThrowNativeError("\"WeaponEquip\" not supported by this mod");
|
||||
} else if (!pCall) {
|
||||
return pContext->ThrowNativeError("\"WeaponEquip\" wrapper failed to initialized");
|
||||
}
|
||||
}
|
||||
|
||||
START_CALL();
|
||||
DECODE_VALVE_PARAM(1, thisinfo, 0);
|
||||
DECODE_VALVE_PARAM(2, vparams, 0);
|
||||
FINISH_CALL_SIMPLE(NULL);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
sp_nativeinfo_t g_Natives[] =
|
||||
{
|
||||
{"ExtinguishEntity", ExtinguishEntity},
|
||||
@ -895,5 +918,6 @@ sp_nativeinfo_t g_Natives[] =
|
||||
{"SetEntityModel", sm_SetEntityModel},
|
||||
{"GetPlayerDecalFile", GetPlayerDecalFile},
|
||||
{"GetServerNetStats", GetServerNetStats},
|
||||
{"EquipPlayerWeapon", WeaponEquip},
|
||||
{NULL, NULL},
|
||||
};
|
||||
|
@ -276,6 +276,11 @@
|
||||
"windows" "34"
|
||||
"linux" "35"
|
||||
}
|
||||
"WeaponEquip"
|
||||
{
|
||||
"windows" "227"
|
||||
"linux" "228"
|
||||
}
|
||||
}
|
||||
}
|
||||
/* EntityFactoryDictionary function */
|
||||
@ -291,4 +296,21 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
/* CBaseEntityOutput::FireOutput */
|
||||
"#default"
|
||||
{
|
||||
"#supported"
|
||||
{
|
||||
"game" "tf"
|
||||
}
|
||||
"Signatures"
|
||||
{
|
||||
"FireEvent"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x81\xEC\x1C\x01\x00\x00\x53\x55\x56\x8B\x71\x14\x85\xF6"
|
||||
"linux" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -332,6 +332,11 @@
|
||||
"windows" "25"
|
||||
"linux" "26"
|
||||
}
|
||||
"WeaponEquip"
|
||||
{
|
||||
"windows" "217"
|
||||
"linux" "218"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1693,5 +1698,22 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
/* CBaseEntityOutput::FireOutput */
|
||||
"#default"
|
||||
{
|
||||
"#supported"
|
||||
{
|
||||
"game" "cstrike"
|
||||
}
|
||||
"Signatures"
|
||||
{
|
||||
"FireEvent"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x81\xEC\x1C\x03\x00\x00\x53\x55\x56\x8B\x71\x14"
|
||||
"linux" "@_ZN17CBaseEntityOutput10FireOutputE9variant_tP11CBaseEntityS2_f"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -283,3 +283,15 @@ native bool:GetPlayerDecalFile(client, String:hex[], maxlength);
|
||||
* @noreturn
|
||||
*/
|
||||
native GetServerNetStats(&Float:in, &Float:out);
|
||||
|
||||
|
||||
/**
|
||||
* Equip's a player's weapon.
|
||||
*
|
||||
* @param client Client index.
|
||||
* @param item CBaseCombatWeapon entity index.
|
||||
* @noreturn
|
||||
* @error Invalid client or entity, lack of mod support, or client not in
|
||||
* game.
|
||||
*/
|
||||
native EquipPlayerWeapon(client, weapon);
|
||||
|
Loading…
Reference in New Issue
Block a user