Jump to content

[Alpha Release] Single Currency 3.0 & Storage DEFAULT HIVE ( No global banking).


Recommended Posts

i would try to go through the hole installation

 

@Chainsaw Squirrel

 

ive installed the plot thing first and then the zsc.. worked perfectly

 

 

 

 

 

What about the Defines between Plot and Coins .. can the co exist or do they need modified  .. in other words .. no conflicts ??

#include "plotManagement\defines.hpp"

 

#include "ZSC\config\ZSCdefines.hpp"

 

and the fn_selfActions.sqf .. modify zuppa's in the ZSC folder or the self actions in the dayz code ??   

Link to comment
Share on other sites

 

What about the Defines between Plot and Coins .. can the co exist or do they need modified  .. in other words .. no conflicts ??

#include "plotManagement\defines.hpp"

 

#include "ZSC\config\ZSCdefines.hpp"

 

and the fn_selfActions.sqf .. modify zuppa's in the ZSC folder or the self actions in the dayz code ??   

 

i have merged the defines and took the plot fn_selfactions and just copied everything needed in it

 

/edit i took my defines.hpp from dzgm and merged it with all my scripts. coexist is not possible, the server will not let you login if something is double-defined. merge it, and comment every line is the best option i guess

Link to comment
Share on other sites

ZUPA,

I think the instructions need updated for the noob server moders since, player_packVault and player_packTent are not mentioned anywhere. The ZSCconfig.sqf has a True/False overwrite for them, but also recommends editing them yourself instead of overwriting them, if you use other mods such as P4L. Not a hard thing to do, I just used diffmerg on your supplied files vs my custom ones, and just didnt overwrite the P4L changes. But, I'm sure there are some people that will be confused. Also, would be nice if your instructions pointed to the proper locations. IE compile\ instead of compiles\.... server PBO directory doesn't contain an s on the end...the compiles.sqf does. Of course, in your instructions when refering to your supplied files and where to find them, the s is fine, since you added it to your compile directory, making it compiles instead. But, every dayz_server.pbo and dayz_code.pbo I have seen, has the directory as compile, no s. (But, thats just me, and the pbo's I've seen.)

 

Anyway, some basic instructions for what lines to add to the packVault and packTent may be helpful too some people.

Link to comment
Share on other sites

Hey ive noticed when i added some ammo to the hero trader, it doesnt let me use it. 

 

My client log says

 

 

Warning Message: Script custom\ZSC\actions\“trade_weapons”.sqf not found
 

I dont know where this file is...

 

The item ive tried to add was the as50 and the ammo. some other ammo that wasnt there normally also doesnt work. but the rest do in the same trader.

 

U have double quotes on the added entry in the config files ( of the item u added)

Link to comment
Share on other sites

dozens of users have this same exact bug so yes there is something wrong with this alpha version.

 

 

So, what is the fix for Coins not saving in the storage? I know someone has figured it out! Can someone tell us? I've read through trying to find it. If it is already in here refer me to the reply and i must be blind and I'm sorry! haha. Also, my storage only shows like 4 or 6 coins total to put in however i can put in however big the storage device is times 1000 like it's supposed to be..whats up with that? I installed everything correctly, I've had to do it like 6 times while trying to get it to work with Vector Build and Precise Build.. so what the eff? haha

Thanks for the help in advance guys!

 

I'm sorry to have to repeat what others have said, but, CHECK YOUR FILES AGAIN. Unfortunately, the dozens of users with this "bug" have done something wrong. There way more than a dozen servers with this working just fine. I have a Overpoch Napf server myself, that has no issues. As Wootywoop mentioned, don't use admin tools to unlock/lock storage. (See below for a possible fix to that). Maybe your players complaining of losing coins are admins and using the admin unlock to be lazy. I have had many server restarts, and no lost coins. Make sure you are using the correct variable names in your files. I could go on and on about things to check, but, many things have already been mentioned before, on so many different threads about mod problems. Its really the basic things that people keep missing. It is rather easy to misread the instructions and do something wrong. One thing I learned from programming that helps sometimes, have a friend look at the code. Many times they see what you overlook. If you are using plot4life, or any other mod that uses the same files, then merge the duplicate files into one file and change the paths. Your problems could be that you modified the file you were told to in the install instructions, but have duplicate file that you forgot about, and it gets called after the file you modified, therefor, overwriting the values of the previous file.

 

