Limmek / MStats-for-rust

Logs player statistics and other server stuff to MySql
https://buymeacoffee.com/Limmek
5 stars 3 forks source link

TC update! #7

Closed csaksapi closed 4 years ago

csaksapi commented 4 years ago

Hey Bro!

yes i am again :) I have a question you could add a little bit to this? namely: I want to know what steamid is added to what / how many TC. log everything into mysql the same way.

Thx for the anwser!

sapi

Limmek commented 4 years ago

Hello mate!

I think your request already is implemented, but i cant tell for sure if it still works.

https://github.com/Limmek/MStats-for-rust/blob/1d53c68fd4242d4e2357cd4a1cc6ff6e3e31de40/MStats.cs#L348

https://github.com/Limmek/MStats-for-rust/blob/1d53c68fd4242d4e2357cd4a1cc6ff6e3e31de40/MStats.cs#L352

I will update my dev server and try the addon and see if the hooks still work.

Cheers

csaksapi commented 4 years ago

"I will update my dev server and try the addon and see if the hooks still work." TY very mutch!!! :)

Limmek commented 4 years ago

Godmorning! I did check this last night and the OnCupboardAuthorize hook is still working. Unfortunately i found out that the hook is not called when a TC is placed only when someone is interacting with it. So i believe it need to be added in the OnEntityBuilt and check if the item placed is a TC and then update the database.

Since there are a lot of changes and its now a part of umod and not oxide anymore my recommendation is to do a rewrite of the plugin and altso make the ability to chose if the plugin shall do a calls to the database on every hook call or save it locally and update the database every 5-10 min or every server save,

Cheers mate

Limmek commented 4 years ago

I added a quick fix and the player_authorize_list will now be updated when a TC is placed by a player.