Jump to content

[Release] Single Currency Axe Cop Service Points for SC


Recommended Posts

Credits to Axe for orignal script.
 
Universal for 1.1 and 2.0

  
These are based on my dev functions: (The functions are needed in your compiles, double check this!)
 

 

THE DEV FUNCTIONS are needed!
 
 
 
 
You can find Service Points files on github here:
 
Replace your old files with these.
 
https://github.com/EpochSC/ServicePointSC

 

Change the configs to your likings.

Link to comment
Share on other sites

Thanks, been waiting for this. :)

 

I'm getting some errors in my client rpt log

  Reveal hidden contents

if !([ player,_costs select 1] call SC_fnc_removeCoins) then >


  Error position: <select 1] call SC_fnc_removeCoins) then >
  Error Zero divisor
File mpmissions\__CUR_MP.panthera2\custom\service_point\service_point_refuel.sqf, line 15
Error in expression <;


if !([ player,_costs select 1] call SC_fnc_removeCoins) then {
_textMissing >
  Error position: <SC_fnc_removeCoins) then {
_textMissing >
  Error Undefined variable in expression: sc_fnc_removecoins
File mpmissions\__CUR_MP.panthera2\custom\service_point\service_point_repair.sqf, line 14
Error in expression <;


if !([ player,_costs select 1] call SC_fnc_removeCoins) then {
_textMissing >
  Error position: <SC_fnc_removeCoins) then {
_textMissing >
  Error Undefined variable in expression: sc_fnc_removecoins
File mpmissions\__CUR_MP.panthera2\custom\service_point\service_point_rearm.sqf, line 15
Error in expression <;

 

anyone figure this out yet?

 

Oh and just to let everyone know there is a missing ] in service_point.sqf

  Reveal hidden contents

This

_repair_costs = [
    ["Air",[CurrencyName,_coinsRepairAir], // 5 Gold for helicopters and planes
    ["AllVehicles",[CurrencyName,_coinsRepairVehicles]] // 2 Gold for all other vehicles
];

should be this

_repair_costs = [
    ["Air",[CurrencyName,_coinsRepairAir]], // 5 Gold for helicopters and planes
    ["AllVehicles",[CurrencyName,_coinsRepairVehicles]] // 2 Gold for all other vehicles
];

Link to comment
Share on other sites

  On 8/12/2014 at 9:14 PM, orionjade said:

Thanks, been waiting for this. :)

 

I'm getting some errors in my client rpt log

  Reveal hidden contents

if !([ player,_costs select 1] call SC_fnc_removeCoins) then >

  Error position: <select 1] call SC_fnc_removeCoins) then >

  Error Zero divisor

File mpmissions\__CUR_MP.panthera2\custom\service_point\service_point_refuel.sqf, line 15

Error in expression <;

