So I've tried to implement both codes Within my game and I keep getting a “ error GIAR pre stack size violation “ The code placed below is what I'm trying to implement so far with the added “rvg_money” item.
In my initServer.sqf
addMissionEventHandler ["Killed", {
params ["_unit", "_killer", "_instigator", "_useEffects"];
_rewardAmount = round(random [50,70,100]) //REWARD SOMEWHERE BETWEEN $50 & $100
//ADD THE MONEY ITEMS (IDK IF ITS $1 = 1 MONEY ITEM, SO ADJUST ACCORDINGLY)
for "_i" from 1 to _rewardAmount do
{
if(!canAdd "rvg_money")exitWith{}; //NOT ENOUGH SPACE, CANT ADD
_killer addItem "rvg_money";
};
_hintStr = format["Congrats murderer... heres $%1",_rewardAmount]; //SHOW A HINT WITH THE AMOUNT THEYVE EARNED
[_hintStr] remoteExec ["hint",local _killer];
}];