Permalink
Browse files

Push ragdoll array instead of just the victim name

  • Loading branch information...
Bara committed Nov 24, 2018
1 parent d8a6b1a commit 313cc8a9a07bc214449298bb2cc7a234afb56d75
@@ -176,10 +176,10 @@ forward Action TTT_OnClientDeathPre(int victim, int attacker);
*
* @param client The client who identified the body.
* @param victim The client whom the body belongs to. (-1 for invalid index)
* @param deadPlayer The name of the victim.
* @param ragdoll The Array with Ragdoll informations (by reference).
* @param silentID True if body was silenced id and false if normal inspect
*/
forward void TTT_OnBodyFound(int client, int victim, const char[] deadPlayer, bool silentID);
forward void TTT_OnBodyFound(int client, int victim, int[] ragdoll, bool silentID);
/**
* Called before we create rules menu.
@@ -181,10 +181,10 @@ public Action TTT_OnClientDeathPre(int victim, int attacker)
LogMessage("(TTT_OnClientDeathPre) victim: %d - attacker: %d", victim, attacker);
}
public void TTT_OnBodyFound(int client, int victim, const char[] deadPlayer, bool silent)
public void TTT_OnBodyFound(int client, int victim, int[] ragdoll, bool silent)
{
LogMessage("TTT_OnBodyFound was called!");
LogMessage("(TTT_OnBodyFound) client: %d - victim: %d - deadPlayer: %s - silent: %b", client, victim, deadPlayer, silent);
LogMessage("(TTT_OnBodyFound) client: %d - victim: %d - ragdoll: %d - silent: %b", client, victim, ragdoll, silent);
}
public Action TTT_OnRulesMenu(int client, bool &show)
@@ -8,7 +8,7 @@ void InitForwards()
g_hOnTakeDamage = CreateGlobalForward("TTT_OnTakeDamage", ET_Ignore, Param_Cell, Param_Cell, Param_Float, Param_Cell, Param_Cell);
g_hOnClientDeath = CreateGlobalForward("TTT_OnClientDeath", ET_Ignore, Param_Cell, Param_Cell, Param_Cell);
g_hOnClientDeathPre = CreateGlobalForward("TTT_OnClientDeathPre", ET_Event, Param_Cell, Param_Cell);
g_hOnBodyFound = CreateGlobalForward("TTT_OnBodyFound", ET_Ignore, Param_Cell, Param_Cell, Param_String, Param_Cell);
g_hOnBodyFound = CreateGlobalForward("TTT_OnBodyFound", ET_Ignore, Param_Cell, Param_Cell, Param_Array, Param_Cell);
g_hOnBodyCheck = CreateGlobalForward("TTT_OnBodyCheck", ET_Event, Param_Cell, Param_Array);
g_hOnButtonPress = CreateGlobalForward("TTT_OnButtonPress", ET_Ignore, Param_Cell, Param_Cell);
g_hOnButtonRelease = CreateGlobalForward("TTT_OnButtonRelease", ET_Ignore, Param_Cell, Param_Cell);
@@ -3576,7 +3576,7 @@ public int TTT_OnButtonPress(int client, int button)
Call_PushCell(-1);
}
Call_PushString(iRagdollC[VictimName]);
Call_PushArrayEx(iRagdollC[0], sizeof(iRagdollC), SM_PARAM_COPYBACK);
Call_PushCell(silentID);
Call_Finish();
}
@@ -1106,7 +1106,7 @@ public void TTT_OnRoundEnd(int winner, Handle array)
}
}
public void TTT_OnBodyFound(int client, int victim, const char[] deadPlayer, bool silentID)
public void TTT_OnBodyFound(int client, int victim, int[] ragdoll, bool silentID)
{
if (!silentID || (g_cSilentIdRewards.BoolValue && silentID))
{

0 comments on commit 313cc8a

Please sign in to comment.