Raised This Month: $12 Target: $400
 3% 

[TUT] Replace Weapon Firing Sounds


Post New Thread Reply   
 
Thread Tools Display Modes
Depresie
Veteran Member
Join Date: Nov 2013
Old 08-15-2017 , 14:15   Re: [TUT] Replace Weapon Firing Sounds
Reply With Quote #21

Quote:
The only accurate snippet to change this fire sound correctly must be the weapon prediction override
I wasn't talking about prediction, I was talking about blocking the default firing function, and emulate the firing function by hooking the firing button, doing a trace line, sending animations, sounds, handle bullets, etc
__________________

Last edited by Depresie; 08-15-2017 at 14:16.
Depresie is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 08-21-2017 , 21:25   Re: [TUT] Replace Weapon Firing Sounds
Reply With Quote #22

Probably this way don't will work.

This is the correct way:

1° Hook FM_UpdateClientData (Post) and set_cd(cd_handle, CD_flNextAttack, get_gametime() + 0.001);
2° Hook FM_PrecacheEvent/FM_PlaybackEvent, precache the gun event (cstrike/events) and then do playback_event (engine);
3° Hook weapon actions (Ham_Weapon_[PrimaryAttack|SecondaryAttack|Reload] | Ham_Item_[Deploy|Holster] etc.), play animations and custom sounds;

Too complicated to explain now without time, but it's a base.

It's a good idea to make an API , probrably when I finish AvP or some other developer take this job...
__________________









Last edited by CrazY.; 08-21-2017 at 21:28.
CrazY. is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 08-22-2017 , 08:47   Re: [TUT] Replace Weapon Firing Sounds
Reply With Quote #23

Quote:
Originally Posted by CrazY. View Post
Probably this way don't will work.

This is the correct way:

1° Hook FM_UpdateClientData (Post) and set_cd(cd_handle, CD_flNextAttack, get_gametime() + 0.001);
2° Hook FM_PrecacheEvent/FM_PlaybackEvent, precache the gun event (cstrike/events) and then do playback_event (engine);
3° Hook weapon actions (Ham_Weapon_[PrimaryAttack|SecondaryAttack|Reload] | Ham_Item_[Deploy|Holster] etc.), play animations and custom sounds;

Too complicated to explain now without time, but it's a base.

It's a good idea to make an API , probrably when I finish AvP or some other developer take this job...
Quote:
weapon prediction override
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 08-22-2017 , 09:50   Re: [TUT] Replace Weapon Firing Sounds
Reply With Quote #24

O.o
__________________








CrazY. is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 08-23-2017 , 07:53   Re: [TUT] Replace Weapon Firing Sounds
Reply With Quote #25

Quote:
Originally Posted by CrazY. View Post
Probably this way don't will work.

This is the correct way:

1° Hook FM_UpdateClientData (Post) and set_cd(cd_handle, CD_flNextAttack, get_gametime() + 0.001);
2° Hook FM_PrecacheEvent/FM_PlaybackEvent, precache the gun event (cstrike/events) and then do playback_event (engine);
3° Hook weapon actions (Ham_Weapon_[PrimaryAttack|SecondaryAttack|Reload] | Ham_Item_[Deploy|Holster] etc.), play animations and custom sounds;

Too complicated to explain now without time, but it's a base.

It's a good idea to make an API , probrably when I finish AvP or some other developer take this job...
Doesn't make any sense...
__________________
Depresie is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 08-23-2017 , 11:36   Re: [TUT] Replace Weapon Firing Sounds
Reply With Quote #26

Really? Take a look at my weapons.
__________________








CrazY. is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-23-2017 , 12:00   Re: [TUT] Replace Weapon Firing Sounds
Reply With Quote #27

It makes sense, not a good method indeed, but yours is not that good too.
__________________

Last edited by HamletEagle; 08-23-2017 at 12:00.
HamletEagle is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 08-23-2017 , 15:07   Re: [TUT] Replace Weapon Firing Sounds
Reply With Quote #28

Well, I'm using this way, but I'm not sure if it's one of the best ways to do it.

Maybe you have some idea in mind, Hamlet...?
__________________








CrazY. is offline
Old 08-23-2017, 15:45
HamletEagle
This message has been deleted by HamletEagle. Reason: nevermind
Depresie
Veteran Member
Join Date: Nov 2013
Old 08-23-2017 , 16:05   Re: [TUT] Replace Weapon Firing Sounds
Reply With Quote #29

Still don't understand what he is explaining there..

Why would you just hook three events and do nothing ? then proceed to emit the sound on PrimaryAttack ?
__________________
Depresie is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-23-2017 , 17:25   Re: [TUT] Replace Weapon Firing Sounds
Reply With Quote #30

best way is to crack the engine hack it !! which its not allowed
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
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 19:25.


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