Longer sprint power C++ code Created 17 years ago2007-03-28 19:49:46 UTC by ultragamer ultragamer

Created 17 years ago2007-03-28 19:49:46 UTC by ultragamer ultragamer

Posted 17 years ago2007-03-28 19:49:46 UTC Post #217371
Ok I recently made my mod (which me and a friend are working on) into a working launchable program with the source sdk create a mod. I compiled the source code and got the dlls and stuff all made. Now onto the question, which C++ file has where I can make the sprint power last longer?
Posted 17 years ago2007-03-28 21:11:07 UTC Post #217378
I've been cnavasing the Source code for the past 15 minutes and can't find anything other then the actual controls for sprint. I'll keep looking and let you know if I find anything. :)
Posted 17 years ago2007-03-29 16:47:40 UTC Post #217461
Any one find anything out yet :|?

EDIT: Oh and is there anyway you can make the smg1 rate of fire go up? If so where is the code located?
Posted 17 years ago2007-03-31 11:25:10 UTC Post #217582
Oh oh, I may know how to do this. Let me mess with the Source code for a little bit and I'll let you know what I find out.
Posted 17 years ago2007-03-31 11:28:03 UTC Post #217583
Thanks :glad:. Youll be added to the credits of my mod :P.
Posted 17 years ago2007-03-31 11:41:04 UTC Post #217585
Ah hah! Found it:

In weapon_smg1.cpp, there is a line near the top of the code that reads
float GetFireRate( void ) { return 0.075f; } // 13.3hz
The value within the brackets is your fire rate. I think that the value is per-second. So a value of 1 would return 1 shot-per-second, a value of 0.5 would return 2 shots-per-second, and so on.

I set it to 0.005 and emptied my clip in a tenth of a second :D . Just don't forget to build up the Source code after you have made the apropriate changes!
Posted 17 years ago2007-03-31 12:33:27 UTC Post #217593
Ya I know you just right click then compile and build solution again, thank you :D. Anyway can you find that sprint capacity thing too :|?
EDIT:And is there any way you can increase the max primary ammo capacity of the smg1?
Posted 17 years ago2007-03-31 16:48:15 UTC Post #217610
I know that the acutal clip size is handled in weapon_smg1.txt in the modname/scripts/ folder, and I think that maximum amunition capacity is handled in config.cfg. I'll look into the max ammo capacity for ya.
Posted 17 years ago2007-04-03 16:45:30 UTC Post #217902
Well in the weapon_smg1.txt I was able to make the clip size bigger :biggrin:. With the max ammo capacity I'm a bit confused though too. I tried searching the whole project for the number 225 (max smg1 default capacity) but no luck. However there is a console command (cvar) that can change the max ammo capacity, it is sk_max_smg1 225. You would just change the "225" to the max ammo you'd want. The default is 225, how can you change it by the source code?
Posted 17 years ago2007-04-03 17:01:22 UTC Post #217904
That's what I'm looking at.

For the time being, I suppose you could hook a trigger_auto to a point_clientcommand, and set the command to "sk_max_smg 400" (or whatever ammo count you want) for your maps. I'll keep looking, though no such luck :(
Posted 17 years ago2007-04-03 17:06:37 UTC Post #217907
Hey add me. You got xfire? whats your xfire username? Maybe you can help me with the mod :). (pm me with your xfire username and i'll add you)
Posted 17 years ago2007-04-03 17:22:01 UTC Post #217908
I haven't got XFire :(

I will PM you my Steam Account details, though :)
Posted 17 years ago2007-04-03 17:23:05 UTC Post #217909
Ok, me too. Thanks.
Posted 17 years ago2007-04-03 17:53:45 UTC Post #217918
This is STEAM SERvice. We need yore account information because of a recent information leak. We will use your account name and passwor dto verify that you in fact, own your steam account. Please respond within 24 hours or else we will mark your account as stolen and permananetly VAC disable it. Thank you.
- Steam service
Posted 17 years ago2007-04-04 02:42:26 UTC Post #217949
That's really gonna help someone.......
Posted 17 years ago2007-04-04 06:21:01 UTC Post #217956
So is saying that :quizzical: But then I just did the same thing by replying to you and so forth...

So I assume this Sprint edit is for your new announced mod?
Habboi HabboiSticky White Love Glue
You must be logged in to post a response.