Monthly Target: $400 Donations: $348
 87% 

[CSS] Weapon Mod


Post New Thread Reply   
 
Thread Tools Display Modes
Author
blodia
Veteran Member
Join Date: Sep 2009
Location: UK
Plugin ID:
1579
Plugin Version:
1.8
Plugin Category:
Fun Stuff
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Approver:
    Plugin Description:
    Allows you to modify weapon attributes
    Servers with this Plugin:
     
    Old 04-01-2010 , 13:33   [CSS] Weapon Mod
    Reply With Quote #1

    Requires SourceMod 1.5 or later

    Note: This is for CSS not CSGO, i don't support CSGO so any replies asking for help with CSGO will be ignored

    Description
    Allows you to modify weapon recoil, fire rate, inaccuracy spread and damage to hitgroups via multipliers. You can also add a fully automatic mode to pistols, add a burst mode to smgs, enable infinite ammo and enable quick switch. There are some issues with client prediction noted below.

    Server Command, Cvar and Menu
    weaponmod <weapon> <attribute> <value>

    e.g weaponmod ak47 recoil 2, this would double the ak47's recoil

    this command can be typed into server console, used via rcon or added into config files.

    if you make any mistakes you will get a message in the console (client console if rcon is used else server console).

    Attributes and Values
    RecoilType1/RecoilType2 -- min 0.0 - max 10.0 - multiplier - default 1.0 -- Modifies a weapons recoil, 0.0 gives no recoil. recoil is also capped not to go above 90 degrees.
    FireRate -- min 0.0 - max 10.0 - value - default -1.0 -- Modifies a weapons fire rate, value is in seconds, 0.0 will set the fire rate to maximum possible.
    HeadDamage -- min 0.0 - max 1000.0 - multiplier - default 1.0 -- Modifies damage done to the head hitgroup. 0.0 stops the damage.
    TorsoDamage -- min 0.0 - max 1000.0 - multiplier - default 1.0 -- Modifies damage done to the chest nan stomach hitgroups. 0.0 stops the damage.
    LimbDamage -- min 0.0 - max 1000.0 - multiplier - default 1.0 -- Modifies damage done to both arm and both leg hitgroups. 0.0 stops the damage.
    GenericDamage -- min 0.0 - max 1000.0 - multiplier - default 1.0 -- Modifies damage done to the generic hitgroup. 0.0 stops the damage. This hitgroup is used by knife, grenade explosion and flashbang/smoke projectile physics damage.
    InfiniteAmmo -- min 0 - max 1 - value - default 0 -- Enables infinite ammo. Also works for all projectile weapons.
    QuickSwitch -- min 0 - max 1 - value - default 0 -- Enables quick switch. This allows you to use your weapon immediately after switching to it instead of waiting for the deploy animation to end.
    RagdollForce -- min 5.0 - max 10000.0 - multiplier - default 5.0 -- Modify force applied to ragdolls(player bodies).
    StandSpread -- min 0.0 - max 1.0 - value - default -1.0 -- Modify the inaccuracy spread when standing, 0.0 will use base spread not no spread.
    MoveSpread -- min 0.0 - max 1.0 - value - default -1.0 -- Modify the inaccuracy spread when moving, 0.0 will use base spread not no spread.
    CrouchSpread -- min 0.0 - max 1.0 - value - default -1.0 -- Modify the inaccuracy spread when crouching, 0.0 will use base spread not no spread.
    MiscSpread -- min 0.0 - max 1.0 - value - default -1.0 -- Modify the inaccuracy spread when jumping, swimming, on ladders and anything else. 0.0 will use base spread not no spread.
    AutoMode -- min 0 - max 1 - value - default 0 -- Only available on pistols. Usp and glock will lose their default secondary modes.
    BurstMode -- min 0 - max 1 - value - default 0 -- Enables burst mode. Only available on smgs.
    ModeFireRate -- min 0.0 - max 10.0 - value - default -1.0 -- Modifies a pistols auto mode fire rate and burst modes delay between bursts, value is in seconds 0.0 will set the fire rate to maximum possible.

    Setting a value of -1.0 will disable the attribute.

    Weapons and Valid Attributes
    check out the attached image below.

    Cvar
    weaponmod_disablenotifications - 0 show all notifications (default), 1 disable weapon equip notifications, 2 disable weapon menu.
    This cvar is bitwise so if you want to remove multiple notifications just add their values together e.g 3(1+2) will remove all.

    Menu
    In chat/teamchat type !weaponmod for a menu that shows you each weapons settings.

    Clientside Prediction Issues
    Recoil
    -- When you use 0.0 for no recoil clients will still see a small amount of recoil but all shots will travel with no recoil.
    -- Smgs, machinegun and rifles (not including snipers) have a capped recoil compared to other weapons. modifying recoil will cause the clients view to flicker between the capped recoil and the modified recoil.
    Fire Rate
    -- Setting the fire rate really high will result in clients not seeing all the bullet decals or hearing all the weapon fire sounds.
    Secondary Modes
    -- Auto and burst mode using a high fire rate will have the same issue as above.
    Quick Switch
    -- Clients viewmodel may begin to play the deploy animation, they can still use the weapon immediately though.

    All these issues can be fixed by using sv_client_predict 0 but this will cause other issues.
    These issues only affect clients when using their own weapons i.e you see others firing weapons fine. The higher the clients ping the worse the mentioned effects are.

    Changelog
    1.8
    -- Some minor changes to fix console errors (make sure you also have sm 1.5).

    1.7
    -- Combined arms and leg damage strributes into limb damage.
    -- Combines the chest and stomach damage attributes into torso damage.
    -- Removed run speed attribute as i doubt its going to be fixed.
    -- Removed chat notifications when an attribute is changed and modified the cvar.
    -- Added RagdollForce attribute check out the attribute and values section above.
    -- Added StandSpread atrribute check out the attribute and values section above.
    -- Added MoveSpread atrribute check out the attribute and values section above.
    -- Added CrouchSpread atrribute check out the attribute and values section above.
    -- Added MiscSpread atrribute check out the attribute and values section above.
    -- Various optimisations to try and improve performance further.
    -- Added a check to stop spam in console for invalid indexes.
    -- You can give glock recoil by setting the recoil modifier to a value other than -1.0
    -- Changed the way ModeFireRate works, it is now the delay between each burst rather than each shot in the burst.
    -- ModeFireRate works on glock and famas burstmodes.


    1.6
    -- SM 1.4 is now needed, changed some code to use newer features.
    -- Added the ability to block the menu via the cvar, see above.

    1.5
    -- Uncommented runspeed code even though it still doesn't work, who knows when it will be fixed, i may not be around then.
    -- Added a menu to show weapon settings see above.
    -- Added a modefirerate attribute to change fire rate for burst and automatic modes see above.
    -- Added a cvar to disable notifications see above.

    1.4
    -- Commented out runspeed code to avoid crash problems.

    1.3
    -- Fixed usp/m4a1 always showing silencer when quickswitching even if you don't have it on.
    -- Moved code around to make it a bit easier to read.

    1.2
    -- Added a new quickswitch attribute, check out the attribute and values section above.

    1.1
    -- Fixed error when pressing attack with no weapon.
    -- Fixed float issue when printing value changes to chat.

    1.0
    -- Initial release.
    Attached Thumbnails
    Click image for larger version

