AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   New Plugin Submissions (https://forums.alliedmods.net/forumdisplay.php?f=26)
-   -   Weapon Modifier v1.56 (Damage, Recoil, Speed and more...) (https://forums.alliedmods.net/showthread.php?t=165075)

Kiske 08-18-2011 18:58

Weapon Modifier v1.56 (Damage, Recoil, Speed and more...)
 
3 Attachment(s)
Weapon Modifier v1.56
By Kiske

http://i.imgur.com/W8qdi.png

Features:
  • Damage
  • Recoil
  • Speed
  • Model
  • Glow(W_ and P_ model)
  • Unlimited Clip and BPAmmo
  • Sound of the knife
  • Knockback Power
  • Automatic Fire Pistol
  • Zoom

This plugin allows you to modify the damage, the recoil and the speed of the weapons, but not just set it, but also add, subtract, multiply or even divide to the default value of the gun.
It also allows you to modify the model of the gun in its three aspects (V_ , P_ , W_).
You can set the glow of all the guns (only W_ and P_ model).
You can put infinite bullets or magazines to the weapon you wish to.
You can also modify the sounds of the knife.
You can modify the knockback power of the weapon.
You can set the automatic fire to any pistol
You can set and change the zoom from weapon, except that weapon that have his respective attack2's function.



http://i.imgur.com/aI0yY.png
It consists of individual CVARs for each gun and an extra to control all the weapons.
If you want to deactivate the wm_damage_all , wm_recoil_all , wm_speed_all , wm_wglow_all , wm_pglow_all , wm_unclip_all , wm_unbpammo_all , wm_kb_all or wm_zoom_kb you must set it in off, and not in 0.

The knockback have 3 aditionals cvars:
wm_knockback 0 (turn on/off the knockback)
wm_kb_zvel 1 (turn on/off the vertical push)
wm_kb_dist 500 (the distance that the knockback do default)


http://i.imgur.com/AZa9j.png
The plugin has a .cfg and .ini for you to configure the guns from there.
The X must be replaced by the desired damage , recoil , speed , unclip or unbpammo
And weaponname must be replaced by the name of the weapon.

Examples:
To add to the default value of the gun: wm_X_weaponname +1337
To subtract the default value of the gun: wm_X_weaponname -1337
To multiply the default value of the gun: wm_X_weaponname *1337
To divide the default value of the gun: wm_X_weaponname /1337
To set a value: wm_X_weaponname =1337

To set the glow of a weapon w_: wm_wglow_weaponname "255 128 33" [Red(0-255) Green(0-255) Blue(0-255)]
To set the glow of a weapon p_: wm_pglow_weaponname "255 128 33" [Red(0-255) Green(0-255) Blue(0-255)]

To set infinite bullets to a gun: wm_unclip_weaponname 1
To set infinite magazines to a gun: wm_unbpammo_weaponname 1

To set the knockback power of a weapon: wm_kb_weaponname 12.7

To set the automatic fire of a weapon: wm_autofire_weaponname 1

To set or modify the zoom of a weapon: wm_zoom_weaponname "0.3 190 60 30" <delay> <maxspeed> <zoom1> [zoom2(optional)]
Delay: delay to add when weapon will be usable after zoom : default cs seems to be 0.3
MaxSpeed: maxspeed a player can gain when the weapon is zoomed (put 0 to keep normal speed, unless you alter a sniper zoom)
Zoom1: 0-90 First zoom value. Default : aug and krieg552 : 55 , snipers 40
Zoom2: 0-90 Second zoom, put 90 for no 2nd zoom. Default: snipers : 15, Awp : 10
Weapon names:
  • p228
  • scout
  • xm1014
  • mac10
  • aug
  • elite
  • fiveseven
  • ump45
  • sg550
  • galil
  • famas
  • usp
  • glock18
  • awp
  • mp5navy
  • m249
  • m3
  • m4a1
  • tmp
  • g3sg1
  • deagle
  • sg552
  • ak47
  • knife
  • p90
  • all
Name of extra weapons for the wm_wglow_* and wm_pglow_* cvar:
  • thighpack (not work for pglow)
  • shield (not work for pglow)
  • hegrenade
  • c4
  • smokegrenade
  • flashbang
  • backpack (not work for pglow)


To change the model you just have to type the route of the model in the .ini file of the weapon.

For example:
If you want to change the model V_ and P_ of the AWP, you have to do as follows:
V_AWP = models/new_weapons/v_awp.mdl
P_AWP = models/new_weapons/p_awp.mdl

If you want to change the sound HITs of the knife, you have to do as follows:
KNIFE_HIT_1 = new_sound/knife_hit_1.wav
KNIFE_HIT_2 = new_sound/knife_hit_2.wav
KNIFE_HIT_3 = new_sound/knife_hit_3.wav
KNIFE_HIT_4 = new_sound/knife_hit_4.wav


http://i.imgur.com/jXL1M.png
dorin2oo7 -ConnorMcLeod - Bug fixing and optimizations, and the weapons zoom code (http://forums.alliedmods.net/showthr...ighlight=scope)
MeRcyLeZZ - For give me the way to put infinite bullets and infinite chargers and stocks, knockback code
Asd' - For the idea of P_ model glow
jc980 - For the idea of knockback and automatic fire pistol
XINLEI - For the idea of weapons zoom

http://i.imgur.com/aqTRJ.png
Quote:

v1.56
- Fixed [HAMSANDWICH] Invalid player 16 (not in-game)
v1.55
- Added: Automatic Fire Pistol
- Added: Weapons Zoom
- Views: 529
v1.53:
- Added: Knockback
- Added a new list of cvars, now you can configure the knockback power of the weapon
- Views: 9
v1.51:
- Fixed one error with the change of the models.
- Views: 72
v1.5:
- Added a new list of cvars, now you can configure the glow of the weapons (model W_ and P_ only).
- Fixed one error with the change of the models of some weapons.
- Some optimizations.
- Views: 43
v1.4:
- Changed the name of the files and the cvars.
- Added: Now you can change the sounds of the knife.
- Added one new list of cvar, now you can put infinite bullets in the guns.
- Added one new list of cvar, now you can put infinite magazines in the guns.
- Fixed one error.
- Views: 21

v1.31:
- Fixed a little bug with the load models
v1.3:
- Added a new list of cvars, now you can configure the glow of the weapons (model W_ only)
- Added more weapons to modify the model:
- p_thighpack , w_thighpack
- v_ / p_ / w_ of hegrenade , flashbang , smokegrenade , shield , c4
- w_backpack
- Views: 24
v1.1:
- Added: Now you can change the model of the weapons
- Views: 19
v1.0:
- First release
- Views: 37

http://i.imgur.com/SvLaV.png
* Place the weapon_modifier.ini and weapon_modifier.cfg file in addons/amxmodx/configs folder.
* Place the plugin's .amxx file in the addons/amxmodx/plugins folder.
* Add the plugin's name to addons/amxmodx/configs/plugins.ini. Example:
weapon_modifier.amxx

razieljohn619 08-18-2011 19:10

Re: Change Weapons
 
nice :D

bibu 08-18-2011 19:18

Re: Change Weapons
 
Good job.

modernwarfare 08-18-2011 19:55

Re: Change Weapons
 
nice very cool i will use if i need :)

Stereo 08-18-2011 20:39

Re: Change Weapons
 
GJ Man :up:

joshknifer 08-19-2011 10:53

Re: Change Weapons
 
Cool. :)

ANTICHRISTUS 08-19-2011 10:56

Re: Change Weapons
 
the title should be more descriptive http://illiweb.com/fa/i/smiles/icon_smile.gif

ConnorMcLeod 08-19-2011 12:28

Re: Change Weapons
 
PHP Code:

    register_message(get_user_msgid("CurWeapon"), "message_CurWeapon"); 

Remove this.

Kiske 08-19-2011 12:49

Re: Change Weapons
 
Quote:

Originally Posted by ANTICHRISTUS (Post 1536281)
the title should be more descriptive http://illiweb.com/fa/i/smiles/icon_smile.gif

Right!

Quote:

Originally Posted by ConnorMcLeod (Post 1536349)
PHP Code:

    register_message(get_user_msgid("CurWeapon"), "message_CurWeapon"); 

Remove this.

Ok!

abdul-rehman 08-19-2011 13:44

Re: Change Weapons (Damage , Recoil and Speed)
 
Iinteresting, Good Job :)

