Jump to content
Sign in to follow this  
Aralvar

Soldiers won't spawn with ammunition

Recommended Posts

Hello, I'm trying to make some bandits. This is the script I am using:

removeallweapons this;

removeallassigneditems this;

removeuniform this;

removevest this;

removebackpack this;

this addmagazine "16Rnd_9x21_Mag";

this addmagazine "16Rnd_9x21_Mag";

this addmagazine "16Rnd_9x21_Mag";

this addweapon "hgun_P07_F";

this adduniform "U_IG_Guerilla2_1"

That's all I want him to have in his inventory. For some reason, whenever I put in this script he spawns with everything listed except the magazines. I even tried it on the player on a different team and the same result happens. Oh, and yes I know you have to double click on the uniform or backpack or vest to get their ammunition. There's nothing there, and when they spawn in they don't even shoot at me, they just run away because they have no ammunition. Does anyone know what's going on?

Share this post


Link to post
Share on other sites

You are giving magazines to a naked man. Maybe you aren't looking for them in the right place?

Share this post


Link to post
Share on other sites

Yup, change the order. Add the uniform, then weapon, then magazines, and see how that works for you.

Share this post


Link to post
Share on other sites

Don't forget the helmet and glasses!

removeAllWeapons this;
removeAllAssignedItems this;
removeUniform this;
removeVest this;
removeBackpack this;
removeHeadgear this;
removeGoggles this;

this addUniform "U_IG_Guerilla2_1";
{this addMagazine "16Rnd_9x21_Mag"} forEach [1,2,3];
this addWeapon "hgun_P07_F";

Share this post


Link to post
Share on other sites
Don't forget the helmet and glasses!

removeAllWeapons this;
removeAllAssignedItems this;
removeUniform this;
removeVest this;
removeBackpack this;
removeHeadgear this;
removeGoggles this;

this addUniform "U_IG_Guerilla2_1";
{this addMagazine "16Rnd_9x21_Mag"} forEach [1,2,3];
this addWeapon "hgun_P07_F";

Correct me if I'm wrong, but won't adding the magazines before the weapon end up with an unloaded weapon?

Share this post


Link to post
Share on other sites
Correct me if I'm wrong, but won't adding the magazines before the weapon end up with an unloaded weapon?

Nope! Exactly the opposite.

Share this post


Link to post
Share on other sites
Nope! Exactly the opposite.
Ok. It's been a while, as I usually create configs to do that stuff instead of scripting it in.

Share this post


Link to post
Share on other sites

Thanks guys, I ended up figuring this out but maybe this topic will help someone else! :D

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×