Adding extdb3 trade logs

Adding extdb3 trade logs

« posted: Dec 07, 2017, 02:05 AM »
Hey, so i would like to add trade logs in exile style for extdb3.
1. Added A3W_extDB_TraderLogs = 1; in main_config.
2. Put in \server\setup\extdb\init.sqf the following:
Code: [Select]
if (["A3W_extDB_TraderLogs"] call isConfigOn) then
{
"extDB3" callExtension "9:ADD_PROTOCOL:LOG:TRADING:A3Wasteland_TradingLog";
diag_log "[extDB3] Initialized LOG:TRADING protocol";
};
Which works fine, i see a record in rpt.
3. Went to \client\systems\vehicleStore\buyVehicles.sqf
And added under the IF of A3W_playerSaving the following
Code: [Select]
if (["A3W_extDB_TraderLogs"] call isConfigOn) then
{
_traderLog = format ["PLAYER: ( %1 ) %2 PURCHASED VEHICLE %3 FOR %4 DOLLARS | PLAYER TOTAL MONEY: %5",getPlayerUID player,player,_class,_price,_playerMoney];
"extDB3" callExtension format["1:TRADING:%1",_traderLog];
};
Which didn't work. I then changed it to _traderLog ="test"; and it didn't work. Then i just stuffed diag_log close to end of this file in few random places and it never wrote anything to rpt. How do i call "extdb3" from the \client\ subsystem?
Thanks in advance!
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2354

Re: Adding extdb3 trade logs

« Reply #1 posted: Dec 08, 2017, 04:09 AM »
You cannot callExtension from the client. You must use remoteExec to send the information to the server, then use callExtension. Or you can callExtension directly from spawnStoreObject.sqf, which contains all the same info as buyVehicles.sqf

Re: Adding extdb3 trade logs

« Reply #2 posted: Dec 08, 2017, 04:58 PM »
After doing everything right few hours ago and hitting the wall and then finding out that i have to broadcast config variable it finally works, thank you very much!
Adding these logs only to have an ability to find dupers. Have 200 dupers in my ban list on my exile server. Do you want to add such functionality? I can send you a commit or files change log. Going to have a log for all items/vehicles purchase/sale.
Thanks again!
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2354

Re: Adding extdb3 trade logs

« Reply #3 posted: Dec 08, 2017, 07:14 PM »
Duping is very hard in A3W, we have a lot of stuff in place to prevent it, like saving the player inventory on disconnect (including Alt-F4 & game crashes). Do you have proof that it actually happens?

Re: Adding extdb3 trade logs

« Reply #4 posted: Dec 08, 2017, 07:18 PM »
No i'm just setting up a server, not live yet. But i do have an exile server for like 8 months and there people just enable lagswitch and sell the same item or car contents many times. I added logs in wasteland for cars and crates. Will make a little software to monitor it and if i will have a proof you will be the first person to know :)

OFF: Can you help me with issue 96 in the github? Everything works fine except that select button in admin menu. I tried vanilla, customed panel, what not. It shows the menu but Select button does nothing.
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2354

Re: Adding extdb3 trade logs

« Reply #5 posted: Dec 08, 2017, 07:25 PM »
people just enable lagswitch and sell the same item or car contents many times

I don't think that would be possible here, everything related to stores is client-side so a lagswitch won't do much. You also cannot sell vehicle inventory if you weren't the last driver, so the vehicle is always client-side when selling, since being last driver gives you network priority on everything that happens to the vehicle.