Im having trouble getting this mighty SDK Call to work.
As of now, calling it causes the server to crash instantly.
The sig, build, and arguments:
PHP Code:
/*
* CTerrorPlayer::Fling(Vector const&,PlayerAnimEvent_t,CBaseCombatCharacter *,float)
*
* Vector: how target is supposed to fly, Animevent is "76" for chargerbounce, CBasePlayer is Fling cause, float is Incap Animation time
*
*/
"CTerrorPlayer_Fling"
{
"library" "server"
"linux" "@_ZN13CTerrorPlayer5FlingERK6Vector17PlayerAnimEvent_tP20CBaseCombatCharacterf"
"windows" "\x81\xEC\x2A\x2A\x2A\x2A\x55\x57\x8B\xE9\x33\xFF\x57\x89\x2A\x2A\x2A\xE8"
/* 81 EC ? ? ? ? 55 57 8B E9 33 FF 57 89 ? ? ? E8 */
}
The SDKCall Prep (the error is most likely in here)
PHP Code:
StartPrepSDKCall(SDKCall_Player);
DebugPrintToAll("Fling Call prepped");
new bool:bFlingFuncLoaded = PrepSDKCall_SetFromConf(gconf, SDKConf_Signature, "CTerrorPlayer_Fling");
if(!bFlingFuncLoaded)
{
LogError("Could not load the Fling signature");
}
PrepSDKCall_AddParameter(SDKType_Vector, SDKPass_ByValue);
PrepSDKCall_AddParameter(SDKType_PlainOldData, SDKPass_Plain);
PrepSDKCall_AddParameter(SDKType_CBasePlayer, SDKPass_Pointer);
PrepSDKCall_AddParameter(SDKType_Float, SDKPass_Plain);
DebugPrintToAll("Fling Signature prepped");
fFling = EndPrepSDKCall();
if(fFling == INVALID_HANDLE)
{
LogError("Could not prep the Fling function");
}
Calling
SDKCall(fFling, target, vector, 76, attacker, 3.0);
crashes the server.
Any ideas?
There are no other functions involved in sending a Player flying when a Charger crashes into them, and i had it forwarded to get those arguments.