Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Kewun on Sep 19, 2016, 05:34 PM

Title: Anti-Multi account/ remove old unused accounts?
Post by: Kewun on Sep 19, 2016, 05:34 PM
i dont have any idea how to do it with ini parser plugin
could anyone give me an example of how to do that or atleast how could it be madden? i want like if account is 2 months old unused, then its get removed from the stats.ini
Title: Re: Anti-Multi account/ remove old unused accounts?
Post by: Thijn on Sep 19, 2016, 06:21 PM
I'm not sure why you would want to do that, since people take breaks from VC:MP all the time and would be pissed if their account has been removed or someone else could impersonate him because his account isn't registered anymore.

But to answer your question: save the timestamp using time(), loop through all your accounts and see if that timestamp is older then 2 months, if so remove his data
Title: Re: Anti-Multi account/ remove old unused accounts?
Post by: Ankris on Sep 19, 2016, 07:58 PM
:whensomeonetriestocopyaurora:
Title: Re: Anti-Multi account/ remove old unused accounts?
Post by: Mötley on Sep 20, 2016, 11:41 AM
Well I do not really know Kewun,

I will just throw some whatevers at you.

Maybe you could create a UID ini list.

and do something in the logic of if uid == player.uid
Then player.Name = that accounts name xD
Sounds really bad.... As if you would break your server.
But might work,...

 
Title: Re: Anti-Multi account/ remove old unused accounts?
Post by: Kewun on Sep 20, 2016, 02:15 PM
Quote from: Ankris on Sep 19, 2016, 07:58 PM:whensomeonetriestocopyaurora:

copy? what do you mean? im just making a server. You have nothing to it, youre just envy that i am better than you.
Title: Re: Anti-Multi account/ remove old unused accounts?
Post by: Kewun on Sep 20, 2016, 02:18 PM
Alright, thijn, ill try it. by the way i wanted to do remove old unused accounts, because they might take eat space ( like trash )
Title: Re: Anti-Multi account/ remove old unused accounts?
Post by: KAKAN on Sep 20, 2016, 02:22 PM
Quote from: Kewun on Sep 20, 2016, 02:18 PMAlright, thijn, ill try it. by the way i wanted to do remove old unused accounts, because they might take eat space ( like trash )
With a MySQL database, I think 1200 or 12000 records take about 5 MB. With INI, I guess it will be even lower.
Title: Re: Anti-Multi account/ remove old unused accounts?
Post by: Kewun on Sep 20, 2016, 02:24 PM
well, i dont know the max of kb in stats ini of a player

because multi accounts might lag my server in a ini with 30 kb when i tested with vehicles in onscriptload, saving all their pos and health ( the accounts stat.ini is 1 kb, so still much to achieve 30 kb)
Title: Re: Anti-Multi account/ remove old unused accounts?
Post by: KAKAN on Sep 20, 2016, 03:27 PM
Quote from: Kewun on Sep 20, 2016, 02:24 PMwell, i dont know the max of kb in stats ini of a player

because multi accounts might lag my server in a ini with 30 kb when i tested with vehicles in onscriptload, saving all their pos and health ( the accounts stat.ini is 1 kb, so still much to achieve 30 kb)
Use the newly released INIParser plugin or make your own( using squirrel ofc ).
Title: Re: Anti-Multi account/ remove old unused accounts?
Post by: Kewun on Sep 20, 2016, 03:57 PM
the new one sucks, because trying to use INI_Open("stats.ini") Gives error: Wrong INI Pointer even if the file exists
Title: Re: Anti-Multi account/ remove old unused accounts?
Post by: Kewun on Sep 20, 2016, 04:10 PM
nvm, i fixed it in the source code.
Title: Re: Anti-Multi account/ remove old unused accounts?
Post by: Ankris on Sep 21, 2016, 02:57 PM
Quote from: Kewun on Sep 20, 2016, 02:15 PM
Quote from: Ankris on Sep 19, 2016, 07:58 PM:whensomeonetriestocopyaurora:

copy? what do you mean? im just making a server. You have nothing to it, youre just envy that i am better than you.

Quote from: Kewun on Sep 20, 2016, 03:57 PMthe new one sucks, because trying to use INI_Open("stats.ini") Gives error: Wrong INI Pointer even if the file exists
Quote from: Kewun on Sep 20, 2016, 02:24 PMbecause multi accounts might lag my server in a ini with 30 kb when i tested with vehicles in onscriptload, saving all their pos and health ( the accounts stat.ini is 1 kb, so still much to achieve 30 kb)

(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FGonjPrg.jpg&hash=5f48c993fd2280adfbd7ba8c5c123b92f1032cb1)
Title: Re: Anti-Multi account/ remove old unused accounts?
Post by: Kewun on Sep 21, 2016, 04:39 PM
Quote from: Ankris on Sep 21, 2016, 02:57 PM
Quote from: Kewun on Sep 20, 2016, 02:15 PM
Quote from: Ankris on Sep 19, 2016, 07:58 PM:whensomeonetriestocopyaurora:

copy? what do you mean? im just making a server. You have nothing to it, youre just envy that i am better than you.

Quote from: Kewun on Sep 20, 2016, 03:57 PMthe new one sucks, because trying to use INI_Open("stats.ini") Gives error: Wrong INI Pointer even if the file exists
Quote from: Kewun on Sep 20, 2016, 02:24 PMbecause multi accounts might lag my server in a ini with 30 kb when i tested with vehicles in onscriptload, saving all their pos and health ( the accounts stat.ini is 1 kb, so still much to achieve 30 kb)

(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FGonjPrg.jpg&hash=5f48c993fd2280adfbd7ba8c5c123b92f1032cb1)

haha very funny...

Seems you cant write, so you instead post a shitty picture.
I dont need to talk to a young kid of 14 years old
Look at your self, you are failing all the time, and being angry at others. Others tell you good things, you take it as bad.
You have only critics, not doing good things. Try acting your age.