if !([ player,_costs select 1] call SC_fnc_removeCoins) then {

_textMissing >

  Error position: <SC_fnc_removeCoins) then {

_textMissing >

  Error Undefined variable in expression: sc_fnc_removecoins

File mpmissions\__CUR_MP.panthera2\custom\service_point\service_point_repair.sqf, line 14

Error in expression <;

if !([ player,_costs select 1] call SC_fnc_removeCoins) then {

_textMissing >

  Error position: <SC_fnc_removeCoins) then {

_textMissing >

  Error Undefined variable in expression: sc_fnc_removecoins

File mpmissions\__CUR_MP.panthera2\custom\service_point\service_point_rearm.sqf, line 15

Error in expression <;

 

anyone figure this out yet?

 

Oh and just to let everyone know there is a missing ] in service_point.sqf

  Reveal hidden contents

This

_repair_costs = [

    ["Air",[CurrencyName,_coinsRepairAir], // 5 Gold for helicopters and planes

    ["AllVehicles",[CurrencyName,_coinsRepairVehicles]] // 2 Gold for all other vehicles

];

should be this

_repair_costs = [

    ["Air",[CurrencyName,_coinsRepairAir]], // 5 Gold for helicopters and planes

    ["AllVehicles",[CurrencyName,_coinsRepairVehicles]] // 2 Gold for all other vehicles

];

Got this figured out, but I'm having some trouble with the refuel, it says missing <null> more of <null> after clicking on refuel. Anyone have a solution for this?

Link to comment
Share on other sites

  Reveal hidden contents

 

Did you add the variables to your custom compiles? 

 

If you have Souls custom Hive.dll

In those variables change 'headShots' to 'cashMoney'

 

Refuel wasn't working as i was getting null something null (cant remember exactly)  :rolleyes:

In Service_point.sqf i changed

 

  Reveal hidden contents

_refuel_costs = [];

 

to

 

  Reveal hidden contents
_refuel_costs = [
["AllVehicles",[CurrencyName,_coinsRefuelVehicles]],

 

["Air",[CurrencyName,_coinsRefuelAir]]];

 

Then added:

 

  Reveal hidden contents

_coinsRefuelVehicles = 0;

_coinsRefuelAir = 0;

 

Under:

 

  Reveal hidden contents

_coinsRepairVehicles = 2000;

 

Probably not the best way to go about it, works tho.  :lol:

 

service_point.sqf

Link to comment
Share on other sites

  On 8/14/2014 at 4:58 AM, kat said:

  Reveal hidden contents

 

Did you add the variables to your custom compiles? 

 

If you have Souls custom Hive.dll

In those variables change 'headShots' to 'cashMoney'

 

Refuel wasn't working as i was getting null something null (cant remember exactly)  :rolleyes:

In Service_point.sqf i changed

 

  Reveal hidden contents

_refuel_costs = [];

 

to

 

  Reveal hidden contents
_refuel_costs = [
["AllVehicles",[CurrencyName,_coinsRefuelVehicles]],

 

["Air",[CurrencyName,_coinsRefuelAir]]];

 

Then added:

 

  Reveal hidden contents

_coinsRefuelVehicles = 0;

_coinsRefuelAir = 0;

 

Under:

 

  Reveal hidden contents

_coinsRepairVehicles = 2000;

 

Probably not the best way to go about it, works tho.  :lol:

 

service_point.sqf

Thanks, I'll try this later today.

I

No I don't use Soul's .dll cause no one there seems willing the try and help me get it working, I have nothing but errors with his .dll file. I wish I could get his to work cause I would rather use this version instead of the original.

Link to comment
Share on other sites

  On 8/16/2014 at 11:36 AM, kat said:

Specifically what stations?

As you know service stations normally have the yellow colored text "VEHICLE SERVICE POINT NEARBY" come up automatically when you're in close range (10 meters or so) and they have the service point mousewheel menu appear as per normal.  The one which was "not working" for us: (North of Solnichniy) didn't had the text and no mouse wheel service point options came up.

 

I am 100% sure it did NOT work when we tested it last time (just before I posted this thread). We had 5 guys in the heli, we took turns trying to figure out what's wrong with it and it consistently did not work.

We were lifting a heli and the lifting heli or the lifted heli (and also none of the quickly spawned land/air vehicles received the service point action menu).

I am not sure whether a one off oddity or something else that will bug us in the future but for now we can assume it is all good as the issue affected only me and just once.

 

NO ISSUES (working consistently with over 20 restarts so far): East of Kamenka, West of Cherno, West of Elektro, East of Novy Sobor.

Link to comment
Share on other sites

Works perfectly on Overpoch Taviana with Soul's hive.dll. Thanks a lot.

 

  Reveal hidden contents

 

Works fine for me. Just tried repairing/refueling some 350z's.

 

 

Edit// Just noticed a minor error in this.

When you don't have the right amount of money you will get a weird message something like: "You need 1000 more of Coins". Instead of calculating the amount of coins you're missing. Not exactly the most vital error but if you're a perfectionst then this fix will help:

 

service_point_repair.sqf

Find:

cutText [format[(localize "STR_EPOCH_ACTIONS_12"), _costs select 1, _textMissing], "PLAIN DOWN"];

Replace with:

_player_money = player getVariable ["cashMoney",0];
_repair_cost = _costs select 1;
_needed = _repair_cost - _player_money;
cutText [format["You need another %1 %2",_needed,CurrencyName] , "PLAIN DOWN"];

Do the same with service_point_refuel.sqf and service_point_rearm.sqf.

 

Now you get something like: You need another 500 Coins.

Link to comment
Share on other sites

I've done everything listed here, and I get no errors, but when I go to any of the fuel stations I don't get the scroll menu.

 

I'm running on Chernarus overpoch.

I've done everything as stated by Rocu and Kat as far as edits and fixes go, and I've double checked everything.

I've also added in the dev functions.

Link to comment
Share on other sites

I am using a modified version of this but i am am having issues with refuel.

I have the refuel set at free.  but when I try and refuel without any coins it tells me that i need 0 coins.

Can anyone give me some pointers?

 

  Reveal hidden contents

 

If I have coin on me, it will refuel but not deduct any coin.

Link to comment
Share on other sites

  On 8/23/2014 at 3:44 AM, McPimpin said:

I am using a modified version of this but i am am having issues with refuel.

I have the refuel set at free.  but when I try and refuel without any coins it tells me that i need 0 coins.

Can anyone give me some pointers?

 

  Reveal hidden contents

 

If I have coin on me, it will refuel but not deduct any coin.

 

See here for fix:

Link to comment
Share on other sites

  On 8/22/2014 at 3:21 PM, GSGBen said:

I've done everything listed here, and I get no errors, but when I go to any of the fuel stations I don't get the scroll menu.

 

I'm running on Chernarus overpoch.

I've done everything as stated by Rocu and Kat as far as edits and fixes go, and I've double checked everything.

I've also added in the dev functions.

 

Did you follow the original Service Point tutorial first? If not, do that first, THEN replace it with Zupa's files. Here's the original: 

Link to comment
Share on other sites

same here  I cant get this to work  I have had original working fine and I just replace the the files on here with the old ones and nothing, then I do the fixes stated on the first page and I get the scroll options but nothing happens when I click on them? Can someone please drop me a link the their working files for this. I don't know what else to try. Thanks 

Link to comment
Share on other sites

  On 8/25/2014 at 8:35 PM, Pro_Speedy said:

Struggling to get this working properly 

 

I am  no no longer getting any messages or options.

 

Could someone take a look and see what's wrong?

 

http://pastebin.com/Q4aDksT6

 

Thank you

 

did you add the functions to the top of your compiles.sqf? I use souls custom hive.dll

//Player only

BIS_fnc_numberDigits 	= compile preprocessFileLineNumbers "custom\numberDigits.sqf";
BIS_fnc_numberText 	= compile preprocessFileLineNumbers "custom\numberText.sqf"; 
// usage
// _removed = [player, 5000] call SC_fnc_removeCoins;
// if(_removed = true)then{  GREAT SUCCES  }else{ IT FAILED, not enoguh money};

SC_fnc_removeCoins=
	{
				private ["_player","_amount","_wealth","_newwealth", "_result"];
				_player =  _this select  0;
				_amount =  _this select  1;
				_result = false;
				_wealth = _player getVariable["cashMoney",0];		
				if (_wealth < _amount) then { 
					_result = false;
				} else { 						
				_newwealth = _wealth - _amount;
				_player setVariable["cashMoney",_newwealth, true];
				_player setVariable ["moneychanged",1,true];	
				_result = true;
				PVDZE_plr_Save = [_player,(magazines _player),true,true] ;
				publicVariableServer "PVDZE_plr_Save";			
				};
				_result
	};

// usage
// _added = [player, 5000] call SC_fnc_addCoins;
// if(_added = true)then{ GREAT SUCCES }else{ IT FAILED, Something went wrong};
	
SC_fnc_addCoins = 
{
	private ["_player","_amount","_wealth","_newwealth", "_result"];			
			_player =  _this select  0;
			_amount =  _this select  1;
			_result = false;	
			_wealth = _player getVariable["cashMoney",0];
			_player setVariable["cashMoney",_wealth + _amount, true];
			PVDZE_plr_Save = [_player,(magazines _player),true,true] ;
			publicVariableServer "PVDZE_plr_Save";
			_player setVariable ["moneychanged",1,true];					
			_newwealth = _player getVariable["cashMoney",0];		
			if (_newwealth >= _wealth) then { _result = true; };			
			_result
};	
Link to comment
Share on other sites

Hello, I am having trouble getting this to work correctly on our server. I cannot repair or rearm any vehicles if there is a cost for the action, but if i set the cost to 0 it works.What could be the problem?

 

Here is my service_point.sqf :

  Reveal hidden contents

// refuel settings
_refuel_enable = true; // enable or disable the refuel option
_refuel_costs = [
["AllVehicles",[CurrencyName,_coinsRefuelVehicles]], 
["Air",[CurrencyName,_coinsRefuelAir]]]; // free for all vehicles (equal to [["AllVehicles",[]]])
_refuel_updateInterval = 1; // update interval (in seconds)
_refuel_amount = 0.05; // amount of fuel to add with every update (in percent)
 
// repair settings
_repair_enable = true; // enable or disable the repair option
_repair_costs = [
["Air",[CurrencyName,_coinsRepairAir]], // 5 Gold for helicopters and planes
["AllVehicles",[CurrencyName,_coinsRepairVehicles]]]; // 2 Gold for all other vehicles
 
_repair_repairTime = 2; // time needed to repair each damaged part (in seconds)
 
// rearm settings
_rearm_enable = true; // enable or disable the rearm option
_rearm_costs = [
["ArmoredSUV_PMC_DZE",[CurrencyName,_coinsRearmSUV]], // special costs for a single vehicle type
["Air",[CurrencyName,_coinsRearmAir]], // 2 10oz Gold for helicopters and planes
["AllVehicles",[CurrencyName,_coinsRearmVehicles]]]; // 1 10oz Gold for all other vehicles
 
_rearm_magazineCount = 3; // amount of magazines to be added to the vehicle weapon
 

 

Here is the add/remove coins code in my compiles.sqf from Zupa:

 

  Reveal hidden contents

// usage
// _removed = [player, 5000] call SC_fnc_removeCoins;
// if(_removed = true)then{  GREAT SUCCES  }else{ IT FAILED, not enoguh money};
 
SC_fnc_removeCoins=
{
private ["_player","_amount","_wealth","_newwealth", "_result"];
_player =  _this select  0;
_amount =  _this select  1;
_result = false;
_wealth = _player getVariable["headShots",0];
if (_wealth < _amount) then { 
_result = false;
} else {
_newwealth = _wealth - _amount;
_player setVariable["headShots",_newwealth, true];
_player setVariable ["moneychanged",1,true];
_result = true;
PVDZE_plr_Save = [_player,(magazines _player),true,true] ;
publicVariableServer "PVDZE_plr_Save";
};
_result
};
 
// usage
// _added = [player, 5000] call SC_fnc_addCoins;
// if(_added = true)then{ GREAT SUCCES }else{ IT FAILED, Something went wrong};
 
SC_fnc_addCoins = 
{
private ["_player","_amount","_wealth","_newwealth", "_result"];
_player =  _this select  0;
_amount =  _this select  1;
_result = false;
_wealth = _player getVariable["headShots",0];
_player setVariable["headShots",_wealth + _amount, true];
PVDZE_plr_Save = [_player,(magazines _player),true,true] ;
publicVariableServer "PVDZE_plr_Save";
_player setVariable ["moneychanged",1,true];
_newwealth = _player getVariable["headShots",0];
if (_newwealth >= _wealth) then { _result = true; };
_result
};
 

 

Thanks for any help I get and these great scripts. 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
×
×
  • Create New...