OpFern 1 Posted June 29, 2017 So I have succesfully made an money system in my game. but I want to add a way to get money without admin or host executing an debug console command to add money, so I thought that maybe if you kill the enemy team you get money for each kill ai or player but I have tried everything and I have googled, binged, yahood you name it and I cant find an working script or something to lead me in the right way NOTHING. so I am hoping that YOU can help me ;). thx in advance OpFern Share this post Link to post Share on other sites
killzone_kid 1332 Posted June 29, 2017 There you go http://bfy.tw/CaTG Share this post Link to post Share on other sites
OpFern 1 Posted June 30, 2017 I appreciate your help, but I have tried all of the links that come up when you search anything near what you searched. Share this post Link to post Share on other sites
xjoker_ 25 Posted June 30, 2017 you can use eventhandlers to do that. Like Killed or MPKilled https://community.bistudio.com/wiki/Arma_3:_Event_Handlers Share this post Link to post Share on other sites
OpFern 1 Posted June 30, 2017 I have tried that with no success. Share this post Link to post Share on other sites
sarogahtyp 1108 Posted June 30, 2017 what exactly did u try? show code! Share this post Link to post Share on other sites
OpFern 1 Posted June 30, 2017 I am trying to make a system so for every ai or player kill you get you earn money. initServer.sqf: Quote { _x addMPEventHandler ["mpkilled", {(_this select 2) execVM "scripts\moneysys\killed.sqf"}]; }forEach playableUnits - allPlayers; initPlayerLocal.sqf: Quote player addMPEventHandler ["MPkilled", {(_this select 2) execVM "scripts\moneysys\killed.sqf"}]; killed.sqf: Quote params ["_killer"]; if (_killer in allPlayers) then { [[[(_this select 2)],"scripts\moneysys\asfdasadsf.sqf"],"BIS_fnc_execVM", _killer, false, true] call BIS_fnc_MP; } addMoney.sqf: Quote cash=cash+100; (uiNameSpace getVariable "myUI_DollarTitle") ctrlSetText format ["Money: %1",cash]; cutText "Kill +100$"; Share this post Link to post Share on other sites
killzone_kid 1332 Posted June 30, 2017 1 hour ago, OpFern said: I appreciate your help, but I have tried all of the links that come up when you search anything near what you searched. Just out of curiousity, did you get the same results? Share this post Link to post Share on other sites
OpFern 1 Posted June 30, 2017 That first one no, the second one yes Share this post Link to post Share on other sites
killzone_kid 1332 Posted June 30, 2017 Maybe Google doesn't like you? Share this post Link to post Share on other sites
OpFern 1 Posted June 30, 2017 I found the link, thanks I will have a look here seems like there is alot of nice stuff :) Share this post Link to post Share on other sites