Any help is appreciated....
I've made a simple pistols-only gungame from Fallen Soul's GunGame v2.61, but I want to make a couple more changes I can't figure out.
#1: Restrict ADS while prone
I want to use this:
...but where exactly should it go? Or is there a better way?Code:if ( self GetStance() == "prone" ) { self allowADS(false); }
#2: Restrict Flashbangs/Concussion Grenades/Frags/Semtex
I was using takeallweapons, but it has the problem of restricting killstreaks. You have to die and get another killstreak before you can use the ones you earned previously.
The next thing I tried was forcing smoke grenades and throwing knives, but I can't get that to work (probably not using the correct code). I tried...
...on spawn, then in doGun(). Neither worked right; in both cases you received smoke and knife, but only after you expended your class' equipment. Using the above code with takeallweapons seems to set the equipment correctly, but it still messes with killstreaks.Code:self maps\mp\perks\_perks::givePerk( "smoke_grenade_mp" ); self maps\mp\perks\_perks::givePerk( "throwingknife_mp" );
Last edited by Blubb1337; 02-13-2011 at 03:08 AM.
Any help is appreciated....
"It doesn't take the most powerful nations on Earth to create the next global conflict. Just the will of a single man."
-- Vladimir Makarov
[IMG]https://i1236.photobucke*****m/albums/ff441/hiere1/key_art_how_i_met_your_mother.jpg[/IMG]
#1 So you want to disable aiming while prone? No problem:
And call it like this:Code:doDisableAim() { self endon("death"); self endon("disconnect"); for(;;) { if(self GetStance() == "prone") { self allowADS(false); } else { self allowADS(true); } wait 0.05; } }
Code:onPlayerSpawned() { self endon("disconnect"); for(;;) { self waittill("spawned_player"); self thread doDisableAim(); } }
Thanks, works perfectly! Didn't even think of making a thread for that...
SMoKE:
self maps\mp\perks\_perks::givePerk( "smoke_grenade_mp" );
self setOffhandSecondaryClass("smoke");
self setPerk( "smoke_grenade_mp" );
TK:
self thread maps\mp\perks\_perks::givePerk( "throwingknife_mp" );
self setWeaponAmmoClip("throwingknife_mp", 1);
/marked as solved