If you are still having problems, post your current files so we can look at them again, and list what mods you have on your server.

HI guys and gals,

 

Just added this lovely script to my server and found that AxeCops service point script and Matt-d-rats towing script have stopped working. :(  I attempted a merge of Zupa's fn_selfactions with my own (knowing there are alterations) during the installation and i think that's where the problem is.

 

I'm going to try a slight roll back on one of the elements of the script (the check wallet part) and see if that's what's causing the problem. Nope not that. I've replaced the service point script with a modification of Axe cops script and it seems to be working... If anyone knows what might be causing this plz let me know  :)

 

 

FYI For those that use Nox's epoch admin tools 1.9.1. Don't try to unlock safes using the unlock option for vehicles. Although it unlocks the safe it wipes the coins from the safe.

 

Regards,

 

Woot

 

The reason you lose coins using his unlock, is because, in basic terms, when the safe is "unlocked", the locked safe is really replaced with an unlocked one. Just look at the code if ya don't believe me. Its like, basic object oriented programming when it comes to A2/Dayz. Nox's tools aren't written for coins, and don't pull the coins variable when unlocking. So, if you want to use Nox's unlock and not lose coins, then edit the PointToUnlock.sqf of Nox's tools, and make it get the money variable, and then set it when placing the unlocked version. I haven't tested this fix yet, but I will in a few minutes. But, here is what I am about to try.

In Nox's PointToUnlock.sqf

Add

"_lockedMoney",

 

To the beginning of

