Raised This Month: $ Target: $400
 0% 

Solved Wrong Shotgun Reload Animation


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 07-07-2017 , 10:03   Re: Wrong Shotgun Reload Animation
Reply With Quote #1

Yes. But you forgot to check in Reload method whether player has spas12.
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 07-07-2017 , 11:57   Re: Wrong Shotgun Reload Animation
Reply With Quote #2

Quote:
Originally Posted by NiHiLaNTh View Post
Yes. But you forgot to check in Reload method whether player has spas12.
Thank you ^^.
I fixed that problem but now I tried to change weapon speed but the Reload Animation is loop 2-3 times in 1 bullet load and it only stop at 8 ammo (maxium of normal weapon) but not 9 as I set it If I use this:
PHP Code:
public Event_CurWeapon(id)
{
    if(!
is_player(id1))
        return
    
    static 
CSWIDCSWID read_data(2)

    if((
CSWID == CSW_SPAS12 && g_OldWeapon[id] == CSW_SPAS12) && Get_BitVar(g_Had_Spas12id)) 
    {
        static 
EntEnt fm_get_user_weapon_entity(idCSW_SPAS12)
        if(!
pev_valid(Ent)) return
        
        
set_pdata_float(Ent46SPEED4)
        
set_pdata_float(Ent47SPEED4)
    }
    
    
g_OldWeapon[id] = CSWID

This one is work but on the server, the reload animation didn't work at all and if I hold attack button, the next attack time seem to be increase each bullet shoot
PHP Code:
public Event_CurWeapon(id)
{
    if(!
is_player(id1))
        return
    
    static 
CSWIDCSWID read_data(2)

    if((
CSWID == CSW_SPAS12 && g_OldWeapon[id] == CSW_SPAS12) && Get_BitVar(g_Had_Spas12id)) 
    {
        static 
EntEnt fm_get_user_weapon_entity(idCSW_SPAS12)
        if(!
pev_valid(Ent)) return
        
        
set_pdata_float(Ent46get_pdata_float(Ent464) * SPEED4)
        
set_pdata_float(Ent47get_pdata_float(Ent464) * SPEED4)
    }
    
    
g_OldWeapon[id] = CSWID

SOLVED: Set attack speed at Ham_Weapon_PrimaryAttack Post
__________________
My plugin:

Last edited by Celena Luna; 07-07-2017 at 12:52.
Celena Luna 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 23:10.


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