01.03.2015, 16:18
Hola, estaba cambiando el sistema de cuentas de mi server basado en Ciudad Prohibida, luego de mucho trabajo y correcciones de errores, lo probй ahora y no lee las cuentas, use una cuenta que ya tenia todos los datos, pero me los dejo todo en 0, y me hizo registrarme de nuevo, cuando me registro de nuevo, salgo y vuelvo a entrar y tengo que volver a registrarme, no importa cuantas veces me registre, no me guarda las cuentas.
Aqui el codigo de OnPlayerLogin:
Aqui el codigo de OnPlayerLogin:
pawn Код:
public OnPlayerLogin(playerid, password[])
{
new string2[128];
new playername2[MAX_PLAYER_NAME];
new playernamesplit[3][MAX_PLAYER_NAME];
GetPlayerName(playerid, playername2, sizeof(playername2));
split(playername2, playernamesplit, '_');
format(string2, sizeof(string2), "users/%s.ini", playername2);
new File: UserFile = fopen(string2, io_read);
if ( UserFile )
{
new PassData[128];
new keytmp[128], valtmp[128];
new string[128];
fread( UserFile , PassData , sizeof( PassData ) );
keytmp = ini_GetKey( PassData );
if( strcmp( keytmp , "Key" , true ) == 0 )
{
valtmp = ini_GetValue( PassData );
strmid(PlayerInfo[playerid][pKey], valtmp, 0, strlen(valtmp)-1, 24);
}
if(strcmp(PlayerInfo[playerid][pKey], password, true ) == 0 )
{
new key[ 128 ] , val[ 128 ];
new Data[ 128 ];
while ( fread( UserFile , Data , sizeof( Data ) ) )
{
key = ini_GetKey( Data );
if( strcmp( key , "Level" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLevel] = strval( val ); }
if( strcmp( key , "AdminCRP" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdminECRP] = strval( val ); }
if( strcmp( key , "Facciones" , true ) == 0 ) { val = ini_GetValue( Data ), PlayerInfo[playerid][pFacciones] = strval( val ); }
if( strcmp( key , "Helper" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHelper] = strval( val ); }
if( strcmp( key , "ConnectedTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pConnectTime] = strval( val ); }
if( strcmp( key , "Registered" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pReg] = strval( val ); }
if( strcmp( key , "Sex" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSex] = strval( val ); }
if( strcmp( key , "Age" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAge] = strval( val ); }
if( strcmp( key , "Origin" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOrigin] = strval( val ); }
if( strcmp( key , "Walk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWalk] = strval( val ); }
if( strcmp( key , "Respect" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pExp] = strval( val ); }
if( strcmp( key , "Money" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCash] = strval( val ); }
if( strcmp( key , "Bank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAccount] = strval( val ); }
if( strcmp( key , "Cheques" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCheques] = strval( val ); }
if( strcmp( key , "Kills" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKills] = strval( val ); }
if( strcmp( key , "Deaths" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDeaths] = strval( val ); }
if( strcmp( key , "Arrested" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pArrested] = strval( val ); }
if( strcmp( key , "LottoNr" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLottoNr] = strval( val ); }
if( strcmp( key , "Job" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJob] = strval( val ); }
if( strcmp( key , "Jailed" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJailed] = strval( val ); }
if( strcmp( key , "JailTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJailTime] = strval( val ); }
if( strcmp( key , "Materiales" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMats] = strval( val ); }
if( strcmp( key , "Drogas" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDrugs] = strval( val ); }
if( strcmp( key , "Speed" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSpeed] = strval( val ); }
if( strcmp( key , "Extasis" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pEctasy] = strval( val ); }
if( strcmp( key , "Ritalin" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRitalin] = strval( val ); }
if( strcmp( key , "Heroina" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHeroina] = strval( val ); }
if( strcmp( key , "Marihuana" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMarihuana] = strval( val ); }
if( strcmp( key , "Leader" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLeader] = strval( val ); }
if( strcmp( key , "Member" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMember] = strval( val ); }
if( strcmp( key , "Rank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRank] = strval( val ); }
if( strcmp( key , "Char" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pChar] = strval( val ); }
if( strcmp( key , "Health" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHealth] = floatstr( val ); }
if( strcmp( key , "Armour" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pArmour] = floatstr( val ); }
if( strcmp( key , "Int" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInt] = strval( val ); }
if( strcmp( key , "VirWorld" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVirWorld] = strval( val ); }
if( strcmp( key , "Team" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTeam] = strval( val ); }
if( strcmp( key , "Model" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pModel] = strval( val ); }
if( strcmp( key , "PhoneNr" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPnumber] = strval( val ); }
if( strcmp( key , "Minutes" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMinutes] = strval( val ); }
if( strcmp( key , "MTexto" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMTexto] = strval( val ); }
if( strcmp( key , "Ipod" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pIpod] = strval( val ); }
if( strcmp( key , "Car" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPcarkey] = strval( val ); }
if( strcmp( key , "Car2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPcarkey2] = strval( val ); }
if( strcmp( key , "TimeCar" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTimeCar] = strval( val ); }
if( strcmp( key , "TimeCar2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTimeCar2] = strval( val ); }
if( strcmp( key , "House" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPhousekey] = strval( val ); }
if( strcmp( key , "Negocio" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPbizzkey] = strval( val ); }
if( strcmp( key , "Pos_x" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_x] = floatstr( val ); }
if( strcmp( key , "Pos_y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_y] = floatstr( val ); }
if( strcmp( key , "Pos_z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_z] = floatstr( val ); }
if( strcmp( key , "CarLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarLic] = strval( val ); }
if( strcmp( key , "FlyLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFlyLic] = strval( val ); }
if( strcmp( key , "BoatLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBoatLic] = strval( val ); }
if( strcmp( key , "GunLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGunLic] = strval( val ); }
if( strcmp( key , "Gafas" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGafas] = strval( val ); }
if( strcmp( key , "Tutorial" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTut] = strval( val ); }
if( strcmp( key , "Antecedente1" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pAntecedente1], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Antecedente2" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pAntecedente2], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Antecedente3" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pAntecedente2], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Note1" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pNote1], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Note2" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pNote2], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Note3" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pNote3], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Note4" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pNote4], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Note5" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pNote5], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "SMS1" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pSMS_1], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "SMS2" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pSMS_2], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "SMS3" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pSMS_3], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "SMS4" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pSMS_4], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "SMS5" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pSMS_5], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Lighter" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLighter] = strval( val ); }
if( strcmp( key , "Cigarettes" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCigarettes] = strval( val ); }
if( strcmp( key , "Mascara" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMask] = strval( val ); }
if( strcmp( key , "Locked" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLocked] = strval( val ); }
if( strcmp( key , "Advertencias" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdvertencias] = strval( val ); }
if( strcmp( key , "AdminAdver" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdminAdver] = strval( val ); }
if( strcmp( key , "DNI" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDNI] = strval( val ); }
if( strcmp( key , "MSN" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pMSN], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Estado", true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pEstado], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Weapon" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWeapon] = strval( val ); }
if( strcmp( key , "Ammo" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo] = strval( val ); }
if( strcmp( key , "Weapon2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWeapon2] = strval( val ); }
if( strcmp( key , "Ammo2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo2] = strval( val ); }
if( strcmp( key , "Weapon3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWeapon3] = strval( val ); }
if( strcmp( key , "Ammo3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo3] = strval( val ); }
if( strcmp( key , "Weapon4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWeapon4] = strval( val ); }
if( strcmp( key , "Ammo4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo4] = strval( val ); }
if( strcmp( key , "Weapon5" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWeapon5] = strval( val ); }
if( strcmp( key , "Ammo5" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo5] = strval( val ); }
if( strcmp( key , "Weapon6" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWeapon6] = strval( val ); }
if( strcmp( key , "Ammo6" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo6] = strval( val ); }
if( strcmp( key , "Weapon7" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWeapon7] = strval( val ); }
if( strcmp( key , "Ammo7" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo7] = strval( val ); }
if( strcmp( key , "Weapon8" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWeapon8] = strval( val ); }
if( strcmp( key , "Ammo8" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo8] = strval( val ); }
if( strcmp( key , "Weapon9" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWeapon9] = strval( val ); }
if( strcmp( key , "Ammo9" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo9] = strval( val ); }
if( strcmp( key , "Weapon10" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWeapon10] = strval( val ); }
if( strcmp( key , "Ammo10" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo10] = strval( val ); }
if( strcmp( key , "Weapon11" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWeapon11] = strval( val ); }
if( strcmp( key , "Ammo11" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo11] = strval( val ); }
if( strcmp( key , "Weapon12" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWeapon12] = strval( val ); }
if( strcmp( key , "Ammo12" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo12] = strval( val ); }
if( strcmp( key , "Mochila" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMochila] = strval( val ); }
if( strcmp( key , "Casco" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCasco] = strval( val ); }
if( strcmp( key , "SIDA" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSIDA] = strval( val ); }
if( strcmp( key , "Cancer" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCancer] = strval( val ); }
if( strcmp( key , "Epilepsia" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pEpilepsia] = strval( val ); }
if( strcmp( key , "DEagle" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDEagle] = strval( val ); }
if( strcmp( key , "Shotgun" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pShotgun] = strval( val ); }
if( strcmp( key , "MP5" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMP5] = strval( val ); }
if( strcmp( key , "AK47" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAK47] = strval( val ); }
if( strcmp( key , "M4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pM4] = strval( val ); }
if( strcmp( key , "Sniper" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSniper] = strval( val ); }
if( strcmp( key , "FStyle" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFStyle] = strval( val ); }
if( strcmp( key , "Leccion" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLeccion] = strval( val ); }
if( strcmp( key , "Busqueda" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBusqueda] = strval( val ); }
if( strcmp( key , "AntiSIDA" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAntiSIDA] = strval( val ); }
if( strcmp( key , "AntiCancer" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAntiCancer] = strval( val ); }
if( strcmp( key , "AntiEpilepsia" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAntiEpilepsia] = strval( val ); }
if( strcmp( key , "Rent" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRent] = strval( val ); }
if( strcmp( key , "Rob" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRob] = strval( val ); }
if( strcmp( key , "Donate" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDonateT] = strval( val ); }
if( strcmp( key , "CarPremium" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarPremium] = strval( val ); }
if( strcmp( key , "BanDuda" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBanDuda] = strval( val ); }
if( strcmp( key , "Seguro" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSeguro] = strval( val ); }
if( strcmp( key , "Walkie" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWalkie] = strval( val ); }
if( strcmp( key , "Head" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHead] = strval( val ); }
if( strcmp( key , "Married" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMarried] = strval( val ); }
if( strcmp( key , "MarriedTo" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pMarriedTo], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Entered" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pEntered] = strval( val ); }
if( strcmp( key , "Peces" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPeces] = strval( val ); }
if( strcmp( key , "Implementos" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pImplementos] = strval( val ); }
if( strcmp( key , "Carnada", true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarnada] = strval( val ); }
if( strcmp( key , "Fichas" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFichas] = strval( val ); }
if( strcmp( key , "DNIFalse" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDNIFalse] = strval( val ); }
if( strcmp( key , "DNIName" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pDNIName], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Suciedad" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSuciedad] = strval( val ); }
if( strcmp( key , "AnilloCom" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAnilloCom] = strval( val ); }
if( strcmp( key , "AnilloOro" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAnilloOro] = strval( val ); }
if( strcmp( key , "Collar" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCollar] = strval( val ); }
if( strcmp( key , "AnilloDia" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAnilloDia] = strval( val ); }
if( strcmp( key , "Pulsera" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPulsera] = strval( val ); }
if( strcmp( key , "Aretes" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAretes] = strval( val ); }
if( strcmp( key , "Reloj" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pReloj] = strval( val ); }
for(new v = 0; v < MAX_PLAYERTOYS; v++)
{
format(string, 128, "pt%dModelID",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerToyInfo[playerid][v][ptModelID] = strval( val ); }
format(string, 128, "pt%dBone",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerToyInfo[playerid][v][ptBone] = strval( val ); }
format(string, 128, "pt%dPosX",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerToyInfo[playerid][v][ptPosX] = floatstr( val ); }
format(string, 128, "pt%dPosY",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerToyInfo[playerid][v][ptPosY] = floatstr( val ); }
format(string, 128, "pt%dPosZ",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerToyInfo[playerid][v][ptPosZ] = floatstr( val ); }
format(string, 128, "pt%dRotX",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerToyInfo[playerid][v][ptRotX] = floatstr( val ); }
format(string, 128, "pt%dRotY",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerToyInfo[playerid][v][ptRotY] = floatstr( val ); }
format(string, 128, "pt%dRotZ",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerToyInfo[playerid][v][ptRotZ] = floatstr( val ); }
}
}//end while
fclose(UserFile);//close the file after everything has been read in the while
}
else
{
ShowLoginDialog(playerid,DLOGIN);
SendClientMessage(playerid, COLOR_WHITE, "Contraseсa erronea");
fclose(UserFile);
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 2) { Kick(playerid); }
return 1;
}
if(PlayerInfo[playerid][pLocked] == 8)
{
Message(playerid, COLOR_YELLOW2, "Atenciуn: Tu cuenta figura como bloqueada.");
Message(playerid, COLOR_YELLOW2, "(Baneado)");
Message(playerid, COLOR_YELLOW2, "Acude al foro para reclamar tu desbaneo.");
Ban(playerid);
}
ResetPlayerMoney(playerid), GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
if(PlayerInfo[playerid][pReg] == 0)
{
PlayerInfo[playerid][pLevel] = 1;
PlayerInfo[playerid][pHealth] = 100.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][pTeam] = 3;
PlayerInfo[playerid][pModel] = 135;
PlayerInfo[playerid][pPhousekey] = 9999;
PlayerInfo[playerid][pPbizzkey] = 9999;
PlayerInfo[playerid][pPcarkey] = 9999;
PlayerInfo[playerid][pPcarkey2] = 9999;
PlayerInfo[playerid][pCarPremium] = 9999;
PlayerInfo[playerid][pAccount] = 0;
PlayerInfo[playerid][pReg] = 1;
GivePlayerMoney(playerid, 3000);
}
ClearChatbox(playerid, 10);
format(string2, sizeof(string2), "* Bienvenido a {37879F}EuroCity, {98FB98}%s.", PlayerName(playerid));
Message(playerid, COLOR_WHITE, string2);
Message(playerid, COLOR_WHITE, "- Escribe {40E0D0}/info {FFFFFF}para estar alerta de los updates/novedades del servidor.");
if(DobleOn == 1) Message(playerid, AMARILLO_ADMIN, "* Informacion: {FFFFFF}El sistema de doble experiencia esta activo, recuerda jugar para subir mas rapido de nivel.");
if(PlayerInfo[playerid][pAdminECRP] > 0)
{
format(string2, sizeof(string2), "- {ADFF2F}Nivel Administrativo {FFFFFF}%d", PlayerInfo[playerid][pAdminECRP]);
Message(playerid, -1, string2);
}
SetTimerEx("Spawned", 10000, false, "i", playerid);
gPlayerLogged[playerid] = 1;
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);
SpawnPlayer(playerid);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(Maskuse[i] == 1)
{
ShowPlayerNameTagForPlayer(playerid, i, 0);
}
}
}
}
return 1;
}