Just a proof of concept atm (offsets are for 96836). It works online however and completely bypasses any battle-eye check and can therefore be remotely executed without modifying arma at all:
Code:
Code:
typedef unsigned int (__thiscall *f_getWeaponClassFromName)(unsigned int dwThis, const char * cName);
typedef void(__thiscall *f_addWeapon)(unsigned int dwEntInventoryManager, unsigned int ent, unsigned int weaponClass, unsigned int reserved1, unsigned int reserved2);
unsigned int locplayer = *(*(*reinterpret_cast<unsigned int***>(ARMA_ENT_PTR)+0x13a4/4)+0x4/4);
f_getWeaponClassFromName getWeaponClassFromName = reinterpret_cast<f_getWeaponClassFromName>(0x004BD67C);
f_addWeapon addWeapon = reinterpret_cast<f_addWeapon>(0x0065AFDF);
unsigned int nvclass = getWeaponClassFromName(0xdddf08,"NVGoggles");
if(nvclass) {
unsigned int invmgr = locplayer+0x678;
addWeapon(invmgr,locplayer,nvclass,0,0);
}
Magazines work similar. It is working online but you have to put the stuff down and pick it up again.
If the interest is high I might think about coding a small gear spawner with teleport functionality that should be relatively safe to use.
THIS IS NOT MINE!
All of the credits go to sd333221