Raised This Month: $ Target: $400
 0% 

Weapon firing error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Lure.d
BANNED
Join Date: Dec 2009
Location: Lithuania->USA
Old 07-08-2010 , 14:58   Weapon firing error
Reply With Quote #1

Hi, I successfully made it to block reloading if ammo is 5 or > .
But when it comes to firing a weapon, i can't seem to make it.
I want it to be able to shoot each 1 seccond, and if it hasn't come i just returned
that it was handled by fakemeta( FMRES_HANDLED )

Thing is even THAT doesn't work, and when i shoot its just like a non-stopping 1ms
taking to shoot firing - its very fast, and ACTUALLY don't hit people, glass any other ent's.
So thats why im asking how to fix it, since i wan't the scout to fire each 1 second, not each 1ms...


PHP Code:
public fw_CmdStartclientuc_handleseed )
{
    
// Ignore dead/those who haven't our weapon
    
new ammoclipweapon get_user_weaponclientclipammo );
    if ( !
is_user_aliveclient ) || !g_has_scoutclient ] || weapon != CSW_SCOUT )
        return 
FMRES_IGNORED;
    
    
// Buttons    
    
new buttons get_ucuc_handleUC_Buttons );
    
    if( 
buttons IN_RELOAD )
    {
        if( 
clip >= )
        {
            
buttons &= ~IN_RELOAD;
            
set_ucuc_handleUC_Buttonsbuttons );
            return 
FMRES_HANDLED;
        }
    }
    
    if( 
buttons IN_ATTACK )
    {
        if( 
clip >= )
        {
            if( 
get_gametime( ) - g_lastclient ] > 1.0 )
            {
                
g_lastclient ] = get_gametime( );
                
cs_set_weapon_ammofind_ent_by_owner( -1"weapon_scout"client ), cs_get_weapon_ammoclient ) - );
                
buttons &= ~IN_ATTACK;
                
set_ucuc_handleUC_Buttonsbuttons );
                return 
FMRES_IGNORED;
            }
            else
            {
                
buttons &= ~IN_ATTACK;
                
set_ucuc_handleUC_Buttonsbuttons );
                return 
FMRES_HANDLED;
            }
        }
    }
    
    return 
FMRES_IGNORED;


Last edited by Lure.d; 07-08-2010 at 16:06.
Lure.d is offline
Send a message via Skype™ to Lure.d
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 07-08-2010 , 16:17   Re: Weapon firing error
Reply With Quote #2

isn't it
PHP Code:
FMRES_SUPERCEDE
when you are trying to block something?
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Lure.d
BANNED
Join Date: Dec 2009
Location: Lithuania->USA
Old 07-08-2010 , 16:49   Re: Weapon firing error
Reply With Quote #3

supercede work same good as handled on reload, and on firing its not changing anything ;)

Last edited by Lure.d; 07-08-2010 at 17:07.
Lure.d is offline
Send a message via Skype™ to Lure.d
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 07-08-2010 , 17:23   Re: Weapon firing error
Reply With Quote #4

If you want to change fire rate then take a look at this plugin:
http://forums.alliedmods.net/showthread.php?p=597185
__________________
Impossible is Nothing
Sylwester is offline
Lure.d
BANNED
Join Date: Dec 2009
Location: Lithuania->USA
Old 07-08-2010 , 18:42   Re: Weapon firing error
Reply With Quote #5

thanks! that's what i've been searching for
Lure.d is offline
Send a message via Skype™ to Lure.d
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 07:11.


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