User without enter correct password can logged in
#1

Guys

i got this error and i don't know how to fix it
please help

nb: i'm using crc32 as password encryption

Sorry if my english too bad, cause i'm speak indonesia
Reply
#2

Deleted

Wrong post.
Reply
#3

Quote:
Originally Posted by NathNathii
Посмотреть сообщение
Deleted

Wrong post.
What did you say

let me know, i must fix this important bug
Reply
#4

Show us the code!
Reply
#5

Quote:
Originally Posted by Yves
Посмотреть сообщение
Show us the code!
Be calm guys

Код:
ShowMainMenuDialog(playerid, frame)
{
	new titlestring[64];
	new string[256];

	switch(frame)
	{
		case 1:
		{
			new ip[32];
			GetPlayerIp(playerid, ip, 32);
			format(titlestring, sizeof(titlestring), "Login - %s", GetPlayerNameEx(playerid));
			format(string, sizeof(string), "Future Life Roleplay, %s.\n\nThis account is marked as registered.  Enter the password to get in.", GetPlayerNameEx(playerid),  ip);
			ShowPlayerDialog(playerid,MAINMENU,DIALOG_STYLE_INPUT,titlestring,string,"Login","Exit");
		}
		case 2:
		{
			new ip[32];
			GetPlayerIp(playerid, ip, 32);
			format(titlestring, sizeof(titlestring), "Register - %s", GetPlayerNameEx(playerid));
			format(string, sizeof(string), "Future Life Roleplay, %s.\n\nYou Have Not Yet Registerd Please Do And Fill Out The Password.", GetPlayerNameEx(playerid),  ip);
			ShowPlayerDialog(playerid,MAINMENU2,DIALOG_STYLE_INPUT,titlestring,string,"Register","Exit");
		}
		case 3:
		{
			new ip[32];
			GetPlayerIp(playerid, ip, 32);
			format(titlestring, sizeof(titlestring), "Login - %s", GetPlayerNameEx(playerid));
			format(string, sizeof(string), "Invalid Password!\n\nFuture Life Roleplay, %s.\n\nThis Account Is Registred Please Fill In Your Password To Login In", GetPlayerNameEx(playerid),  ip);
			ShowPlayerDialog(playerid,MAINMENU,DIALOG_STYLE_INPUT,titlestring,string,"Login","Exit");
		}
	}
}

