View Single Post
Fredd
Veteran Member
Join Date: Jul 2007
Old 05-11-2009 , 02:28   Re: [REQ] New Weapon Based [CS]
Reply With Quote #2

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...
__________________
Need a private coder? AMXX, SourceMOD, MMS? PM me!
Fredd is offline