Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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
Reply

#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);
Reply

#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
Reply

#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
Reply

#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;
Reply

#6
setDvar("scr_disable_weapondrop", 1);

EDIT:

oops, didnt lokk at the other posts : P
Reply

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



Possibly Related Threads…
Thread Author Replies Views Last Post
Question Help Mw2 weapon skin question FroxIVx4 1 2,953 10-13-2013, 16:54
Last Post: hmann
Question Help Weapon Name iRoNinja 8 6,596 10-08-2013, 08:31
Last Post: iRoNinja
  Mw2 weapon porting? Cuddlyedits 3 4,743 09-15-2013, 16:43
Last Post: DidUknowiPwn
Rainbow [Release] MW3: Random Weapon Plugin V1 Nekochan 50 33,319 09-11-2013, 15:11
Last Post: EnVi Sweden Rocks
Exclamation [Request] Random Weapon At Spawn Scripts18 3 4,743 07-27-2013, 23:53
Last Post: DidUknowiPwn
  Help Mw2 weapon skin question FroxIVx4 1 2,924 07-06-2013, 19:22
Last Post: surtek
  [Request] List of all weapon models DidUknowiPwn 3 4,631 04-20-2013, 09:13
Last Post: Dominator56
  [Release] !weapon Plugin 8q4s8 40 25,688 03-24-2013, 17:02
Last Post: X-Track
  Help pickup mod + spawn fx m4gicaL 1 2,670 03-07-2013, 17:52
Last Post: tadej
  [Release] Black Ops ZM & MP weapon ID's JariZ 7 31,013 03-01-2013, 22:04
Last Post: JariZ

Forum Jump:


Users browsing this thread:
5 Guest(s)

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