Name:	weaponmod.jpg
Views:	1418
Size:	95.1 KB
ID:	110992  
    Attached Files
    File Type: sp Get Plugin or Get Source (weaponmod.sp - 1429 views - 62.7 KB)
    File Type: smx weaponmod.smx (22.9 KB, 484 views)

    Last edited by blodia; 09-29-2013 at 17:38.
    blodia is offline
    Bacardi
    Veteran Member
    Join Date: Jan 2010
    Old 04-02-2010 , 07:16   Re: [CSS] Weapon Mod
    Reply With Quote #2

    Is this possible ??
    =D

    Have to test

    *edit
    Create own server, ye you have ping/latency 1,
    but set server sv_cheats 1 and use fake lag
    net_fakeloss 2 = Loss packet
    net_fakelag 60 = Increase ping ms

    *second edit
    Dammed Plugin failed to compile! Please try contacting the author.
    Have to then compile *.sp file
    Why not upload *.smx file in first post ?

    *edit
    One thing !! Is there already plugin that you can change weapons price/cost $ ???
    Or could you add this feature in this same plugin =)

    Last edited by Bacardi; 04-02-2010 at 08:30.
    Bacardi is offline
    blodia
    Veteran Member
    Join Date: Sep 2009
    Location: UK
    Old 04-02-2010 , 09:50   Re: [CSS] Weapon Mod
    Reply With Quote #3

    i've attached the smx file. i knew i overlooked something, the fact it won't compile using webcompiler when using an ext.

    i could only change prices if i could detect when a player buys something. also at the moment i don't want to add any new features until i get some feed back on performance, if servers cant handle the plugin i may have to remove some features.
    blodia is offline
    Bacardi
    Veteran Member
    Join Date: Jan 2010
    Old 04-02-2010 , 15:00   Re: [CSS] Weapon Mod
    Reply With Quote #4

    Ok thanks for answer.
    I have tested quick with bots and it look working great
    (of course that "predict" is little problem but if use too big values)

    I try next week more results, after holiday's
    I write here same post

    *edit
    Ok.. I have test with bots.
    Have change all weapons with every attributes, working great. No problems.


    I didin't first time figured damage <value>, I try 100, after then 10 then I realize it's multiplier value. Default dmg (x) * 100.
    Heha, then you get if headshot 900 - 5000 damage
    So I make AWP weapon to worst gun, change damage value 0.01

    This is great plugin if some one like make lazy SMG-weapon to little more powerfull damage/recoil or any gun.

    Of course there would be appears problems on public server if change one of guns firerate too fast.
    Server have to keep information about bullet hits to every player. (I don't know just guessing)

    Again great plugin. Very usefull.

    *edit
    I attach cfg file which is ready all weapons+Attributes.
    All values is default (1) and have been disabled (//), so you have to only find certain weapon and remove // to enable and of course change values what you want.
    - Move this weapon_mod.cfg to ...cfg/sourcemod/ -folder
    - Also edit ...cfg/sourcemod/sourcemod.cfg file, add bottom of list command exec sourcemod/weapon_mod.cfg

    *second edit
    when you add value... put them inside quotes ""
    not big deal but if you set 1.3 without quotes, it start show multiplier values like this in chat 1.2999999999999

    *third edit
    I have typed triple, weapon knife
    attributes. Forgot wrte knifestab knifebacstab..
    Fixed typos.

    *updatet
    Added new
    Attribute quickswitch and descriptions
    Attached Files
    File Type: cfg weapon_mod.cfg (12.7 KB, 777 views)

    Last edited by Bacardi; 10-16-2010 at 16:46.
    Bacardi is offline
    Bacardi
    Veteran Member
    Join Date: Jan 2010
    Old 04-13-2010 , 15:58   Re: [CSS] Weapon Mod
    Reply With Quote #5

    I have found one error.
    I use Super Admin Commands to disarm player entirely all weapons.
    So it stand T-position, no weapons and knife.

    When try attack/shoot without weapons, plugin print these errors in logs
    Code:
    L 04/13/2010 - 22:30:49: Info (map "de_dust2") (file "errors_20100413.log")
    L 04/13/2010 - 22:30:49: [SM] Native "GetEntPropFloat" reported: Entity -1 (-1) is invalid
    L 04/13/2010 - 22:30:49: [SM] Displaying call stack trace for plugin "downloads\weaponmod.smx":
    L 04/13/2010 - 22:30:49: [SM]   [0]  Line 1176, weaponmod.sp::OnPostThink()
    But maybe this is not big problem if players not play no-weapons
    Bacardi is offline
    blodia
    Veteran Member
    Join Date: Sep 2009
    Location: UK
    Old 04-14-2010 , 08:55   Re: [CSS] Weapon Mod
    Reply With Quote #6

    thanks for the feedback, i'm sure that cfg will be useful to anyone who may use this plugin.
    i had coded the plugin to work with players who have no weapons aswell so i'll have to have a look through the code, i must have missed something.
    blodia is offline
    Bacardi
    Veteran Member
    Join Date: Jan 2010
    Old 04-14-2010 , 09:01   Re: [CSS] Weapon Mod
    Reply With Quote #7

    ok.. I have
    OS Windows 7
    MMS 1.8.0
    SM 1.3.1

    If make any different
    Bacardi is offline
    blodia
    Veteran Member
    Join Date: Sep 2009
    Location: UK
    Old 04-14-2010 , 10:19   Re: [CSS] Weapon Mod
    Reply With Quote #8

    Updated
    i just missed a weapon check when a player presses attack so it was easily fixed. i also sorted out the issue with floats displaying incorrectly, it seems to be an issue with string formatting, for the print to chat i just converted the float back to a string.
    blodia is offline
    aLEN_St
    Junior Member
    Join Date: Mar 2010
    Old 05-26-2010 , 13:28   Re: [CSS] Weapon Mod
    Reply With Quote #9

    need some help guys....i get this plugin only to edit a hegrenade damage but whatever number i put i don't see any difference ! i do have exec sourcemod/weapon_mod.cfg
    aLEN_St is offline
    blodia
    Veteran Member
    Join Date: Sep 2009
    Location: UK
    Old 05-26-2010 , 13:42   Re: [CSS] Weapon Mod
    Reply With Quote #10

    PHP Code:
    weaponmod hegrenade genericdamage 2.0 
    will double the damage, the values are multipliers so 0.5 will halve the damage.

    if you're using the cfg make sure to remove the // from in front of the code or it won't work

    Last edited by blodia; 05-26-2010 at 13:44.
    blodia is offline
    Reply


    Thread Tools
    Display Modes

    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 16:16.


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