AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Server crash Ham_Weapon_SendWeaponAnim (https://forums.alliedmods.net/showthread.php?t=90223)

Empowers 04-15-2009 12:22

Server crash Ham_Weapon_SendWeaponAnim
 
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 :)

Arkshine 04-15-2009 13:09

Re: Server crash Ham_Weapon_SendWeaponAnim
 
This Ham is known to crash, like others ( Ham_Player_GetGunPosition if I remember ). All you can do is to file a bug report.

ConnorMcLeod 04-15-2009 13:54

Re: Server crash Ham_Weapon_SendWeaponAnim
 
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()
}


Empowers 04-15-2009 14:01

Re: Server crash Ham_Weapon_SendWeaponAnim
 
so it's not possible to block client weapon animation?

Arkshine 04-15-2009 14:04

Re: Server crash Ham_Weapon_SendWeaponAnim
 
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.

Empowers 04-15-2009 14:08

Re: Server crash Ham_Weapon_SendWeaponAnim
 
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

Arkshine 04-15-2009 14:58

Re: Server crash Ham_Weapon_SendWeaponAnim
 
If I'm not wron it only

You're wrong. To send a weapon animation ; engine set pev_weaponanim + SVC_WEAPONANIM.

ConnorMcLeod 04-15-2009 15:56

Re: Server crash Ham_Weapon_SendWeaponAnim
 
May you you can take the problem in another way.
Witch weapon anim do you want to block ?

Empowers 04-15-2009 16:13

Re: Server crash Ham_Weapon_SendWeaponAnim
 
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 :)

Arkshine 04-15-2009 16:27

Re: Server crash Ham_Weapon_SendWeaponAnim
 
You could try to play with FM_UpdateClientData and CD_WeaponAnim but I don't know really.


All times are GMT -4. The time now is 02:20.

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