Kiske 08-19-2011 23:09

Re: Change Weapons v1.1 (Damage , Recoil , Speed and Models)
 
Update Plugin!
See changelog for more information.

Sory for my english.

klatro 08-20-2011 03:22

Re: Change Weapons v1.1 (Damage , Recoil , Speed and Models)
 
Thank you very much for this plugin.

Good job! :)

Kiske 08-21-2011 21:46

Re: Change Weapons v1.3 (Damage , Recoil , Speed , Models and Glow)
 
Update Plugin and Post!
See changelog for more information.

Dolph_Ziggler 08-23-2011 16:03

Re: Change Weapons v1.31 (Damage , Recoil , Speed , Model and Glow)
 
Thanks is very nice = )

bibu 08-23-2011 16:21

Re: Change Weapons v1.31 (Damage , Recoil , Speed , Model and Glow)
 
The name "Weapon Modifier" would be better IMO. :)

ConnorMcLeod 08-23-2011 17:40

Re: Change Weapons v1.31 (Damage , Recoil , Speed , Model and Glow)
 
PHP Code:

    if(equal(classname"weaponbox") ||
    
equali(model"models/w_shield.mdl") ||
    
equali(model"models/w_thighpack.mdl") ||
    
equali(model"models/w_c4.mdl") ||
    
equali(model"models/w_backpacks.mdl")) // sory for that :( 

