[Ayuda] Gm no guarda los datos al registrarse
#3

Quote:
Originally Posted by Goncho28
Посмотреть сообщение
No puedo ver con mucho detalle desde el cel pero por lo que veo solo cargas datos y no los guardas.
Creo que todo se guarda en el OnPlayerUpdateTime que es este:
Код:
public OnPlayerUpdateTime(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)
			{
				new var[32],string[328];
                format(var, 32, "Key=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);
				format(var, 32, "Level=%d\n",PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
				format(var, 32, "AdminCRP=%d\n",PlayerInfo[playerid][pAdminECRP]);fwrite(hFile, var);
				format(var, 32, "Facciones=%d\n",PlayerInfo[playerid][pFacciones]);fwrite(hFile, var);
				format(var, 32, "Helper=%d\n",PlayerInfo[playerid][pHelper]);fwrite(hFile, var);
				format(var, 32, "ConnectedTime=%d\n",PlayerInfo[playerid][pConnectTime]);fwrite(hFile, var);
				format(var, 32, "Registered=%d\n",PlayerInfo[playerid][pReg]);fwrite(hFile, var);
				format(var, 32, "Sex=%d\n",PlayerInfo[playerid][pSex]);fwrite(hFile, var);
				format(var, 32, "Age=%d\n",PlayerInfo[playerid][pAge]);fwrite(hFile, var);
				format(var, 32, "Origin=%d\n",PlayerInfo[playerid][pOrigin]);fwrite(hFile, var);
                format(var, 32, "Walk=%d\n",PlayerInfo[playerid][pWalk]);fwrite(hFile, var);
				format(var, 32, "Respect=%d\n",PlayerInfo[playerid][pExp]);fwrite(hFile, var);
				format(var, 32, "Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
				format(var, 32, "Bank=%d\n",PlayerInfo[playerid][pAccount]);fwrite(hFile, var);
				format(var, 32, "Cheques%d\n",PlayerInfo[playerid][pCheques]);fwrite(hFile, var);
				format(var, 32, "Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var);
				format(var, 32, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var);
				format(var, 32, "Arrested=%d\n",PlayerInfo[playerid][pArrested]);fwrite(hFile, var);
				format(var, 32, "LottoNr=%d\n",PlayerInfo[playerid][pLottoNr]);fwrite(hFile, var);
				format(var, 32, "Job=%d\n",PlayerInfo[playerid][pJob]);fwrite(hFile, var);
				format(var, 32, "Jailed=%d\n",PlayerInfo[playerid][pJailed]);fwrite(hFile, var);
				format(var, 32, "JailTime=%d\n",PlayerInfo[playerid][pJailTime]);fwrite(hFile, var);
				format(var, 32, "Materiales=%d\n",PlayerInfo[playerid][pMats]);fwrite(hFile, var);
				format(var, 32, "Drogas=%d\n",PlayerInfo[playerid][pDrugs]);fwrite(hFile, var);
				format(var, 32, "Speed=%d\n",PlayerInfo[playerid][pSpeed]);fwrite(hFile, var);
				format(var, 32, "Ectasy=%d\n",PlayerInfo[playerid][pEctasy]);fwrite(hFile, var);
				format(var, 32, "Ritalin=%d\n",PlayerInfo[playerid][pRitalin]);fwrite(hFile, var);
				format(var, 32, "Heroina=%d\n",PlayerInfo[playerid][pHeroina]);fwrite(hFile, var);
				format(var, 32, "Marihuana=%d\n",PlayerInfo[playerid][pMarihuana]);fwrite(hFile, var);
				format(var, 32, "Leader=%d\n",PlayerInfo[playerid][pLeader]);fwrite(hFile, var);
				format(var, 32, "Member=%d\n",PlayerInfo[playerid][pMember]);fwrite(hFile, var);
				format(var, 32, "Rank=%d\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var);
				format(var, 32, "Char=%d\n",PlayerInfo[playerid][pChar]);fwrite(hFile, var);
				GetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
	            format(var, 32, "pHealth=%.1f\n",PlayerInfo[playerid][pHealth]);fwrite(hFile, var);
	            GetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);
                format(var, 32, "pArmour=%.1f\n",PlayerInfo[playerid][pArmour]);fwrite(hFile, var);
                PlayerInfo[playerid][pInt] = GetPlayerInterior(playerid);
				format(var, 32, "Int=%d\n",PlayerInfo[playerid][pInt]);fwrite(hFile, var);
				PlayerInfo[playerid][pVirWorld] = GetPlayerVirtualWorld(playerid);
				format(var, 32, "VirWorld=%d\n",PlayerInfo[playerid][pVirWorld]);fwrite(hFile, var);
				format(var, 32, "Team=%d\n",PlayerInfo[playerid][pTeam]);fwrite(hFile, var);
				format(var, 32, "Model=%d\n",PlayerInfo[playerid][pModel]);fwrite(hFile, var);
				format(var, 32, "PhoneNr=%d\n",PlayerInfo[playerid][pPnumber]);fwrite(hFile, var);
				format(var, 32, "Minutes=%d\n",PlayerInfo[playerid][pMinutes]);fwrite(hFile, var);
				format(var, 32, "MTexto=%d\n",PlayerInfo[playerid][pMTexto]);fwrite(hFile, var);
				format(var, 32, "Ipod=%d\n",PlayerInfo[playerid][pIpod]);fwrite(hFile, var);
				format(var, 32, "Car=%d\n",PlayerInfo[playerid][pPcarkey]);fwrite(hFile, var);
				format(var, 32, "Car2=%d\n",PlayerInfo[playerid][pPcarkey2]);fwrite(hFile, var);
				format(var, 32, "TimeCar=%d\n",PlayerInfo[playerid][pTimeCar]);fwrite(hFile, var);
				format(var, 32, "TimeCar2=%d\n",PlayerInfo[playerid][pTimeCar2]);fwrite(hFile, var);
				format(var, 32, "House=%d\n",PlayerInfo[playerid][pPhousekey]);fwrite(hFile, var);
				format(var, 32, "Negocio=%d\n",PlayerInfo[playerid][pPbizzkey]);fwrite(hFile, var);
    			new Float:x, Float:y, Float:z;
     			GetPlayerPos(playerid,x,y,z);
				PlayerInfo[playerid][pPos_x] = x;
				PlayerInfo[playerid][pPos_y] = y;
				PlayerInfo[playerid][pPos_z] = z;
				format(var, 32, "Pos_x=%.1f\n",PlayerInfo[playerid][pPos_x]);fwrite(hFile, var);
				format(var, 32, "Pos_y=%.1f\n",PlayerInfo[playerid][pPos_y]);fwrite(hFile, var);
				format(var, 32, "Pos_z=%.1f\n",PlayerInfo[playerid][pPos_z]);fwrite(hFile, var);
				format(var, 32, "CarLic=%d\n",PlayerInfo[playerid][pCarLic]);fwrite(hFile, var);
                format(var, 32, "FlyLic=%d\n",PlayerInfo[playerid][pFlyLic]);fwrite(hFile, var);
				format(var, 32, "BoatLic=%d\n",PlayerInfo[playerid][pBoatLic]);fwrite(hFile, var);
				format(var, 32, "GunLic=%d\n",PlayerInfo[playerid][pGunLic]);fwrite(hFile, var);
				format(var, 32, "Gafas=%d\n",PlayerInfo[playerid][pGafas]);fwrite(hFile, var);
				format(var, 32, "Tutorial=%d\n",PlayerInfo[playerid][pTut]);fwrite(hFile, var);
    			format(string, 64, "Antecedente1=%s\n",PlayerInfo[playerid][pAntecedente1]);fwrite(hFile, string);
				format(string, 64, "Antecedente2=%s\n",PlayerInfo[playerid][pAntecedente2]);fwrite(hFile, string);
				format(string, 64, "Antecedente3=%s\n",PlayerInfo[playerid][pAntecedente3]);fwrite(hFile, string);
    			format(string, 64, "Note1=%s\n",PlayerInfo[playerid][pNote1]);fwrite(hFile, string);
				format(string, 64, "Note2=%s\n",PlayerInfo[playerid][pNote2]);fwrite(hFile, string);
				format(string, 64, "Note3=%s\n",PlayerInfo[playerid][pNote3]);fwrite(hFile, string);
				format(string, 64, "Note4=%s\n",PlayerInfo[playerid][pNote4]);fwrite(hFile, string);
				format(string, 64, "Note5=%s\n",PlayerInfo[playerid][pNote5]);fwrite(hFile, string);
				format(string, 128, "SMS1=%s\n",PlayerInfo[playerid][pSMS_1]);fwrite(hFile, string);
				format(string, 128, "SMS2=%s\n",PlayerInfo[playerid][pSMS_2]);fwrite(hFile, string);
				format(string, 128, "SMS3=%s\n",PlayerInfo[playerid][pSMS_3]);fwrite(hFile, string);
				format(string, 128, "SMS4=%s\n",PlayerInfo[playerid][pSMS_4]);fwrite(hFile, string);
				format(string, 128, "SMS5=%s\n",PlayerInfo[playerid][pSMS_5]);fwrite(hFile, string);
				format(var, 32, "Lighter=%d\n",PlayerInfo[playerid][pLighter]);fwrite(hFile, var);
				format(var, 32, "Cigarettes=%d\n",PlayerInfo[playerid][pCigarettes]);fwrite(hFile, var);
				format(var, 32, "Mascara=%d\n",PlayerInfo[playerid][pMask]);fwrite(hFile, var);
				format(var, 32, "Locked=%d\n",PlayerInfo[playerid][pLocked]);fwrite(hFile, var);
				format(var, 32, "Advertencias=%d\n",PlayerInfo[playerid][pAdvertencias]);fwrite(hFile, var);
				format(var, 32, "AdminAdver=%d\n",PlayerInfo[playerid][pAdminAdver]);fwrite(hFile, var);
				format(string, 32, "DNI=%d\n",PlayerInfo[playerid][pDNI]);fwrite(hFile, var);
				format(string, 32, "MSN=%s\n",PlayerInfo[playerid][pMSN]);fwrite(hFile, var);
				format(string, 32, "Estado=%s\n",PlayerInfo[playerid][pEstado]);fwrite(hFile, string);
				format(var, 64, "Weapon=%d\n",PlayerInfo[playerid][pWeapon]);fwrite(hFile, var);
				format(var, 64, "Ammo=%d\n",PlayerInfo[playerid][pAmmo]);fwrite(hFile, var);
				format(var, 64, "Weapon2=%d\n",PlayerInfo[playerid][pWeapon2]);fwrite(hFile, var);
				format(var, 64, "Ammo2=%d\n",PlayerInfo[playerid][pAmmo2]);fwrite(hFile, var);
				format(var, 64, "Weapon3=%d\n",PlayerInfo[playerid][pWeapon3]);fwrite(hFile, var);
				format(var, 64, "Ammo3=%d\n",PlayerInfo[playerid][pAmmo3]);fwrite(hFile, var);
				format(var, 64, "Weapon4=%d\n",PlayerInfo[playerid][pWeapon4]);fwrite(hFile, var);
				format(var, 64, "Ammo4=%d\n",PlayerInfo[playerid][pAmmo4]);fwrite(hFile, var);
				format(var, 64, "Weapon5=%d\n",PlayerInfo[playerid][pWeapon5]);fwrite(hFile, var);
				format(var, 64, "Ammo5=%d\n",PlayerInfo[playerid][pAmmo5]);fwrite(hFile, var);
				format(var, 64, "Weapon6=%d\n",PlayerInfo[playerid][pWeapon6]);fwrite(hFile, var);
				format(var, 64, "Ammo6=%d\n",PlayerInfo[playerid][pAmmo6]);fwrite(hFile, var);
				format(var, 64, "Weapon7=%d\n",PlayerInfo[playerid][pWeapon7]);fwrite(hFile, var);
				format(var, 64, "Ammo7=%d\n",PlayerInfo[playerid][pAmmo7]);fwrite(hFile, var);
				format(var, 64, "Weapon8=%d\n",PlayerInfo[playerid][pWeapon8]);fwrite(hFile, var);
				format(var, 64, "Ammo8=%d\n",PlayerInfo[playerid][pAmmo8]);fwrite(hFile, var);
				format(var, 64, "Weapon9=%d\n",PlayerInfo[playerid][pWeapon9]);fwrite(hFile, var);
				format(var, 64, "Ammo9=%d\n",PlayerInfo[playerid][pAmmo9]);fwrite(hFile, var);
				format(var, 64, "Weapon10=%d\n",PlayerInfo[playerid][pWeapon10]);fwrite(hFile, var);
				format(var, 64, "Ammo10=%d\n",PlayerInfo[playerid][pAmmo10]);fwrite(hFile, var);
				format(var, 64, "Weapon11=%d\n",PlayerInfo[playerid][pWeapon11]);fwrite(hFile, var);
				format(var, 64, "Ammo11=%d\n",PlayerInfo[playerid][pAmmo11]);fwrite(hFile, var);
				format(var, 64, "Weapon12=%d\n",PlayerInfo[playerid][pWeapon12]);fwrite(hFile, var);
				format(var, 64, "Ammo12=%d\n",PlayerInfo[playerid][pAmmo12]);fwrite(hFile, var);
				format(var, 32, "Maleta=%d\n",PlayerInfo[playerid][pMaleta]);fwrite(hFile, var);
				format(var, 32, "Mochila=%d\n",PlayerInfo[playerid][pMochila]);fwrite(hFile, var);
				format(var, 32, "Casco=%d\n",PlayerInfo[playerid][pCasco]);fwrite(hFile, var);
				format(var, 32, "SIDA=%d\n",PlayerInfo[playerid][pSIDA]);fwrite(hFile, var);
				format(var, 32, "Cancer=%d\n",PlayerInfo[playerid][pCancer]);fwrite(hFile, var);
				format(var, 32, "Epilepsia=%d\n",PlayerInfo[playerid][pEpilepsia]);fwrite(hFile, var);
				format(var, 32, "DEagle=%d\n",PlayerInfo[playerid][pDEagle]);fwrite(hFile, var);
				format(var, 32, "Shotgun=%d\n",PlayerInfo[playerid][pShotgun]);fwrite(hFile, var);
				format(var, 32, "MP5=%d\n",PlayerInfo[playerid][pMP5]);fwrite(hFile, var);
				format(var, 32, "AK47=%d\n",PlayerInfo[playerid][pAK47]);fwrite(hFile, var);
				format(var, 32, "M4=%d\n",PlayerInfo[playerid][pMP5]);fwrite(hFile, var);
				format(var, 32, "Sniper=%d\n",PlayerInfo[playerid][pSniper]);fwrite(hFile, var);
				format(var, 32, "FStyle=%d\n",PlayerInfo[playerid][pFStyle]);fwrite(hFile, var);
				format(var, 32, "Leccion=%d\n",PlayerInfo[playerid][pLeccion]);fwrite(hFile, var);
				format(var, 32, "Busqueda=%d\n",PlayerInfo[playerid][pBusqueda]);fwrite(hFile, var);
				format(var, 32, "AntiSIDA=%d\n",PlayerInfo[playerid][pAntiSIDA]);fwrite(hFile, var);
				format(var, 32, "AntiCancer=%d\n",PlayerInfo[playerid][pAntiCancer]);fwrite(hFile, var);
				format(var, 32, "AntiEpilepsia=%d\n",PlayerInfo[playerid][pAntiEpilepsia]);fwrite(hFile, var);
				format(var, 32, "Rent=%d\n",PlayerInfo[playerid][pRent]);fwrite(hFile, var);
				format(var, 32, "Rob=%d\n",PlayerInfo[playerid][pRob]);fwrite(hFile, var);
				format(var, 32, "Donate=%d\n",PlayerInfo[playerid][pDonateT]);fwrite(hFile, var);
				format(var, 32, "CarPremium=%d\n",PlayerInfo[playerid][pCarPremium]);fwrite(hFile, var);
				format(var, 32, "BanDuda=%d ",PlayerInfo[playerid][pBanDuda]);fwrite(hFile, var);
				format(var, 32, "Seguro=%d\n",PlayerInfo[playerid][pSeguro]);fwrite(hFile, var);
				format(var, 32, "Walkie=%d\n",PlayerInfo[playerid][pWalkie]);fwrite(hFile, var);
				format(var, 32, "Head=%d\n",PlayerInfo[playerid][pHead]);fwrite(hFile, var);
                format(var, 32, "Married%d\n",PlayerInfo[playerid][pMarried]);fwrite(hFile, var);
				format(string, 32, "MarriedTo=%s\n",PlayerInfo[playerid][pMarriedTo]);fwrite(hFile, var);
				format(var, 32, "Entered=%d\n",PlayerInfo[playerid][pEntered]);fwrite(hFile, var);
				format(var, 32, "Peces=%d\n",PlayerInfo[playerid][pPeces]);fwrite(hFile, var);
				format(var, 32, "Implementos=%d\n",PlayerInfo[playerid][pImplementos]);fwrite(hFile, var);
				format(var, 32, "Carnada=%d\n",PlayerInfo[playerid][pCarnada]);fwrite(hFile, var);
				format(var, 32, "Fichas=%d\n",PlayerInfo[playerid][pFichas]);fwrite(hFile, var);
				format(var, 32, "DNIFalse=%d\n",PlayerInfo[playerid][pDNIFalse]);fwrite(hFile, var);
				format(string, 32, "DNIName=%s\n",PlayerInfo[playerid][pDNIName]);fwrite(hFile, var);
				format(var, 32, "Suciedad=%d\n",PlayerInfo[playerid][pSuciedad]);fwrite(hFile, var);
				format(var, 32, "AnilloCom=%d\n",PlayerInfo[playerid][pAnilloCom]);fwrite(hFile, var);
				format(var, 32, "AnilloOro=%d\n",PlayerInfo[playerid][pAnilloOro]);fwrite(hFile, var);
				format(var, 32, "Collar=%d\n",PlayerInfo[playerid][pCollar]);fwrite(hFile, var);
				format(var, 32, "AnilloDia=%d\n",PlayerInfo[playerid][pAnilloDia]);fwrite(hFile, var);
				format(var, 32, "Pulsera=%d\n",PlayerInfo[playerid][pPulsera]);fwrite(hFile, var);
				format(var, 32, "Aretes=%d\n",PlayerInfo[playerid][pAretes]);fwrite(hFile, var);
				format(var, 32, "Reloj=%d\n",PlayerInfo[playerid][pReloj]);fwrite(hFile, var);
    			for(new v = 0; v < MAX_PLAYERTOYS; v++)
	    		{
					format(var, 32, "pt%dModelID=%d\n", v, PlayerToyInfo[playerid][v][ptModelID]);fwrite(hFile, var);
					format(var, 32, "pt%dBone=%d\n", v, PlayerToyInfo[playerid][v][ptBone]);fwrite(hFile, var);
	        		format(var, 32, "pt%dPosX=%.5f\n", v, PlayerToyInfo[playerid][v][ptPosX]);fwrite(hFile, var);
	    			format(var, 32, "pt%dPosY=%.5f\n", v, PlayerToyInfo[playerid][v][ptPosY]);fwrite(hFile, var);
	    			format(var, 32, "pt%dPosZ=%.5f\n", v, PlayerToyInfo[playerid][v][ptPosZ]);fwrite(hFile, var);
	    			format(var, 32, "pt%dRotX=%.5f\n", v, PlayerToyInfo[playerid][v][ptRotX]);fwrite(hFile, var);
	    			format(var, 32, "pt%dRotY=%.5f\n", v, PlayerToyInfo[playerid][v][ptRotY]);fwrite(hFile, var);
	    			format(var, 32, "pt%dRotZ=%.5f\n", v, PlayerToyInfo[playerid][v][ptRotZ]);fwrite(hFile, var);
	    		}
				fclose(hFile);
			}
		}
	}
	return 1;
}
Reply


Messages In This Thread
[Ayuda] Gm no lee los datos al registrarse - by Ivanlamega - 01.03.2015, 16:18
Respuesta: [Ayuda] Gm no guarda los datos al registrarse - by Goncho28 - 01.03.2015, 19:57
Respuesta: [Ayuda] Gm no guarda los datos al registrarse - by Ivanlamega - 01.03.2015, 20:18

Forum Jump:


Users browsing this thread: 5 Guest(s)