Slugs 0 Posted February 9, 2007 I want to have civilians that carry pistols and can use an action to holster them. I can add the pistol to the character but I cant make them holster the pistol. I have tried pressing the switch weapon or pulling out binoculars to switch it so I was wondering if there was a command I could use after: this addaction to make them put the pistol away. Share this post Link to post Share on other sites
SenseleSS Violence 0 Posted February 10, 2007 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this addweapon "m9";this setbehaviour "careless"; shot this civ in the leg and he pulled a m9 on me..."go figure" Share this post Link to post Share on other sites
Slugs 0 Posted February 10, 2007 That works if the civilian is AI controlled, I want it to be player controlled. If its player controlled you start with it away but draw it a few seconds later automatically. Share this post Link to post Share on other sites
SenseleSS Violence 0 Posted February 11, 2007 ok..... <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this addAction ["pistol","Holster.sqf"]; then in Holster.sqf <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if(player hasWeapon "M9")exitwith{player removeWeapon "M9"}; if not(player hasWeapon "M9")exitwith{player addWeapon "M9";player addmagazine "15Rnd_9x19_M9";player addmagazine "15Rnd_9x19_M9";}; Now for some reason the ammo isn't given to the player and I'm not sure why the player has to take 3 steps forward when pistol is removed but have a play with it or work on another option. cheeers Share this post Link to post Share on other sites
Slugs 0 Posted February 11, 2007 Ill give it a try thanks Share this post Link to post Share on other sites