Quote:
Originally Posted by OciXCrom
That made it shoot out more bullets, but still no sound and visual effect.
Code:
public Action Cmd_TestShoot(int id, int iArgs)
{
g_bForceShoot = true
g_iCurrentCalls = 10
return Plugin_Handled
}
public Action OnPlayerRunCmd(id, &iButtons)
{
if(g_bForceShoot)
{
PrintToChat(id, "Force shoot %i", g_iCurrentCalls)
iButtons &= ~IN_RELOAD
iButtons |= IN_ATTACK
if(--g_iCurrentCalls <= 0)
{
g_bForceShoot = false
g_bCheckNextShot = true
}
return Plugin_Changed
}
else if(g_bForceReload && GetGameTime() >= g_fDoReload)
{
PrintToChat(id, "Force reload")
g_bForceReload = false
iButtons &= ~IN_ATTACK
iButtons |= IN_RELOAD
return Plugin_Changed
}
return Plugin_Continue
}
|
The sound is not played because of the client prediction, try using the plugin with
cl_predict set to 0, I'm not sure if you can fix this server side (if not playing the sound manually when shooting).
__________________