Forum Jump :

Author Message

ogion  



Posts: 115
Rank:


Level: Member

Country: se
Location:
Occupation: Small business owner
Age: 45
In-game name: Ogion [SW]

 
#95013 Posted at 2010-12-07 08:34        
     
Hi guys. I need a script compatible with ACE 1.09 that takes into account a rucksack and it's content on respawn.

I've used Xeno's wepaon respawn script in the past with great sucess, only now in ACE with the rucksack it just doesn't cut it anymore.

Is there already such a script available, or is it possible to mod the existing script?

This is what the script looks like at the moment:

while {true} do {
    waitUntil {!alive player};
    _p = player;
    _weapons = weapons _p;
    _magazines = magazines _p;
    waitUntil {alive player};
    _p = player;
    removeAllWeapons _p;
    {_p addMagazine _x;} forEach _magazines;
    {_p addWeapon _x;} forEach _weapons;
    _primw = primaryWeapon _p;
    if (_primw != "") then {
        _p selectWeapon _primw;
        // Fix for weapons with grenade launcher
        _muzzles = getArray(configFile>>"cfgWeapons" >> _primw >> "muzzles");
        _p selectWeapon (_muzzles select 0);
    };
};

// Call from init with: [] execVM "weaponspawn.sqf"
// Script by Xeno



If there is a solution, please PM me so we don't clutter up this thread with OT...?!

Thanks in advance guys. You're the best! =)

"Do, or do not. There is no try!" - Yoda
http://www.silentwarriors.org.uk/