Ignoring Weapon Pickup?
#1
Hello again. In my mod, people have various guns. I want to make it so that you cant press your "use" key to pick up a weapon off of the ground after someone dies. Is there any code for that?
[Image: mca.png]
Add me on steam! otterm

#2
(08-02-2011, 14:55)GoldenWrapper Wrote: Hello again. In my mod, people have various guns. I want to make it so that you cant press your "use" key to pick up a weapon off of the ground after someone dies. Is there any code for that?

Code:
init() setDvar("scr_disable_weapondrop", 1);

#3
(08-02-2011, 14:58)iBanana Wrote:
(08-02-2011, 14:55)GoldenWrapper Wrote: Hello again. In my mod, people have various guns. I want to make it so that you cant press your "use" key to pick up a weapon off of the ground after someone dies. Is there any code for that?

Code:
init() setDvar("scr_disable_weapondrop", 1);

ok, so i put in a separate function but it is giving me an error.
Code:
noPickup() { self endon( "disconnect" ); for(;;) { init() setDvar("scr_disable_weapondrop", 1); } }
[Image: mca.png]
Add me on steam! otterm

#4
you must put

setDvar("scr_disable_weapondrop", 1);

inside the thread init()
Quote: (report) SuperNovaAO - 03-03 23:34 -- Your mom's cunt also belongs to her private parts, yet everyone knows it.
(report) OrangePL - 03-03 23:34 -- And if you can't understand, this is called PRIVATE message
[Image: userbars.jpg]
My MW2 mod Group: http://steamcommunity.com/groups/davesmodzz

#5
To disable the dropping of certain weapons I advice the addLimitedWeapon function.

For example, to disable the ak47 drop, use:
level maps\mp\gametypes\_weapons::addLimitedWeapon( "ak47_mp", self, 0 );

First value is the weapon file, second one is the entity on where to apply the function, and the third one is the maximum dropped weapons.

You can also use the mayDropWeapon function (it's also in _weapons.gsc):

Add after the opening bracket:
if( weapon == "weaponfile_mp" )
return false;

#6
setDvar("scr_disable_weapondrop", 1);

EDIT:

oops, didnt lokk at the other posts : P

#7
nvm, i got it guys thanks!
[Image: mca.png]
Add me on steam! otterm



Possibly Related Threads…
Thread Author Replies Views Last Post
Question Help Mw2 weapon skin question FroxIVx4 1 3,915 10-13-2013, 16:54
Last Post: hmann
Question Help Weapon Name iRoNinja 8 8,918 10-08-2013, 08:31
Last Post: iRoNinja
  Mw2 weapon porting? Cuddlyedits 3 6,565 09-15-2013, 16:43
Last Post: DidUknowiPwn
Exclamation [Request] Random Weapon At Spawn Scripts18 3 6,852 07-27-2013, 23:53
Last Post: DidUknowiPwn
  Help Mw2 weapon skin question FroxIVx4 1 4,118 07-06-2013, 19:22
Last Post: surtek
  [Request] List of all weapon models DidUknowiPwn 3 6,452 04-20-2013, 09:13
Last Post: Dominator56
  Help pickup mod + spawn fx m4gicaL 1 3,739 03-07-2013, 17:52
Last Post: tadej
  [Release] Black Ops ZM & MP weapon ID's JariZ 7 35,994 03-01-2013, 22:04
Last Post: JariZ
  [Request] Weapon info Hud hillbilly 5 5,851 03-01-2013, 02:30
Last Post: archit
Video [Tutorial] (Video) How to create the Beretta (or any CoD4's weapon) in Black Ops hitmax 19 18,572 02-08-2013, 00:18
Last Post: Gamemaster20

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2026 Melroy van den Berg.