
Originally Posted by
iLoveGaming1912
Pretty much just wanna drop money and spawn shit...
money is going to depend on the server and the name they have assigned to your player object. ill try to get started on a little gui tonight however its going to be time consuming, already have functions made to grab and sort weapons from the configs so it shouldnt take to long, just need to do the same thing for vehicles/helmets/vests and such. may i ask why you do not want to alter an existing menu
- - - Updated - - -
i could try making a sort of universal money drop, can you give me an example of servers you play on? and as for your spawning, is something like this ok which i can setup very quickly(this took about 20 minutes pulling the data from the configs-sorting-removing duplicates and storing to make) or do you want something like an actual gui? works with some custom weapons as well such as NIArms(it would be nice if they set them up the same way as vanilla weapons in their configs -_-)
MUTE THE AUDIO
heres the example script
Code:
allPistolArray = [];
allSMGArray = [];
allRifleArray = [];
allDmrArray = [];
allMachineGunArray = [];
_getWeps =
{
_getPistols = "getText (_x >> 'cursor') isEqualTo 'hgun' && getNumber (_x >> 'scope') == 2" configClasses (configFile >> "cfgWeapons");
_getSmgs = "getText (_x >> 'cursor') isEqualTo 'smg' && getNumber (_x >> 'scope') == 2" configClasses (configFile >> "cfgWeapons");
_getRifles = "getText (_x >> 'baseWeapon') != 'hgun_PDW2000_F' && getText (_x >> 'cursor') isEqualTo 'arifle' && getNumber (_x >> 'scope') == 2" configClasses (configFile >> "cfgWeapons");
_getMachineGuns = "getText (_x >> 'cursor') isEqualTo 'mg' && getNumber (_x >> 'scope') == 2" configClasses (configFile >> "cfgWeapons");
_getDmrs = "getText (_x >> 'cursor') isEqualTo 'srifle' && getNumber (_x >> 'scope') == 2" configClasses (configFile >> "cfgWeapons");
_pistolTempListArray = [_getPistols] call _getBaseClass;
_smgTempListArray = [_getSmgs] call _getBaseClass;
_rifleTempListArray = [_getRifles] call _getBaseClass;
_machineGunTempListArray = [_getMachineGuns] call _getBaseClass;
_dmrTempListArray = [_getDmrs] call _getBaseClass;
[_pistolTempListArray, "pistol"] call _removeDuplicates;
[_smgTempListArray, "smg"] call _removeDuplicates;
[_rifleTempListArray, "rifle"] call _removeDuplicates;
[_machineGunTempListArray, "machineGun"] call _removeDuplicates;
[_dmrTempListArray, "dmr"] call _removeDuplicates;
};
_getBaseClass =
{
_weaponArray = (_this select 0);
_returnedArray = [];
{
_weaponName = configName (_x);
_devName = getText (configFile >> "cfgWeapons" >> _weaponName >> "author");
if (_devName == "Bohemia Interactive") then
{
_wepClass = getText (configFile >> "cfgWeapons" >> _weaponName >> "baseWeapon");
if (_wepClass != "") then
{
_returnedArray pushBackUnique _wepClass;
};
}
else
{
_returnedArray pushBackUnique _weaponName;
};
} forEach _weaponArray;
_returnedArray
};
_removeDuplicates =
{
params ["_passedArray", "_weaponType"];
private ["_cost", "_type"];
switch (_weaponType) do
{
case "pistol":
{
{
_wepName = getText (configFile >> "cfgWeapons" >> _x >> "displayname");
_data = [_x, _wepName];
allPistolArray pushBack _data;
} forEach _passedArray;
};
case "smg":
{
{
_wepName = getText (configFile >> "cfgWeapons" >> _x >> "displayname");
_data = [_x, _wepName];
allSMGArray pushBack _data;
} forEach _passedArray;
};
case "rifle":
{
{
_wepName = getText (configFile >> "cfgWeapons" >> _x >> "displayname");
_data = [_x, _wepName];
allRifleArray pushBack _data;
} forEach _passedArray;
};
case "machineGun":
{
{
_wepName = getText (configFile >> "cfgWeapons" >> _x >> "displayname");
_data = [_x, _wepName];
allMachineGunArray pushBack _data;
} forEach _passedArray;
};
case "dmr":
{
{
_wepName = getText (configFile >> "cfgWeapons" >> _x >> "displayname");
_data = [_x, _wepName];
allDmrArray pushBack _data;
} forEach _passedArray;
};
};
};
call _getWeps;
addPistolActions =
{
removeAllActions player;
player addAction ["Close", "removeAllActions player;; call openInitMen"];
{
_className = _x select 0;
_weaponName = _x select 1;
player addAction [_weaponName,
{
_weaponClass = (_this select 3) select 0;
[player, _weaponClass, 3, 0] call BIS_fnc_addWeapon;
}, [_className]];
} forEach allPistolArray;
};
addSMGActions =
{
removeAllActions player;
player addAction ["Close", "removeAllActions player;; call openInitMen"];
{
_className = _x select 0;
_weaponName = _x select 1;
player addAction [_weaponName,
{
_weaponClass = (_this select 3) select 0;
[player, _weaponClass, 3, 0] call BIS_fnc_addWeapon;
}, [_className]];
} forEach allSMGArray;
};
addRifleActions =
{
removeAllActions player;
player addAction ["Close", "removeAllActions player;; call openInitMen"];
{
_className = _x select 0;
_weaponName = _x select 1;
player addAction [_weaponName,
{
_weaponClass = (_this select 3) select 0;
[player, _weaponClass, 3, 0] call BIS_fnc_addWeapon;
}, [_className]];
} forEach allRifleArray;
};
addMGActions =
{
removeAllActions player;
player addAction ["Close", "removeAllActions player;; call openInitMen"];
{
_className = _x select 0;
_weaponName = _x select 1;
player addAction [_weaponName,
{
_weaponClass = (_this select 3) select 0;
[player, _weaponClass, 3, 0] call BIS_fnc_addWeapon;
}, [_className]];
} forEach allMachineGunArray;
};
addDMRActions =
{
removeAllActions player;
player addAction ["Close", "removeAllActions player;; call openInitMen"];
{
_className = _x select 0;
_weaponName = _x select 1;
player addAction [_weaponName,
{
_weaponClass = (_this select 3) select 0;
[player, _weaponClass, 3, 0] call BIS_fnc_addWeapon;
}, [_className]];
} forEach allDMRArray;
};
openWepAct =
{
player addAction ["Weapons",
{
removeAllActions player;
player addAction ["Pistols", "call addPistolActions"];
player addAction ["SMGs", "call addSMGActions"];
player addAction ["Rifles", "call addRifleActions"];
player addAction ["Machine Guns", "call addMGActions"];
player addAction ["DMRs", "call addDMRActions"];
}];
};
openInitMen =
{
player addAction ["Open",
{
removeAllActions player;
call openWepAct
}];
};
call openInitMen;