So combined with that stuff from Stop That Tank we have some neat stuff to play with
PHP Code:
/*
Animation Sequences
Thanks to Stop That Tank!
*/
static Handle:g_hSDKSendWeaponAnim;
static Handle:g_hSDKPlaySpecificSequence;
stock OnPluginStart_RegisterAnimData()
{
new Handle:hGameData = LoadGameConfigFile("anim.data");
if (hGameData == INVALID_HANDLE)
{
SetFailState("Unable to load required gamedata (anim.data.txt)");
}
// This call is used to play the knife blocked animation.
StartPrepSDKCall(SDKCall_Entity);
PrepSDKCall_SetFromConf(hGameData, SDKConf_Signature, "CTFWeaponBase::SendWeaponAnim");
PrepSDKCall_AddParameter(SDKType_PlainOldData, SDKPass_Plain);
g_hSDKSendWeaponAnim = EndPrepSDKCall();
if (g_hSDKSendWeaponAnim == INVALID_HANDLE)
{
StartPrepSDKCall(SDKCall_Entity);
PrepSDKCall_SetFromConf(hGameData, SDKConf_Virtual, "CTFWeaponBase::SendWeaponAnim");
PrepSDKCall_AddParameter(SDKType_PlainOldData, SDKPass_Plain);
g_hSDKSendWeaponAnim = EndPrepSDKCall();
if (g_hSDKSendWeaponAnim == INVALID_HANDLE)
{
LogMessage("Failed to create call: CTFWeaponBase::SendWeaponAnim!");
}
}
// This call is used to set the deploy animation on the robots with the bomb
StartPrepSDKCall(SDKCall_Player);
PrepSDKCall_SetFromConf(hGameData, SDKConf_Signature, "CTFPlayer::PlaySpecificSequence");
PrepSDKCall_AddParameter(SDKType_String, SDKPass_Pointer);
g_hSDKPlaySpecificSequence = EndPrepSDKCall();
if (g_hSDKPlaySpecificSequence == INVALID_HANDLE)
{
LogMessage("Failed to create call: CTFPlayer::PlaySpecificSequence!");
}
}
stock SDK_SendWeaponAnim(weapon, anim)
{
if (g_hSDKSendWeaponAnim != INVALID_HANDLE)
{
SDKCall(g_hSDKSendWeaponAnim, weapon, anim);
}
}
stock SDK_PlaySpecificSequence(client, String:strSequence[])
{
if (g_hSDKPlaySpecificSequence != INVALID_HANDLE)
{
SDKCall(g_hSDKPlaySpecificSequence, client, strSequence);
}
}
anim.data.txt
Code:
"Games"
{
"tf"
{
"Signatures"
{
"CTFPlayer::PlaySpecificSequence"
{
"library" "server"
"linux" "@_ZN9CTFPlayer20PlaySpecificSequenceEPKc"
"windows" "\x55\x8B\xEC\x83\xEC\x30\x53\x56\x8B\x75\x08\x57\x56\x8B\xF9\xE8\x2A\x2A\x2A\x2A\x8B\xD8\x83\xFB\xFF\x74\x2A\x8B\x35\x2A\x2A\x2A\x2A\x8B\xCE\x8B\x16\xFF\x52\x2A\x8B\x8F\x2A\x2A\x2A\x2A\x53\x6A\x13\x8B\x01\xFF\x50"
}
"CTFWeaponBase::SendWeaponAnim"
{
"library" "server"
"linux" "@_ZN13CTFWeaponBase14SendWeaponAnimEi"
}
}
"Offsets"
{
"CTFWeaponBase::SendWeaponAnim"
{
"library" "server"
"linux" "247"
"windows" "241"
}
}
}
}
Stun animation on knives when backstabbing Razorback.
PHP Code:
SDK_SendWeaponAnim(iWeapon, 0x61B);
They also have one for CTFPlayer::Taunt or w/e, dunno if it's any much different from things like what tauntem does though.
__________________