View Single Post
Papero
Veteran Member
Join Date: Aug 2016
Location: Italy
Old 12-18-2020 , 08:03   Re: [CS:GO] Force shoot & reload
Reply With Quote #11

Quote:
Originally Posted by OciXCrom View Post
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).
__________________
My Plugins
SPCode


Steam: hexer504
Telegram: Hexah
Discord: Hexah#6903

If you like my work you can donate here!
Papero is offline