planeklm / razed-cryptomining

An advanced crypto mining simulator for qbcore.
52 stars 19 forks source link

Question #5

Closed jigglyblunt closed 5 months ago

jigglyblunt commented 7 months ago

I have a question, is there a way to leave the miner running when logging off?

I commented out the server drop player

--AddEventHandler('playerDropped', function() -- MinerStatus = false --end)

but it still sets status to false on D/C.

planeklm commented 5 months ago

You could log when the player leaves with the miner, then log when the player joins and calculate the amount they mined, however I wouldn't recommend doing it as it would be prone to players loosing bitcoins in case of a server restart or crash.