Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 9 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 MP Mapping
CoD 2 mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Pick Up weapon from a script.
Ploxxy
General Member
Since: May 1, 2009
Posts: 170
Last: Aug 31, 2011
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoD2 MP Mapping
Posted: Saturday, Aug. 13, 2011 05:53 am
So i made a weapon that requires a trigger and the trigger basically "buys" the weapon. But without money, so its basically pickup as if someone were to die. Well, I have it so it takes the players weapon and gives them the one they chose to pick up. I don't want to make them drop there current. I want the script to take it. and This is what i have atm.

mosinNag()
{
trig = getent("getmosin", "targetname");
while(1)
{
trig waittill("trigger", customer);

current = customer getcurrentweapon();
customer takeWeapon(current);
current = customer getcurrentweapon();
current = undefined;
current = customer getcurrentweapon();
if(current == "none")
{
customer giveWeapon("mosin_nagant_mp");
customer iprintln("Picked up Mosin Nagant.");
}
else if(customer hasweapon("mosin_nagant_mp"))
{
customer giveMaxAmmo("mosin_nagant_mp");
}
}
}

and Whats bothering me is. It gives me an error that is just saying that it cant give the player the mosin_nagant_mp because there are no open slots. But i took the players weapon...
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 MP Mapping

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»