Help needed in Deleting userdata.
#1

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.
Reply
#2

  1. What saving system do you use? Flat file or SQL?
  2. How do you determine who is inactive? Do you store the last connect time?
Reply
#3

Do you know if it saves with MySQL or .ini files?
Reply
#4

Hello,

Its .ini and it is not SQL nor MySQL.
Also it does not have the last login time.
I need to add that as well, but I will need some help if you have time

Best Regards,
kasper.
Reply
#5

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.
Reply
#6

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.
Reply
#7

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.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)