Raised This Month: $32 Target: $400
 8% 

[CS:GO] Force shoot & reload


Post New Thread Reply   
 
Thread Tools Display Modes
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
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-18-2020 , 09:29   Re: [CS:GO] Force shoot & reload
Reply With Quote #12

cl_predict was set to 0 the entire time, so that's not the issue. It doesn't matter if it can work serverside, I need this for my personal usage.
__________________

Last edited by OciXCrom; 12-18-2020 at 09:45.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-18-2020 , 16:33   Re: [CS:GO] Force shoot & reload
Reply With Quote #13

Or if there is a way to disable "cl_restrict_server_commands" which doesn't exist anymore and execute +attack and +reload manually, I can work with that too.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-25-2020 , 13:47   Re: [CS:GO] Force shoot & reload
Reply With Quote #14

I found a workaround by manually emitting the weapon's shooting sound.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 01-03-2021 , 14:20   Re: [CS:GO] Force shoot & reload
Reply With Quote #15

The animation is missing clientside only like the gunfire sound.

You could try to override the current weapon animation to show the animation clientside.
But this could come with a short delay on client side.
__________________

Last edited by zipcore; 01-03-2021 at 14:23.
zipcore is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-05-2021 , 07:40   Re: [CS:GO] Force shoot & reload
Reply With Quote #16

Quote:
Originally Posted by zipcore View Post
The animation is missing clientside only like the gunfire sound.

You could try to override the current weapon animation to show the animation clientside.
But this could come with a short delay on client side.
Could you show an example of how I can play a weapon animation? In this note, is it possible to play the gloves inspect animation that's shown when you unbox/inspect them?
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:16.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode