/login lag - used Dini
#3

hmm, i cant find the problem in my saving file.
i think its good.

Here is my saving/registing scripts:

[code=/register]dcmd_register(playerid, params[])
{
if(!strlen(params)){SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /register [password]");return 1;}
if(gPlayerAccount[playerid] == 1){SendClientMessage(playerid, COLOR_GRAD1, "This nick is allready registered!");return 1;}
gPlayerAccount[playerid] = 1;
new playername[MAX_PLAYER_NAME],string[MAX_STRING];
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "/RolePlayLS/Users/%s.ini", playername);
if(!dini_Exists(string))
{
PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
LatestMember = playername;
dini_Create(string);
dini_Set(string,"Password",params);
dini_IntSet(string,"Cash",PlayerInfo[playerid][pCash]);
dini_IntSet(string,"Account",PlayerInfo[playerid][pAccount]);
dini_IntSet(string,"AdminLevel",PlayerInfo[playerid][pAdmin]);
dini_IntSet(string,"Rank",PlayerInfo[playerid][pRank]);
dini_IntSet(string,"JRank",PlayerInfo[playerid][pJRank]);
dini_IntSet(string,"Level",PlayerInfo[playerid][pLevel]);
dini_IntSet(string,"Exp",PlayerInfo[playerid][pExp]);
dini_IntSet(string,"UpgradePoints",PlayerInfo[playerid][gPupgrade]);
dini_IntSet(string,"Kills",PlayerInfo[playerid][pKills]);
dini_IntSet(string,"Deaths",PlayerInfo[playerid][pDeaths]);
dini_IntSet(string,"CB",PlayerInfo[playerid][pCB]);
dini_IntSet(string,"HW",PlayerInfo[playerid][pHW]);
dini_IntSet(string,"SR",PlayerInfo[playerid][pSR]);
dini_IntSet(string,"WA",PlayerInfo[playerid][pWA]);
dini_IntSet(string,"PEN",PlayerInfo[playerid][pPEN]);
dini_IntSet(string,"Gun1",PlayerInfo[playerid][pGun1]);
dini_IntSet(string,"Gun2",PlayerInfo[playerid][pGun2]);
dini_IntSet(string,"Gun3",PlayerInfo[playerid][pGun3]);
dini_IntSet(string,"Gun4",PlayerInfo[playerid][pGun4]);
dini_IntSet(string,"Gun5",PlayerInfo[playerid][pGun5]);
dini_IntSet(string,"Gun6",PlayerInfo[playerid][pGun6]);
dini_IntSet(string,"Gun7",PlayerInfo[playerid][pGun7]);
dini_IntSet(string,"Ammo1",PlayerInfo[playerid][pAmmo1]);
dini_IntSet(string,"Ammo2",PlayerInfo[playerid][pAmmo2]);
dini_IntSet(string,"Ammo3",PlayerInfo[playerid][pAmmo3]);
dini_IntSet(string,"Ammo4",PlayerInfo[playerid][pAmmo4]);
dini_IntSet(string,"Ammo5",PlayerInfo[playerid][pAmmo5]);
dini_IntSet(string,"Ammo6",PlayerInfo[playerid][pAmmo6]);
dini_IntSet(string,"Ammo7",PlayerInfo[playerid][pAmmo7]);
dini_FloatSet(string,"SpawnHealth",PlayerInfo[playerid][pSHealth]);
dini_FloatSet(string,"Health",PlayerInfo[playerid][pHealth]);
dini_FloatSet(string,"Pos_x",PlayerInfo[playerid][pPos_x]);
dini_FloatSet(string,"Pos_y",PlayerInfo[playerid][pPos_y]);
dini_FloatSet(string,"Pos_z",PlayerInfo[playerid][pPos_z]);
dini_IntSet(string,"LicenseA",PlayerInfo[playerid][pLicenseA]);
dini_IntSet(string,"LicenseB",PlayerInfo[playerid][pLicenseB]);
dini_IntSet(string,"LicenseC",PlayerInfo[playerid][pLicenseC]);
if(accountplay)
{
PlayerInfo[playerid][pInt] = 0;
}
gTeam[playerid] = 3;
PlayerInfo[playerid][pTeam] = gTeam[playerid];
dini_IntSet(string,"Int",PlayerInfo[playerid][pInt]);
dini_IntSet(string,"Local",PlayerInfo[playerid][pLocal]);
dini_IntSet(string,"Team",PlayerInfo[playerid][pTeam]);
dini_IntSet(string,"Model",PlayerInfo[playerid][pModel]);
dini_IntSet(string,"PhoneNumber",PlayerInfo[playerid][pPnumber]);
dini_IntSet(string,"HouseKey",PlayerInfo[playerid][pPhousekey]);
dini_IntSet(string,"Pbiskey",PlayerInfo[playerid][pPbiskey]);
dini_IntSet(string,"Duty",PlayerInfo[playerid][pDuty]);
dini_IntSet(string,"Drugs",PlayerInfo[playerid][pDrugs]);
dini_IntSet(string,"SendContracts",PlayerInfo[playerid][pSendContracts]);
dini_IntSet(string,"HaveContracts",PlayerInfo[playerid][pHaveContracts]);
dini_IntSet(string,"Warnings",PlayerInfo[playerid][pWarnL]);
dini_FloatSet(string,"Armour",PlayerInfo[playerid][pSArmour]);
dini_IntSet(string,"Jailed",PlayerInfo[playerid][pJailed]);
dini_IntSet(string,"Kicks",PlayerInfo[playerid][pKicks]);
dini_IntSet(string,"Bans",PlayerInfo[playerid][pBans]);
PlayerInfo[playerid][pPhoneBook] = gPhoneBook[playerid];
PlayerInfo[playerid][pDice] = gDice[playerid];
PlayerInfo[playerid][pSpeedo] = gSpeedo[playerid];
PlayerInfo[playerid][pPoliceRadio] = PoliceRadio[playerid];
dini_IntSet(string,"PhoneBook",PlayerInfo[playerid][pPhoneBook]);
dini_IntSet(string,"Dice",PlayerInfo[playerid][pDice]);
dini_IntSet(string,"Speedo",PlayerInfo[playerid][pSpeedo]);
dini_IntSet(string,"PoliceRadio",PlayerInfo[playerid][pPoliceRadio]);
dini_IntSet(string,"ReactionWins",PlayerInfo[playerid][pReactionWins]);
SendClientMessage(playerid, COLOR_WHITE, "SERVER: Next time you connect, type /login <PASSWORD> to log in.");
OnPlayerLogin(playerid,params);
}
return 1;
}
[/code]

