public OnPlayerUpdate
#5

Код:
public YSI_Save_Account(playerid)
{
	if(Logueado[playerid] == true)
	{
 		new PlayerAccountData[MAX_PLAYER_ACCOUNT_DATA];
		format(PlayerAccountData, sizeof(PlayerAccountData), "%s%s.ini", DIR_CUENTAS, GetPlayerNameTwo(playerid));
		new INI:PlayerStatsData = INI_Open(PlayerAccountData);
		INI_WriteString(PlayerStatsData, 	"Password", 		GetPlayerData[playerid][P_Pass]);
		INI_WriteInt(PlayerStatsData, 		"Skin", 			GetPlayerData[playerid][P_Skin]);
		INI_WriteInt(PlayerStatsData, 		"Admin",       		GetPlayerData[playerid][P_Admin]);
		INI_WriteInt(PlayerStatsData, 		"Registrado",       GetPlayerData[playerid][P_Registred]);
		INI_WriteFloat(PlayerStatsData, 	"PosX",				GetPlayerData[playerid][P_Position][0]);
		INI_WriteFloat(PlayerStatsData, 	"PosY",				GetPlayerData[playerid][P_Position][1]);
		INI_WriteFloat(PlayerStatsData, 	"PosZ",				GetPlayerData[playerid][P_Position][2]);
		INI_WriteFloat(PlayerStatsData, 	"Vida",       		GetPlayerData[playerid][P_Health]);
		INI_WriteFloat(PlayerStatsData, 	"Chaleco",       	GetPlayerData[playerid][P_Armour]);
		INI_WriteInt(PlayerStatsData, 		"Interior",       	GetPlayerData[playerid][P_Interior]);
		INI_WriteInt(PlayerStatsData, 		"MundoV",       	GetPlayerData[playerid][P_World]);
		INI_WriteInt(PlayerStatsData, 		"Dinero",       	GetPlayerData[playerid][P_Money]);
		INI_WriteInt(PlayerStatsData, 		"Lider",       		GetPlayerData[playerid][P_Leader]);
		INI_WriteInt(PlayerStatsData, 		"Miembro",       	GetPlayerData[playerid][P_Member]);
		INI_WriteInt(PlayerStatsData, 		"Rango",       		GetPlayerData[playerid][P_Rank]);
		INI_WriteInt(PlayerStatsData, 		"FaccionID",       	GetPlayerData[playerid][P_FactionID]);
		INI_WriteInt(PlayerStatsData, 		"Baneado",       	GetPlayerData[playerid][P_Banned]);
		INI_WriteInt(PlayerStatsData, 		"Edad",       		GetPlayerData[playerid][P_Age]);
		INI_WriteInt(PlayerStatsData, 		"IsJailed",       	GetPlayerData[playerid][P_Jailed]);
		INI_WriteInt(PlayerStatsData, 		"JailedTime",       GetPlayerData[playerid][P_JailedTime]);
		INI_WriteInt(PlayerStatsData, 		"Reloj",       		GetPlayerData[playerid][P_Clock]);
		INI_WriteInt(PlayerStatsData, 		"Telefono",       	GetPlayerData[playerid][P_Phone]);
		INI_WriteInt(PlayerStatsData, 		"RadioOnline",      GetPlayerData[playerid][P_RadioOnline]);
		INI_WriteInt(PlayerStatsData, 		"Nivel",      		GetPlayerData[playerid][P_Level]);
		INI_WriteInt(PlayerStatsData, 		"PlateNum",       	GetPlayerData[playerid][P_PlateNum]);
		INI_WriteInt(PlayerStatsData, 		"WelcomeMusic",     GetPlayerData[playerid][P_WelcomeMusic]);
		INI_WriteInt(PlayerStatsData, 		"FightStyle",     	GetPlayerData[playerid][P_FightStyle]);
		INI_WriteInt(PlayerStatsData, 		"Ganzuas",      	GetPlayerData[playerid][P_Ganzuas]);
		INI_WriteInt(PlayerStatsData, 		"Materiales",      	GetPlayerData[playerid][P_Materiales]);
		INI_WriteInt(PlayerStatsData, 		"Drogas",      		GetPlayerData[playerid][P_Drugs][0]);
		INI_WriteInt(PlayerStatsData, 		"TimeLeft",      	GetPlayerData[playerid][P_TimeLeft]);
		INI_WriteInt(PlayerStatsData, 		"TotalTimeLeft",    GetPlayerData[playerid][P_TotalTimeLeft]);
		INI_WriteInt(PlayerStatsData, 		"Banco",      		GetPlayerData[playerid][P_BankAccount]);
		INI_WriteInt(PlayerStatsData, 		"Trabajo",      	GetPlayerData[playerid][P_Trabajo]);
		INI_WriteInt(PlayerStatsData, 		"TrabajoTime",     	GetPlayerData[playerid][P_TrabajoTime]);
		INI_WriteInt(PlayerStatsData, 		"Cospel",      		GetPlayerData[playerid][P_Cospel]);
		INI_WriteInt(PlayerStatsData, 		"Pasaporte",      	GetPlayerData[playerid][P_Pasaporte]);
		INI_WriteInt(PlayerStatsData, 		"CashInBag",      	GetPlayerData[playerid][P_CashInBag]);
		INI_WriteInt(PlayerStatsData, 		"PhoneType",      	GetPlayerData[playerid][P_PhoneType]);
		INI_WriteInt(PlayerStatsData, 		"Muertes",      	GetPlayerData[playerid][P_Deaths]);
		INI_WriteInt(PlayerStatsData, 		"Asesinatos",      	GetPlayerData[playerid][P_Kills]);
		INI_WriteInt(PlayerStatsData, 		"Carnadas",      	GetPlayerData[playerid][P_Carnadas]);
		INI_WriteInt(PlayerStatsData, 		"Fishes",      		GetPlayerData[playerid][P_Fishes]);
		INI_WriteInt(PlayerStatsData, 		"FishTool",      	GetPlayerData[playerid][P_FishTool]);
		INI_WriteInt(PlayerStatsData, 		"RentedHouse",     	GetPlayerData[playerid][P_RentedHouse]);
		INI_WriteInt(PlayerStatsData, 		"RentedHousePay",   GetPlayerData[playerid][P_RentedHousePay]);
		INI_WriteInt(PlayerStatsData, 		"HungryLevel",		GetPlayerData[playerid][P_HungryLevel]);
		INI_WriteInt(PlayerStatsData, 		"TutorialLevel",	GetPlayerData[playerid][P_TutoLevel]);
		INI_WriteInt(PlayerStatsData,       "DaysOn",    		GetPlayerData[playerid][P_DaysOn]);
		INI_WriteInt(PlayerStatsData,       "HoursOn",    		GetPlayerData[playerid][P_HoursOn]);
		INI_WriteInt(PlayerStatsData,       "MinsOn",    		GetPlayerData[playerid][P_MinsOn]);
		INI_WriteInt(PlayerStatsData,       "DoingTutorial",    GetPlayerData[playerid][P_DoingTutorial]);
		INI_WriteInt(PlayerStatsData,       "P_AnsweredQuest",  GetPlayerData[playerid][P_AnsweredQuest]);
		INI_WriteInt(PlayerStatsData,       "P_AnsweredReports",GetPlayerData[playerid][P_AnsweredReports]);
		INI_WriteInt(PlayerStatsData,       "P_DisableSpeedo",  GetPlayerData[playerid][P_DisableSpeedo]);
		INI_WriteInt(PlayerStatsData,       "WalkStyle",    	GetPlayerData[playerid][P_WalkStyle]);
		INI_WriteInt(PlayerStatsData,       "NextPay",    		GetPlayerData[playerid][P_NextPay]);
		INI_WriteInt(PlayerStatsData,       "NextTeam",    		GetPlayerData[playerid][P_NextTeam]);
		INI_WriteInt(PlayerStatsData,       "Horas",    		GetPlayerData[playerid][pHoras]);
		INI_WriteInt(PlayerStatsData,       "Minutos",    		GetPlayerData[playerid][pMinutos]);
		INI_WriteInt(PlayerStatsData,       "Segundos",    		GetPlayerData[playerid][pSegundos]);
 		INI_WriteInt(PlayerStatsData,       "Orina",    		GetPlayerData[playerid][pOrina]);
		INI_WriteInt(PlayerStatsData, 	"HambreJugador",       	GetPlayerData[playerid][pHambre]);
		INI_WriteInt(PlayerStatsData, 	"MensajesPrivados",       	GetPlayerData[playerid][pWhispers]);
		INI_WriteInt(PlayerStatsData, 	"Casco",       	GetPlayerData[playerid][pCasco]);
		INI_WriteInt(PlayerStatsData, 	"MinutosCel",       	GetPlayerData[playerid][pMinutes]);
		INI_WriteInt(PlayerStatsData, 	"MensajesCel",       	GetPlayerData[playerid][pMTexto]);
 	    INI_WriteString(PlayerStatsData, "Note1", 		GetPlayerData[playerid][pNote1]);
     	INI_WriteString(PlayerStatsData, "Note2", 		GetPlayerData[playerid][pNote2]);
     	INI_WriteString(PlayerStatsData, "Note3", 		GetPlayerData[playerid][pNote3]);
     	INI_WriteString(PlayerStatsData, "Note4", 		GetPlayerData[playerid][pNote4]);
     	INI_WriteString(PlayerStatsData, "Note5", 		GetPlayerData[playerid][pNote5]);
     	INI_WriteString(PlayerStatsData, "Note6", 		GetPlayerData[playerid][pNote6]);
		// Variables sin 'GetPlayerData'
		INI_WriteInt(PlayerStatsData, 		"Player_Entered_Bizz", 	Player_Entered_Bizz[playerid]);
		INI_WriteInt(PlayerStatsData, 		"PhoneStatus",      	PhoneStatus[playerid]);
		DoLoop(SlotID, false, MAX_PLAYER_FISHES)
		{
		    new FishSlotInfo[MAX_TEXTOS_CORTOS];
		    format(FishSlotInfo, sizeof(FishSlotInfo), "FishInSlot[%i]", 	SlotID);
			INI_WriteInt(PlayerStatsData,				FishSlotInfo,		GetPlayerData[playerid][P_FishInSlot][SlotID]);
		}
		DoLoop(ComidaID, false, MAX_PLAYER_COMIDAS)
		{
		    new EatInfo[MAX_TEXTOS_CORTOS];
		    format(EatInfo, sizeof(EatInfo), 	"ComidaComprada[%i]", 	ComidaID);
  			INI_WriteInt(PlayerStatsData, 		EatInfo, 				ComidaComprada[playerid][ComidaID]);
		}
		DoLoop(WeaponID, false, MAX_PLAYER_WEAPON)
		{
		    new WeaponInfo[MAX_TEXTOS_CORTOS];
		    format(WeaponInfo, sizeof(WeaponInfo), "Arma[%i]", 		WeaponID, GetPlayerData[playerid][P_Weapon][WeaponID]);
		    INI_WriteInt(PlayerStatsData, 			WeaponInfo, 	GetPlayerData[playerid][P_Weapon][WeaponID]);
		    format(WeaponInfo, sizeof(WeaponInfo), "Balas[%i]", 	WeaponID, GetPlayerData[playerid][P_Ammo][WeaponID]);
	    	INI_WriteInt(PlayerStatsData, 			WeaponInfo,		GetPlayerData[playerid][P_Ammo][WeaponID]);
		}
		DoLoop(All, false, MAX_PLAYER_LICENCES)
		{
		    new LicenceInfo[MAX_TEXTOS_CORTOS];
		    format(LicenceInfo, sizeof(LicenceInfo), 	"Licencias[%i]", 	All);
  			INI_WriteInt(PlayerStatsData, 		 		LicenceInfo, 		GetPlayerData[playerid][P_Licences][All]);
  		}
  		DoLoop(BlockID, false, MAX_BLOCK_COUNT)
		{
		    new CommandInfo[MAX_TEXTOS_CORTOS];
		    format(CommandInfo, sizeof(CommandInfo), 	"BlockCommands[%i]", BlockID);
  			INI_WriteString(PlayerStatsData, 		 	CommandInfo, 		 Player_Command_Blocked[playerid][BlockID]);
		}
    	INI_WriteString(PlayerStatsData,		"Sexo", 			GetPlayerData[playerid][P_SexName]);
	   	INI_WriteString(PlayerStatsData,		"Ciudad", 			GetPlayerData[playerid][P_City]);
	    INI_WriteString(PlayerStatsData,		"LastIP", 			GetPlayerData[playerid][P_MyLastIP]);
		INI_WriteString(PlayerStatsData,		"JailRazon", 		GetPlayerData[playerid][P_JailedReason]);
		INI_Close(PlayerStatsData);
	}
	return 1;
}
Reply


Messages In This Thread
public OnPlayerUpdate - by wharlos - 03.12.2015, 18:21
Respuesta: public OnPlayerUpdate - by FelipeAndres - 03.12.2015, 19:00
Respuesta: public OnPlayerUpdate - by wharlos - 03.12.2015, 19:25
Respuesta: public OnPlayerUpdate - by FelipeAndres - 03.12.2015, 19:49
Respuesta: public OnPlayerUpdate - by wharlos - 03.12.2015, 19:51
Respuesta: public OnPlayerUpdate - by DesingMyCry - 03.12.2015, 20:05
Respuesta: public OnPlayerUpdate - by wharlos - 03.12.2015, 22:59
Respuesta: public OnPlayerUpdate - by DesingMyCry - 04.12.2015, 00:46
Respuesta: public OnPlayerUpdate - by wharlos - 04.12.2015, 00:48
Respuesta: public OnPlayerUpdate - by DesingMyCry - 04.12.2015, 00:57

Forum Jump:


Users browsing this thread: 1 Guest(s)