Bueno Lo que Ise Fue Crear Login y el Registro en Dos Callback Diferentes despues agregue:
en Onplayerconnect y tambien lo agregue en la callback del registro pero despues del INI_Close(File); tambien agregue esto en el Login...
Код:
public OnPlayerUpdateEx(playerid)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid])
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"Data");
INI_WriteInt(File,"Level",PlayerInfo[playerid][pLevel]);
INI_WriteInt(File,"AdminLevel",PlayerInfo[playerid][pAdmin]);
PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
INI_WriteInt(File,"DonateRank",PlayerInfo[playerid][pDonateRank]);
INI_WriteInt(File,"UpgradePoints",PlayerInfo[playerid][gPupgrade]);
INI_WriteInt(File,"ConnectedTime",PlayerInfo[playerid][pConnectTime]);
INI_WriteInt(File,"Registered",PlayerInfo[playerid][pReg]);
INI_WriteInt(File,"Sex",PlayerInfo[playerid][pSex]);
INI_WriteInt(File,"Age",PlayerInfo[playerid][pAge]);
INI_WriteInt(File,"Origin",PlayerInfo[playerid][pOrigin]);
INI_WriteInt(File,"CK",PlayerInfo[playerid][pCK]);
INI_WriteInt(File,"Muted",PlayerInfo[playerid][pMuted]);
INI_WriteInt(File,"Respect",PlayerInfo[playerid][pExp]);
INI_WriteInt(File,"Money",PlayerInfo[playerid][pCash]);
INI_WriteInt(File,"Bank",PlayerInfo[playerid][pAccount]);
INI_WriteInt(File,"Crimes",PlayerInfo[playerid][pCrimes]);
INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
INI_WriteInt(File,"Arrested",PlayerInfo[playerid][pArrested]);
INI_WriteInt(File,"WantedDeaths",PlayerInfo[playerid][pWantedDeaths]);
INI_WriteInt(File,"Phonebook",PlayerInfo[playerid][pPhoneBook]);
INI_WriteInt(File,"LottoNr",PlayerInfo[playerid][pLottoNr]);
INI_WriteInt(File,"Job",PlayerInfo[playerid][pJob]);
INI_WriteInt(File,"Paycheck",PlayerInfo[playerid][pPayCheck]);
INI_WriteInt(File,"HeadValue",PlayerInfo[playerid][pHeadValue]);
INI_WriteInt(File,"Jailed",PlayerInfo[playerid][pJailed]);
INI_WriteInt(File,"Materials",PlayerInfo[playerid][pMats]);
INI_WriteInt(File,"Drugs",PlayerInfo[playerid][pDrugs]);
INI_WriteInt(File,"Leader",PlayerInfo[playerid][pLeader]);
INI_WriteInt(File,"Member",PlayerInfo[playerid][pMember]);
INI_WriteInt(File,"Rank",PlayerInfo[playerid][pRank]);
INI_WriteInt(File,"Char",PlayerInfo[playerid][pChar]);
INI_WriteInt(File,"ContractTime",PlayerInfo[playerid][pContractTime]);
INI_WriteInt(File,"DetSkill",PlayerInfo[playerid][pDetSkill]);
INI_WriteInt(File,"SexSkill",PlayerInfo[playerid][pSexSkill]);
INI_WriteInt(File,"BoxSkill",PlayerInfo[playerid][pBoxSkill]);
INI_WriteInt(File,"LawSkill",PlayerInfo[playerid][pLawSkill]);
INI_WriteInt(File,"MechSkill",PlayerInfo[playerid][pMechSkill]);
INI_WriteInt(File,"JackSkill",PlayerInfo[playerid][pJackSkill]);
INI_WriteInt(File,"CarSkill",PlayerInfo[playerid][pCarSkill]);
INI_WriteInt(File,"NewsSkill",PlayerInfo[playerid][pNewsSkill]);
INI_WriteInt(File,"DrugsSkill",PlayerInfo[playerid][pDrugsSkill]);
INI_WriteFloat(File,"pSHealth",PlayerInfo[playerid][pSHealth]);
GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
INI_WriteFloat(File,"pHealth",PlayerInfo[playerid][pHealth]);
INI_WriteInt(File,"Int",PlayerInfo[playerid][pInt]);
INI_WriteInt(File,"Local",PlayerInfo[playerid][pLocal]);
INI_WriteInt(File,"Team",PlayerInfo[playerid][pTeam]);
INI_WriteInt(File,"Model",PlayerInfo[playerid][pModel]);
INI_WriteInt(File,"PhoneNr",PlayerInfo[playerid][pPnumber]);
INI_WriteInt(File,"Car",PlayerInfo[playerid][pPcarkey]);
INI_WriteInt(File,"House",PlayerInfo[playerid][pPhousekey]);
INI_WriteInt(File,"Bizz",PlayerInfo[playerid][pPbiskey]);
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];
}
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;
PlayerInfo[playerid][pInt] = GetPlayerInterior(playerid);
PlayerInfo[playerid][pVirWorld] = GetPlayerVirtualWorld(playerid);
INI_WriteFloat(File,"Pos_x",PlayerInfo[playerid][pPos_x]);
INI_WriteFloat(File,"Pos_y",PlayerInfo[playerid][pPos_y]);
INI_WriteFloat(File,"Pos_z",PlayerInfo[playerid][pPos_z]);
INI_WriteInt(File,"CarLic",PlayerInfo[playerid][pCarLic]);
INI_WriteInt(File,"FlyLic",PlayerInfo[playerid][pFlyLic]);
INI_WriteInt(File,"BoatLic",PlayerInfo[playerid][pBoatLic]);
INI_WriteInt(File,"FishLic",PlayerInfo[playerid][pFishLic]);
INI_WriteInt(File,"GunLic",PlayerInfo[playerid][pGunLic]);
INI_WriteInt(File,"Gun1",PlayerInfo[playerid][pGun1]);
INI_WriteInt(File,"Gun2",PlayerInfo[playerid][pGun2]);
INI_WriteInt(File,"Gun3",PlayerInfo[playerid][pGun3]);
INI_WriteInt(File,"Gun4",PlayerInfo[playerid][pGun4]);
INI_WriteInt(File,"Ammo1",PlayerInfo[playerid][pAmmo1]);
INI_WriteInt(File,"Ammo2",PlayerInfo[playerid][pAmmo2]);
INI_WriteInt(File,"Ammo3",PlayerInfo[playerid][pAmmo3]);
INI_WriteInt(File,"Ammo4",PlayerInfo[playerid][pAmmo4]);
INI_WriteInt(File,"CarTime",PlayerInfo[playerid][pCarTime]);
INI_WriteInt(File,"PayDay",PlayerInfo[playerid][pPayDay]);
INI_WriteInt(File,"PayDayHad",PlayerInfo[playerid][pPayDayHad]);
INI_WriteInt(File,"Watch",PlayerInfo[playerid][pWatch]);
INI_WriteInt(File,"Wins",PlayerInfo[playerid][pWins]);
INI_WriteInt(File,"Loses",PlayerInfo[playerid][pLoses]);
INI_WriteInt(File,"AlcoholPerk",PlayerInfo[playerid][pAlcoholPerk]);
INI_WriteInt(File,"DrugPerk",PlayerInfo[playerid][pDrugPerk]);
INI_WriteInt(File,"MiserPerk",PlayerInfo[playerid][pMiserPerk]);
INI_WriteInt(File,"PainPerk",PlayerInfo[playerid][pPainPerk]);
INI_WriteInt(File,"TraderPerk",PlayerInfo[playerid][pTraderPerk]);
INI_WriteInt(File,"Tutorial",PlayerInfo[playerid][pTut]);
INI_WriteInt(File,"Mission",PlayerInfo[playerid][pMissionNr]);
INI_WriteInt(File,"Warnings",PlayerInfo[playerid][pWarns]);
INI_WriteInt(File,"VirWorld",PlayerInfo[playerid][pVirWorld]);
if(PlayerInfo[playerid][pDonateRank] < 1) { PlayerInfo[playerid][pFuel] = 0; }
INI_WriteInt(File,"Fuel",PlayerInfo[playerid][pFuel]);
INI_WriteInt(File,"Married",PlayerInfo[playerid][pMarried]);
INI_WriteString(File,"MarriedTo",PlayerInfo[playerid][pMarriedTo]);
INI_WriteString(File,"Note1",PlayerInfo[playerid][pNote1]);
INI_WriteInt(File,"Note1s",PlayerInfo[playerid][pNote1s]);
INI_WriteString(File,"Note2",PlayerInfo[playerid][pNote2]);
INI_WriteInt(File,"Note2s",PlayerInfo[playerid][pNote2s]);
INI_WriteString(File,"Note3",PlayerInfo[playerid][pNote3]);
INI_WriteInt(File,"Note3s",PlayerInfo[playerid][pNote3s]);
INI_WriteString(File,"Note4",PlayerInfo[playerid][pNote4]);
INI_WriteInt(File,"Note4s",PlayerInfo[playerid][pNote4s]);
INI_WriteString(File,"Note5",PlayerInfo[playerid][pNote5]);
INI_WriteInt(File,"Note5s",PlayerInfo[playerid][pNote5s]);
INI_WriteInt(File,"InvWeapon",PlayerInfo[playerid][pInvWeapon]);
INI_WriteInt(File,"InvAmmo",PlayerInfo[playerid][pInvAmmo]);
INI_WriteInt(File,"Lighter",PlayerInfo[playerid][pLighter]);
INI_WriteInt(File,"Cigarettes",PlayerInfo[playerid][pCigarettes]);
INI_WriteInt(File,"Locked",PlayerInfo[playerid][pLocked]);
INI_WriteInt(File,"FStyle",PlayerInfo[playerid][pFStyle]);
INI_WriteInt(File,"BizzEntered",BizzEntered[playerid]);
INI_WriteInt(File,"HouseEntered",HouseEntered[playerid]);
INI_Close(File);
}
}
return 1;
}
//-----[LoadUser Data]-----
forward CargarDatosUser_Data(playerid,name[],value[]);
public CargarDatosUser_Data(playerid,name[],value[])
{
INI_String("Password",PlayerInfo[playerid][pPass],128);
INI_Int("Level",PlayerInfo[playerid][pLevel]);
INI_Int("AdminLevel",PlayerInfo[playerid][pAdmin]);
INI_Int("DonateRank",PlayerInfo[playerid][pDonateRank]);
INI_Int("UpgradePoints",PlayerInfo[playerid][gPupgrade]);
INI_Int("ConnectedTime",PlayerInfo[playerid][pConnectTime]);
INI_Int("Registered",PlayerInfo[playerid][pReg]);
INI_Int("Sex",PlayerInfo[playerid][pSex]);
INI_Int("Age",PlayerInfo[playerid][pAge]);
INI_Int("Origin",PlayerInfo[playerid][pOrigin]);
INI_Int("CK",PlayerInfo[playerid][pCK]);
INI_Int("Muted",PlayerInfo[playerid][pMuted]);
INI_Int("Respect",PlayerInfo[playerid][pExp]);
INI_Int("Money",PlayerInfo[playerid][pCash]);
INI_Int("Bank",PlayerInfo[playerid][pAccount]);
INI_Int("Crimes",PlayerInfo[playerid][pCrimes]);
INI_Int("Kills",PlayerInfo[playerid][pKills]);
INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
INI_Int("Arrested",PlayerInfo[playerid][pArrested]);
INI_Int("WantedDeaths",PlayerInfo[playerid][pWantedDeaths]);
INI_Int("Phonebook",PlayerInfo[playerid][pPhoneBook]);
INI_Int("LottoNr",PlayerInfo[playerid][pLottoNr]);
INI_Int("Job",PlayerInfo[playerid][pJob]);
INI_Int("Paycheck",PlayerInfo[playerid][pPayCheck]);
INI_Int("HeadValue",PlayerInfo[playerid][pHeadValue]);
INI_Int("Jailed",PlayerInfo[playerid][pJailed]);
INI_Int("Materials",PlayerInfo[playerid][pMats]);
INI_Int("Drugs",PlayerInfo[playerid][pDrugs]);
INI_Int("Leader",PlayerInfo[playerid][pLeader]);
INI_Int("Member",PlayerInfo[playerid][pMember]);
INI_Int("Rank",PlayerInfo[playerid][pRank]);
INI_Int("Char",PlayerInfo[playerid][pChar]);
INI_Int("ContractTime",PlayerInfo[playerid][pContractTime]);
INI_Int("DetSkill",PlayerInfo[playerid][pDetSkill]);
INI_Int("SexSkill",PlayerInfo[playerid][pSexSkill]);
INI_Int("BoxSkill",PlayerInfo[playerid][pBoxSkill]);
INI_Int("LawSkill",PlayerInfo[playerid][pLawSkill]);
INI_Int("MechSkill",PlayerInfo[playerid][pMechSkill]);
INI_Int("JackSkill",PlayerInfo[playerid][pJackSkill]);
INI_Int("CarSkill",PlayerInfo[playerid][pCarSkill]);
INI_Int("NewsSkill",PlayerInfo[playerid][pNewsSkill]);
INI_Int("DrugsSkill",PlayerInfo[playerid][pDrugsSkill]);
INI_Float("pSHealth",PlayerInfo[playerid][pSHealth]);
INI_Float("pHealth",PlayerInfo[playerid][pHealth]);
INI_Int("Int",PlayerInfo[playerid][pInt]);
INI_Int("Local",PlayerInfo[playerid][pLocal]);
INI_Int("Team",PlayerInfo[playerid][pTeam]);
INI_Int("Model",PlayerInfo[playerid][pModel]);
INI_Int("PhoneNr",PlayerInfo[playerid][pPnumber]);
INI_Int("Car",PlayerInfo[playerid][pPcarkey]);
INI_Int("House",PlayerInfo[playerid][pPhousekey]);
INI_Int("Bizz",PlayerInfo[playerid][pPbiskey]);
INI_Float("Pos_x",PlayerInfo[playerid][pPos_x]);
INI_Float("Pos_y",PlayerInfo[playerid][pPos_y]);
INI_Float("Pos_z",PlayerInfo[playerid][pPos_z]);
INI_Int("CarLic",PlayerInfo[playerid][pCarLic]);
INI_Int("FlyLic",PlayerInfo[playerid][pFlyLic]);
INI_Int("BoatLic",PlayerInfo[playerid][pBoatLic]);
INI_Int("FishLic",PlayerInfo[playerid][pFishLic]);
INI_Int("GunLic",PlayerInfo[playerid][pGunLic]);
INI_Int("Gun1",PlayerInfo[playerid][pGun1]);
INI_Int("Gun2",PlayerInfo[playerid][pGun2]);
INI_Int("Gun3",PlayerInfo[playerid][pGun3]);
INI_Int("Gun4",PlayerInfo[playerid][pGun4]);
INI_Int("Ammo1",PlayerInfo[playerid][pAmmo1]);
INI_Int("Ammo2",PlayerInfo[playerid][pAmmo2]);
INI_Int("Ammo3",PlayerInfo[playerid][pAmmo3]);
INI_Int("Ammo4",PlayerInfo[playerid][pAmmo4]);
INI_Int("CarTime",PlayerInfo[playerid][pCarTime]);
INI_Int("PayDay",PlayerInfo[playerid][pPayDay]);
INI_Int("PayDayHad",PlayerInfo[playerid][pPayDayHad]);
INI_Int("Watch",PlayerInfo[playerid][pWatch]);
INI_Int("Wins",PlayerInfo[playerid][pWins]);
INI_Int("Loses",PlayerInfo[playerid][pLoses]);
INI_Int("AlcoholPerk",PlayerInfo[playerid][pAlcoholPerk]);
INI_Int("DrugPerk",PlayerInfo[playerid][pDrugPerk]);
INI_Int("MiserPerk",PlayerInfo[playerid][pMiserPerk]);
INI_Int("PainPerk",PlayerInfo[playerid][pPainPerk]);
INI_Int("TraderPerk",PlayerInfo[playerid][pTraderPerk]);
INI_Int("Tutorial",PlayerInfo[playerid][pTut]);
INI_Int("Mission",PlayerInfo[playerid][pMissionNr]);
INI_Int("Warnings",PlayerInfo[playerid][pWarns]);
INI_Int("VirWorld",PlayerInfo[playerid][pVirWorld]);
INI_Int("Fuel",PlayerInfo[playerid][pFuel]);
INI_Int("Married",PlayerInfo[playerid][pMarried]);
INI_String("MarriedTo",PlayerInfo[playerid][pMarriedTo], 128);
INI_String("Note1",PlayerInfo[playerid][pNote1], 128);
INI_Int("Note1s",PlayerInfo[playerid][pNote1s]);
INI_String("Note2",PlayerInfo[playerid][pNote2], 128);
INI_Int("Note2s",PlayerInfo[playerid][pNote2s]);
INI_String("Note3",PlayerInfo[playerid][pNote3], 128);
INI_Int("Note3s",PlayerInfo[playerid][pNote3s]);
INI_String("Note4",PlayerInfo[playerid][pNote4], 128);
INI_Int("Note4s",PlayerInfo[playerid][pNote4s]);
INI_String("Note5",PlayerInfo[playerid][pNote5], 128);
INI_Int("Note5s",PlayerInfo[playerid][pNote5s]);
INI_Int("InvWeapon",PlayerInfo[playerid][pInvWeapon]);
INI_Int("InvAmmo",PlayerInfo[playerid][pInvAmmo]);
INI_Int("Lighter",PlayerInfo[playerid][pLighter]);
INI_Int("Cigarettes",PlayerInfo[playerid][pCigarettes]);
INI_Int("Locked",PlayerInfo[playerid][pLocked]);
INI_Int("FStyle",PlayerInfo[playerid][pFStyle]);
INI_Int("BizzEntered",BizzEntered[playerid]);
INI_Int("HouseEntered",HouseEntered[playerid]);
return 1;
}
public OnPlayerLogin(playerid,password[])
{
if(strcmp(PlayerInfo[playerid][pPass],password, true ) == 0 )
{
INI_ParseFile(UserPath(playerid), "CargarDatosUser_%s", .bExtra = true, .extra = playerid);
SendClientMessage(playerid,COLOR_RED,""lgreen"» Usted se a "lyellow"Logeado con Exito"lgreen"!");
}
else
{
new s[256];
format(s,sizeof(s),""lgreen"Inserte Su Contraseсa Correcta: "lyellow2"%s! \nSi Llega a las 5 Fallidas Seras "lred"Bloqueado!",GetPName(playerid));
ShowPlayerDialog(playerid,Logindialog,1,""lyellow"Contraseсa Erronea",s,"Login","Cancel");
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 1) { SendClientMessage(playerid, COLOR_WHITE, "{AA3333}[Error] {FFFFFF}Contraseсa Invalida [1/5]"); }
if(gPlayerLogTries[playerid] == 2) { SendClientMessage(playerid, COLOR_WHITE, "{AA3333}[Error] {FFFFFF}Contraseсa Invalida [2/5]"); }
if(gPlayerLogTries[playerid] == 3) { SendClientMessage(playerid, COLOR_WHITE, "{AA3333}[Error] {FFFFFF}Contraseсa Invalida [3/5]"); }
if(gPlayerLogTries[playerid] == 4) { SendClientMessage(playerid, COLOR_WHITE, "{AA3333}[Error] {FFFFFF}Contraseсa Invalida [4/5]"); }
if(gPlayerLogTries[playerid] == 5)
{
SendClientMessage(playerid, COLOR_WHITE, "{AA3333}[Error] {FFFFFF}Contraseсa Invalida [5/5]");
Ban(playerid);
}
return 1;
}
new tmp2[256];
new string2[64];
new playername2[MAX_PLAYER_NAME];
new playernamesplit[3][MAX_PLAYER_NAME];
GetPlayerName(playerid, playername2, sizeof(playername2));
split(playername2, playernamesplit, '_');
SafeResetPlayerMoney(playerid);
SafeGivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
CurrentMoney[playerid] = PlayerInfo[playerid][pCash];
if(PlayerInfo[playerid][pReg] == 0)
{
PlayerInfo[playerid][pLevel] = 1;
PlayerInfo[playerid][pSHealth] = 0.0;
PlayerInfo[playerid][pHealth] = 50.0;
PlayerInfo[playerid][pPos_x] = 1612.3240;
PlayerInfo[playerid][pPos_y] = -2330.1670;
PlayerInfo[playerid][pPos_z] = 13.5469;
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 255;
PlayerInfo[playerid][pTeam] = 3;
PlayerInfo[playerid][pModel] = 135;
PlayerInfo[playerid][pPhousekey] = 9999;
PlayerInfo[playerid][pPcarkey] = 999;
PlayerInfo[playerid][pPbiskey] = 255;
PlayerInfo[playerid][pAccount] = 0;
PlayerInfo[playerid][pReg] = 1;
SafeGivePlayerMoney(playerid, 300);
}
if(PlayerInfo[playerid][pLevel] == -999) //autoban
{
Ban(playerid);
}
else if(PlayerInfo[playerid][pCK] > 0)
{
Kick(playerid);
}
ClearChatbox(playerid, 8);
format(string2, sizeof(string2), "Bienbenido/a!.",playernamesplit[0]);
SendClientMessage(playerid, COLOR_YELLOW2, string2);
SendClientMessage(playerid, COLOR_WHITE, "..::Rol-Revolution::..");
SendClientMessage(playerid, COLOR_GREY, "Nuevo Sistema de AntiCheat Norton 360");
SendClientMessage(playerid, COLOR_WHITE, " ");
printf("%s ha logueado.",playername2);
if (PlayerInfo[playerid][pDonateRank] > 0)
{
SendClientMessage(playerid, COLOR_GREEN,"..::Rol-Revolution::..: Usted ha ingresado como Usuario PREMIUM, disfrute de sus Beneficios!");
}
if (PlayerInfo[playerid][pAdmin] > 0)
{
format(string2, sizeof(string2), "Servidor: Te has logueado con el nivel %d de Administrador.",PlayerInfo[playerid][pAdmin]);
SendClientMessage(playerid, COLOR_WHITE,string2);
}
SetTimerEx("UnsetFirstSpawn", 5000, false, "i", playerid);
SetSpawnInfo(playerid, PlayerInfo[playerid][pTeam], PlayerInfo[playerid][pModel], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], 1.0, -1, -1, -1, -1, -1, -1);
if(gTeam[playerid] == 0)
{
gTeam[playerid] = 3;
}
else
{
gTeam[playerid] = PlayerInfo[playerid][pTeam];
}
gPlayerLogged[playerid] = 1;
SpawnPlayer(playerid);
ActivarEm(playerid);
DateProp(playerid);
format(tmp2, sizeof(tmp2), "~w~Bienvenido ~n~~y~ %s", playername2);
GameTextForPlayer(playerid, tmp2, 5000, 1);
return 1;
}
public OnPlayerRegister(playerid, password[])
{
if(IsPlayerConnected(playerid))
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"Data");
INI_WriteString(File,"Password",password);
PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
INI_WriteInt(File,"Level",PlayerInfo[playerid][pLevel]);
INI_WriteInt(File,"AdminLevel",PlayerInfo[playerid][pAdmin]);
INI_WriteInt(File,"DonateRank",PlayerInfo[playerid][pDonateRank]);
INI_WriteInt(File,"UpgradePoints",PlayerInfo[playerid][gPupgrade]);
INI_WriteInt(File,"ConnectedTime",PlayerInfo[playerid][pConnectTime]);
INI_WriteInt(File,"Registered",PlayerInfo[playerid][pReg]);
INI_WriteInt(File,"Sex",PlayerInfo[playerid][pSex]);
INI_WriteInt(File,"Age",PlayerInfo[playerid][pAge]);
INI_WriteInt(File,"Origin",PlayerInfo[playerid][pOrigin]);
INI_WriteInt(File,"CK",PlayerInfo[playerid][pCK]);
INI_WriteInt(File,"Muted",PlayerInfo[playerid][pMuted]);
INI_WriteInt(File,"Respect",PlayerInfo[playerid][pExp]);
INI_WriteInt(File,"Money",PlayerInfo[playerid][pCash]);
INI_WriteInt(File,"Bank",PlayerInfo[playerid][pAccount]);
INI_WriteInt(File,"Crimes",PlayerInfo[playerid][pCrimes]);
INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
INI_WriteInt(File,"Arrested",PlayerInfo[playerid][pArrested]);
INI_WriteInt(File,"WantedDeaths",PlayerInfo[playerid][pWantedDeaths]);
INI_WriteInt(File,"Phonebook",PlayerInfo[playerid][pPhoneBook]);
INI_WriteInt(File,"LottoNr",PlayerInfo[playerid][pLottoNr]);
INI_WriteInt(File,"Job",PlayerInfo[playerid][pJob]);
INI_WriteInt(File,"Paycheck",PlayerInfo[playerid][pPayCheck]);
INI_WriteInt(File,"HeadValue",PlayerInfo[playerid][pHeadValue]);
INI_WriteInt(File,"Jailed",PlayerInfo[playerid][pJailed]);
INI_WriteInt(File,"Materials",PlayerInfo[playerid][pMats]);
INI_WriteInt(File,"Drugs",PlayerInfo[playerid][pDrugs]);
INI_WriteInt(File,"Leader",PlayerInfo[playerid][pLeader]);
INI_WriteInt(File,"Member",PlayerInfo[playerid][pMember]);
INI_WriteInt(File,"Rank",PlayerInfo[playerid][pRank]);
INI_WriteInt(File,"Char",PlayerInfo[playerid][pChar]);
INI_WriteInt(File,"ContractTime",PlayerInfo[playerid][pContractTime]);
INI_WriteInt(File,"DetSkill",PlayerInfo[playerid][pDetSkill]);
INI_WriteInt(File,"SexSkill",PlayerInfo[playerid][pSexSkill]);
INI_WriteInt(File,"BoxSkill",PlayerInfo[playerid][pBoxSkill]);
INI_WriteInt(File,"LawSkill",PlayerInfo[playerid][pLawSkill]);
INI_WriteInt(File,"MechSkill",PlayerInfo[playerid][pMechSkill]);
INI_WriteInt(File,"JackSkill",PlayerInfo[playerid][pJackSkill]);
INI_WriteInt(File,"CarSkill",PlayerInfo[playerid][pCarSkill]);
INI_WriteInt(File,"NewsSkill",PlayerInfo[playerid][pNewsSkill]);
INI_WriteInt(File,"DrugsSkill",PlayerInfo[playerid][pDrugsSkill]);
INI_WriteFloat(File,"pSHealth",PlayerInfo[playerid][pSHealth]);
GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
INI_WriteFloat(File,"pHealth",PlayerInfo[playerid][pHealth]);
INI_WriteInt(File,"Int",PlayerInfo[playerid][pInt]);
INI_WriteInt(File,"Local",PlayerInfo[playerid][pLocal]);
INI_WriteInt(File,"Team",PlayerInfo[playerid][pTeam]);
INI_WriteInt(File,"Model",PlayerInfo[playerid][pModel]);
INI_WriteInt(File,"PhoneNr",PlayerInfo[playerid][pPnumber]);
INI_WriteInt(File,"Car",PlayerInfo[playerid][pPcarkey]);
INI_WriteInt(File,"House",PlayerInfo[playerid][pPhousekey]);
INI_WriteInt(File,"Bizz",PlayerInfo[playerid][pPbiskey]);
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];
}
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;
PlayerInfo[playerid][pInt] = GetPlayerInterior(playerid);
PlayerInfo[playerid][pVirWorld] = GetPlayerVirtualWorld(playerid);
INI_WriteFloat(File,"Pos_x",PlayerInfo[playerid][pPos_x]);
INI_WriteFloat(File,"Pos_y",PlayerInfo[playerid][pPos_y]);
INI_WriteFloat(File,"Pos_z",PlayerInfo[playerid][pPos_z]);
INI_WriteInt(File,"CarLic",PlayerInfo[playerid][pCarLic]);
INI_WriteInt(File,"FlyLic",PlayerInfo[playerid][pFlyLic]);
INI_WriteInt(File,"BoatLic",PlayerInfo[playerid][pBoatLic]);
INI_WriteInt(File,"FishLic",PlayerInfo[playerid][pFishLic]);
INI_WriteInt(File,"GunLic",PlayerInfo[playerid][pGunLic]);
INI_WriteInt(File,"Gun1",PlayerInfo[playerid][pGun1]);
INI_WriteInt(File,"Gun2",PlayerInfo[playerid][pGun2]);
INI_WriteInt(File,"Gun3",PlayerInfo[playerid][pGun3]);
INI_WriteInt(File,"Gun4",PlayerInfo[playerid][pGun4]);
INI_WriteInt(File,"Ammo1",PlayerInfo[playerid][pAmmo1]);
INI_WriteInt(File,"Ammo2",PlayerInfo[playerid][pAmmo2]);
INI_WriteInt(File,"Ammo3",PlayerInfo[playerid][pAmmo3]);
INI_WriteInt(File,"Ammo4",PlayerInfo[playerid][pAmmo4]);
INI_WriteInt(File,"CarTime",PlayerInfo[playerid][pCarTime]);
INI_WriteInt(File,"PayDay",PlayerInfo[playerid][pPayDay]);
INI_WriteInt(File,"PayDayHad",PlayerInfo[playerid][pPayDayHad]);
INI_WriteInt(File,"Watch",PlayerInfo[playerid][pWatch]);
INI_WriteInt(File,"Wins",PlayerInfo[playerid][pWins]);
INI_WriteInt(File,"Loses",PlayerInfo[playerid][pLoses]);
INI_WriteInt(File,"AlcoholPerk",PlayerInfo[playerid][pAlcoholPerk]);
INI_WriteInt(File,"DrugPerk",PlayerInfo[playerid][pDrugPerk]);
INI_WriteInt(File,"MiserPerk",PlayerInfo[playerid][pMiserPerk]);
INI_WriteInt(File,"PainPerk",PlayerInfo[playerid][pPainPerk]);
INI_WriteInt(File,"TraderPerk",PlayerInfo[playerid][pTraderPerk]);
INI_WriteInt(File,"Tutorial",PlayerInfo[playerid][pTut]);
INI_WriteInt(File,"Mission",PlayerInfo[playerid][pMissionNr]);
INI_WriteInt(File,"Warnings",PlayerInfo[playerid][pWarns]);
INI_WriteInt(File,"VirWorld",PlayerInfo[playerid][pVirWorld]);
if(PlayerInfo[playerid][pDonateRank] < 1) { PlayerInfo[playerid][pFuel] = 0; }
INI_WriteInt(File,"Fuel",PlayerInfo[playerid][pFuel]);
INI_WriteInt(File,"Married",PlayerInfo[playerid][pMarried]);
INI_WriteString(File,"MarriedTo",PlayerInfo[playerid][pMarriedTo]);
INI_WriteString(File,"Note1",PlayerInfo[playerid][pNote1]);
INI_WriteInt(File,"Note1s",PlayerInfo[playerid][pNote1s]);
INI_WriteString(File,"Note2",PlayerInfo[playerid][pNote2]);
INI_WriteInt(File,"Note2s",PlayerInfo[playerid][pNote2s]);
INI_WriteString(File,"Note3",PlayerInfo[playerid][pNote3]);
INI_WriteInt(File,"Note3s",PlayerInfo[playerid][pNote3s]);
INI_WriteString(File,"Note4",PlayerInfo[playerid][pNote4]);
INI_WriteInt(File,"Note4s",PlayerInfo[playerid][pNote4s]);
INI_WriteString(File,"Note5",PlayerInfo[playerid][pNote5]);
INI_WriteInt(File,"Note5s",PlayerInfo[playerid][pNote5s]);
INI_WriteInt(File,"InvWeapon",PlayerInfo[playerid][pInvWeapon]);
INI_WriteInt(File,"InvAmmo",PlayerInfo[playerid][pInvAmmo]);
INI_WriteInt(File,"Lighter",PlayerInfo[playerid][pLighter]);
INI_WriteInt(File,"Cigarettes",PlayerInfo[playerid][pCigarettes]);
INI_WriteInt(File,"Locked",PlayerInfo[playerid][pLocked]);
INI_WriteInt(File,"FStyle",PlayerInfo[playerid][pFStyle]);
INI_WriteInt(File,"BizzEntered",BizzEntered[playerid]);
INI_WriteInt(File,"HouseEntered",HouseEntered[playerid]);
INI_Close(File);
INI_ParseFile(UserPath(playerid), "CargarDatosUser_%s", .bExtra = true, .extra = playerid);
new string[256];
SendClientMessage(playerid,COLOR_RED,""lgreen"» Usted se a "lyellow"Registrado con Exito"lgreen"!");
format(string,sizeof(string),""lgreen"Bienvenido Nuevamente: "lyellow2"%s! \n Coloque su "lred"Contraseсa "lgreen"Para Logear!",GetPName(playerid));
ShowPlayerDialog(playerid,Logindialog,1,""lyellow"Logeo de Cuenta",string,"Login","Cancel");
}
return 1;
}