31.05.2015, 15:46
Hi guys i have a server and today when i logged in to my vps i say 13k files in my users folder so is there any way to delete inactive users .The server lags a bit when there are 40+ players because of these extra files.
I use ladmin and examples of .sav files
My code for saving
I use ladmin and examples of .sav files
Код:
password_hash=182845945 ip=216.172.142.176 registered=1 RegisteredDate=27/5/2015 Nick=$$M@ster$$ loggedin=0 banned=0 level=0 LastOn=27/5/2015 money=86207 Score=47 kills=2 deaths=0 hours=1 minutes=52 seconds=40 dRank=0 Help Operator=0 Donor=0 x1=165 y1=1971 z1=19 interior1=0 weap1=24 weap1ammo=100 weap2=27 weap2ammo=279 weap3=0 weap3ammo=0 weap4=31 weap4ammo=163 weap5=0 weap5ammo=0 weap6=0 weap6ammo=0 health=100 armour=1 TimesOnServer=2
Код:
if (udb_Exists(PlayerName2(playerid))) { if(PlayerInfo[playerid][LoggedIn] == 0) { ShowPlayerDialog(playerid, 125, DIALOG_STYLE_PASSWORD, ""cred"Account Login",""ccolor"This account is registered!"cgreen" Please login To continue","Login","Kick"); } } if (!udb_Exists(PlayerName2(playerid))) { if(PlayerInfo[playerid][Registered] == 0) { new string[200]; format(string, sizeof(string),""cgreen"Welcome To Real World At War 2™ "cred"%s "ccolor"You are not Registered\n"corange"Please Enter a password to register an account", PlayerName2(playerid)); ShowPlayerDialog(playerid, 126, DIALOG_STYLE_PASSWORD, "Register",string,"Register","Kick"); } } if(PlayerInfo[playerid][LoggedIn] == 1) { new pname[128]; new file[128]; GetPlayerName(playerid, pname, sizeof(pname)); format(file, sizeof(file), savefolder,pname); if(!dini_Exists(file)) { dini_Create(file); dini_IntSet(file, "Score", 0); dini_IntSet(file, "Money", 0); SetPlayerScore(playerid, dini_Int(file, "Score")); SetPlayerMoney(playerid, dini_Int(file, "Money")); } else { SetPlayerScore(playerid, dini_Int(file, "Score")); SetPlayerMoney(playerid, dini_Int(file, "Money")); } }