Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include sdktools
- Handle sdkOnStaggered;
- public OnPluginStart()
- {
- Handle hGameConf = LoadGameConfigFile("l4d_direct");
- if( hGameConf == null )
- SetFailState("342423");
- HookEvent("player_shoved", EventShove);
- StartPrepSDKCall(SDKCall_Player);
- PrepSDKCall_SetFromConf(hGameConf, SDKConf_Signature, "CTerrorPlayer::OnStaggered");
- PrepSDKCall_AddParameter(SDKType_CBaseEntity, SDKPass_Pointer);
- PrepSDKCall_AddParameter(SDKType_Vector, SDKPass_ByRef);
- sdkOnStaggered = EndPrepSDKCall();
- }
- public Action EventShove(Event event, const char[] name, bool dontBroadcast)
- {
- int attacker = GetClientOfUserId(event.GetInt("attacker"));
- int victim = GetClientOfUserId(event.GetInt("userid"));
- new Float:attacker_origin[3];
- GetEntPropVector(attacker, Prop_Data, "m_vecOrigin", attacker_origin);
- SDKCall(sdkOnStaggered, victim, attacker, attacker_origin);
- }
Advertisement
Add Comment
Please, Sign In to add comment