Help > Lag in GM
#1

Dear,

I have a Register System on my GAMEMODE, and it was make with fwrite system, and this was hindering the creation of commands for changing data offline, then i decided to change the system to dini_Set / Get, but now when the player registers, the system create the file in "users /" with dini_Create, then add the variables in PlayerName.ini, but after I made this change to DINI, GM WAS VERY LAG!, When I write something inside the server, it takes 10 seconds to really go to the server.

I wonder if anyone here uses system dini_set / get in the server, and if this lag is related to the new dini system or not.

Surfing the internet, i found a Tutorial "How to make a register system With DINI" (https://sampforum.blast.hk/showthread.php?tid=167937 ). If a person made a tutorial like that, the dini needs to be a good choice for register system!

The dini is or not a good idea for system registry? it causes lag on the server, or is this a problem with my GM?

Grateful,

Bruno.

OBS: Excuse my english.
Reply
#2

Its looks like you give script to do something, very much and very often, just dont say you use OnPLayerUpdate something?
Reply
#3

Reduce your timers
Reply
#4

Reduce timers, or/and combine them if possible like scarface said. And check if you dont set a lot timers for every player (then try making a global one with loop)
Reply
#5

Quote:
Originally Posted by ikey07
Посмотреть сообщение
Its looks like you give script to do something, very much and very often, just dont say you use OnPLayerUpdate something?
Man, on my "OnPlayerUpdate()", i just made the variables "PlayerInfo" receiver the datas of accounts, with dini_get.
u can take a look:

Код:
public OnPlayerUpdate(playerid)
{
	if(IsPlayerConnected(playerid))
	{
		if(gPlayerLogged[playerid])
		{
		    new string3[64];
			new playername3[MAX_PLAYER_NAME];
			GetPlayerName(playerid, playername3, sizeof(playername3));
			format(string3, sizeof(string3), "users/%s.ini", playername3);
			//new File: hFile = fopen(string3, io_write);
			//if (hFile)
			//{
				// --------------------------------- Stanley ----------
			     //new var[64];
				//format(var, 64, "Key=%s\r\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);
				dini_Set(string3, "Key", PlayerInfo[playerid][pKey]);
				PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
				//format(var, 64, "Level=%d\r\n",PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
				dini_IntSet(string3, "Level", PlayerInfo[playerid][pLevel]);
				//format(var, 64, "AdminLevel=%d\r\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
				dini_IntSet(string3, "AdminLevel", PlayerInfo[playerid][pAdmin]);
				//format(var, 64, "DonateRank=%d\r\n",PlayerInfo[playerid][pDonateRank]);fwrite(hFile, var);
				dini_IntSet(string3, "DonateRank", PlayerInfo[playerid][pDonateRank]);
				//format(var, 64, "UpgradePoints=%d\r\n",PlayerInfo[playerid][gPupgrade]);fwrite(hFile, var);
				dini_IntSet(string3, "UpgradePoints", PlayerInfo[playerid][gPupgrade]);
				//format(var, 64, "ConnectedTime=%d\r\n",PlayerInfo[playerid][pConnectTime]);fwrite(hFile, var);
				dini_IntSet(string3, "ConnectedTime", PlayerInfo[playerid][pConnectTime]);
				//format(var, 64, "Registered=%d\r\n",PlayerInfo[playerid][pReg]);fwrite(hFile, var);
				dini_IntSet(string3, "Registered", PlayerInfo[playerid][pReg]);
				//format(var, 64, "Sex=%d\r\n",PlayerInfo[playerid][pSex]);fwrite(hFile, var);
				dini_IntSet(string3, "Sex", PlayerInfo[playerid][pSex]);
				//format(var, 64, "Age=%d\r\n",PlayerInfo[playerid][pAge]);fwrite(hFile, var);
				dini_IntSet(string3, "Age", PlayerInfo[playerid][pAge]);
				//format(var, 64, "Origin=%d\r\n",PlayerInfo[playerid][pOrigin]);fwrite(hFile, var);
				dini_IntSet(string3, "Origin", PlayerInfo[playerid][pOrigin]);
				//format(var, 64, "CK=%d\r\n",PlayerInfo[playerid][pCK]);fwrite(hFile, var);
				dini_IntSet(string3, "CK", PlayerInfo[playerid][pCK]);
				//format(var, 64, "Muted=%d\r\n",PlayerInfo[playerid][pMuted]);fwrite(hFile, var);
				dini_IntSet(string3, "Muted", PlayerInfo[playerid][pMuted]);
				//format(var, 64, "Respect=%d\r\n",PlayerInfo[playerid][pExp]);fwrite(hFile, var);
				dini_IntSet(string3, "Respect", PlayerInfo[playerid][pExp]);
				//format(var, 64, "Money=%d\r\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
				dini_IntSet(string3, "Money", PlayerInfo[playerid][pCash]);
				//format(var, 64, "Bank=%d\r\n",PlayerInfo[playerid][pAccount]);fwrite(hFile, var);
				dini_IntSet(string3, "Bank", PlayerInfo[playerid][pAccount]);
				//format(var, 64, "Crimes=%d\r\n",PlayerInfo[playerid][pCrimes]);fwrite(hFile, var);
				dini_IntSet(string3, "Crimes", PlayerInfo[playerid][pCrimes]);
				//format(var, 64, "Kills=%d\r\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var);
				dini_IntSet(string3, "Kills", PlayerInfo[playerid][pKills]);
				//format(var, 64, "Deaths=%d\r\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var);
				dini_IntSet(string3, "Deaths", PlayerInfo[playerid][pDeaths]);
				//format(var, 64, "Arrested=%d\r\n",PlayerInfo[playerid][pArrested]);fwrite(hFile, var);
				dini_IntSet(string3, "Arrested", PlayerInfo[playerid][pArrested]);
				//format(var, 64, "WantedDeaths=%d\r\n",PlayerInfo[playerid][pWantedDeaths]);fwrite(hFile, var);
				dini_IntSet(string3, "WantedDeaths", PlayerInfo[playerid][pWantedDeaths]);
				//format(var, 64, "Phonebook=%d\r\n",PlayerInfo[playerid][pPhoneBook]);fwrite(hFile, var);
				dini_IntSet(string3, "Phonebook", PlayerInfo[playerid][pPhoneBook]);
				//format(var, 64, "LottoNr=%d\r\n",PlayerInfo[playerid][pLottoNr]);fwrite(hFile, var);
				dini_IntSet(string3, "LottoNr", PlayerInfo[playerid][pLottoNr]);
				//format(var, 64, "Fishes=%d\r\n",PlayerInfo[playerid][pFishes]);fwrite(hFile, var);
				dini_IntSet(string3, "Fishes", PlayerInfo[playerid][pFishes]);
				//format(var, 64, "BiggestFish=%d\r\n",PlayerInfo[playerid][pBiggestFish]);fwrite(hFile, var);
				dini_IntSet(string3, "BiggestFish", PlayerInfo[playerid][pBiggestFish]);
				//format(var, 64, "Job=%d\r\n",PlayerInfo[playerid][pJob]);fwrite(hFile, var);
				dini_IntSet(string3, "Job", PlayerInfo[playerid][pJob]);
				//format(var, 64, "Paycheck=%d\r\n",PlayerInfo[playerid][pPayCheck]);fwrite(hFile, var);
				dini_IntSet(string3, "Paycheck", PlayerInfo[playerid][pPayCheck]);
				//format(var, 64, "HeadValue=%d\r\n",PlayerInfo[playerid][pHeadValue]);fwrite(hFile, var);
				dini_IntSet(string3, "HeadValue", PlayerInfo[playerid][pHeadValue]);
				//format(var, 64, "Jailed=%d\r\n",PlayerInfo[playerid][pJailed]);fwrite(hFile, var);
				dini_IntSet(string3, "Jailed", PlayerInfo[playerid][pJailed]);
				//format(var, 64, "JailTime=%d\r\n",PlayerInfo[playerid][pJailTime]);fwrite(hFile, var);
                	dini_IntSet(string3, "JailTime", PlayerInfo[playerid][pJailTime]);
                	//format(var, 64, "Jailed2=%d\r\n",PlayerInfo[playerid][pJailed2]);fwrite(hFile, var);
				dini_IntSet(string3, "Jailed2", PlayerInfo[playerid][pJailed2]);
				//format(var, 64, "JailTime2=%d\r\n",PlayerInfo[playerid][pJailTime2]);fwrite(hFile, var);
				dini_IntSet(string3, "JailTime2", PlayerInfo[playerid][pJailTime]);
				//format(var, 64, "Materials=%d\r\n",PlayerInfo[playerid][pMats]);fwrite(hFile, var);
				dini_IntSet(string3, "Materials", PlayerInfo[playerid][pMats]);
				//format(var, 64, "Drugs=%d\r\n",PlayerInfo[playerid][pDrugs]);fwrite(hFile, var);
				dini_IntSet(string3, "Drugs", PlayerInfo[playerid][pDrugs]);
				//format(var, 64, "Leader=%d\r\n",PlayerInfo[playerid][pLeader]);fwrite(hFile, var);
				dini_IntSet(string3, "Leader", PlayerInfo[playerid][pLeader]);
				//format(var, 64, "Member=%d\r\n",PlayerInfo[playerid][pMember]);fwrite(hFile, var);
				dini_IntSet(string3, "Member", PlayerInfo[playerid][pMember]);
				//format(var, 64, "FMember=%d\r\n",PlayerInfo[playerid][pFMember]);fwrite(hFile, var);
				dini_IntSet(string3, "FMember", PlayerInfo[playerid][pFMember]);
				//format(var, 64, "Rank=%d\r\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var);
				dini_IntSet(string3, "Rank", PlayerInfo[playerid][pRank]);
				//format(var, 64, "Char=%d\r\n",PlayerInfo[playerid][pChar]);fwrite(hFile, var);
				dini_IntSet(string3, "Char", PlayerInfo[playerid][pChar]);
				//format(var, 64, "ContractTime=%d\r\n",PlayerInfo[playerid][pContractTime]);fwrite(hFile, var);
				dini_IntSet(string3, "ContractTime", PlayerInfo[playerid][pContractTime]);
				//format(var, 64, "DetSkill=%d\r\n",PlayerInfo[playerid][pDetSkill]);fwrite(hFile, var);
				dini_IntSet(string3, "DetSkill", PlayerInfo[playerid][pDetSkill]);
				//format(var, 64, "SexSkill=%d\r\n",PlayerInfo[playerid][pSexSkill]);fwrite(hFile, var);
				dini_IntSet(string3, "SexSkill", PlayerInfo[playerid][pSexSkill]);
				//format(var, 64, "BoxSkill=%d\r\n",PlayerInfo[playerid][pBoxSkill]);fwrite(hFile, var);
				dini_IntSet(string3, "BoxSkill", PlayerInfo[playerid][pBoxSkill]);
				//format(var, 64, "LawSkill=%d\r\n",PlayerInfo[playerid][pLawSkill]);fwrite(hFile, var);
				dini_IntSet(string3, "LawSkill", PlayerInfo[playerid][pLawSkill]);
				//format(var, 64, "MechSkill=%d\r\n",PlayerInfo[playerid][pMechSkill]);fwrite(hFile, var);
				dini_IntSet(string3, "MechSkill", PlayerInfo[playerid][pMechSkill]);
				//format(var, 64, "JackSkill=%d\r\n",PlayerInfo[playerid][pJackSkill]);fwrite(hFile, var);
				dini_IntSet(string3, "JackSkill", PlayerInfo[playerid][pJackSkill]);
				//format(var, 64, "CarSkill=%d\r\n",PlayerInfo[playerid][pCarSkill]);fwrite(hFile, var);
				dini_IntSet(string3, "CarSkill", PlayerInfo[playerid][pCarSkill]);
				//format(var, 64, "NewsSkill=%d\r\n",PlayerInfo[playerid][pNewsSkill]);fwrite(hFile, var);
				dini_IntSet(string3, "NewsSkill", PlayerInfo[playerid][pNewsSkill]);
				//format(var, 64, "DrugsSkill=%d\r\n",PlayerInfo[playerid][pDrugsSkill]);fwrite(hFile, var);
				dini_IntSet(string3, "DrugsSkill", PlayerInfo[playerid][pDrugsSkill]);
				//format(var, 64, "CookSkill=%d\r\n",PlayerInfo[playerid][pCookSkill]);fwrite(hFile, var);
				dini_IntSet(string3, "CookSkill", PlayerInfo[playerid][pCookSkill]);
				//format(var, 64, "FishSkill=%d\r\n",PlayerInfo[playerid][pFishSkill]);fwrite(hFile, var);
				dini_IntSet(string3, "FishSkill", PlayerInfo[playerid][pFishSkill]);
				//format(var, 64, "pSHealth=%.1f\r\n",PlayerInfo[playerid][pSHealth]);fwrite(hFile, var);
	            	dini_FloatSet(string3, "pSHealth", PlayerInfo[playerid][pSHealth]);
	            	GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
				//format(var, 64, "pHealth=%.1f\r\n",PlayerInfo[playerid][pHealth]);fwrite(hFile, var);
				dini_FloatSet(string3, "pHealth", PlayerInfo[playerid][pHealth]);
				//format(var, 64, "Int=%d\r\n",PlayerInfo[playerid][pInt]);fwrite(hFile, var);
				dini_IntSet(string3, "Int", PlayerInfo[playerid][pInt]);
				//format(var, 64, "Local=%d\r\n",PlayerInfo[playerid][pLocal]);fwrite(hFile, var);
				dini_IntSet(string3, "Local", PlayerInfo[playerid][pLocal]);
				//format(var, 64, "Team=%d\r\n",PlayerInfo[playerid][pTeam]);fwrite(hFile, var);
				dini_IntSet(string3, "Team", PlayerInfo[playerid][pTeam]);
				//format(var, 64, "Model=%d\r\n",PlayerInfo[playerid][pModel]);fwrite(hFile, var);
				dini_IntSet(string3, "Model", PlayerInfo[playerid][pModel]);
				//format(var, 64, "PhoneNr=%d\r\n",PlayerInfo[playerid][pPnumber]);fwrite(hFile, var);
				dini_IntSet(string3, "PhoneNr", PlayerInfo[playerid][pPnumber]);
				//format(var, 64, "Car=%d\r\n",PlayerInfo[playerid][pPcarkey]);fwrite(hFile, var);
				dini_IntSet(string3, "Car", PlayerInfo[playerid][pPcarkey]);
				//format(var, 64, "Car2=%d\r\n",PlayerInfo[playerid][pPcarkey2]);fwrite(hFile, var);
				dini_IntSet(string3, "Car2", PlayerInfo[playerid][pPcarkey2]);
				//format(var, 64, "Car3=%d\r\n",PlayerInfo[playerid][pPcarkey3]);fwrite(hFile, var);
				dini_IntSet(string3, "Car3", PlayerInfo[playerid][pPcarkey3]);
				//format(var, 64, "House=%d\r\n",PlayerInfo[playerid][pPhousekey]);fwrite(hFile, var);
				dini_IntSet(string3, "House", PlayerInfo[playerid][pPhousekey]);
				//format(var, 64, "Bizz=%d\r\n",PlayerInfo[playerid][pPbiskey]);fwrite(hFile, var);
				dini_IntSet(string3, "Bizz", PlayerInfo[playerid][pPbiskey]);
				if ((PlayerInfo[playerid][pPos_x]==0.0 && PlayerInfo[playerid][pPos_y]==0.0 && PlayerInfo[playerid][pPos_z]==0.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];
				}
				//format(var, 64, "Pos_x=%.1f\r\n",PlayerInfo[playerid][pPos_x]);fwrite(hFile, var);
				dini_FloatSet(string3, "Pos_x", PlayerInfo[playerid][pPos_x]);
				//format(var, 64, "Pos_y=%.1f\r\n",PlayerInfo[playerid][pPos_y]);fwrite(hFile, var);
				dini_FloatSet(string3, "Pos_y", PlayerInfo[playerid][pPos_y]);
				//format(var, 64, "Pos_z=%.1f\r\n",PlayerInfo[playerid][pPos_z]);fwrite(hFile, var);
				dini_FloatSet(string3, "Pos_z", PlayerInfo[playerid][pPos_z]);
				//format(var, 64, "CarLic=%d\r\n",PlayerInfo[playerid][pCarLic]);fwrite(hFile, var);
                	dini_IntSet(string3, "CarLic", PlayerInfo[playerid][pCarLic]);
                	//format(var, 64, "FlyLic=%d\r\n",PlayerInfo[playerid][pFlyLic]);fwrite(hFile, var);
				dini_IntSet(string3, "FlyLic", PlayerInfo[playerid][pFlyLic]);
				//format(var, 64, "BoatLic=%d\r\n",PlayerInfo[playerid][pBoatLic]);fwrite(hFile, var);
				dini_IntSet(string3, "BoatLic", PlayerInfo[playerid][pBoatLic]);
				//format(var, 64, "FishLic=%d\r\n",PlayerInfo[playerid][pFishLic]);fwrite(hFile, var);
				dini_IntSet(string3, "FishLic", PlayerInfo[playerid][pFishLic]);
				//format(var, 64, "GunLic=%d\r\n",PlayerInfo[playerid][pGunLic]);fwrite(hFile, var);
				dini_IntSet(string3, "GunLic", PlayerInfo[playerid][pGunLic]);
				//format(var, 64, "Gun1=%d\r\n",PlayerInfo[playerid][pGun1]);fwrite(hFile, var);
				dini_IntSet(string3, "Gun1", PlayerInfo[playerid][pGun1]);
				//format(var, 64, "Gun2=%d\r\n",PlayerInfo[playerid][pGun2]);fwrite(hFile, var);
				dini_IntSet(string3, "Gun2", PlayerInfo[playerid][pGun2]);
				//format(var, 64, "Gun3=%d\r\n",PlayerInfo[playerid][pGun3]);fwrite(hFile, var);
				dini_IntSet(string3, "Gun3", PlayerInfo[playerid][pGun3]);
				//format(var, 64, "Gun4=%d\r\n",PlayerInfo[playerid][pGun4]);fwrite(hFile, var);
				dini_IntSet(string3, "Gun4", PlayerInfo[playerid][pGun4]);
				//format(var, 64, "Ammo1=%d\r\n",PlayerInfo[playerid][pAmmo1]);fwrite(hFile, var);
				dini_IntSet(string3, "Ammo1", PlayerInfo[playerid][pAmmo1]);
				//format(var, 64, "Ammo2=%d\r\n",PlayerInfo[playerid][pAmmo2]);fwrite(hFile, var);
				dini_IntSet(string3, "Ammo2", PlayerInfo[playerid][pAmmo2]);
				//format(var, 64, "Ammo3=%d\r\n",PlayerInfo[playerid][pAmmo3]);fwrite(hFile, var);
				dini_IntSet(string3, "Ammo3", PlayerInfo[playerid][pAmmo3]);
				//format(var, 64, "Ammo4=%d\r\n",PlayerInfo[playerid][pAmmo4]);fwrite(hFile, var);
				dini_IntSet(string3, "Ammo4", PlayerInfo[playerid][pAmmo4]);
				//format(var, 64, "CarTime=%d\r\n",PlayerInfo[playerid][pCarTime]);fwrite(hFile, var);
				dini_IntSet(string3, "CarTime", PlayerInfo[playerid][pCarTime]);
				//format(var, 64, "PayDay=%d\r\n",PlayerInfo[playerid][pPayDay]);fwrite(hFile, var);
				dini_IntSet(string3, "PayDay", PlayerInfo[playerid][pPayDay]);
				//format(var, 64, "PayDayHad=%d\r\n",PlayerInfo[playerid][pPayDayHad]);fwrite(hFile, var);
				dini_IntSet(string3, "PayDayHad", PlayerInfo[playerid][pPayDayHad]);
				//format(var, 64, "Watch=%d\r\n",PlayerInfo[playerid][pWatch]);fwrite(hFile, var);
				dini_IntSet(string3, "Watch", PlayerInfo[playerid][pWatch]);
				//format(var, 64, "Crashed=%d\r\n",PlayerInfo[playerid][pCrashed]);fwrite(hFile, var);
				dini_IntSet(string3, "Crashed", PlayerInfo[playerid][pCrashed]);
				//format(var, 64, "Wins=%d\r\n",PlayerInfo[playerid][pWins]);fwrite(hFile, var);
				dini_IntSet(string3, "Wins", PlayerInfo[playerid][pWins]);
				//format(var, 64, "Loses=%d\r\n",PlayerInfo[playerid][pLoses]);fwrite(hFile, var);
				dini_IntSet(string3, "Loses", PlayerInfo[playerid][pLoses]);
				//format(var, 64, "AlcoholPerk=%d\r\n",PlayerInfo[playerid][pAlcoholPerk]);fwrite(hFile, var);
				dini_IntSet(string3, "AlcoholPerk", PlayerInfo[playerid][pAlcoholPerk]);
				//format(var, 64, "DrugPerk=%d\r\n",PlayerInfo[playerid][pDrugPerk]);fwrite(hFile, var);
				dini_IntSet(string3, "DrugPerk", PlayerInfo[playerid][pDrugPerk]);
				//format(var, 64, "MiserPerk=%d\r\n",PlayerInfo[playerid][pMiserPerk]);fwrite(hFile, var);
				dini_IntSet(string3, "MiserPerk", PlayerInfo[playerid][pMiserPerk]);
				//format(var, 64, "PainPerk=%d\r\n",PlayerInfo[playerid][pPainPerk]);fwrite(hFile, var);
				dini_IntSet(string3, "PainPerk", PlayerInfo[playerid][pPainPerk]);
				//format(var, 64, "TraderPerk=%d\r\n",PlayerInfo[playerid][pTraderPerk]);fwrite(hFile, var);
				dini_IntSet(string3, "TraderPerk", PlayerInfo[playerid][pTraderPerk]);
				//format(var, 64, "Tutorial=%d\r\n",PlayerInfo[playerid][pTut]);fwrite(hFile, var);
				dini_IntSet(string3, "Tutorial", PlayerInfo[playerid][pTut]);
				//format(var, 64, "Mission=%d\r\n",PlayerInfo[playerid][pMissionNr]);fwrite(hFile, var);
				dini_IntSet(string3, "Mission", PlayerInfo[playerid][pMissionNr]);
				//format(var, 64, "Warnings=%d\r\n",PlayerInfo[playerid][pWarns]);fwrite(hFile, var);
				dini_IntSet(string3, "Warnings", PlayerInfo[playerid][pWarns]);
				//format(var, 64, "VirWorld=%d\r\n",PlayerInfo[playerid][pVirWorld]);fwrite(hFile, var);
				dini_IntSet(string3, "VirWorld", PlayerInfo[playerid][pVirWorld]);
				//format(var, 64, "Fuel=%d\r\n",PlayerInfo[playerid][pFuel]);fwrite(hFile, var);
				dini_IntSet(string3, "Fuel", PlayerInfo[playerid][pFuel]);
				//format(var, 64, "Married=%d\r\n",PlayerInfo[playerid][pMarried]);fwrite(hFile, var);
				dini_IntSet(string3, "Married", PlayerInfo[playerid][pMarried]);
				//format(var, 64, "MarriedTo=%s\r\n",PlayerInfo[playerid][pMarriedTo]);fwrite(hFile, var);
				dini_Set(string3, "MarriedTo", PlayerInfo[playerid][pMarriedTo]);
				//format(var, 64, "FishTool=%d\r\n",PlayerInfo[playerid][pFishTool]);fwrite(hFile, var);
    				dini_IntSet(string3, "FishTool", PlayerInfo[playerid][pFishTool]);
    				//format(var, 64, "Note1=%s\r\n",PlayerInfo[playerid][pNote1]);fwrite(hFile, var);
				dini_Set(string3, "Note1", PlayerInfo[playerid][pNote1]);
				//format(var, 64, "Note1s=%d\r\n",PlayerInfo[playerid][pNote1s]);fwrite(hFile, var);
				dini_IntSet(string3, "Note1s", PlayerInfo[playerid][pNote1s]);
				//format(var, 64, "Note2=%s\r\n",PlayerInfo[playerid][pNote2]);fwrite(hFile, var);
				dini_Set(string3, "Note2", PlayerInfo[playerid][pNote2]);
				//format(var, 64, "Note2s=%d\r\n",PlayerInfo[playerid][pNote2s]);fwrite(hFile, var);
				dini_IntSet(string3, "Note2s", PlayerInfo[playerid][pNote2s]);
				//format(var, 64, "Note3=%s\r\n",PlayerInfo[playerid][pNote3]);fwrite(hFile, var);
				dini_Set(string3, "Note3", PlayerInfo[playerid][pNote3]);
				//format(var, 64, "Note3s=%d\r\n",PlayerInfo[playerid][pNote3s]);fwrite(hFile, var);
				dini_IntSet(string3, "Note3s", PlayerInfo[playerid][pNote3s]);
				//format(var, 64, "Note4=%s\r\n",PlayerInfo[playerid][pNote4]);fwrite(hFile, var);
				dini_Set(string3, "Note4", PlayerInfo[playerid][pNote4]);
				//format(var, 64, "Note4s=%d\r\n",PlayerInfo[playerid][pNote4s]);fwrite(hFile, var);
				dini_IntSet(string3, "Note4s", PlayerInfo[playerid][pNote4s]);
				//format(var, 64, "Note5=%s\r\n",PlayerInfo[playerid][pNote5]);fwrite(hFile, var);
				dini_Set(string3, "Note5", PlayerInfo[playerid][pNote5]);
				//format(var, 64, "Note5s=%d\r\n",PlayerInfo[playerid][pNote5s]);fwrite(hFile, var);
				dini_IntSet(string3, "Note5s", PlayerInfo[playerid][pNote5s]);
				//format(var, 64, "InvWeapon=%d\r\n",PlayerInfo[playerid][pInvWeapon]);fwrite(hFile, var);
				dini_IntSet(string3, "InvWeapon", PlayerInfo[playerid][pInvWeapon]);
				//format(var, 64, "InvAmmo=%d\r\n",PlayerInfo[playerid][pInvAmmo]);fwrite(hFile, var);
				dini_IntSet(string3, "InvAmmo", PlayerInfo[playerid][pInvAmmo]);
				//format(var, 64, "Lighter=%d\r\n",PlayerInfo[playerid][pLighter]);fwrite(hFile, var);
				dini_IntSet(string3, "Lighter", PlayerInfo[playerid][pLighter]);
				//format(var, 64, "Cigarettes=%d\r\n",PlayerInfo[playerid][pCigarettes]);fwrite(hFile, var);
				dini_IntSet(string3, "Cigarettes", PlayerInfo[playerid][pCigarettes]);
				//format(var, 64, "TrancarConta=%d\r\n",PlayerInfo[playerid][pTrancarConta]);fwrite(hFile, var);
				dini_IntSet(string3, "TrancarConta", PlayerInfo[playerid][pTrancarConta]);
				//format(var, 64, "SenhaBanco=%s\r\n",PlayerInfo[playerid][pSenhaBanco]);fwrite(hFile, var);
				dini_Set(string3, "SenhaBanco", PlayerInfo[playerid][pSenhaBanco]);
				//format(var, 64, "TrocarSenha=%s\n",PlayerInfo[playerid][pTrocarSenha]);fwrite(hFile, var); - Sistema utilizado para checar a senha no Trocar / Criar Senha! - REMOVIDO -
				//format(var, 64, "ChecarSenha=%d\r\n",PlayerInfo[playerid][pChecarSenha]);fwrite(hFile, var);
				dini_IntSet(string3, "ChecarSenha", PlayerInfo[playerid][pChecarSenha]);
				//format(var, 64, "AvisoADM=%d\r\n",PlayerInfo[playerid][pAvisoADM]);fwrite(hFile, var);
				dini_IntSet(string3, "AvisoADM", PlayerInfo[playerid][pAvisoADM]);
				//format(var, 64, "AvisoXiter=%d\r\n",PlayerInfo[playerid][pAvisoXiter]);fwrite(hFile, var);
				dini_IntSet(string3, "AvisoXiter", PlayerInfo[playerid][pAvisoXiter]);
				//fclose(hFile);*/
			}
		}
	return 1;
}
Is there any problem ?
Ty.

Quote:
Originally Posted by Scarface~
Посмотреть сообщение
Reduce your timers
Man, i just changed my Register System, i have the GM before this change, and this work perfect!
i don't changed any timer. cause this, the problem can't be in the timers.
Ty.

Quote:
Originally Posted by gamer931215
Посмотреть сообщение
Reduce timers, or/and combine them if possible like scarface said. And check if you dont set a lot timers for every player (then try making a global one with loop)
The same of i said to Scarface, i haven't changed any timer. If the problem is in the timers, this problem needs to stay in older versions ...
I Just Changed the system from fwrite / fread to dini_set / dini_get.

Thank-You for all.

I keep waiting.

Excuse my english.
Reply
#6

Quote:
Originally Posted by Guerek
Посмотреть сообщение
Man, on my "OnPlayerUpdate()", i just made the variables "PlayerInfo" receiver the datas of accounts, with dini_get.
u can take a look:

Код:
public OnPlayerUpdate(playerid)
{
	if(IsPlayerConnected(playerid))
	{
		if(gPlayerLogged[playerid])
		{
		    new string3[64];
			new playername3[MAX_PLAYER_NAME];
			GetPlayerName(playerid, playername3, sizeof(playername3));
			format(string3, sizeof(string3), "users/%s.ini", playername3);
			//new File: hFile = fopen(string3, io_write);
			//if (hFile)
			//{
				// --------------------------------- Stanley ----------
			     //new var[64];
				//format(var, 64, "Key=%s\r\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);
				dini_Set(string3, "Key", PlayerInfo[playerid][pKey]);
				PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
				//format(var, 64, "Level=%d\r\n",PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
				dini_IntSet(string3, "Level", PlayerInfo[playerid][pLevel]);
				//format(var, 64, "AdminLevel=%d\r\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
				dini_IntSet(string3, "AdminLevel", PlayerInfo[playerid][pAdmin]);
				//format(var, 64, "DonateRank=%d\r\n",PlayerInfo[playerid][pDonateRank]);fwrite(hFile, var);
				dini_IntSet(string3, "DonateRank", PlayerInfo[playerid][pDonateRank]);
				//format(var, 64, "UpgradePoints=%d\r\n",PlayerInfo[playerid][gPupgrade]);fwrite(hFile, var);
				dini_IntSet(string3, "UpgradePoints", PlayerInfo[playerid][gPupgrade]);
				//format(var, 64, "ConnectedTime=%d\r\n",PlayerInfo[playerid][pConnectTime]);fwrite(hFile, var);
				dini_IntSet(string3, "ConnectedTime", PlayerInfo[playerid][pConnectTime]);
				//format(var, 64, "Registered=%d\r\n",PlayerInfo[playerid][pReg]);fwrite(hFile, var);
				dini_IntSet(string3, "Registered", PlayerInfo[playerid][pReg]);
				//format(var, 64, "Sex=%d\r\n",PlayerInfo[playerid][pSex]);fwrite(hFile, var);
				dini_IntSet(string3, "Sex", PlayerInfo[playerid][pSex]);
				//format(var, 64, "Age=%d\r\n",PlayerInfo[playerid][pAge]);fwrite(hFile, var);
				dini_IntSet(string3, "Age", PlayerInfo[playerid][pAge]);
				//format(var, 64, "Origin=%d\r\n",PlayerInfo[playerid][pOrigin]);fwrite(hFile, var);
				dini_IntSet(string3, "Origin", PlayerInfo[playerid][pOrigin]);
				//format(var, 64, "CK=%d\r\n",PlayerInfo[playerid][pCK]);fwrite(hFile, var);
				dini_IntSet(string3, "CK", PlayerInfo[playerid][pCK]);
				//format(var, 64, "Muted=%d\r\n",PlayerInfo[playerid][pMuted]);fwrite(hFile, var);
				dini_IntSet(string3, "Muted", PlayerInfo[playerid][pMuted]);
				//format(var, 64, "Respect=%d\r\n",PlayerInfo[playerid][pExp]);fwrite(hFile, var);
				dini_IntSet(string3, "Respect", PlayerInfo[playerid][pExp]);
				//format(var, 64, "Money=%d\r\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
				dini_IntSet(string3, "Money", PlayerInfo[playerid][pCash]);
				//format(var, 64, "Bank=%d\r\n",PlayerInfo[playerid][pAccount]);fwrite(hFile, var);
				dini_IntSet(string3, "Bank", PlayerInfo[playerid][pAccount]);
				//format(var, 64, "Crimes=%d\r\n",PlayerInfo[playerid][pCrimes]);fwrite(hFile, var);
				dini_IntSet(string3, "Crimes", PlayerInfo[playerid][pCrimes]);
				//format(var, 64, "Kills=%d\r\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var);
				dini_IntSet(string3, "Kills", PlayerInfo[playerid][pKills]);
				//format(var, 64, "Deaths=%d\r\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var);
				dini_IntSet(string3, "Deaths", PlayerInfo[playerid][pDeaths]);
				//format(var, 64, "Arrested=%d\r\n",PlayerInfo[playerid][pArrested]);fwrite(hFile, var);
				dini_IntSet(string3, "Arrested", PlayerInfo[playerid][pArrested]);
				//format(var, 64, "WantedDeaths=%d\r\n",PlayerInfo[playerid][pWantedDeaths]);fwrite(hFile, var);
				dini_IntSet(string3, "WantedDeaths", PlayerInfo[playerid][pWantedDeaths]);
				//format(var, 64, "Phonebook=%d\r\n",PlayerInfo[playerid][pPhoneBook]);fwrite(hFile, var);
				dini_IntSet(string3, "Phonebook", PlayerInfo[playerid][pPhoneBook]);
				//format(var, 64, "LottoNr=%d\r\n",PlayerInfo[playerid][pLottoNr]);fwrite(hFile, var);
				dini_IntSet(string3, "LottoNr", PlayerInfo[playerid][pLottoNr]);
				//format(var, 64, "Fishes=%d\r\n",PlayerInfo[playerid][pFishes]);fwrite(hFile, var);
				dini_IntSet(string3, "Fishes", PlayerInfo[playerid][pFishes]);
				//format(var, 64, "BiggestFish=%d\r\n",PlayerInfo[playerid][pBiggestFish]);fwrite(hFile, var);
				dini_IntSet(string3, "BiggestFish", PlayerInfo[playerid][pBiggestFish]);
				//format(var, 64, "Job=%d\r\n",PlayerInfo[playerid][pJob]);fwrite(hFile, var);
				dini_IntSet(string3, "Job", PlayerInfo[playerid][pJob]);
				//format(var, 64, "Paycheck=%d\r\n",PlayerInfo[playerid][pPayCheck]);fwrite(hFile, var);
				dini_IntSet(string3, "Paycheck", PlayerInfo[playerid][pPayCheck]);
				//format(var, 64, "HeadValue=%d\r\n",PlayerInfo[playerid][pHeadValue]);fwrite(hFile, var);
				dini_IntSet(string3, "HeadValue", PlayerInfo[playerid][pHeadValue]);
				//format(var, 64, "Jailed=%d\r\n",PlayerInfo[playerid][pJailed]);fwrite(hFile, var);
				dini_IntSet(string3, "Jailed", PlayerInfo[playerid][pJailed]);
				//format(var, 64, "JailTime=%d\r\n",PlayerInfo[playerid][pJailTime]);fwrite(hFile, var);
                	dini_IntSet(string3, "JailTime", PlayerInfo[playerid][pJailTime]);
                	//format(var, 64, "Jailed2=%d\r\n",PlayerInfo[playerid][pJailed2]);fwrite(hFile, var);
				dini_IntSet(string3, "Jailed2", PlayerInfo[playerid][pJailed2]);
				//format(var, 64, "JailTime2=%d\r\n",PlayerInfo[playerid][pJailTime2]);fwrite(hFile, var);
				dini_IntSet(string3, "JailTime2", PlayerInfo[playerid][pJailTime]);
				//format(var, 64, "Materials=%d\r\n",PlayerInfo[playerid][pMats]);fwrite(hFile, var);
				dini_IntSet(string3, "Materials", PlayerInfo[playerid][pMats]);
				//format(var, 64, "Drugs=%d\r\n",PlayerInfo[playerid][pDrugs]);fwrite(hFile, var);
				dini_IntSet(string3, "Drugs", PlayerInfo[playerid][pDrugs]);
				//format(var, 64, "Leader=%d\r\n",PlayerInfo[playerid][pLeader]);fwrite(hFile, var);
				dini_IntSet(string3, "Leader", PlayerInfo[playerid][pLeader]);
				//format(var, 64, "Member=%d\r\n",PlayerInfo[playerid][pMember]);fwrite(hFile, var);
				dini_IntSet(string3, "Member", PlayerInfo[playerid][pMember]);
				//format(var, 64, "FMember=%d\r\n",PlayerInfo[playerid][pFMember]);fwrite(hFile, var);
				dini_IntSet(string3, "FMember", PlayerInfo[playerid][pFMember]);
				//format(var, 64, "Rank=%d\r\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var);
				dini_IntSet(string3, "Rank", PlayerInfo[playerid][pRank]);
				//format(var, 64, "Char=%d\r\n",PlayerInfo[playerid][pChar]);fwrite(hFile, var);
				dini_IntSet(string3, "Char", PlayerInfo[playerid][pChar]);
				//format(var, 64, "ContractTime=%d\r\n",PlayerInfo[playerid][pContractTime]);fwrite(hFile, var);
				dini_IntSet(string3, "ContractTime", PlayerInfo[playerid][pContractTime]);
				//format(var, 64, "DetSkill=%d\r\n",PlayerInfo[playerid][pDetSkill]);fwrite(hFile, var);
				dini_IntSet(string3, "DetSkill", PlayerInfo[playerid][pDetSkill]);
				//format(var, 64, "SexSkill=%d\r\n",PlayerInfo[playerid][pSexSkill]);fwrite(hFile, var);
				dini_IntSet(string3, "SexSkill", PlayerInfo[playerid][pSexSkill]);
				//format(var, 64, "BoxSkill=%d\r\n",PlayerInfo[playerid][pBoxSkill]);fwrite(hFile, var);
				dini_IntSet(string3, "BoxSkill", PlayerInfo[playerid][pBoxSkill]);
				//format(var, 64, "LawSkill=%d\r\n",PlayerInfo[playerid][pLawSkill]);fwrite(hFile, var);
				dini_IntSet(string3, "LawSkill", PlayerInfo[playerid][pLawSkill]);
				//format(var, 64, "MechSkill=%d\r\n",PlayerInfo[playerid][pMechSkill]);fwrite(hFile, var);
				dini_IntSet(string3, "MechSkill", PlayerInfo[playerid][pMechSkill]);
				//format(var, 64, "JackSkill=%d\r\n",PlayerInfo[playerid][pJackSkill]);fwrite(hFile, var);
				dini_IntSet(string3, "JackSkill", PlayerInfo[playerid][pJackSkill]);
				//format(var, 64, "CarSkill=%d\r\n",PlayerInfo[playerid][pCarSkill]);fwrite(hFile, var);
				dini_IntSet(string3, "CarSkill", PlayerInfo[playerid][pCarSkill]);
				//format(var, 64, "NewsSkill=%d\r\n",PlayerInfo[playerid][pNewsSkill]);fwrite(hFile, var);
				dini_IntSet(string3, "NewsSkill", PlayerInfo[playerid][pNewsSkill]);
				//format(var, 64, "DrugsSkill=%d\r\n",PlayerInfo[playerid][pDrugsSkill]);fwrite(hFile, var);
				dini_IntSet(string3, "DrugsSkill", PlayerInfo[playerid][pDrugsSkill]);
				//format(var, 64, "CookSkill=%d\r\n",PlayerInfo[playerid][pCookSkill]);fwrite(hFile, var);
				dini_IntSet(string3, "CookSkill", PlayerInfo[playerid][pCookSkill]);
				//format(var, 64, "FishSkill=%d\r\n",PlayerInfo[playerid][pFishSkill]);fwrite(hFile, var);
				dini_IntSet(string3, "FishSkill", PlayerInfo[playerid][pFishSkill]);
				//format(var, 64, "pSHealth=%.1f\r\n",PlayerInfo[playerid][pSHealth]);fwrite(hFile, var);
	            	dini_FloatSet(string3, "pSHealth", PlayerInfo[playerid][pSHealth]);
	            	GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
				//format(var, 64, "pHealth=%.1f\r\n",PlayerInfo[playerid][pHealth]);fwrite(hFile, var);
				dini_FloatSet(string3, "pHealth", PlayerInfo[playerid][pHealth]);
				//format(var, 64, "Int=%d\r\n",PlayerInfo[playerid][pInt]);fwrite(hFile, var);
				dini_IntSet(string3, "Int", PlayerInfo[playerid][pInt]);
				//format(var, 64, "Local=%d\r\n",PlayerInfo[playerid][pLocal]);fwrite(hFile, var);
				dini_IntSet(string3, "Local", PlayerInfo[playerid][pLocal]);
				//format(var, 64, "Team=%d\r\n",PlayerInfo[playerid][pTeam]);fwrite(hFile, var);
				dini_IntSet(string3, "Team", PlayerInfo[playerid][pTeam]);
				//format(var, 64, "Model=%d\r\n",PlayerInfo[playerid][pModel]);fwrite(hFile, var);
				dini_IntSet(string3, "Model", PlayerInfo[playerid][pModel]);
				//format(var, 64, "PhoneNr=%d\r\n",PlayerInfo[playerid][pPnumber]);fwrite(hFile, var);
				dini_IntSet(string3, "PhoneNr", PlayerInfo[playerid][pPnumber]);
				//format(var, 64, "Car=%d\r\n",PlayerInfo[playerid][pPcarkey]);fwrite(hFile, var);
				dini_IntSet(string3, "Car", PlayerInfo[playerid][pPcarkey]);
				//format(var, 64, "Car2=%d\r\n",PlayerInfo[playerid][pPcarkey2]);fwrite(hFile, var);
				dini_IntSet(string3, "Car2", PlayerInfo[playerid][pPcarkey2]);
				//format(var, 64, "Car3=%d\r\n",PlayerInfo[playerid][pPcarkey3]);fwrite(hFile, var);
				dini_IntSet(string3, "Car3", PlayerInfo[playerid][pPcarkey3]);
				//format(var, 64, "House=%d\r\n",PlayerInfo[playerid][pPhousekey]);fwrite(hFile, var);
				dini_IntSet(string3, "House", PlayerInfo[playerid][pPhousekey]);
				//format(var, 64, "Bizz=%d\r\n",PlayerInfo[playerid][pPbiskey]);fwrite(hFile, var);
				dini_IntSet(string3, "Bizz", PlayerInfo[playerid][pPbiskey]);
				if ((PlayerInfo[playerid][pPos_x]==0.0 && PlayerInfo[playerid][pPos_y]==0.0 && PlayerInfo[playerid][pPos_z]==0.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];
				}
				//format(var, 64, "Pos_x=%.1f\r\n",PlayerInfo[playerid][pPos_x]);fwrite(hFile, var);
				dini_FloatSet(string3, "Pos_x", PlayerInfo[playerid][pPos_x]);
				//format(var, 64, "Pos_y=%.1f\r\n",PlayerInfo[playerid][pPos_y]);fwrite(hFile, var);
				dini_FloatSet(string3, "Pos_y", PlayerInfo[playerid][pPos_y]);
				//format(var, 64, "Pos_z=%.1f\r\n",PlayerInfo[playerid][pPos_z]);fwrite(hFile, var);
				dini_FloatSet(string3, "Pos_z", PlayerInfo[playerid][pPos_z]);
				//format(var, 64, "CarLic=%d\r\n",PlayerInfo[playerid][pCarLic]);fwrite(hFile, var);
                	dini_IntSet(string3, "CarLic", PlayerInfo[playerid][pCarLic]);
                	//format(var, 64, "FlyLic=%d\r\n",PlayerInfo[playerid][pFlyLic]);fwrite(hFile, var);
				dini_IntSet(string3, "FlyLic", PlayerInfo[playerid][pFlyLic]);
				//format(var, 64, "BoatLic=%d\r\n",PlayerInfo[playerid][pBoatLic]);fwrite(hFile, var);
				dini_IntSet(string3, "BoatLic", PlayerInfo[playerid][pBoatLic]);
				//format(var, 64, "FishLic=%d\r\n",PlayerInfo[playerid][pFishLic]);fwrite(hFile, var);
				dini_IntSet(string3, "FishLic", PlayerInfo[playerid][pFishLic]);
				//format(var, 64, "GunLic=%d\r\n",PlayerInfo[playerid][pGunLic]);fwrite(hFile, var);
				dini_IntSet(string3, "GunLic", PlayerInfo[playerid][pGunLic]);
				//format(var, 64, "Gun1=%d\r\n",PlayerInfo[playerid][pGun1]);fwrite(hFile, var);
				dini_IntSet(string3, "Gun1", PlayerInfo[playerid][pGun1]);
				//format(var, 64, "Gun2=%d\r\n",PlayerInfo[playerid][pGun2]);fwrite(hFile, var);
				dini_IntSet(string3, "Gun2", PlayerInfo[playerid][pGun2]);
				//format(var, 64, "Gun3=%d\r\n",PlayerInfo[playerid][pGun3]);fwrite(hFile, var);
				dini_IntSet(string3, "Gun3", PlayerInfo[playerid][pGun3]);
				//format(var, 64, "Gun4=%d\r\n",PlayerInfo[playerid][pGun4]);fwrite(hFile, var);
				dini_IntSet(string3, "Gun4", PlayerInfo[playerid][pGun4]);
				//format(var, 64, "Ammo1=%d\r\n",PlayerInfo[playerid][pAmmo1]);fwrite(hFile, var);
				dini_IntSet(string3, "Ammo1", PlayerInfo[playerid][pAmmo1]);
				//format(var, 64, "Ammo2=%d\r\n",PlayerInfo[playerid][pAmmo2]);fwrite(hFile, var);
				dini_IntSet(string3, "Ammo2", PlayerInfo[playerid][pAmmo2]);
				//format(var, 64, "Ammo3=%d\r\n",PlayerInfo[playerid][pAmmo3]);fwrite(hFile, var);
				dini_IntSet(string3, "Ammo3", PlayerInfo[playerid][pAmmo3]);
				//format(var, 64, "Ammo4=%d\r\n",PlayerInfo[playerid][pAmmo4]);fwrite(hFile, var);
				dini_IntSet(string3, "Ammo4", PlayerInfo[playerid][pAmmo4]);
				//format(var, 64, "CarTime=%d\r\n",PlayerInfo[playerid][pCarTime]);fwrite(hFile, var);
				dini_IntSet(string3, "CarTime", PlayerInfo[playerid][pCarTime]);
				//format(var, 64, "PayDay=%d\r\n",PlayerInfo[playerid][pPayDay]);fwrite(hFile, var);
				dini_IntSet(string3, "PayDay", PlayerInfo[playerid][pPayDay]);
				//format(var, 64, "PayDayHad=%d\r\n",PlayerInfo[playerid][pPayDayHad]);fwrite(hFile, var);
				dini_IntSet(string3, "PayDayHad", PlayerInfo[playerid][pPayDayHad]);
				//format(var, 64, "Watch=%d\r\n",PlayerInfo[playerid][pWatch]);fwrite(hFile, var);
				dini_IntSet(string3, "Watch", PlayerInfo[playerid][pWatch]);
				//format(var, 64, "Crashed=%d\r\n",PlayerInfo[playerid][pCrashed]);fwrite(hFile, var);
				dini_IntSet(string3, "Crashed", PlayerInfo[playerid][pCrashed]);
				//format(var, 64, "Wins=%d\r\n",PlayerInfo[playerid][pWins]);fwrite(hFile, var);
				dini_IntSet(string3, "Wins", PlayerInfo[playerid][pWins]);
				//format(var, 64, "Loses=%d\r\n",PlayerInfo[playerid][pLoses]);fwrite(hFile, var);
				dini_IntSet(string3, "Loses", PlayerInfo[playerid][pLoses]);
				//format(var, 64, "AlcoholPerk=%d\r\n",PlayerInfo[playerid][pAlcoholPerk]);fwrite(hFile, var);
				dini_IntSet(string3, "AlcoholPerk", PlayerInfo[playerid][pAlcoholPerk]);
				//format(var, 64, "DrugPerk=%d\r\n",PlayerInfo[playerid][pDrugPerk]);fwrite(hFile, var);
				dini_IntSet(string3, "DrugPerk", PlayerInfo[playerid][pDrugPerk]);
				//format(var, 64, "MiserPerk=%d\r\n",PlayerInfo[playerid][pMiserPerk]);fwrite(hFile, var);
				dini_IntSet(string3, "MiserPerk", PlayerInfo[playerid][pMiserPerk]);
				//format(var, 64, "PainPerk=%d\r\n",PlayerInfo[playerid][pPainPerk]);fwrite(hFile, var);
				dini_IntSet(string3, "PainPerk", PlayerInfo[playerid][pPainPerk]);
				//format(var, 64, "TraderPerk=%d\r\n",PlayerInfo[playerid][pTraderPerk]);fwrite(hFile, var);
				dini_IntSet(string3, "TraderPerk", PlayerInfo[playerid][pTraderPerk]);
				//format(var, 64, "Tutorial=%d\r\n",PlayerInfo[playerid][pTut]);fwrite(hFile, var);
				dini_IntSet(string3, "Tutorial", PlayerInfo[playerid][pTut]);
				//format(var, 64, "Mission=%d\r\n",PlayerInfo[playerid][pMissionNr]);fwrite(hFile, var);
				dini_IntSet(string3, "Mission", PlayerInfo[playerid][pMissionNr]);
				//format(var, 64, "Warnings=%d\r\n",PlayerInfo[playerid][pWarns]);fwrite(hFile, var);
				dini_IntSet(string3, "Warnings", PlayerInfo[playerid][pWarns]);
				//format(var, 64, "VirWorld=%d\r\n",PlayerInfo[playerid][pVirWorld]);fwrite(hFile, var);
				dini_IntSet(string3, "VirWorld", PlayerInfo[playerid][pVirWorld]);
				//format(var, 64, "Fuel=%d\r\n",PlayerInfo[playerid][pFuel]);fwrite(hFile, var);
				dini_IntSet(string3, "Fuel", PlayerInfo[playerid][pFuel]);
				//format(var, 64, "Married=%d\r\n",PlayerInfo[playerid][pMarried]);fwrite(hFile, var);
				dini_IntSet(string3, "Married", PlayerInfo[playerid][pMarried]);
				//format(var, 64, "MarriedTo=%s\r\n",PlayerInfo[playerid][pMarriedTo]);fwrite(hFile, var);
				dini_Set(string3, "MarriedTo", PlayerInfo[playerid][pMarriedTo]);
				//format(var, 64, "FishTool=%d\r\n",PlayerInfo[playerid][pFishTool]);fwrite(hFile, var);
    				dini_IntSet(string3, "FishTool", PlayerInfo[playerid][pFishTool]);
    				//format(var, 64, "Note1=%s\r\n",PlayerInfo[playerid][pNote1]);fwrite(hFile, var);
				dini_Set(string3, "Note1", PlayerInfo[playerid][pNote1]);
				//format(var, 64, "Note1s=%d\r\n",PlayerInfo[playerid][pNote1s]);fwrite(hFile, var);
				dini_IntSet(string3, "Note1s", PlayerInfo[playerid][pNote1s]);
				//format(var, 64, "Note2=%s\r\n",PlayerInfo[playerid][pNote2]);fwrite(hFile, var);
				dini_Set(string3, "Note2", PlayerInfo[playerid][pNote2]);
				//format(var, 64, "Note2s=%d\r\n",PlayerInfo[playerid][pNote2s]);fwrite(hFile, var);
				dini_IntSet(string3, "Note2s", PlayerInfo[playerid][pNote2s]);
				//format(var, 64, "Note3=%s\r\n",PlayerInfo[playerid][pNote3]);fwrite(hFile, var);
				dini_Set(string3, "Note3", PlayerInfo[playerid][pNote3]);
				//format(var, 64, "Note3s=%d\r\n",PlayerInfo[playerid][pNote3s]);fwrite(hFile, var);
				dini_IntSet(string3, "Note3s", PlayerInfo[playerid][pNote3s]);
				//format(var, 64, "Note4=%s\r\n",PlayerInfo[playerid][pNote4]);fwrite(hFile, var);
				dini_Set(string3, "Note4", PlayerInfo[playerid][pNote4]);
				//format(var, 64, "Note4s=%d\r\n",PlayerInfo[playerid][pNote4s]);fwrite(hFile, var);
				dini_IntSet(string3, "Note4s", PlayerInfo[playerid][pNote4s]);
				//format(var, 64, "Note5=%s\r\n",PlayerInfo[playerid][pNote5]);fwrite(hFile, var);
				dini_Set(string3, "Note5", PlayerInfo[playerid][pNote5]);
				//format(var, 64, "Note5s=%d\r\n",PlayerInfo[playerid][pNote5s]);fwrite(hFile, var);
				dini_IntSet(string3, "Note5s", PlayerInfo[playerid][pNote5s]);
				//format(var, 64, "InvWeapon=%d\r\n",PlayerInfo[playerid][pInvWeapon]);fwrite(hFile, var);
				dini_IntSet(string3, "InvWeapon", PlayerInfo[playerid][pInvWeapon]);
				//format(var, 64, "InvAmmo=%d\r\n",PlayerInfo[playerid][pInvAmmo]);fwrite(hFile, var);
				dini_IntSet(string3, "InvAmmo", PlayerInfo[playerid][pInvAmmo]);
				//format(var, 64, "Lighter=%d\r\n",PlayerInfo[playerid][pLighter]);fwrite(hFile, var);
				dini_IntSet(string3, "Lighter", PlayerInfo[playerid][pLighter]);
				//format(var, 64, "Cigarettes=%d\r\n",PlayerInfo[playerid][pCigarettes]);fwrite(hFile, var);
				dini_IntSet(string3, "Cigarettes", PlayerInfo[playerid][pCigarettes]);
				//format(var, 64, "TrancarConta=%d\r\n",PlayerInfo[playerid][pTrancarConta]);fwrite(hFile, var);
				dini_IntSet(string3, "TrancarConta", PlayerInfo[playerid][pTrancarConta]);
				//format(var, 64, "SenhaBanco=%s\r\n",PlayerInfo[playerid][pSenhaBanco]);fwrite(hFile, var);
				dini_Set(string3, "SenhaBanco", PlayerInfo[playerid][pSenhaBanco]);
				//format(var, 64, "TrocarSenha=%s\n",PlayerInfo[playerid][pTrocarSenha]);fwrite(hFile, var); - Sistema utilizado para checar a senha no Trocar / Criar Senha! - REMOVIDO -
				//format(var, 64, "ChecarSenha=%d\r\n",PlayerInfo[playerid][pChecarSenha]);fwrite(hFile, var);
				dini_IntSet(string3, "ChecarSenha", PlayerInfo[playerid][pChecarSenha]);
				//format(var, 64, "AvisoADM=%d\r\n",PlayerInfo[playerid][pAvisoADM]);fwrite(hFile, var);
				dini_IntSet(string3, "AvisoADM", PlayerInfo[playerid][pAvisoADM]);
				//format(var, 64, "AvisoXiter=%d\r\n",PlayerInfo[playerid][pAvisoXiter]);fwrite(hFile, var);
				dini_IntSet(string3, "AvisoXiter", PlayerInfo[playerid][pAvisoXiter]);
				//fclose(hFile);*/
			}
		}
	return 1;
}
Is there any problem ?
Ty.


Man, i just changed my Register System, i have the GM before this change, and this work perfect!
i don't changed any timer. cause this, the problem can't be in the timers.
Ty.


The same of i said to Scarface, i haven't changed any timer. If the problem is in the timers, this problem needs to stay in older versions ...
I Just Changed the system from fwrite / fread to dini_set / dini_get.

Thank-You for all.

I keep waiting.

Excuse my english.
....OnPlayerUpdate is called around 2,000 times a second. Do NOT use OnPlayerUpdate for saving files, create a seperate timer.
Reply
#7

http://forum.sa-mp.com/showthread.ph...onplayerupdate
Reply
#8

Oh WOW.. Why do you save all this data all the time?
You wont NEED to save It before the player disconnects, unless he crash. Make a timer that runs like every 25 minutes or so to keep your data.
Reply
#9

Quote:
Originally Posted by Mike Garber
Посмотреть сообщение
Oh WOW.. Why do you save all this data all the time?
You wont NEED to save It before the player disconnects, unless he crash. Make a timer that runs like every 25 minutes or so to keep your data.
2-5 mins would be better.. 25 mins is a big roleback if he crashs.
Reply
#10

Quote:
Originally Posted by LilGunna
Посмотреть сообщение
2-5 mins would be better.. 25 mins is a big roleback if he crashs.
I personally do it every 3 seconds, and it's a bit over-kill.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)