AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   [REQ] New Weapon Based [CS] (https://forums.alliedmods.net/showthread.php?t=92152)

morgado4ever 05-10-2009 21:47

[REQ] New Weapon Based [CS]
 
I need a plugin for create a "new weapons", based on a created weapon..

Example: m4, based on m4a1; heavyawp, based on awp.

Look the example config file:

PHP Code:

[weapon_m4]
only=CT                // ALL, CT, TR
p_model=models/p_m4.mdl
v_model
=models/v_m4.mdl
w_model
=models/w_m4.mdl
fire
=weapons/m4-fire.wav
fire2
=weapons/m4-fire2.wav
reload
=weapons/m4-reload.wav
reload2
=weapons/m4-reload2.wav
optional
=weapons/m4-optional.wav
based
=weapon_m4a1            // based weapon
damage=2.0*                // 2x
bullets=30                // bullets per clip
clips=5                    // max clips
speed=1.5*                // fire rate speed

[weapon_heavyawp]
only=ALL                // ALL, CT, TR
p_model=models/p_heavyawp.mdl
v_model
=models/v_heavyawp.mdl
w_model
=models/w_heavyawp.mdl
fire
=weapons/heavyawp-fire.wav
fire2
=weapons/heavyawp-fire2.wav
reload1
=weapons/heavyawp-reload1.wav
reload2
=weapons/heavyawp-reload2.wav
optional
=weapons/heavyawp-optional.wav
based
=weapon_awp            // based weapon
damage=0.5*                // 2x
bullets=10                // bullets per clip
clips=5                    // max clips
speed=2.0*                // fire rate speed 

Can you help me?

Thanks for all, Kazz.

Fredd 05-11-2009 02:28

Re: [REQ] New Weapon Based [CS]
 
this wont be possible unless if you wanna overide the original weapons on certian conditions... meaning for example creating a special menu for buying weapons such your 'm4' which would give them the same exact m4a1 that is provider by the game then change the stuff you need to change.

The view models is part is not possible afaik but i have seen someone saying that someone has done it over on the ES forums...

the sounds are very easy since you sourcemod has EmitSound hook that you could use in a plugin..

damage is possible using a OnTakeDamage hook which is not possible using a plugin as of right now... as far as bullets and clips physically its not possible but playing with the hud and using some sort of WeaponCanUse hook after a certian amount of bullets have been shawt which would need to be tracked carefully. and for speed there is 2 ways to do it right first which is detouring GetMaxSpeed which is a client function but just not virtual... and second is a little harder but better in this case because it will be easier to do weapon specific speeds and it's by using an entity listnener or hooking IEntityFactoryDictionar::Create and checking if the entity is weapon and then using a manual hook which is something like "CBaseCombatWeapon::GetMaxSpeed" or something like that....

so what i'm really trying to say is first i actually don't think anyone will go about writing this because mainly it will need to be as an extension. I just laid that out there in case if someone is interested then that's the way i see it being done...

Leonardo 02-25-2010 05:14

Re: [REQ] New Weapon Based [CS]
 
anyway, how to add a new weapons in CSS? no overrided the original weapons
like, for example, a zombie_claws_of_death


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

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