public SafeLogin(playerid)
{

	// Main Menu Features.
	ShowMainMenuGUI(playerid);
	SetPlayerJoinCamera(playerid);
	ClearChatbox(playerid);
	SetPlayerVirtualWorld(playerid, 0);

	new playername[MAX_PLAYER_NAME];
	GetPlayerName(playerid, playername, sizeof(playername));
	if(doesAccountExist(playername))
	{
		gPlayerAccount[playerid] = 1;
		ShowMainMenuDialog(playerid, 1);
		return 1;
	}
	else
	{
		if( strfind( playername, "_", true) == -1 )
		{
			SendClientMessageEx( playerid, COLOR_WHITE, "Connection rejected. Please get a name in the correct format like: Bob_Smith." );
		}
		else
		{
			gPlayerAccount[playerid] = 0;
			ShowMainMenuDialog(playerid, 2);
		}
	/*	else
		{
			gPlayerAccount[playerid] = 0;
			ShowMainMenuDialog(playerid, 3);
		}*/

		return 1;
	}
}
Code for processing the dialog
Код:
public OnPlayerLogin(playerid,password[])
{
    new string[128];
	new tmp2[256];
	new string2[128];
	new playername2[MAX_PLAYER_NAME];
	GetPlayerName(playerid, playername2, sizeof(playername2));
	format(string2, sizeof(string2), "users/%s.ini", playername2);
	new File: UserFile = fopen(string2, io_read);
	if ( UserFile )
	{
		new PassData[256];
		new keytmp[256], valtmp[256];
		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, 255);
		}
   		if( strfind( PlayerInfo[playerid][pKey], "\r", true) != -1)
   		{
   		    format(string, sizeof(string), "Warning: \\r found in player %s's password.  Removing now. Password Before: %s", GetPlayerNameEx(playerid), PlayerInfo[playerid][pKey]);
			Log("logs/password.log", string);
			new pos = strfind( PlayerInfo[playerid][pKey], "\r", true);
   		    strdel(PlayerInfo[playerid][pKey], pos, pos+2);
   		    format(string, sizeof(string), "%s's Password After: %s  (Note these passwords are encrypted)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pKey]);
			Log("logs/password.log", string);
		}
		//if(strcmp(PlayerInfo[playerid][pKey],password, true ) == 0 )
		if(strcmp(PlayerInfo[playerid][pKey],password,true) == 0)
		{
				new key[ 256 ] , val[ 256 ];
				new Data[ 256 ];
				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 , "AdminLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdmin] = strval( val ); }
					//if( strcmp( key , "AdminName" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdminName] = strval( val ); }
					//if( strcmp( key , "NormalName" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNormalName] = strval( val ); }
					if( strcmp( key , "Band" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBanned] = strval( val ); }
					if( strcmp( key , "PermBand" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPermaBanned] = strval( val ); }
					if( strcmp( key , "Warnings" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWarns] = strval( val ); }
					if( strcmp( key , "Disabled" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDisabled] = strval( val ); }
					if( strcmp( key , "DonateRank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDonateRank] = strval( val ); }
					if( strcmp( key , "BanAppealer" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBanAppealer] = strval( val ); }
					if( strcmp( key , "ShopTech" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pShopTech] = strval( val ); }
					if( strcmp( key , "Undercover" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pUndercover] = strval( val ); }
					if( strcmp( key , "TogReports" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTogReports] = strval( val ); }
					if( strcmp( key , "Radio" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRadio] = strval( val ); }
					if( strcmp( key , "RadioFreq" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRadioFreq] = strval( val ); }
					if( strcmp( key , "UpgradePoints" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][gPupgrade] = 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 , "Muted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMuted] = 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 ); SetPVarInt(playerid, "Cash", strval( val )); }
					if( strcmp( key , "Bank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAccount] = strval( val ); }
					if( strcmp( key , "Crimes" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCrimes] = strval( val ); }
					if( strcmp( key , "Accent" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAccent] = strval( val ); }
					if( strcmp( key , "CHits" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCHits] = strval( val ); }
					if( strcmp( key , "FHits" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFHits] = strval( val ); }
					if( strcmp( key , "Arrested" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pArrested] = strval( val ); }
					if( strcmp( key , "Phonebook" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPhoneBook] = strval( val ); }
					if( strcmp( key , "LottoNr" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLottoNr] = strval( val ); }
					if( strcmp( key , "Fishes" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFishes] = strval( val ); }
					if( strcmp( key , "BiggestFish" , 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 , "Job2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJob2] = strval( val ); }
					if( strcmp( key , "Paycheck" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayCheck] = strval( val ); }
					if( strcmp( key , "HeadValue" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHeadValue] = 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 , "WRestricted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWRestricted] = strval( val ); }
					if( strcmp( key , "Materials" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMats] = strval( val ); }
					if( strcmp( key , "Packages" , true ) == 0 ) { val = ini_GetValue( Data ); SetPVarInt(playerid, key, strval( val )); }
					if( strcmp( key , "Crates" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCrates] = strval( val ); }
					if( strcmp( key , "Pot" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPot] = strval( val ); }
					if( strcmp( key , "Crack" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCrack] = 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 , "Division" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDivision] = strval( val ); }
					if( strcmp( key , "FMember" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFMember] = strval( val ); }
					if( strcmp( key , "Rank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRank] = strval( val ); }
					if( strcmp( key , "DetSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDetSkill] = strval( val ); }
					if( strcmp( key , "SexSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSexSkill] = strval( val ); }
					if( strcmp( key , "BoxSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBoxSkill] = strval( val ); }
					if( strcmp( key , "LawSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLawSkill] = strval( val ); }
					if( strcmp( key , "MechSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMechSkill] = strval( val ); }
					if( strcmp( key , "JackSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJackSkill] = strval( val ); }
					if( strcmp( key , "CarSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarSkill] = strval( val ); }
    				if( strcmp( key , "TruckSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTruckSkill] = strval( val ); }
					if( strcmp( key , "NewsSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNewsSkill] = strval( val ); }
					if( strcmp( key , "DrugsSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDrugsSkill] = strval( val ); }
					if( strcmp( key , "ArmsSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pArmsSkill] = strval( val ); }
					if( strcmp( key , "SmugglerSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSmugSkill] = strval( val ); }
					if( strcmp( key , "FishSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFishSkill] = strval( val ); }
					if( strcmp( key , "FightingStyle" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFightStyle] = strval( val ); }
					if( strcmp( key , "pHealth" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHealth] = floatstr( val ); }
					if( strcmp( key , "pArmor" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pArmor] = floatstr( val ); }
					if( strcmp( key , "pSHealth" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSHealth] = floatstr( val ); }
					//if( strcmp( key , "pSArmor" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSArmor] = floatstr( val ); }
					if( strcmp( key , "Int" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInt] = strval( val ); }
					if( strcmp( key , "Local" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLocal] = strval( val ); }
					if( strcmp( key , "VirtualWorld" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVW] = strval( val ); }
					if( strcmp( key , "HouseInvite" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHouseInvite] = strval( val ); }
					if( strcmp( key , "Model" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pModel] = strval( val ); }
					if( strcmp( key , "Clothes" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pClothes] = strval( val ); }
					if( strcmp( key , "PhoneNr" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPnumber] = strval( val ); }
					if( strcmp( key , "Apartment" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPhousekey] = strval( val ); }
					if( strcmp( key , "Apartment2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPhousekey2] = strval( val ); }
					if( strcmp( key , "Renting" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRenting] = strval( 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 , "CheckCash" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCheckCash] = strval( val ); }
					if( strcmp( key , "Firework1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFirework1] = strval( val ); }
					if( strcmp( key , "Firework2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFirework2] = strval( val ); }
					if( strcmp( key , "Firework3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFirework3] = strval( val ); }
					if( strcmp( key , "Checks" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pChecks] = strval( val ); }
					if( strcmp( key , "GunLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGunLic] = strval( val ); }
					for(new s = 0; s < 12; s++)
					{
						format(string, 128, "Gun%d", s);
						if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGuns][s] = strval( val ); }
					}
					if( strcmp( key , "CarTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarTime] = strval( val ); }
					if( strcmp( key , "DrugsTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDrugsTime] = strval( val ); }
					if( strcmp( key , "LawyerTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLawyerTime] = strval( val ); }
					if( strcmp( key , "LawyerFreeTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLawyerFreeTime] = strval( val ); }
					if( strcmp( key , "MechTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMechTime] = strval( val ); }
					if( strcmp( key , "SexTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSexTime] = strval( val ); }
					if( strcmp( key , "PayDay" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayDay] = strval( val ); }
					if( strcmp( key , "PayDayHad" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayDayHad] = strval( val ); }
					if( strcmp( key , "CDPlayer" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCDPlayer] = strval( val ); }
					if( strcmp( key , "Dice" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDice] = strval( val ); }
					if( strcmp( key , "Spraycan" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSpraycan] = strval( val ); }
					if( strcmp( key , "Rope" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRope] = strval( val ); }
					if( strcmp( key , "Cigars" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCigar] = strval( val ); }
					if( strcmp( key , "Sprunk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSprunk] = strval( val ); }
					if( strcmp( key , "Bombs" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBombs] = strval( val ); }
					if( strcmp( key , "Wins" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWins] = strval( val ); }
					if( strcmp( key , "Loses" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLoses] = strval( val ); }
					if( strcmp( key , "Tutorial" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTut] = strval( val ); }
					if( strcmp( key , "OnDuty" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDuty] = strval( val ); }
					if( strcmp( key , "Hospital" , true ) == 0 ) { val = ini_GetValue( Data ); SetPVarInt(playerid, key, strval( val )); }
					if( strcmp( key , "Adjustable" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdjustable] = 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 , "ContractBy" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pContractBy], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "ContractDetail" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pContractDetail], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "IP" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pIP], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "WantedLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWantedLevel] = strval( val ); }
					if( strcmp( key , "Insurance" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInsurance] = strval( val ); }
					if( strcmp( key , "NewMuted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNMute] = strval( val ); }
					if( strcmp( key , "NewMutedTotal" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNMuteTotal] = strval( val ); }
					if( strcmp( key , "AdMuted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pADMute] = strval( val ); }
					if( strcmp( key , "AdMutedTotal" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pADMuteTotal] = strval( val ); }
                    if( strcmp( key , "HelpMute" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHelpMute] = strval( val ); }
					/*if( strcmp( key , "Warrant" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRoadblock] = strval( val ); }
					if( strcmp( key , "Helper" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHelper] = strval( val ); }
					if( strcmp( key , "Interor" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInterior] = strval( val ); }
					if( strcmp( key , "playerrob" , true ) == 0 ) { val = ini_GetValue( Data ); playerrob[playerid] = strval( val ); }
					if( strcmp( key , "felon" , true ) == 0 ) { val = ini_GetValue( Data ); felon[playerid] = strval( val ); }
					if( strcmp( key , "StreetRep" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pStreetRep] = strval( val ); }
					if( strcmp( key , "RepHandOut" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRepHandOut] = strval( val ); }*/
					if( strcmp( key , "SPos_x" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_x] = floatstr( val ); }
					if( strcmp( key , "SPos_y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_y] = floatstr( val ); }
					if( strcmp( key , "SPos_z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_z] = floatstr( val ); }
					if( strcmp( key , "SPos_r" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_r] = floatstr( val ); }
					if( strcmp( key , "Helper" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHelper] = strval( val ); }
					if( strcmp( key , "ReportMuted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRMuted] = strval( val ); }
                    if( strcmp( key , "ReportMutedTotal" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRMutedTotal] = strval( val ); }
					if( strcmp( key , "ReportMutedTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRMutedTime] = strval( val ); }
					if( strcmp( key , "VIPMuted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVMuted] = strval( val ); }
					if( strcmp( key , "VIPMutedTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVMutedTime] = strval( val ); }
					if( strcmp( key , "GiftTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGiftTime] = strval( val ); }
					if( strcmp( key , "AdvisorDutyHours" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDutyHours] = strval( val ); }
					if( strcmp( key , "AcceptedHelp" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAcceptedHelp] = strval( val ); }
					if( strcmp( key , "AcceptReport" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAcceptReport] = strval( val ); }
					if( strcmp( key , "TrashReport" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTrashReport] = strval( val ); }
					if( strcmp( key , "FactionModerator" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFactionModerator] = strval( val ); }
					if( strcmp( key , "GangModerator" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGangModerator] = strval( val ); }
                    if( strcmp( key , "GangWarn" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGangWarn] = strval( val ); }
					if( strcmp( key , "FactionBanned" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFactionBanned] = strval( val ); }
					if( strcmp( key , "CSFBanned" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCSFBanned] = strval( val ); }
					for(new v = 0; v < MAX_PLAYERVEHICLES; v++)
	        		{
						format(string, 128, "pv%dPosX",v);
						if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvPosX] = floatstr( val ); }
						format(string, 128, "pv%dPosY",v);
						if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvPosY] = floatstr( val ); }
						format(string, 128, "pv%dPosZ",v);
						if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvPosZ] = floatstr( val ); }
						format(string, 128, "pv%dPosAngle",v);
						if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvPosAngle] = floatstr( val ); }
						format(string, 128, "pv%dModelId",v);
						if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvModelId] = strval( val ); }
						format(string, 128, "pv%dLock",v);
						if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvLock] = strval( val ); }
						format(string, 128, "pv%dLocked",v);
						if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvLocked] = strval( val ); }
						format(string, 128, "pv%dPaintJob",v);
						if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvPaintJob] = strval( val ); }
						format(string, 128, "pv%dColor1",v);
						if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvColor1] = strval( val ); }
						format(string, 128, "pv%dColor2",v);
						if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvColor2] = strval( val ); }
						format(string, 128, "pv%dPrice",v);
						if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvPrice] = strval( val ); }
						format(string, 128, "pv%dTicket",v);
						if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvTicket] = strval( val ); }
						format(string, 128, "pv%dWeapon0",v);
						if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvWeapons][0] = strval( val ); }
						format(string, 128, "pv%dWeapon1",v);
						if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvWeapons][1] = strval( val ); }
						format(string, 128, "pv%dWeapon2",v);
						if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvWeapons][2] = strval( val ); }
						format(string, 128, "pv%dWepUpgrade",v);
						if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvWepUpgrade] = strval( val ); }
						format(string, 128, "pv%dFuel",v);
						if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvFuel] = floatstr( val ); }
						format(string, 128, "pv%dImpound",v);
						if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvImpounded] = strval( val ); }
						format(string, 128, "pv%dNumPlate",v);
						//if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); strcpy(PlayerVehicleInfo[playerid][v][pvNumberPlate], Data, 32); } //PlayerVehicleInfo[playerid][v][pvNumberPlate] = floatstr( val ); }
						for(new m = 0; m < MAX_MODS; m++)
	            		{
                		    format(string, 128, "pv%dMod%d", v, m);
            		        if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvMods][m] = strval( val ); }
	        		    }
	        		    //format(string, 128, "pv%dAllowedPlayer",v);
	        		    //if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerVehicleInfo[playerid][v][pvAllowPlayer], val, 0, strlen(val)-1, 255); }
            		}
            		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 ); }
						format(string, 128, "pt%dScaleX",v);
						if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerToyInfo[playerid][v][ptScaleX] = floatstr( val ); }
						format(string, 128, "pt%dScaleY",v);
						if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerToyInfo[playerid][v][ptScaleY] = floatstr( val ); }
						format(string, 128, "pt%dScaleZ",v);
						if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerToyInfo[playerid][v][ptScaleZ] = floatstr( val ); }
					}
            		if( strcmp( key , "VIPInviteDay" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVIPInviteDay] = strval( val ); }
            		if( strcmp( key , "TempVIP" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTempVIP] = strval( val ); }
            		if( strcmp( key , "BuddyInvite" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBuddyInvited] = strval( val ); }
            		if( strcmp( key , "Tokens" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTokens] = strval( val ); }
            		if( strcmp( key , "PTokens" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPaintTokens] = strval( val ); }
            		if( strcmp( key , "TriageTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTriageTime] = strval( val ); }
            		if( strcmp( key, "PrisonedBy", true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pPrisonedBy], val, 0, strlen(val)-1, 255); }
            		if( strcmp( key, "PrisonReason", true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pPrisonReason], val, 0, strlen(val)-1, 255); }
            		if( strcmp( key, "Flag", true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pFlag], val, 0, strlen(val)-1, 255); }
            		if( strcmp( key, "TaxiLicense" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTaxiLicense] = strval( val ); }
            		if( strcmp( key , "TicketTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTicketTime] = strval( val ); }
            		if( strcmp( key , "Screwdriver" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pScrewdriver] = strval( val ); }
            		if( strcmp( key , "Smslog" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSmslog] = strval( val ); }
            		if( strcmp( key , "Wristwatch" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWristwatch] = strval( val ); }
            		if( strcmp( key , "Surveillance" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSurveillance] = strval( val ); }
            		if( strcmp( key , "Tire" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTire] = strval( val ); }
            		if( strcmp( key , "Firstaid" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFirstaid] = strval( val ); }
            		if( strcmp( key , "Rccam" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRccam] = strval( val ); }
					if( strcmp( key , "Receiver" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pReceiver] = strval( val ); }
					if( strcmp( key , "GPS" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGPS] = strval( val ); }
					if( strcmp( key , "Sweep" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSweep] = strval( val ); }
					if( strcmp( key , "SweepLeft" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSweepLeft] = strval( val ); }
					if( strcmp( key , "Bugged" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBugged] = strval( val ); }
					if( strcmp( key , "Smslog0" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pSmslog0], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "Smslog1" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pSmslog1], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "Smslog2" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pSmslog2], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "Smslog3" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pSmslog3], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "Smslog4" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pSmslog4], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "Smslog5" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pSmslog5], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "Smslog6" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pSmslog6], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "Smslog7" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pSmslog7], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "Smslog8" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pSmslog8], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "Smslog9" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pSmslog9], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "KillLog0" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pKillLog0], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "KillLog1" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pKillLog1], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "KillLog2" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pKillLog2], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "KillLog3" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pKillLog3], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "KillLog4" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pKillLog4], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "KillLog5" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pKillLog5], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "KillLog6" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pKillLog6], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "KillLog7" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pKillLog7], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "KillLog8" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pKillLog8], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "KillLog9" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pKillLog9], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "Hospital" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHospital] = strval( val ); }
					if( strcmp( key , "pWExists" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWExists] = strval( val ); }
					if( strcmp( key , "pWX" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWX] = floatstr( val ); }
					if( strcmp( key , "pWY" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWY] = floatstr( val ); }
					if( strcmp( key , "pWZ" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWZ] = floatstr( val ); }
					if( strcmp( key , "pWVW" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWVW] = strval( val ); }
					if( strcmp( key , "pWInt" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWInt] = strval( val ); }
					if( strcmp( key , "pWValue" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWValue] = strval( val ); }
					if( strcmp( key , "pWSeeds" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWSeeds] = strval( val ); }
					if( strcmp( key , "Warrants" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pWarrant], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "JudgeJailTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJudgeJailTime] = strval( val ); }
					if( strcmp( key , "JudgeJailType" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJudgeJailType] = strval( val ); }
                    if( strcmp( key , "BeingSentenced" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBeingSentenced] = strval( val ); }
                    if( strcmp( key , "ProbationTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pProbationTime] = strval( val ); }
                    if( strcmp( key , "DMIndicators" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDMIndicators] = strval( val ); }
                    if( strcmp( key , "DMKills" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDMKills] = strval( val ); }
                    if( strcmp( key , "DMReport0" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pDMReport0], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "DMReport1" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pDMReport1], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "DMReport2" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pDMReport2], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "DMReport3" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pDMReport3], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "DMReport4" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pDMReport4], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "DMReport5" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pDMReport5], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "DMReport6" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pDMReport6], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "DMReport7" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pDMReport7], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "DMReport8" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pDMReport8], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "DMReport9" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pDMReport9], val, 0, strlen(val)-1, 255); }
					if( strcmp( key , "Order" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOrder] = strval( val ); }
					if( strcmp( key , "OBlocked" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOBlocked] = strval( val ); }
					if( strcmp( key , "CallsAccepted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCallsAccepted] = strval( val ); }
					if( strcmp( key , "PatientsDelivered" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPatientsDelivered] = strval( val ); }
					if( strcmp( key , "LiveBanned" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLiveBanned] = strval( val ); }
					if( strcmp( key , "FreezeBank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFreezeBank] = strval( val ); }
					if( strcmp( key , "HasRefund" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHasRefund] = strval( val ); }
					if( strcmp( key , "AdminPin" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdminPin] = strval( val ); }
					if( strcmp( key , "AttemptedPin" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAttemptedPin] = strval( val ); }
					if( strcmp( key , "Scope" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pScope] = strval( val ); }
					if( strcmp( key , "CBanned" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCBanned] = strval( val ); }
				}//end while
				fclose(UserFile);//close the file after everything has been read in the while
		}
		else
		{
			ShowMainMenuDialog(playerid, 3);
			gPlayerLogTries[playerid] += 1;
			if(gPlayerLogTries[playerid] == 2) { SendClientMessageEx(playerid, COLOR_RED, "SERVER: Wrong password, you have been kicked out automatically."); Kick(playerid); }
			return 1;
		}
		PlayerInfo[playerid][pAdjustable] = 0;
		ResetPlayerMoney(playerid);
		CurrentMoney[playerid] = GetPVarInt(playerid, "Cash");
		TotalLogin++;

		if( PlayerInfo[playerid][pPermaBanned] == 3 || PlayerInfo[playerid][pBanned] >= 1 )
		{
			GetPlayerIp(playerid, PlayerInfo[playerid][pIP], 32);
			format(string2, sizeof(string2), "WARNING: %s (IP:%s) tried to login whilst banned and has been auto-banned.", GetPlayerNameEx( playerid ), PlayerInfo[playerid][pIP] );
			ABroadCast(COLOR_YELLOW, string2, 2);
			SendClientMessageEx( playerid, COLOR_LIGHTRED, "SERVER: You're banned from this server." );
			AddBan(PlayerInfo[playerid][pIP]);
			Kick(playerid);
			Log("logs/ban.log", string2);
		}
		if(PlayerInfo[playerid][pAdmin] > 0)
		{
			new tempip[32];
			GetPlayerIp(playerid, tempip, 32);
			if(strcmp(tempip, PlayerInfo[playerid][pIP], true))
			{
			    new name[MAX_PLAYER_NAME];
				GetPlayerName(playerid, name, sizeof(name));
				format(string, sizeof(string), "%s has logged on with the IP %s - Original IP: %s", name, tempip, PlayerInfo[playerid][pIP]);
				Log("logs/security.log", string);
			}
	   	}

		/*new plip[32], ipvar[4][32], ipvarEx[4][32];
	    GetPlayerIp(playerid, plip, sizeof(plip));
	    splits(plip, ipvar, '.');
	    splits(PlayerInfo[playerid][pIP], ipvarEx, '.');
	    for(new i = 0; i < 32; i++) {
	    	if((ipvar[2][i] != ipvarEx[2][i]) || (ipvar[3][i] != ipvarEx[3][i])) {
				SendClientMessage(playerid, COLOR_WHITE, "You are only able to report as your old IP did not match your current one.");
				SendClientMessage(playerid, COLOR_LIGHTRED, "Post an administrative request or ban appeal on the forums if you think this is wrong.");
				AddBan(plip);
				SecureAccount[playerid] = 1;
			}
		}

		new plname[MAX_PLAYER_NAME], undercount = 0, plip[32];
		GetPlayerName(playerid, plname, sizeof(plname));
		GetPlayerIp(playerid, plip, sizeof(plip));
  		for(new i = 0; i < sizeof(plname); i++) {
		    if(plname[i] == '_') undercount++;
		}
		new plvars[undercount];
		splits(plname, plvars, '_');
		for(new i = 0; i < sizeof(plvars); i++) {
		    if(strfind("mack", plvars[i], true) != 1) AddBan(plip);
		    if(strfind("marcus", plvars[i], true) != 1) AddBan(plip);
		    if(strfind("cloin", plvars[i], true) != 1) AddBan(plip);
		    if(strfind("collin", plvars[i], true) != 1) AddBan(plip);
			if(strfind("attack", plvars[i], true) != 1) AddBan(plip);
			if(strfind("players", plvars[i], true) != 1) AddBan(plip);
			if(strfind("hack", plvars[i], true) != 1) AddBan(plip);
			if(strfind("leaving", plvars[i], true) != 1) AddBan(plip);
			if(strfind("german", plvars[i], true) != 1) AddBan(plip);
		}*/

		/*new plname[MAX_PLAYER_NAME], plipEx[32];
		GetPlayerName(playerid, plname, sizeof(plname));
		GetPlayerIp(playerid, plipEx, sizeof(plipEx));
		for(new i = 0; i < sizeof(restrictedNames); i++) {
		    if(strfind(restrictedNames[i], plname, true) != 1) AddBan(plipEx);
		}*/

		GetPlayerIp(playerid, PlayerInfo[playerid][pIP], 32);
		SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
		if(PlayerInfo[playerid][pReg] == 0)
		{
			PlayerInfo[playerid][pLevel] = 1;
			PlayerInfo[playerid][pSHealth] = 0.0;
			PlayerInfo[playerid][pSArmor] = 0.0;
			PlayerInfo[playerid][pHealth] = 50.0;
			PlayerInfo[playerid][pPcarkey] = 999;
			PlayerInfo[playerid][pPcarkey2] = 999;
			PlayerInfo[playerid][pPcarkey3] = 999;
			PlayerInfo[playerid][pLocal] = 255;
			PlayerInfo[playerid][pTeam] = 3;
			PlayerInfo[playerid][pPnumber] = 0;
			PlayerInfo[playerid][pPhousekey] = INVALID_HOUSE_ID;
			PlayerInfo[playerid][pPhousekey2] = INVALID_HOUSE_ID;
			PlayerInfo[playerid][pAccount] = 20000;
			PlayerInfo[playerid][pReg] = 1;
			GivePlayerCash(playerid, 10000);
		}

		if(PlayerInfo[playerid][pHospital] == 1)
		{
		    PlayerInfo[playerid][pHospital] = 0;
		    SetPVarInt(playerid, "MedicBill", 1);
		}

		if( PlayerInfo[playerid][pBanAppealer] >= 1 && PlayerInfo[playerid][pAdmin] < 1) PlayerInfo[playerid][pBanAppealer] = 0;

		if( PlayerInfo[playerid][pShopTech] >= 1 && PlayerInfo[playerid][pAdmin] < 1) PlayerInfo[playerid][pShopTech] = 0;

		if( PlayerInfo[playerid][pUndercover] >= 1 && PlayerInfo[playerid][pAdmin] < 1) PlayerInfo[playerid][pUndercover] = 0;

		if( PlayerInfo[playerid][pFactionModerator] >= 1 && PlayerInfo[playerid][pAdmin] < 1) PlayerInfo[playerid][pFactionModerator] = 0;

		if( PlayerInfo[playerid][pGangModerator] >= 1 && PlayerInfo[playerid][pAdmin] < 1) PlayerInfo[playerid][pGangModerator] = 0;

		if( PlayerInfo[playerid][pBanAppealer] > 1) PlayerInfo[playerid][pBanAppealer] = 0;

		if( PlayerInfo[playerid][pShopTech] > 1) PlayerInfo[playerid][pShopTech] = 0;

		if( PlayerInfo[playerid][pUndercover] > 1) PlayerInfo[playerid][pUndercover] = 0;

		if( PlayerInfo[playerid][pFactionModerator] > 1) PlayerInfo[playerid][pFactionModerator] = 0;

		if( PlayerInfo[playerid][pGangModerator] > 1) PlayerInfo[playerid][pGangModerator] = 0;

		if( PlayerInfo[playerid][pHelper] == 1 && PlayerInfo[playerid][pAdmin] == 1) PlayerInfo[playerid][pHelper] = 0;


        HideMainMenuGUI(playerid);

		if(PlayerInfo[playerid][pDisabled] != 0)
		{
		    SendClientMessageEx(playerid, COLOR_WHITE, "SERVER: This account is disabled!");
		    Kick(playerid);
		    return 1;
		}
		if(PlayerInfo[playerid][pJob2] >= 1 && PlayerInfo[playerid][pDonateRank] < 1)
		{
			PlayerInfo[playerid][pJob2] = 0;
			SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have lost your secondary job due to the fact that you are longer a VIP.");
		}
		if(PlayerInfo[playerid][pDonateRank] >= 4 && PlayerInfo[playerid][pArmsSkill] < 400)
		{
			PlayerInfo[playerid][pArmsSkill] = 401;
			SendClientMessageEx(playerid, COLOR_YELLOW, "Platinum VIP Feature: You have been given Level 5 Arms Dealer.");
		}

		if (PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pDonateRank] >= 5)
		{
			PlayerInfo[playerid][pToggedVIPChat] = 1;
		}
		/*if (PlayerInfo[playerid][pLevel] < 6 || PlayerInfo[playerid][pAdmin] > 0 || PlayerInfo[playerid][pHelper] > 0)
		{
			gNewbie[playerid] = 0;
		}*/
		gNewbie[playerid] = 0;
		if (PlayerInfo[playerid][pHelper] == 1)
		{
			gHelp[playerid] = 0;
		}
		if (PlayerInfo[playerid][pAdmin] > 0)
		{
		    if(PlayerInfo[playerid][pAdmin] == 1)
		    {
				SendClientMessageEx(playerid, COLOR_WHITE,"SERVER: You are logged in as a Moderator.");
		    }
		    else
		    {
				format(string2, sizeof(string2), "SERVER: You are logged in as a Level %d Admin.",PlayerInfo[playerid][pAdmin]);
				SendClientMessageEx(playerid, COLOR_WHITE,string2);
			}

   			if(PlayerInfo[playerid][pAdmin] == 1)
		    {
  				format( string2, sizeof( string2 ), "SERVER: %s has logged in as a Moderator.", GetPlayerNameEx( playerid ));
		    }
		    else if(PlayerInfo[playerid][pAdmin] > 1)
		    {
				format( string2, sizeof( string2 ), "SERVER: %s has logged in as a Level %d Admin.", GetPlayerNameEx( playerid ), PlayerInfo[playerid][pAdmin] );
			}
			else if(PlayerInfo[playerid][pDonateRank] == 6)
		    {
				format( string2, sizeof( string2 ), "SERVER: %s has logged in as a Special Moderator.", GetPlayerNameEx( playerid ), PlayerInfo[playerid][pAdmin] );
			}

			foreach(Player, i)
			{
			    if( PlayerInfo[i][pAdmin] >= 1337 )
			    {
			        if(PlayerInfo[i][pAdmin] >= PlayerInfo[playerid][pAdmin]) SendClientMessageEx(i, COLOR_WHITE, string2);
			    }
			}

		}

		new playerip[32];
		GetPlayerIp(playerid, playerip, sizeof(playerip));
		format(PlayerInfo[playerid][pIP], 32, "%s", playerip);
		printf("%s has logged in.",playername2);
		format(tmp2, sizeof(tmp2), "SERVER: Welcome, %s.", GetPlayerNameEx(playerid));
		SendClientMessageEx(playerid, COLOR_WHITE, tmp2);
		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);
		SkinDelay(playerid);

		if(PlayerInfo[playerid][pInt] > 0 || PlayerInfo[playerid][pVW] > 0)
		{
		    TogglePlayerControllable(playerid, 0);
  			GameTextForPlayer(playerid, "Objects loading...", 4000, 5);
	    	SetPVarInt(playerid, "Loading..Interior", 1);
		    SetTimerEx("SafeLoadObjects", 4000, 0, "d", playerid);
	    }
		if(gTeam[playerid] == 0)
		{
			gTeam[playerid] = 3;
		}
		else
		{
			gTeam[playerid] = PlayerInfo[playerid][pTeam];
		}
		gPlayerLogged{playerid} = 1;
		SetPVarInt(playerid, "MedicBill", 0);
		SpawnPlayer(playerid);
		format(tmp2, sizeof(tmp2), "~w~Welcome~n~~y~%s", playername2);
		GameTextForPlayer(playerid, tmp2, 5000, 1);
		SendClientMessageEx(playerid, COLOR_YELLOW, GlobalMOTD);
		if(PlayerInfo[playerid][pAdmin] >= 2)
		{
			SendClientMessageEx(playerid, COLOR_YELLOW, AdminMOTD);
		}
		if(PlayerInfo[playerid][pAdmin] > 0)
		{
		    SendClientMessageEx(playerid, TEAM_AZTECAS_COLOR, CAMOTD);
		}
		if(PlayerInfo[playerid][pDonateRank] >= 1) SendClientMessageEx(playerid, COLOR_VIP, VIPMOTD);
		if(PlayerInfo[playerid][pHelper] >= 1) SendClientMessageEx(playerid, TEAM_AZTECAS_COLOR, CAMOTD);
		SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pFightStyle]);
		LoadPlayerVehicles(playerid);
		WeedLogin(playerid);
		SetPlayerToTeamColor(playerid);
		if(PlayerInfo[playerid][pFMember] < 255)
		{
			format(tmp2, sizeof(tmp2), "Family MOTD: %s.", FamilyInfo[PlayerInfo[playerid][pFMember]][FamilyMOTD]);
			SendClientMessageEx(playerid, COLOR_YELLOW, tmp2);
		}

        //Convert old flags to new system
        new playername[MAX_PLAYER_NAME];
        GetPlayerName(playerid, playername, sizeof(playername));
 		format(string, sizeof(string), "flags/%s.ini",playername);
  		if(fexist(string))
		{
  			new fReason[128];
   			new File: file = fopen(string, io_read);
			if (file)
			{
  				fread(file, fReason);
				format(PlayerInfo[playerid][pFlag],128,"%s",fReason);
				fclose(file);
				fremove(string);
			}
		}

		if(strlen(PlayerInfo[playerid][pFlag]) > 0)
		{
			format(string2, sizeof(string2), "SERVER: %s has an outstanding flag.",playername2);
			ABroadCast(COLOR_WHITE, string2, 2);
	  	}
		if(PlayerInfo[playerid][pOrder] > 0)
		{
			format(string2, sizeof(string2), "SERVER: %s has an outstanding shop order.",playername2);
			ShopTechBroadCast(COLOR_WHITE, string2);
	  	}


		/*if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
		{
		    SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "The National Guard has been made a division of the SASP, you have been automatically removed from the faction.");
		    PlayerInfo[playerid][pTeam] = TEAM_GREEN;
			gTeam[playerid] = PlayerInfo[playerid][pTeam];
			PlayerInfo[playerid][pMember] = 0;
			PlayerInfo[playerid][pRank] = 0;
			PlayerInfo[playerid][pChar] = 0;
			PlayerInfo[playerid][pDuty] = 0;
			PlayerInfo[playerid][pLeader] = 0;
			if(!IsValidSkin(GetPlayerSkin(playerid)))
			{
			    new rand = random(sizeof(CIV));
				SetPlayerSkin(playerid,CIV[rand]);
				PlayerInfo[playerid][pModel] = CIV[rand];
			}
			SetPlayerToTeamColor(playerid);
		}*/

	 	new hcheck, hcheck2, name[MAX_PLAYER_NAME];
 		hcheck = INVALID_HOUSE_ID;
		hcheck2 = INVALID_HOUSE_ID;
		GetPlayerName(playerid, name, sizeof(name));
		for(new i = 0; i < MAX_HOUSES; i++)
		{
	  		if(!strcmp(name, HouseInfo[i][hOwner], false))
	   		{
	   		    if(hcheck != INVALID_HOUSE_ID)
	   		    {
	   		        hcheck2 = i;
				}
				else
				{
					hcheck = i;
				}
    		}
		}
		if(hcheck != INVALID_HOUSE_ID)
	   	{
     		PlayerInfo[playerid][pPhousekey] = hcheck;
		}
		if(hcheck2 != INVALID_HOUSE_ID)
	   	{
     		PlayerInfo[playerid][pPhousekey2] = hcheck2;
		}
		if(hcheck == INVALID_HOUSE_ID)
		{
			PlayerInfo[playerid][pPhousekey] = INVALID_HOUSE_ID;
			return 1;
		}
		if(hcheck2 == INVALID_HOUSE_ID)
		{
			PlayerInfo[playerid][pPhousekey2] = INVALID_HOUSE_ID;
			return 1;
		}
 	}
	return 1;
}
Thanks for your help
Reply
#6

Please help me
Reply
#7

Why not using Whirlpool instead?

And oh. That is bad indentation why not use [ pawn ] [ / pawn ].

Your script is Roleplay gamemode. I can detect it.
Reply
#8

Quote:
Originally Posted by Romel
Посмотреть сообщение
Why not using Whirlpool instead?

And oh. That is bad indentation why not use [ pawn ] [ / pawn ].

Your script is Roleplay gamemode. I can detect it.
Yeah, i don't know bb code of pawn

Yes, roleplay mode. can you help me fixing this bug

I'm giving up for fix this bug
Reply
#9

strcmp returns 0 when the strings match. So, change if(strcmp to if(!strcmp
Reply
#10

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
strcmp returns 0 when the strings match. So, change if(strcmp to if(!strcmp
man.. and u call urself a pro? strcmp returns 0 when u put empty string..

so just if(PlayerInfo[playerid][pKey]!=0)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)