If you are so sorry, then use a Trie :)

Also, notice the typo you made on models/w_backpacks.mdl

Kiske 08-23-2011 22:24

Re: Change Weapons v1.31 (Damage , Recoil , Speed , Model and Glow)
 
Quote:

Originally Posted by ConnorMcLeod (Post 1536349)
PHP Code:

    register_message(get_user_msgid("CurWeapon"), "message_CurWeapon"); 

Remove this.

Sorry, but I had to put it back for the infinite bullets.


Quote:

Originally Posted by bibu (Post 1539497)
The name "Weapon Modifier" would be better IMO. :)

Accepted!
Thanks.


Quote:

Originally Posted by ConnorMcLeod (Post 1539543)
PHP Code:

    if(equal(classname"weaponbox") ||
    
equali(model"models/w_shield.mdl") ||
    
equali(model"models/w_thighpack.mdl") ||
    
equali(model"models/w_c4.mdl") ||
    
equali(model"models/w_backpacks.mdl")) // sory for that :( 

If you are so sorry, then use a Trie :)

Also, notice the typo you made on models/w_backpacks.mdl

Done!, and thanks for the bugfix :)


Update Plugin and Post!
See changelog for more information.

TandborsteN 08-24-2011 01:29

Re: Weapon Modifier v1.4 (Damage, Recoil, Speed and more...)
 
Awesome plugin, GJ! :)

xPaw 08-24-2011 06:08

Re: Weapon Modifier v1.4 (Damage, Recoil, Speed and more...)
 
PHP Code:

get_pcvar_string(g_cvar_weapon[g_weapon[attacker]][WEAPON_DAMAGE], dmg_cvarcharsmax(dmg_cvar));
    
get_pcvar_string(g_cvar_weapon[31][WEAPON_DAMAGE], dmg_cvar_tempcharsmax(dmg_cvar_temp)); 

You should've used get_pcvar_float, and use 0.0 as "off"

Kiske 08-24-2011 07:19

Re: Weapon Modifier v1.4 (Damage, Recoil, Speed and more...)
 
Quote:

Originally Posted by xPaw (Post 1539776)
PHP Code:

get_pcvar_string(g_cvar_weapon[g_weapon[attacker]][WEAPON_DAMAGE], dmg_cvarcharsmax(dmg_cvar));
    
get_pcvar_string(g_cvar_weapon[31][WEAPON_DAMAGE], dmg_cvar_tempcharsmax(dmg_cvar_temp)); 

You should've used get_pcvar_float, and use 0.0 as "off"

But the cvar is used with the following format:
+value
-value
*value
/value
=value

And if i get as a float, i can't get the +, -, etc.
Sorry for my english.

xPaw 08-24-2011 08:34

Re: Weapon Modifier v1.4 (Damage, Recoil, Speed and more...)
 
Quote:

Originally Posted by Kiske (Post 1539805)
But the cvar is used with the following format:
+value
-value
*value
/value
=value

And if i get as a float, i can't get the +, -, etc.
Sorry for my english.

oh right, sorry.

Kiske 08-25-2011 00:29

Re: Weapon Modifier v1.4 (Damage, Recoil, Speed and more...)
 
Quote:

Originally Posted by xPaw (Post 1539839)
oh right, sorry.

No problem.

Update Plugin and Post!
See changelog for more information.

Korxu 08-27-2011 11:13

Re: Weapon Modifier v1.5 (Damage, Recoil, Speed and more...)
 
