init.sqf - Init script on client side
// This is a public variable cash = 50;
onPlayerKilled.sqf
_unit = (_this select 0);
_pos = getPos _unit;
_moneyObject = "Land_Money_F" createVehicle [0, 0, 0];
_moneyObject setPos _pos;
_moneyObject setVariable ["cashAmount", cash]
[ _moneyObject, [ "Pickup Money",{
_amount = (_this select 0) getVariable "cashAmount";
hint format ["Money taken %1", _amount];
cash = cash + _amount;
deleteVehicle (_this select 0);
}, [], 6, false, true, "", "_target distance _this < 2" ]
] remoteExec ["addAction"]