Raised This Month: $ Target: $400
 0% 

Server crash Ham_Weapon_SendWeaponAnim


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Empowers
BANNED
Join Date: Feb 2009
Location: Ukraine
Old 04-15-2009 , 12:22   Server crash Ham_Weapon_SendWeaponAnim
Reply With Quote #1

I have windows cstrike server and my Hamsandwich module is from www.amxmodx.org.


When Ham_Weapon_SendWeaponAnim is hooked my server crashes.. here is the code:
PHP Code:
#include <amxmodx>
#include <hamsandwich>

public plugin_init()
    
RegisterHam(Ham_Weapon_SendWeaponAnim,"weapon_glock18","go",1)

public 
go()
    
server_print("ANIM SENT"
When I'm hooking pre event the same result, When I'm changing entity to other weapon classname the same result.

Help me please

Last edited by Empowers; 04-15-2009 at 12:26.
Empowers is offline
Send a message via ICQ to Empowers
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-15-2009 , 13:09   Re: Server crash Ham_Weapon_SendWeaponAnim
Reply With Quote #2

This Ham is known to crash, like others ( Ham_Player_GetGunPosition if I remember ). All you can do is to file a bug report.
Arkshine is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-15-2009 , 13:54   Re: Server crash Ham_Weapon_SendWeaponAnim
Reply With Quote #3

And use a stock.
Code:
SendWeaponAnim(id, iAnim)
{
	set_pev(id, pev_weaponanim, iAnim)

	message_begin(MSG_ONE_UNRELIABLE, SVC_WEAPONANIM, _, id)
	write_byte(iAnim)
	write_byte(pev(id,pev_body))
	message_end()
}
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Empowers
BANNED
Join Date: Feb 2009
Location: Ukraine
Old 04-15-2009 , 14:01   Re: Server crash Ham_Weapon_SendWeaponAnim
Reply With Quote #4

so it's not possible to block client weapon animation?
Empowers is offline
Send a message via ICQ to Empowers
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-15-2009 , 14:04   Re: Server crash Ham_Weapon_SendWeaponAnim
Reply With Quote #5

Quote:
And use a stock
He wants to hook not to send.


Quote:
so it's not possible to block client weapon animation?
You could try to hook SVC_WEAPONANIM with register_message() but I doubt it will work since it's client-side.

Last edited by Arkshine; 04-15-2009 at 14:06.
Arkshine is offline
Empowers
BANNED
Join Date: Feb 2009
Location: Ukraine
Old 04-15-2009 , 14:08   Re: Server crash Ham_Weapon_SendWeaponAnim
Reply With Quote #6

SVC_WEAPONANIM?
If I'm not wron it only covers animantion that other player can see when looking at you.. ( not anim on your screen )

And animation on your screen can be changed by this: pev_weaponanim
Empowers is offline
Send a message via ICQ to Empowers
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-15-2009 , 14:58   Re: Server crash Ham_Weapon_SendWeaponAnim
Reply With Quote #7

If I'm not wron it only

You're wrong. To send a weapon animation ; engine set pev_weaponanim + SVC_WEAPONANIM.
Arkshine is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-15-2009 , 15:56   Re: Server crash Ham_Weapon_SendWeaponAnim
Reply With Quote #8

May you you can take the problem in another way.
Witch weapon anim do you want to block ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Empowers
BANNED
Join Date: Feb 2009
Location: Ukraine
Old 04-15-2009 , 16:13   Re: Server crash Ham_Weapon_SendWeaponAnim
Reply With Quote #9

Witch weapon anim do you want to block ?
PHP Code:
new ent get_current_weapon(id)
block_animation(ent,ANIM_WEAPON_SWITCH
somethink like that
Empowers is offline
Send a message via ICQ to Empowers
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-15-2009 , 16:27   Re: Server crash Ham_Weapon_SendWeaponAnim
Reply With Quote #10

You could try to play with FM_UpdateClientData and CD_WeaponAnim but I don't know really.
Arkshine 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 02:20.


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