Raised This Month: $51 Target: $400
 12% 

[CSS] automatic => semi-automatic


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tom77
Junior Member
Join Date: Aug 2011
Old 06-14-2012 , 15:28   [CSS] automatic => semi-automatic
Reply With Quote #1

Hi everyone;

I want to make a plugin wich modify automatic weapon to semi-automatic weapon

its to make a paintball plugin (no automatic weapon)

Thanks and sorry for my bad english
tom77 is offline
blodia
Veteran Member
Join Date: Sep 2009
Location: UK
Old 06-14-2012 , 18:10   Re: [CSS] automatic => semi-automatic
Reply With Quote #2

this is off the top of my head so it hasn't been tested.

PHP Code:
public Action:OnPlayerRunCmd(client, &buttons, &impulseFloat:vel[3], Float:angles[3], &weapon)
{
    static 
OldButtons[MAXPLAYERS 1];
    
    if (!
IsAlive[client])
    {
        return 
Plugin_Continue;
    }
    
    if ((
OldButtons[client] & IN_ATTACK) && (buttons IN_ATTACK))
    {
        
OldButtons[client] = buttons;
        
buttons &= ~IN_ATTACK;
        return 
Plugin_Continue;
    }
    
    
OldButtons[client] = buttons;
    return 
Plugin_Continue;

blodia is offline
Stinkyfax
BANNED
Join Date: Aug 2007
Old 06-24-2012 , 19:15   Re: [CSS] automatic => semi-automatic
Reply With Quote #3

Sadly, with solution above player will still see animation of wepaon shooting.

Another solution is manipulating Entity data nextprimaryattack.

Last edited by Stinkyfax; 06-24-2012 at 19:15.
Stinkyfax is offline
blodia
Veteran Member
Join Date: Sep 2009
Location: UK
Old 06-25-2012 , 18:25   Re: [CSS] automatic => semi-automatic
Reply With Quote #4

when fiddling with things like this prediction issues can't be avoided, changing nextprimaryattack changes the rate of fire and doesn't make the weapon semi-automatic.
blodia 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 07:02.


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