Posts: 53
Threads: 8
Joined: Apr 2012
Reputation:
0
Hello all,
I am currently running PPC_Trucking Gamemode, and I want to remove inactive playerdata.
But I do not know how to do it.
Also it has a custom saving system.
If you can give me some information about how I can do it, it will be helpful.
Best Regards,
kasper.
Posts: 1,830
Threads: 49
Joined: Nov 2014
Reputation:
0
Do you know if it saves with MySQL or .ini files?
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
Well, then I'm afraid it's going to very hard, if not near impossible, to achieve in Pawn. I'd been looking at JaTochNietDan's Filemanager plugin, but it doesn't have an option to read a file's metadata. The remaining options are very IO intensive and slow. This will likely cause noticeable in-game lag.
So I guess you'll have to resort to writing a powershell/bash script that reads the last modified date from the file's metadata so it can decide which files to keep and which to toss.
Posts: 53
Threads: 8
Joined: Apr 2012
Reputation:
0
Hello,
Thank you for your reply, can you help me with creating a .bat if it can read and delete the userdata?
Best Regards,
kasper.
Posts: 53
Threads: 8
Joined: Apr 2012
Reputation:
0
Hello,
I do not know if you know PPC_Trucking, it is not made by me, it is pre-made and has its own saving system.
If I know how to change it to YINI, I would of, but I do not know :P
Also I got houses, businesses, Most houses are now bought, that is a problem for new players, old players just buy them and leave them, so that's why I want to delete inactive playerdata.
Is there a command that can be done in command prompt to read and delete with IF function so for example if a that line has 31 days then it deletes specific lines in that .ini file?
It is probably too much, but an example would be great.
Best Regards,
kasper.