[code=public OnPlayerUpdate]public OnPlayerUpdate(playerid)
{
if (gPlayerLogged[playerid] != 0)
{
new playername[MAX_PLAYER_NAME],string[MAX_STRING];
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "/RolePlayLS/Users/%s.ini", playername);
if(dini_Exists(string))
{
dini_Set(string,"Password",PlayerInfo[playerid][pPassword]);
PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
dini_IntSet(string,"Cash",PlayerInfo[playerid][pCash]);
dini_IntSet(string,"Account",PlayerInfo[playerid][pAccount]);
dini_IntSet(string,"AdminLevel",PlayerInfo[playerid][pAdmin]);
dini_IntSet(string,"Rank",PlayerInfo[playerid][pRank]);
dini_IntSet(string,"JRank",PlayerInfo[playerid][pJRank]);
dini_IntSet(string,"Level",PlayerInfo[playerid][pLevel]);
dini_IntSet(string,"Exp",PlayerInfo[playerid][pExp]);
dini_IntSet(string,"UpgradePoints",PlayerInfo[playerid][gPupgrade]);
dini_IntSet(string,"Kills",PlayerInfo[playerid][pKills]);
dini_IntSet(string,"Deaths",PlayerInfo[playerid][pDeaths]);
dini_IntSet(string,"CB",PlayerInfo[playerid][pCB]);
dini_IntSet(string,"HW",PlayerInfo[playerid][pHW]);
dini_IntSet(string,"SR",PlayerInfo[playerid][pSR]);
dini_IntSet(string,"WA",PlayerInfo[playerid][pWA]);
dini_IntSet(string,"PEN",PlayerInfo[playerid][pPEN]);
dini_IntSet(string,"Gun1",PlayerInfo[playerid][pGun1]);
dini_IntSet(string,"Gun2",PlayerInfo[playerid][pGun2]);
dini_IntSet(string,"Gun3",PlayerInfo[playerid][pGun3]);
dini_IntSet(string,"Gun4",PlayerInfo[playerid][pGun4]);
dini_IntSet(string,"Gun5",PlayerInfo[playerid][pGun5]);
dini_IntSet(string,"Gun6",PlayerInfo[playerid][pGun6]);
dini_IntSet(string,"Gun7",PlayerInfo[playerid][pGun7]);
dini_IntSet(string,"Ammo1",PlayerInfo[playerid][pAmmo1]);
dini_IntSet(string,"Ammo2",PlayerInfo[playerid][pAmmo2]);
dini_IntSet(string,"Ammo3",PlayerInfo[playerid][pAmmo3]);
dini_IntSet(string,"Ammo4",PlayerInfo[playerid][pAmmo4]);
dini_IntSet(string,"Ammo5",PlayerInfo[playerid][pAmmo5]);
dini_IntSet(string,"Ammo6",PlayerInfo[playerid][pAmmo6]);
dini_IntSet(string,"Ammo7",PlayerInfo[playerid][pAmmo7]);
dini_FloatSet(string,"SpawnHealth",PlayerInfo[playerid][pSHealth]);
GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
dini_FloatSet(string,"Health",PlayerInfo[playerid][pHealth]);
GetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z]);
if ((PlayerInfo[playerid][pPos_x]==0.0 && PlayerInfo[playerid][pPos_y]==0.0 && PlayerInfo[playerid][pPos_z]==0.0) || (gPlayerFighter[playerid] != 0))
{
PlayerInfo[playerid][pPos_x] = 1684.9;
PlayerInfo[playerid][pPos_y] = -2244.5;
PlayerInfo[playerid][pPos_z] = 13.5;
}
if(Spectate[playerid] != 255)
{
PlayerInfo[playerid][pPos_x] = Unspec[playerid][sPx];
PlayerInfo[playerid][pPos_y] = Unspec[playerid][sPy];
PlayerInfo[playerid][pPos_z] = Unspec[playerid][sPz];
PlayerInfo[playerid][pInt] = Unspec[playerid][sPint];
PlayerInfo[playerid][pLocal] = Unspec[playerid][sLocal];
}
gTeam[playerid] = PlayerInfo[playerid][pTeam];
dini_FloatSet(string,"Pos_x",PlayerInfo[playerid][pPos_x]);
dini_FloatSet(string,"Pos_y",PlayerInfo[playerid][pPos_y]);
dini_FloatSet(string,"Pos_z",PlayerInfo[playerid][pPos_z]);
dini_IntSet(string,"LicenseA",PlayerInfo[playerid][pLicenseA]);
dini_IntSet(string,"LicenseB",PlayerInfo[playerid][pLicenseB]);
dini_IntSet(string,"LicenseC",PlayerInfo[playerid][pLicenseC]);
dini_IntSet(string,"Int",PlayerInfo[playerid][pInt]);
dini_IntSet(string,"Local",PlayerInfo[playerid][pLocal]);
dini_IntSet(string,"Team",PlayerInfo[playerid][pTeam]);
dini_IntSet(string,"Model",PlayerInfo[playerid][pModel]);
dini_IntSet(string,"PhoneNumber",PlayerInfo[playerid][pPnumber]);
dini_IntSet(string,"HouseKey",PlayerInfo[playerid][pPhousekey]);
dini_IntSet(string,"Pbiskey",PlayerInfo[playerid][pPbiskey]);
dini_IntSet(string,"Duty",PlayerInfo[playerid][pDuty]);
dini_IntSet(string,"Drugs",PlayerInfo[playerid][pDrugs]);
dini_IntSet(string,"SendContracts",PlayerInfo[playerid][pSendContracts]);
dini_IntSet(string,"HaveContracts",PlayerInfo[playerid][pHaveContracts]);
dini_IntSet(string,"Warnings",PlayerInfo[playerid][pWarnL]);
dini_FloatSet(string,"Armour",PlayerInfo[playerid][pSArmour]);
dini_IntSet(string,"Jailed",PlayerInfo[playerid][pJailed]);
dini_IntSet(string,"Kicks",PlayerInfo[playerid][pKicks]);
dini_IntSet(string,"Bans",PlayerInfo[playerid][pBans]);
PlayerInfo[playerid][pPhoneBook] = gPhoneBook[playerid];
PlayerInfo[playerid][pDice] = gDice[playerid];
PlayerInfo[playerid][pSpeedo] = gSpeedo[playerid];
PlayerInfo[playerid][pPoliceRadio] = PoliceRadio[playerid];
dini_IntSet(string,"PhoneBook",PlayerInfo[playerid][pPhoneBook]);
dini_IntSet(string,"Dice",PlayerInfo[playerid][pDice]);
dini_IntSet(string,"Speedo",PlayerInfo[playerid][pSpeedo]);
dini_IntSet(string,"PoliceRadio",PlayerInfo[playerid][pPoliceRadio]);
dini_IntSet(string,"ReactionWins",PlayerInfo[playerid][pReactionWins]);
}
}
return 1;
}
[/code]
Reply


Messages In This Thread
/login lag - used Dini - by [NL]Bank - 23.04.2009, 15:02
Re: /login lag - used Dini - by Outbreak - 23.04.2009, 15:11
Re: /login lag - used Dini - by [NL]Bank - 27.04.2009, 11:07
Re: /login lag - used Dini - by [NL]Bank - 27.04.2009, 14:21
Re: /login lag - used Dini - by 90NINE - 27.04.2009, 15:00
Re: /login lag - used Dini - by Joe Staff - 27.04.2009, 15:05

Forum Jump:


Users browsing this thread: 1 Guest(s)