AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to block animation? (https://forums.alliedmods.net/showthread.php?t=173962)

Bos93 12-13-2011 10:43

How to block animation?
 
How to block animation for a knife?


PHP Code:

#include <amxmodx>
#include <fakemeta>

public plugin_init ( )
    
register_forward(FM_UpdateClientData"UpdateClientData_Post"1)

public 
UpdateClientData_Post PlayerSendWeaponsCD_Handle )
{
    if (!
is_user_alive(Player)) return FMRES_IGNORED

    
if( get_user_weaponPlayer ) != CSW_KNIFE ) return FMRES_IGNORED

    set_cd
(CD_HandleCD_ID0);

    return 
FMRES_HANDLED


So animation is blocked on all weapons :(

Snaker beatter 12-13-2011 10:46

Re: How to block animation?
 
Not sure if works:
PHP Code:

public UpdateClientData_Post PlayerSendWeaponsCD_Handle 

    if (!
is_user_alive(Player)) return FMRES_IGNORED 

    
if( get_user_weaponPlayer ) != CSW_KNIFE ) return FMRES_IGNORED 

    set_cd
(CD_HandleCD_ID0); 

    return 
FMRES_IGNORED;



JoKeR LauGh 12-13-2011 13:06

Re: How to block animation?
 
you changed nothing?

joshknifer 12-13-2011 13:18

Re: How to block animation?
 
Quote:

Originally Posted by JoKeR LauGh (Post 1612554)
you changed nothing?

he changed:

PHP Code:

return FMRES_HANDLED 

:arrow:

PHP Code:

return FMRES_IGNORED


Bos93 12-13-2011 13:29

Re: How to block animation?
 
Nothing has changed

Snaker beatter 12-18-2011 03:42

Re: How to block animation?
 
If i revived sorry

Code:

public UpdateClientData_Post ( Player, SendWeapons, CD_Handle )
{
    if (!is_user_alive(Player)) return FMRES_IGNORED

    if( get_user_weapon( Player ) == CSW_KNIFE ) return FMRES_IGNORED

    set_cd(CD_Handle, CD_ID, 0);

    return FMRES_IGNORED;
}



All times are GMT -4. The time now is 11:52.

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