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

Blocking weapon fire, including client-side sounds/animations


Post New Thread Reply   
 
Thread Tools Display Modes
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 10-01-2006 , 02:45   Re: Blocking weapon fire, including client-side sounds/animations
Reply With Quote #21

When do you trigger the animation to play?
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
P34nut
AMX Mod X Beta Tester
Join Date: Feb 2006
Location: Netherlands
Old 10-01-2006 , 07:31   Re: Blocking weapon fire, including client-side sounds/animations
Reply With Quote #22

we set the animation here
Code:
set_pev(id, pev_weaponanim, anim)

we play the animation here
Code:
message_begin(MSG_ONE, SVC_WEAPONANIM, {0, 0, 0}, id) write_byte(anim) write_byte(pev(id, pev_body)) message_end()

hope this will help you

P34nut
__________________
All you need to change the world is one good lie and a river of blood
P34nut is offline
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 10-02-2006 , 00:40   Re: Blocking weapon fire, including client-side sounds/animations
Reply With Quote #23

I mean "trigger" not set or play. I tryed hooking it in FM_CmdStart and also prethink but it doesnt play the animation.
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
P34nut
AMX Mod X Beta Tester
Join Date: Feb 2006
Location: Netherlands
Old 10-02-2006 , 11:30   Re: Blocking weapon fire, including client-side sounds/animations
Reply With Quote #24

ow srry

I did it in prethink for a fire animation or something

and draw in curweapon event
__________________
All you need to change the world is one good lie and a river of blood
P34nut is offline
KCE
Senior Member
Join Date: Jan 2005
Location: Los Angeles, CA
Old 10-02-2006 , 20:10   Re: Blocking weapon fire, including client-side sounds/animations
Reply With Quote #25

BTW, SVC_WEAPONANIM, seems to only be called weapon player switches weapon.

Also added a quick rundown of weapon ROF.

And is CmdStart called every frame?
__________________

My 3D Art: http://k-c-e.deviantart.com/

[img]http://img213.**************/img213/7132/userbar152416mp2.gif[/img]
[img]http://img65.**************/img65/5606/userbar152433ie5.gif[/img]
[img]http://img223.**************/img223/7576/userbar152440yk6.gif[/img]

Last edited by KCE; 10-02-2006 at 21:25.
KCE is offline
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 10-06-2006 , 03:29   Re: Blocking weapon fire, including client-side sounds/animations
Reply With Quote #26

SVC_WEAPONANIM when I did tests with it only works on bots for CS. How I know is I have a event hooker, hmm it should be released soon actually since AMXX 1.76 is now available.
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd

Last edited by Orangutanz; 11-15-2006 at 08:09.
Orangutanz is offline
schnitzelmaker
Senior Member
Join Date: Apr 2006
Location: HERE
Old 10-17-2006 , 09:13   Re: Blocking weapon fire, including client-side sounds/animations
Reply With Quote #27

Here where gabenmod have it from hlsdk(weapons.cpp):
Code:
void CBasePlayerWeapon::SendWeaponAnim( int iAnim, int skiplocal, int body )
{
	if ( UseDecrement() )
		skiplocal = 1;
	else
		skiplocal = 0;

	m_pPlayer->pev->weaponanim = iAnim;

#if defined( CLIENT_WEAPONS )
	if ( skiplocal && ENGINE_CANSKIP( m_pPlayer->edict() ) )
		return;
#endif

	MESSAGE_BEGIN( MSG_ONE, SVC_WEAPONANIM, NULL, m_pPlayer->pev );
		WRITE_BYTE( iAnim );						// sequence number
		WRITE_BYTE( pev->body );					// weaponmodel bodygroup.
	MESSAGE_END();
}
It need to set both pev and SVC_WEAPONANIM

Reload an deploy weapon use this function.
__________________

Last edited by schnitzelmaker; 10-17-2006 at 09:21.
schnitzelmaker is offline
The Specialist
BANNED
Join Date: Nov 2006
Old 11-15-2006 , 03:41   Re: Blocking weapon fire, including client-side sounds/animations
Reply With Quote #28

is there a way to use any of this to adjust a users Rate-Of-Fire. not blocking it but making it faster or slower ? so i can make a user fire faster or slower then normal .if so can you show me please and thank you

Last edited by The Specialist; 11-15-2006 at 04:05.
The Specialist is offline
Send a message via AIM to The Specialist
schnitzelmaker
Senior Member
Join Date: Apr 2006
Location: HERE
Old 11-15-2006 , 08:00   Re: Blocking weapon fire, including client-side sounds/animations
Reply With Quote #29

Look in the tutorial under: Method 2 - Modify the time until the next attack:
or under: Custom Weapon ROF (Rate-of-fire)
__________________
schnitzelmaker is offline
Rolnaaba
Veteran Member
Join Date: May 2006
Old 05-01-2007 , 08:16   Re: Blocking weapon fire, including client-side sounds/animations
Reply With Quote #30

what would be the normal value of CVAR_rof, if it didnt speed up or slow down the ROF?
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
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 11:10.


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