Awesome Kiske, very good job!

Choose_Your_Destiny 08-27-2011 17:45

Re: Weapon Modifier v1.5 (Damage, Recoil, Speed and more...)
 
OoOo yeah nice :)

Napoleon_be 08-28-2011 17:10

Re: Weapon Modifier v1.5 (Damage, Recoil, Speed and more...)
 
This plugin is awesome :D

Destro- 08-30-2011 10:18

Re: Weapon Modifier v1.5 (Damage, Recoil, Speed and more...)
 
nice :).

@Spanish
Podrías remover fn_refill_bpammo y usar cs_set_user_bpammo xD.
También podrías cargar todo por file envés de usar cvar.

@Bad English
You could remove fn_refill_bpammo and use cs_set_user_bpammo xD.
You could also upload everything file instead of using cvar.

Kiske 08-30-2011 19:09

Re: Weapon Modifier v1.5 (Damage, Recoil, Speed and more...)
 
Quote:

Originally Posted by Destro- (Post 1543998)
nice :).

@Spanish
Podrías remover fn_refill_bpammo y usar cs_set_user_bpammo xD.
También podrías cargar todo por file envés de usar cvar.

@Bad English
You could remove fn_refill_bpammo and use cs_set_user_bpammo xD.
You could also upload everything file instead of using cvar.

I don't use cs_set_user_bpammo because in that case, it doesn't do the same thing (I don't really know how to explain it to you).
I put CVARs to make it more customizable in-game.

SkiGz 08-30-2011 19:45

Re: Weapon Modifier v1.5 (Damage, Recoil, Speed and more...)
 
Good job! :)

Preyas3 09-01-2011 03:50

Re: Weapon Modifier v1.5 (Damage, Recoil, Speed and more...)
 
cw_damage, cw_recoil, etc don't work in console

Kiske 09-01-2011 08:45

Re: Weapon Modifier v1.5 (Damage, Recoil, Speed and more...)
 
Quote:

Originally Posted by Preyas3 (Post 1545356)
cw_damage, cw_recoil, etc don't work in console

Sorry for that.
cw -> wm

Update the post!.


Thanks.

Preyas3 09-01-2011 18:13

Re: Weapon Modifier v1.5 (Damage, Recoil, Speed and more...)
 
Your welcome. :)

Preyas3 09-02-2011 03:28

Re: Weapon Modifier v1.5 (Damage, Recoil, Speed and more...)
 
Another error:

Code:


L 09/02/2011 - 17:21:31: [AMXX]    [0] 91235.attach::event_AmmoX (line 232)
L 09/02/2011 - 17:21:31: Invalid CVAR pointer
L 09/02/2011 - 17:21:31: [AMXX] Displaying debug trace (plugin "weapon_modifier.amxx")
L 09/02/2011 - 17:21:31: [AMXX] Run time error 10: native error (native "get_pcvar_string")
 
L 09/02/2011 - 17:21:31: [AMXX]    [0] 91235.attach::event_AmmoX (line 232)
L 09/02/2011 - 17:21:31: Invalid CVAR pointer
L 09/02/2011 - 17:21:31: [AMXX] Displaying debug trace (plugin "weapon_modifier.amxx")
L 09/02/2011 - 17:21:31: [AMXX] Run time error 10: native error (native "get_pcvar_string")

It keeps saying that over and over again.

Kiske 09-02-2011 10:02

Re: Weapon Modifier v1.5 (Damage, Recoil, Speed and more...)
 
Quote:

Originally Posted by Preyas3 (Post 1546183)
Another error:

Code:


L 09/02/2011 - 17:21:31: [AMXX]    [0] 91235.attach::event_AmmoX (line 232)
L 09/02/2011 - 17:21:31: Invalid CVAR pointer
L 09/02/2011 - 17:21:31: [AMXX] Displaying debug trace (plugin "weapon_modifier.amxx")
L 09/02/2011 - 17:21:31: [AMXX] Run time error 10: native error (native "get_pcvar_string")
 
L 09/02/2011 - 17:21:31: [AMXX]    [0] 91235.attach::event_AmmoX (line 232)
L 09/02/2011 - 17:21:31: Invalid CVAR pointer
L 09/02/2011 - 17:21:31: [AMXX] Displaying debug trace (plugin "weapon_modifier.amxx")
L 09/02/2011 - 17:21:31: [AMXX] Run time error 10: native error (native "get_pcvar_string")

