DAKA Posted March 6, 2017 Report Share Posted March 6, 2017 So with Epoch 1.0.5.1 and infistar, you have an option to add some code to at.sqf so that you can add coins to a player. With the new 1.0.6.1 and single currency, is there a way to add coins or is someone have a work around for infistar to do it? Link to comment Share on other sites More sharing options...
lwbuk Posted March 6, 2017 Report Share Posted March 6, 2017 I was going to play with this later. Presumably just remove the banking part of the code and leave the player coins side. Probably more to it than that though I'm sure. Link to comment Share on other sites More sharing options...
salival Posted March 6, 2017 Report Share Posted March 6, 2017 In AT.sqf find: adminadd = adminadd + [" Give -2500 Humanity",adminHumanityMinus,"0","0","0","1",[0,0.8,1,1]]; Add below: adminadd = adminadd + [" Change Coins",changeCoins,"0","0","0","1",[0,0.8,1,1]]; adminadd = adminadd + [" Give +25,000 Coins",adminCoinsPlus,"0","0","0","1",[0,0.8,1,1]]; adminadd = adminadd + [" Give -25,000 Coins",adminCoinsMinus,"0","0","0","1",[0,0.8,1,1]]; Find this code block down further (Yours may be a little different): adminHumanityMinus = { { if (name _x == _this select 0) then { _humanity = _x getVariable['humanity',0]; _x setVariable['humanity',_humanity - 2500,true]; hint format['Gave %1 -2500 Humanity!',_this select 0]; _sl = format['%1 minus 2500 Humanity to %2',name player,_this select 0]; PVAH_WriteLogReq = [player,toArray _sl]; publicVariableServer 'PVAH_WriteLogReq'; }; } forEach playableUnits; }; Add this block below: changeCoins = { disableSerialization; _plr = objNull; {if (name _x == _this select 0) exitWith {_plr = _x;};} forEach playableUnits; if (isNull _plr) exitWith {systemchat 'Select a Player!';}; if (isNull findDisplay 24) exitWith {systemchat format ['open the chat, type the amount of %1 you want to add (can be negative) and doubleClick again!',CurrencyName];}; _chat = (findDisplay 24) displayCtrl 101; _txt = ctrlText _chat; _num = 0; if (_txt != '') then { _num = parseNumber _txt; if (typeName _num != 'SCALAR') then {systemchat 'INSERT A NUMBER!';}; (findDisplay 24) closeDisplay 0; }; _coins = _plr getVariable[Z_moneyVariable,0]; _plr setVariable[Z_moneyVariable,_coins+_num,true]; hint format['Gave %1 %2 %3!',_this select 0,_num,CurrencyName]; _sl = format['%1 %2 %4 to %3',name player,_num,_this select 0,CurrencyName]; PVAH_WriteLogReq = [player,toArray _sl]; publicVariableServer 'PVAH_WriteLogReq'; }; adminCoinsPlus = { { if (name _x == _this select 0) then { _coins = _x getVariable[Z_moneyVariable,0]; _x setVariable[Z_moneyVariable,_coins + 25000,true]; hint format['Gave %1 +25,000 %2!',_this select 0,CurrencyName]; _sl = format['%1 +25,000 %3 to %2',name player,_this select 0,CurrencyName]; PVAH_WriteLogReq = [player,toArray _sl]; publicVariableServer 'PVAH_WriteLogReq'; }; } forEach playableUnits; }; adminCoinsMinus = { { if (name _x == _this select 0) then { _coins = _x getVariable[Z_moneyVariable,0]; _x setVariable[Z_moneyVariable,_coins - 25000,true]; hint format['Gave %1 -25,000 %2!',_this select 0,CurrencyName]; _sl = format['%1 -25,000 %3 to %2',name player,_this select 0,CurrencyName]; PVAH_WriteLogReq = [player,toArray _sl]; publicVariableServer 'PVAH_WriteLogReq'; }; } forEach playableUnits; }; That is straight from my server so that should work OK (maybe, haha) gle353 and Relentless 1 1 Link to comment Share on other sites More sharing options...
salival Posted March 6, 2017 Report Share Posted March 6, 2017 To add coins to spectate view: Find this line in AT.sqf: _log2 = format['Blood: %1 Humanity: %2',(_unit getVariable['USEC_BloodQty',12000]),(_unit getVariable['humanity',0])]; Replace with this line: _log2 = format['Blood: %1 Humanity: %2 Coins: %3',_unit getVariable['USEC_BloodQty',12000],_unit getVariable['humanity',0],[(_unit getVariable [z_moneyVariable,0])] call BIS_fnc_numberText]; Relentless, theduke and gle353 2 1 Link to comment Share on other sites More sharing options...
rockybonne Posted March 18, 2017 Report Share Posted March 18, 2017 Link to comment Share on other sites More sharing options...
nova Posted April 14, 2017 Report Share Posted April 14, 2017 what if i do not have an at.sqf? I only have ah.sqf in the ah folder. even did a search for it. not there. i used to have 1 in my old overpoch server but the 1061 server didnt come with 1. is there any other way to do it? Link to comment Share on other sites More sharing options...
salival Posted April 14, 2017 Report Share Posted April 14, 2017 @novaI would guess you are with a hosting provider that has hidden that file from you, in which case you're not going to have much luck. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now