Raised This Month: $ Target: $400
 0% 

Change "draw" animation.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 03-30-2009 , 12:44   Change "draw" animation.
Reply With Quote #1

How to change from one model "draw" animation to another.
In PreThink I've tryied(Doesn't work):
PHP Code:
///PRETHINK////        
new iAnim pev(idpev_weaponanim)
if( 
iAnim == 3)
            {
                
Set_Weapon_Animation(id_9)
            }


///STOCK////
Set_Weapon_Animation(id=0iEnt=0iAnim)
{
    if( 
id || (iEnt && (id pev(iEntpev_owner))) )
    {
        
set_pev(idpev_weaponanimiAnim)

        
message_begin(MSG_ONESVC_WEAPONANIM_id)
        
write_byte(iAnim)
        
write_byte(pev(idpev_body))
        
message_end()
    }

xbatista is offline
Send a message via Skype™ to xbatista
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-30-2009 , 13:19   Re: Change "draw" animation.
Reply With Quote #2

Try something that :http://forums.alliedmods.net/showthr...377#post792377
Arkshine is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 03-30-2009 , 13:24   Re: Change "draw" animation.
Reply With Quote #3

Nothing happens.

Last edited by xbatista; 03-30-2009 at 13:34.
xbatista is offline
Send a message via Skype™ to xbatista
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-30-2009 , 13:36   Re: Change "draw" animation.
Reply With Quote #4

Show your code, what you say doesn't help at all...
Arkshine is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 03-30-2009 , 13:38   Re: Change "draw" animation.
Reply With Quote #5

PHP Code:
public UpdateClientDataidiSendWeaponscd_handle )
{
    new 
weapon get_user_weapon(id__);
    new 
anim get_cdcd_handle CD_WeaponAnim );
    if( 
anim == && weapon == CSW_SCOUT)
    {
        
set_cdcd_handle CD_WeaponAnim );
        return 
FMRES_OVERRIDE;
    }
    return 
FMRES_IGNORED;

And other methode tryied:
PHP Code:
public FwdPlayerPreThink(id)
{
    new 
weapon get_user_weapon(id__);
    if(
is_user_alive(id) && weapon == CSW_SCOUT)
    {
        if( 
pev(idpev_weaponanim) == 3)
        {
            
Set_Weapon_Animation(id_9)
        }
    }
}
Set_Weapon_Animation(id=0iEnt=0iAnim

    if( 
id || (iEnt && (id pev(iEntpev_owner))) ) 
    { 
        
set_pev(idpev_weaponanimiAnim

        
message_begin(MSG_ONESVC_WEAPONANIM_id
        
write_byte(iAnim
        
write_byte(pev(idpev_body)) 
        
message_end() 
    } 

xbatista is offline
Send a message via Skype™ to xbatista
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 03-30-2009 , 14:00   Re: Change "draw" animation.
Reply With Quote #6

Quote:
if( id || (iEnt && (id = pev(iEnt, pev_owner))) )
->
Code:
if ( id || ( iEnt && id == pev ( iEnt, pev_owner ) ) )
__________________

anakin_cstrike is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 03-30-2009 , 14:06   Re: Change "draw" animation.
Reply With Quote #7

Quote:
Originally Posted by anakin_cstrike View Post
->
Code:
if ( id || ( iEnt && id == pev ( iEnt, pev_owner ) ) )
He is purposely assigning the id, not checking it. So his way is correct.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Old 03-30-2009, 14:09
xbatista
This message has been deleted by xbatista.
Old 03-30-2009, 14:09
xbatista
This message has been deleted by xbatista.
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:15.


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