It keeps saying that over and over again.

Hi Preyas3

My apologies, I cant find the error myself, is because they cause, but dont know what is causing weapon.

If you could help I'd appreciate a bit.
If you throw that error again, you could try to remember the gun he had in hand, or any indication that I can help.

Sorry for my english.
Thank you.

Preyas3 09-02-2011 21:27

Re: Weapon Modifier v1.5 (Damage, Recoil, Speed and more...)
 
If debug isn't enabled it says this:

Code:

L 09/03/2011 - 11:22:27: Invalid CVAR pointer
L 09/03/2011 - 11:22:27: [AMXX] Run time error 10 (plugin "weapon_modifier.amxx") (native
"get_pcvar_string") - debug not enabled!
L 09/03/2011 - 11:22:27: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini
(without quotes).

I only use the plugin to change the damage, and the error appears once if I buy/pick up a gun.

Kiske 09-02-2011 22:08

Re: Weapon Modifier v1.5 (Damage, Recoil, Speed and more...)
 
Quote:

Originally Posted by Preyas3 (Post 1546835)
If debug isn't enabled it says this:

Code:

L 09/03/2011 - 11:22:27: Invalid CVAR pointer
L 09/03/2011 - 11:22:27: [AMXX] Run time error 10 (plugin "weapon_modifier.amxx") (native
"get_pcvar_string") - debug not enabled!
L 09/03/2011 - 11:22:27: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini
(without quotes).

I only use the plugin to change the damage, and the error appears once if I buy/pick up a gun.

It's weird, I don't get any errors and I don't see anything wrong in my coding, maybe there's another plugin interfering with it, but I doub it. So I'm confused :(

Preyas3 09-02-2011 23:54

Re: Weapon Modifier v1.5 (Damage, Recoil, Speed and more...)
 
Would a different plugin that lets you change recoil/fire rate interfere? If so could you make a plugin that only changes damage because my other plugins take forever to configure to the correct settings?

My plugins:
Code:

; Custom - Add 3rd party plugins here
bazooka.amxx
Bullet_Whizz.amxx
snipers_crosshairs.amxx
recoil_control.amxx
Grenade_Destroy_Breakables.amxx
kill_rewards.amxx
jetpack.amxx
advanced_tracers.amxx
super_speed.amxx
grenademodes.amxx
ElitesforCT.amxx
combatarmskillsounds.amxx
weapons_maxclip.amxx
bpammo_features.amxx
InfiniteMoney.amxx
weapon_modifier.amxx
minigun.amxx
cwz.amxx
FireRate_Control.amxx


modernwarfare 09-03-2011 11:10

Re: Weapon Modifier v1.5 (Damage, Recoil, Speed and more...)
 
i need to make a new skill in my plugin (xp mod)

and its recoil

how to make it change the recoil like in a plugin

here is my xp mod plugin

Kiske 09-03-2011 14:59

Re: Weapon Modifier v1.5 (Damage, Recoil, Speed and more...)
 
Quote:

Originally Posted by Preyas3 (Post 1546875)
Would a different plugin that lets you change recoil/fire rate interfere? If so could you make a plugin that only changes damage because my other plugins take forever to configure to the correct settings?

My plugins:
Code:

; Custom - Add 3rd party plugins here
bazooka.amxx
Bullet_Whizz.amxx
snipers_crosshairs.amxx
recoil_control.amxx
Grenade_Destroy_Breakables.amxx
kill_rewards.amxx
jetpack.amxx
advanced_tracers.amxx
super_speed.amxx
grenademodes.amxx
ElitesforCT.amxx
combatarmskillsounds.amxx
weapons_maxclip.amxx
bpammo_features.amxx
InfiniteMoney.amxx
weapon_modifier.amxx
minigun.amxx
cwz.amxx
FireRate_Control.amxx


Try putting the weapon_modifier on top of bazooka.

Preyas3 09-03-2011 21:09

Re: Weapon Modifier v1.5 (Damage, Recoil, Speed and more...)
 
Still the same error.

Preyas3 09-03-2011 21:53

Re: Weapon Modifier v1.5 (Damage, Recoil, Speed and more...)
 
Quote:

Originally Posted by modernwarfare (Post 1547163)
i need to make a new skill in my plugin (xp mod)

and its recoil

how to make it change the recoil like in a plugin

here is my xp mod plugin

Use the search.


All times are GMT -4. The time now is 20:02.

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