Raised This Month: $30 Target: $400
 7% 

[CSGO]Block weapon reload event transmit ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
1254871688
Junior Member
Join Date: Nov 2016
Old 01-06-2022 , 15:46   [CSGO]Block weapon reload event transmit ?
Reply With Quote #1

in a zombie mod server, if you have a lot of teammate def one place you will always hear their reload sound (clipin \clipout\ bolt) that was annoying
I tried sound hook but it did not work , after search for more infomation , i found that these sound are client side.
but one of my friend told me , when he played in a zombie server before ,he can not hear any reload sound from his teammate because he did not see any reloading animation on his teammate
so it means, when you reload your weapon, other player can not see your thirdperson reloading animation
I realized that if we block weapon reload event transmit to other player , no animation = no sound
but how to do that?
weapon_reload seems not work
any idea?

Last edited by 1254871688; 01-06-2022 at 16:30.
1254871688 is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 01-06-2022 , 15:58   Re: [CSGO]Block weapon reload event transmit ?
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?t=300730
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
1254871688
Junior Member
Join Date: Nov 2016
Old 01-06-2022 , 16:29   Re: [CSGO]Block weapon reload event transmit ?
Reply With Quote #3

Quote:
Originally Posted by eyal282 View Post
i see that post , that is for viewmodel reload speed , seems not work on thirdperson (other player still see your reload animation on your playermodel and hear the sound)
1254871688 is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 01-06-2022 , 18:26   Re: [CSGO]Block weapon reload event transmit ?
Reply With Quote #4

Block reload sounds
PHP Code:

public void OnPluginStart()
{
    
UserMsg msg GetUserMessageId("WeaponSound");

    if(
msg != INVALID_MESSAGE_ID)
        
HookUserMessage(msgusermsg_hooktrue);

}

public 
Action usermsg_hook(UserMsg msg_idProtobuf msg, const int[] playersint playersNumbool reliablebool init)
{
    
char buffer[60];
    
//GetUserMessageName(msg_id, buffer, sizeof(buffer));
    //PrintToServer("msg_id %s", buffer);

    
msg.ReadInt("entidx");
    
msg.ReadFloat("origin_x");
    
msg.ReadFloat("origin_y");
    
msg.ReadFloat("origin_z");
    
msg.ReadString("sound"buffersizeof(buffer));
    
msg.ReadFloat("timestamp");
    
    
//PrintToServer("-WeaponSound %s", buffer);
    
return Plugin_Handled;

*edit
Maybe I am wrong, I assume now, blocking weapon reload animation work in Counter-Strike: Source game,
CS:GO again seems not use that reload usermessage.

One of reasons why people need mention in they forum topic, what a game it is.
__________________
Do not Private Message @me

Last edited by Bacardi; 01-06-2022 at 18:33.
Bacardi is offline
1254871688
Junior Member
Join Date: Nov 2016
Old 01-07-2022 , 05:27   Re: [CSGO]Block weapon reload event transmit ?
Reply With Quote #5

Quote:
Originally Posted by Bacardi View Post
Block reload sounds
PHP Code:

public void OnPluginStart()
{
    
UserMsg msg GetUserMessageId("WeaponSound");

    if(
msg != INVALID_MESSAGE_ID)
        
HookUserMessage(msgusermsg_hooktrue);

}

public 
Action usermsg_hook(UserMsg msg_idProtobuf msg, const int[] playersint playersNumbool reliablebool init)
{
    
char buffer[60];
    
//GetUserMessageName(msg_id, buffer, sizeof(buffer));
    //PrintToServer("msg_id %s", buffer);

    
msg.ReadInt("entidx");
    
msg.ReadFloat("origin_x");
    
msg.ReadFloat("origin_y");
    
msg.ReadFloat("origin_z");
    
msg.ReadString("sound"buffersizeof(buffer));
    
msg.ReadFloat("timestamp");
    
    
//PrintToServer("-WeaponSound %s", buffer);
    
return Plugin_Handled;

*edit
Maybe I am wrong, I assume now, blocking weapon reload animation work in Counter-Strike: Source game,
CS:GO again seems not use that reload usermessage.

One of reasons why people need mention in they forum topic, what a game it is.

tested ,works on CSGO
1254871688 is offline
Reply


Thread Tools
Display Modes

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 01:48.


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