Posts: 122
Threads: 24
Joined: Jul 2011
Reputation:
0
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?
Add me on steam! otterm
Posts: 445
Threads: 51
Joined: Feb 2011
Reputation:
14
08-02-2011, 15:16
(This post was last modified: 08-02-2011, 15:17 by ddaavvee.)
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
My MW2 mod Group:
http://steamcommunity.com/groups/davesmodzz
Posts: 438
Threads: 4
Joined: May 2011
Reputation:
23
08-02-2011, 16:53
(This post was last modified: 08-02-2011, 16:53 by XeroK.)
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;
Posts: 1,185
Threads: 72
Joined: Jan 2011
Reputation:
25
08-02-2011, 18:08
(This post was last modified: 08-02-2011, 18:08 by Tomsen1410.)
setDvar("scr_disable_weapondrop", 1);
EDIT:
oops, didnt lokk at the other posts : P
Posts: 122
Threads: 24
Joined: Jul 2011
Reputation:
0
nvm, i got it guys thanks!
Add me on steam! otterm