private [

 

Add

_lockedMoney = _obj getVariable ["bankMoney",0];

 

above

_objectID = _obj getVariable["ObjectID","0"];

 

Add

_holder setVariable ["bankMoney", _lockedMoney , true];

 

After

_holder setPosATL _pos;

 

My pointtounlock:

private ["_lockedMoney","_objectID","_objectUID","_obj","_ownerID","_dir","_pos","_holder","_weapons","_magazines","_backpacks","_objWpnTypes","_objWpnQty","_countr","_unlockedClass","_objType","_objectCharacterID","_player"];
 
_obj = cursorTarget;
if(isNull _obj) exitWith {};
_objectID = _obj getVariable["ObjectID","0"];
_objType = typeOf _obj;
_player = player;
 
// Unlock car
if (_obj isKindOf "LandVehicle" || _obj isKindOf "Air" || _obj isKindOf "Ship") then {
 
{player removeAction _x} forEach s_player_lockunlock;s_player_lockunlock = [];
s_player_lockUnlock_crtl = 1;
 
PVDZE_veh_Lock = [_obj,false];
 
if (local _obj) then {
PVDZE_veh_Lock spawn local_lockUnlock
} else {
publicVariable "PVDZE_veh_Lock";
};
 
s_player_lockUnlock_crtl = -1;
 
// Tool use logger
if(logMajorTool) then {
usageLogger = format["%1 %2 -- has unlocked vehicle: %3 with ID:%4",name _player,getPlayerUID _player,_obj,_objectID];
[] spawn {publicVariable "usageLogger";};
};
// Tool use broadcaster
if(!((getPlayerUID _player) in SuperAdminList) && broadcastToolUse) then {
useBroadcaster = format["%1 -- has forcibly unlocked a vehicle",name _player];
[] spawn {publicVariableServer "useBroadcaster";};
};
 
} else {
// Unlock Safe/Lock_Box
if(_objType in DZE_LockedStorage) then {
// Get all required variables
_unlockedClass = getText (configFile >> "CfgVehicles" >> _objType >> "unlockedClass");
_text = getText (configFile >> "CfgVehicles" >> _objType >> "displayName");
_dir = direction _obj;
_pos = _obj getVariable["OEMPos",(getposATL _obj)];
_lockedMoney = _obj getVariable ["bankMoney",0];
_objectID = _obj getVariable["ObjectID","0"];
_objectUID = _obj getVariable["ObjectUID","0"];
_ownerID = _obj getVariable["CharacterID","0"];
_weapons = _obj getVariable["WeaponCargo",[]];
_magazines = _obj getVariable["MagazineCargo",[]];
_backpacks = _obj getVariable["BackpackCargo",[]];
_holder = createVehicle [_unlockedClass,_pos,[], 0, "CAN_COLLIDE"];
 
//log the lockUnlock
PVDZE_log_lockUnlock = [player, _obj, false];
publicVariableServer "PVDZE_log_lockUnlock";
_obj setVariable["packing",1];
 
// Remove locked vault
deleteVehicle _obj;
 
//Add the new unlocked safe
_holder setdir _dir;
_holder setPosATL _pos;
_holder setVariable ["bankMoney", _lockedMoney , true];
player reveal _holder;
 
_holder setVariable["CharacterID",_ownerID,true];
_holder setVariable["ObjectID",_objectID,true];
_holder setVariable["ObjectUID",_objectUID,true];
_holder setVariable ["OEMPos", _pos, true];
 
if (count _weapons > 0) then {
//Add weapons
_objWpnTypes = _weapons select 0;
_objWpnQty = _weapons select 1;
_countr = 0;
{
_holder addweaponcargoGlobal [_x,(_objWpnQty select _countr)];
_countr = _countr + 1;
} count _objWpnTypes;
};
 
if (count _magazines > 0) then {
//Add Magazines
_objWpnTypes = _magazines select 0;
_objWpnQty = _magazines select 1;
_countr = 0;
{
if( _x != "CSGAS" ) then
{
_holder addmagazinecargoGlobal [_x,(_objWpnQty select _countr)];
_countr = _countr + 1;
};
} count _objWpnTypes;
};
 
if (count _backpacks > 0) then {
//Add Backpacks
_objWpnTypes = _backpacks select 0;
_objWpnQty = _backpacks select 1;
_countr = 0;
{
_holder addbackpackcargoGlobal [_x,(_objWpnQty select _countr)];
_countr = _countr + 1;
} count _objWpnTypes;
};
 
// Tool use logger
if(logMajorTool) then {
usageLogger = format["%1 %2 -- has unlocked a safe - ID:%3 UID:%4",name _player,getPlayerUID _player,_objectID,_ownerID];
[] spawn {publicVariable "usageLogger";};
};
// Tool use broadcaster
if(broadcastToolUse) then {
useBroadcaster = "Admin -- has forcibly unlocked a safe";
[] spawn {publicVariableServer "useBroadcaster";};
};
 
} else {
 
_objectCharacterID = _obj getVariable ["CharacterID","0"];
 
//Unlock Doors
if(_obj animationPhase "Open_hinge" == 0) then {_obj animate ["Open_hinge", 1];};
if(_obj animationPhase "Open_latch" == 0) then {_obj animate ["Open_latch", 1];};
if(_obj animationPhase "Open_door" == 0) then {_obj animate ["Open_door", 1];};
if(_obj animationPhase "DoorR" == 0) then {_obj animate ["DoorR", 1];};
if(_obj animationPhase "LeftShutter" == 0) then {_obj animate ["LeftShutter", 1];};
if(_obj animationPhase "RightShutter" == 0) then {_obj animate ["RightShutter", 1];};
 
// Tool use logger
if(logMajorTool) then {
usageLogger = format["%1 %2 -- has unlocked a door - ID:%3 Combo:%4",name _player,getPlayerUID _player,_objectID,_objectCharacterID];
[] spawn {publicVariable "usageLogger";};
};
// Tool use broadcaster
if(broadcastToolUse) then {
useBroadcaster = "Admin -- has forcibly unlocked a door";
[] spawn {publicVariableServer "useBroadcaster";};
};
};
};

 
Again guys, coins not "saving" isn't a bug. It's a install mistake. Maybe you copied the inserted stuff wrong, merged p4l or another mod wrong, or whatever. Either way, since so many of us that have it working with out problem, that means ZSC itself is not the problem. We all followed the same instructions, so if it was a bug, we would all have it, not just some servers.
 
The next time you have coins on you, check your database inventory space, and see how its formatted. Should be as shown below, with coins at the end. If not, then you have something messed up somewhere.

[["NVGoggles","ItemMap","ItemMatchbox_DZE","ItemKnife","ItemToolbox","ItemRadio","ItemCrowbar","Binocular","ItemKeyBlack647","ItemCompass","ItemGPS","ItemKeyGreen25","ItemKeyGreen619","M110_NVG_EP1"],["FoodSteakCooked","ItemSodaCoke","ItemBandage","ItemBandage","ItemMorphine","ItemBloodbag","ItemPainkiller","ItemBandage","ItemBandage","ItemBandage","ItemBandage","ItemBandage","ItemBandage"],247900]

 
Figure out if all coins disappear on restart or what. Do all storage objects lose coins or just certain types? 
Link to comment
Share on other sites

Anyone that has issues with buying/selling canceling, turn off instant trade. Buying/selling vehicles seemed to work just fine, but buying ammo and selling weapons (probably everything but only tested ammo and weapons) ended in almost an instant "Trade Canceled". Turning off instant trade in the config fixed it. This has been said before, but some people don't like to read all posts it seems.

 

I haven't taken the time to fix this issue, but I am sure some one has, or can fix it quickly. Could probably check the RPT right after trying and see what the error is.

Link to comment
Share on other sites

Hey zupa,

 

My clients are telling me that items and coin have been disapearing from their safes. Some people say when they are on the server they check the safe, has coin and a few breifs inside or something. they close it go out to do some missions and come back and its all gone. I can say no one stole it, so it has to be something ive done wrong or mabe people havent tested this 100%. dont know which one it is yet :D

 

how should i go about debugging this?


Link to comment
Share on other sites

Hey zupa,

 

My clients are telling me that items and coin have been disapearing from their safes. Some people say when they are on the server they check the safe, has coin and a few breifs inside or something. they close it go out to do some missions and come back and its all gone. I can say no one stole it, so it has to be something ive done wrong or mabe people havent tested this 100%. dont know which one it is yet :D

 

how should i go about debugging this?

Having same problem
Link to comment
Share on other sites

So i have installed a new test server. I have used server and mission files that Zupa have made. The only scripts installed beside the singleCoin is Nox's admin tools. 

I lock and unlock the safe with the code, not the admin tool. 

 

I can see in the database that when I store money in the safe, it updates the DB and show the money stored.

But when I lock the safe the money in the DB says 0. 

When I unlock the safe, the money is still there. And the DB updates back to say that there is money in the safe.

 

If I restart the server when the safe is unlocked the money is saved, and is still there when the server is back online.

If I restart the server when the safe is locked, the money is gone.

 

So am I missing something in Locksafe.sqf or in the Unlocksafe.sqf??

 

Moneystorage in vehicles is working. No problems there.

 

I have tried figuring this out for the last month. Noob on scripting, so please help me out.  

Link to comment
Share on other sites

So i have installed a new test server. I have used server and mission files that Zupa have made. The only scripts installed beside the singleCoin is Nox's admin tools. 

I lock and unlock the safe with the code, not the admin tool. 

 

I can see in the database that when I store money in the safe, it updates the DB and show the money stored.

But when I lock the safe the money in the DB says 0. 

When I unlock the safe, the money is still there. And the DB updates back to say that there is money in the safe.

 

If I restart the server when the safe is unlocked the money is saved, and is still there when the server is back online.

If I restart the server when the safe is locked, the money is gone.

 

So am I missing something in Locksafe.sqf or in the Unlocksafe.sqf??

 

Moneystorage in vehicles is working. No problems there.

 

I have tried figuring this out for the last month. Noob on scripting, so please help me out.  

You are missing something in Locksafe.sqf I would say. The ways I said to fix the admin script lock/unlock would be basically the same for you, just with your regular scripts.

 

Post #563 I gave some code for the fix, but I should have mentioned it needs to be done in both scripts, that is, in the locksafe and the unlocksafe scripts. The object is replaced during both actions. If you are using P4L, make sure you make the changes in the files contained in its folder. Same goes for other mods, make sure you are doing the changes in the file that is actually being referenced in your server files. Ya, I know, that's just common sense. I just wish common sense was more common. haha.

 

Oh, an update to my above post, the fix I mentioned does fix the coins disapearing with the admin unlock/lock, as long as you do it to both files. if using P4L, or maybe other plot management, you also need to add some stuff about characterID and such. Not required unless you care about being able to keep opening your safe without entering code as the owner it seems. You really could take the changes that you have to make for using P4L, and add them to your admin tools files as well. After I did my fix, I was looking at P4L files, and noticed the ZSC changes to its files, were basically the same as what I did. I just used a different variable name is all.

 

So use my fix, and you can use admin lock and unlock with out losing coins.

 

Anyway, check your lock/unlock files Smallpox. I bet you missed a step for them.

Link to comment
Share on other sites

People just don't know they have a client rpt on there pc which explains what u did wrong.

 

Indeed, server owners and admins should do some research and learn a bit. So many are lacking the basics. I'm no expert, but, I do a lot of searching and reading, and comparing my stuff to others, before I start asking questions. I even read EVERY single post in the thread before I post. Most of these guys skip to the last page. So its no wonder we have to repeat everything.

Link to comment
Share on other sites

we seem to be having the same issue on our server as well, except we had the coin mod working for awhile and it was working fine, we installed vector building and the coin in safes/lock boxes starting dissapearing after restart, sheds/cars are working fine, only the safes and lock boxes have been affected. 

 

i read the fixes you listed bualdoot, however we don't use any of the mentioned mods (p4l,nox) we are currently using no plot pole anyone have any idea's? 

Link to comment
Share on other sites

OK now the coins save in lock boxes and safes after restart, in fact as pointed out by other users it,s not a bug it's really just a call files issue. Sry for beeing such a noob, for others noobsters like me my problem came from Plot For Life, that's where you need to adjust the files. Maybe (eventually) add a list of commonly used scripts/addons that calls the same files as this currency system in the instructions so noob scripters like me spend less time on trying to figure it out? idk, just a suggestion.. lol

Link to comment
Share on other sites

I'm also having this issue where coins are not in safes after restart.

 

It was working, yet after installing a new loadscreen and dzai vehicle patrols it just stopped.

 

arma 2 oa client report says nothing at all regarding coins.

 

Very frustrating.

Link to comment
Share on other sites

Hello Zupa

 

i have a little problem with your skript  .... i use it on my Epoch Napf Server i put the skript at first on the Server

 

it works ... ( the Safes are in Funktion)  but when i use this funktion

 

// (True = No Animation / False = Animation)
InstantTrading = false;

 

true; ... change ...

 

i dont can trade at Shratten and Lenzburg Wepaons and Ammo  he will trade and then "Handel abgebrochen"

 

Emmen are full in Funktion ...... ?????

 

Can you help me ?

 

Sorry for my bad english

nuss

Link to comment
Share on other sites

Hello Zupa

 

i have a little problem with your skript  .... i use it on my Epoch Napf Server i put the skript at first on the Server

 

it works ... ( the Safes are in Funktion)  but when i use this funktion

 

// (True = No Animation / False = Animation)

InstantTrading = false;

 

true; ... change ...

 

i dont can trade at Shratten and Lenzburg Wepaons and Ammo  he will trade and then "Handel abgebrochen"

 

Emmen are full in Funktion ...... ?????

 

Can you help me ?

 

Sorry for my bad english

nuss

 

This is because these traders are not standing on the ground. You can fix this by following these directions : 

 

Replace 

if (player distance _oldPosition <= 1) then {

with

if ((position player) distance _oldPosition <= 1) then {

in ALL of these files

 

  • ZSC\actions\trade_any_bicycle.sqf
  • ZSC\actions\trade_any_boat.sqf
  • ZSC\actions\trade_any_vehicle.sqf
  • ZSC\actions\trade_backpacks.sqf
  • ZSC\actions\trade_items.sqf       [ 2 times! ]
  • ZSC\actions\trade_weapons.sqf

 

Thanks to BangL

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...