K I have this script. It works, only, its will remove your gun even if its not rifle AND when I holster it, then try to unholster, it says I have no weapon.
SOO:
How do i make it only remove if its a rifle.
AND
How do make it save your weapon, then add it back later?
_weps = weapons player;
_mags = magazines player;
_howmuch = count _weps;
_weapon = [vehicle player] call mando_my_weapon;
_sWeap = secondaryWeapon player;
if (holstered) then
{
{player addWeapon _x} foreach _weps;
{player addmagazine _x} foreach _mags;
ctrlSetText [33, "Unholstered"];
Sleep 1;
ctrlSetText [33, ""];
holstered = false;
} else {
if (_weapon == "") then
{
ctrlSetText [33, "You don't have a rifle!"];
_holstered = false;
Sleep 1;
ctrlSetText [33, ""];
} else {
if (_howmuch > 1) then
{
ctrlSetText [33, "You can only holster one rifle!"];
Sleep 1;
ctrlSetText [33, ""];
} else {
removeAllWeapons player;
_holstered = true;
ctrlSetText [33, "Holstered"];
Sleep 1;
ctrlSetText [33, ""];
};
};
};