Code:
public Action:OnPlayerRunCmd(client, &buttons, &impulse, Float:vel[3], Float:angles[3], &weapon)
{
if (!buttons)
return Plugin_Continue;
if (!IsClientInGame(client) || IsFakeClient(client) || GetClientTeam(client) != 3
|| GetEntProp(client, Prop_Send, "m_zombieClass") != 8)
return Plugin_Continue;
if (buttons & IN_RELOAD)
{
g_iQueuedThrow[client] = 3; //two hand overhand
buttons |= IN_ATTACK2;
}
else if (buttons & IN_USE)
{
g_iQueuedThrow[client] = 2; //underhand
buttons |= IN_ATTACK2;
}
else
{
g_iQueuedThrow[client] = 1; //one hand overhand
}
return Plugin_Continue;
}
public Action:L4D2_OnSelectTankAttack(client, &sequence)
{
if ((sequence == 761 || sequence == 762) && g_iQueuedThrow[client])
{
//rock throw
sequence = g_iQueuedThrow[client] + 48;
return Plugin_Handled;
}
return Plugin_Continue;
}
I don’t understand what I'm doing wrong, but it doesn’t work) The rock throw animation is just buggy.
__________________