Login Interior and VirtualWorld
#8

Is that OnPlayerLogin? If yes this is my code:

Код:
public OnPlayerLogin(playerid,password[])
{
	new tmp2[256]
	new	string2[64];
    new	string[128];
	new	playername2[MAX_PLAYER_NAME];
	new playersip[24];

    GetPlayerName(playerid, playername2, sizeof(playername2));
    GetPlayerIp(playerid, playersip, sizeof(playersip));

	format(string2, sizeof(string2), "STATES/Users/%s.ini", playername2);

	if (dini_Exists(string2))
	{
	    new password2 = num_hash(password);
 		if(dini_Int(string2,"Password") == password2)
		{
		    PlayerInfo[playerid][pKey] = dini_Int(string2,"Password");
		    PlayerInfo[playerid][pLevel] = dini_Int(string2,"Level");
		    PlayerInfo[playerid][pSpawn] = dini_Int(string2,"Spawn");
		    PlayerInfo[playerid][pTester] = dini_Int(string2,"TesterLevel");
		    PlayerInfo[playerid][pHelper] = dini_Int(string2,"HelperLevel");
		    PlayerInfo[playerid][pAdmin] = dini_Int(string2,"AdminLevel");
		    PlayerInfo[playerid][pRegularRank] = dini_Int(string2,"RegularRank");
		    PlayerInfo[playerid][gPupgrade] = dini_Int(string2,"UpgradePoints");
		    PlayerInfo[playerid][pConnectSeconds] = dini_Int(string2,"ConnectedTime");
		    PlayerInfo[playerid][pReg] = dini_Int(string2,"Registered");
		    PlayerInfo[playerid][pSex] = dini_Int(string2,"Sex");
		    PlayerInfo[playerid][pAge] = dini_Int(string2,"Age");
		    PlayerInfo[playerid][pGPS] = dini_Int(string2,"GPS");
		    PlayerInfo[playerid][pOrigin] = dini_Int(string2,"Origin");
		    PlayerInfo[playerid][pCK] = dini_Int(string2,"CK");
		    PlayerInfo[playerid][pMuted] = dini_Int(string2,"Muted");
		    PlayerInfo[playerid][pFrozen] = dini_Int(string2,"Frozen");
		    PlayerInfo[playerid][pBlind] = dini_Int(string2,"Blind");
		    PlayerInfo[playerid][pExp] = dini_Int(string2,"Respect");
		    PlayerInfo[playerid][pCash] = dini_Int(string2,"Money");
		    PlayerInfo[playerid][pAccount] = dini_Int(string2,"Bank");
		    PlayerInfo[playerid][pCrimes] = dini_Int(string2,"Crimes");
		    strmid(PlayerInfo[playerid][pCrimeReason],dini_Get(string2,"CrimeReason"),0,strlen(dini_Get(string2,"CrimeReason")),255);
		    PlayerInfo[playerid][pWanted] = dini_Int(string2,"Wanted");
		    PlayerInfo[playerid][pWantedLevel] = dini_Int(string2,"WantedLevel");
		    PlayerInfo[playerid][pKills] = dini_Int(string2,"Kills");
		    PlayerInfo[playerid][pDeaths] = dini_Int(string2,"Deaths");
		    PlayerInfo[playerid][pArrested] = dini_Int(string2,"Arrested");
		    PlayerInfo[playerid][pWantedDeaths] = dini_Int(string2,"WantedDeaths");
		    PlayerInfo[playerid][pPhoneBook] = dini_Int(string2,"PhoneBook");
		    PlayerInfo[playerid][pLottoNr] = dini_Int(string2,"LottoNr");
		    PlayerInfo[playerid][pFishes] = dini_Int(string2,"Fishes");
		    PlayerInfo[playerid][pBiggestFish] = dini_Int(string2,"BiggestFish");
		    PlayerInfo[playerid][pJob] = dini_Int(string2,"Job");
		    PlayerInfo[playerid][pPayCheck] = dini_Int(string2,"Paycheck");
		    PlayerInfo[playerid][pHeadValue] = dini_Int(string2,"HeadValue");
		    PlayerInfo[playerid][pJailed] = dini_Int(string2,"Jailed");
		    PlayerInfo[playerid][pJailTime] = dini_Int(string2,"JailTime");
		    PlayerInfo[playerid][pRobTime] = dini_Int(string2,"CanRobTime");
		    PlayerInfo[playerid][pMats] = dini_Int(string2,"Materials");
		    PlayerInfo[playerid][pDrugs] = dini_Int(string2,"Drugs");
		    PlayerInfo[playerid][pLeader] = dini_Int(string2,"Leader");
		    PlayerInfo[playerid][pMember] = dini_Int(string2,"Member");
		    PlayerInfo[playerid][pFMember] = dini_Int(string2,"FMember");
		    PlayerInfo[playerid][pRank] = dini_Int(string2,"Rank");
		    PlayerInfo[playerid][pChar] = dini_Int(string2,"Char");
		    PlayerInfo[playerid][pContractTime] = dini_Int(string2,"ContractTime");
		    PlayerInfo[playerid][pDetSkill] = dini_Int(string2,"DetSkill");
		    PlayerInfo[playerid][pSexSkill] = dini_Int(string2,"SexSkill");
		    PlayerInfo[playerid][pBoxSkill] = dini_Int(string2,"BoxSkill");
		    PlayerInfo[playerid][pLawSkill] = dini_Int(string2,"LawSkill");
		    PlayerInfo[playerid][pMechSkill] = dini_Int(string2,"MechSkill");
		    PlayerInfo[playerid][pJackSkill] = dini_Int(string2,"JackSkill");
		    PlayerInfo[playerid][pCarSkill] = dini_Int(string2,"CarSkill");
		    PlayerInfo[playerid][pNewsSkill] = dini_Int(string2,"NewsSkill");
		    PlayerInfo[playerid][pDrugsSkill] = dini_Int(string2,"DrugsSkill");
		    PlayerInfo[playerid][pCookSkill] = dini_Int(string2,"CookSkill");
		    PlayerInfo[playerid][pFishSkill] = dini_Int(string2,"FishSkill");
		    PlayerInfo[playerid][pHealth] = dini_Float(string2,"pHealth");
		    PlayerInfo[playerid][pArmour] = dini_Float(string2,"pArmour");
		    PlayerInfo[playerid][pInt] = dini_Int(string2,"Int");
		    PlayerInfo[playerid][pInteriorNr] = dini_Int(string2,"InteriorNr");
		    PlayerInfo[playerid][pLocal] = dini_Int(string2,"Local");
		    PlayerInfo[playerid][pTeam] = dini_Int(string2,"Team");
		    PlayerInfo[playerid][pModel] = dini_Int(string2,"Model");
		    PlayerInfo[playerid][pPnumber] = dini_Int(string2,"PhoneNr");
		    PlayerInfo[playerid][pPhousekey] = dini_Int(string2,"House");
		    PlayerInfo[playerid][pPbiskey] = dini_Int(string2,"Bizz");
		    PlayerInfo[playerid][pPos_x] = dini_Float(string2,"Pos_x");
		    PlayerInfo[playerid][pPos_y] = dini_Float(string2,"Pos_y");
		    PlayerInfo[playerid][pPos_z] = dini_Float(string2,"Pos_z");
		    PlayerInfo[playerid][pPassport] = dini_Int(string2,"Passport");
		    PlayerInfo[playerid][pCarLic] = dini_Int(string2,"CarLic");
		    PlayerInfo[playerid][pFlyLic] = dini_Int(string2,"FlyLic");
		    PlayerInfo[playerid][pBoatLic] = dini_Int(string2,"BoatLic");
		    PlayerInfo[playerid][pFishLic] = dini_Int(string2,"FishLic");
		    PlayerInfo[playerid][pGunLic] = dini_Int(string2,"GunLic");
		    PlayerInfo[playerid][pCopLic] = dini_Int(string2,"CopLic");
		    PlayerInfo[playerid][pCarTime] = dini_Int(string2,"CarTime");
		    PlayerInfo[playerid][pPayDay] = dini_Int(string2,"PayDay");
		    PlayerInfo[playerid][pPayDayHad] = dini_Int(string2,"PayDayHad");
		    PlayerInfo[playerid][pWatch] = dini_Int(string2,"Watch");
		    PlayerInfo[playerid][pCrashed] = dini_Int(string2,"Crashed");
		    PlayerInfo[playerid][pWins] = dini_Int(string2,"Wins");
		    PlayerInfo[playerid][pLoses] = dini_Int(string2,"Loses");
		    PlayerInfo[playerid][pAlcoholPerk] = dini_Int(string2,"AlcoholPerk");
		    PlayerInfo[playerid][pDrugPerk] = dini_Int(string2,"DrugPerk");
		    PlayerInfo[playerid][pMiserPerk] = dini_Int(string2,"MiserPerk");
		    PlayerInfo[playerid][pPainPerk] = dini_Int(string2,"PainPerk");
		    PlayerInfo[playerid][pTraderPerk] = dini_Int(string2,"TraderPerk");
		    PlayerInfo[playerid][pTut] = dini_Int(string2,"Tutorial");
		    PlayerInfo[playerid][pVirWorld] = dini_Int(string2,"VirWorld");
		    PlayerInfo[playerid][pFuel] = dini_Int(string2,"Fuel");
		    PlayerInfo[playerid][pMarried] = dini_Int(string2,"Married");
		    strmid(PlayerInfo[playerid][pMarriedTo],dini_Get(string2,"MarriedTo"),0,strlen(dini_Get(string2,"MarriedTo")),255);
		    PlayerInfo[playerid][pFishTool] = dini_Int(string2,"FlyLic");
		    strmid(PlayerInfo[playerid][pWhyLeft],dini_Get(string2,"WhyLeft"),0,strlen(dini_Get(string2,"WhyLeft")),255);
		    strmid(PlayerInfo[playerid][pNote1],dini_Get(string2,"Note1"),0,strlen(dini_Get(string2,"Note1")),255);
		    PlayerInfo[playerid][pNote1s] = dini_Int(string2,"Note1s");
		    strmid(PlayerInfo[playerid][pNote2],dini_Get(string2,"Note2"),0,strlen(dini_Get(string2,"Note2")),255);
		    PlayerInfo[playerid][pNote2s] = dini_Int(string2,"Note2s");
		    strmid(PlayerInfo[playerid][pNote3],dini_Get(string2,"Note3"),0,strlen(dini_Get(string2,"Note3")),255);
		    PlayerInfo[playerid][pNote3s] = dini_Int(string2,"Note3s");
		    strmid(PlayerInfo[playerid][pNote4],dini_Get(string2,"Note4"),0,strlen(dini_Get(string2,"Note4")),255);
		    PlayerInfo[playerid][pNote4s] = dini_Int(string2,"Note4s");
		    strmid(PlayerInfo[playerid][pNote5],dini_Get(string2,"Note5"),0,strlen(dini_Get(string2,"Note5")),255);
		    PlayerInfo[playerid][pNote5s] = dini_Int(string2,"Note5s");
		    PlayerInfo[playerid][pInvWeapon] = dini_Int(string2,"InvWeapon");
		    PlayerInfo[playerid][pInvAmmo] = dini_Int(string2,"InvAmmo");
		    PlayerInfo[playerid][pInvWeapon2] = dini_Int(string2,"InvWeapon2");
		    PlayerInfo[playerid][pInvAmmo2] = dini_Int(string2,"InvAmmo2");
		    PlayerInfo[playerid][pInvWeapon3] = dini_Int(string2,"InvWeapon3");
		    PlayerInfo[playerid][pInvAmmo3] = dini_Int(string2,"InvAmmo3");
		    PlayerInfo[playerid][pInvWeapon4] = dini_Int(string2,"InvWeapon4");
		    PlayerInfo[playerid][pInvAmmo4] = dini_Int(string2,"InvAmmo4");
		    PlayerInfo[playerid][pInvWeapon5] = dini_Int(string2,"InvWeapon5");
		    PlayerInfo[playerid][pInvAmmo5] = dini_Int(string2,"InvAmmo5");
		    PlayerInfo[playerid][pInvWeapon6] = dini_Int(string2,"InvWeapon6");
		    PlayerInfo[playerid][pInvAmmo6] = dini_Int(string2,"InvAmmo6");
		    PlayerInfo[playerid][pLighter] = dini_Int(string2,"Lighter");
		    PlayerInfo[playerid][pCigarettes] = dini_Int(string2,"Cigarettes");
		    PlayerInfo[playerid][pDM] = dini_Int(string2,"DDManager");
		    PlayerInfo[playerid][pDuty] = dini_Int(string2,"OnDuty");
		    PlayerInfo[playerid][pWarned] = dini_Int(string2,"Warnings");
		    PlayerInfo[playerid][pSwat] = dini_Int(string2,"Swat");
		    PlayerInfo[playerid][pFS] = dini_Int(string2,"Fighting");
		    PlayerInfo[playerid][pBoxiSkill] = dini_Int(string2,"Boxing");
		    PlayerInfo[playerid][pKneeSkill] = dini_Int(string2,"KneeHead");
		    PlayerInfo[playerid][pKungSkill] = dini_Int(string2,"KungFu");
		    PlayerInfo[playerid][pGrabSkill] = dini_Int(string2,"GrabKick");
		    PlayerInfo[playerid][pElbowSkill] = dini_Int(string2,"ElBow");
		    PlayerInfo[playerid][pTactical] = dini_Int(string2,"Tactical");
		    PlayerInfo[playerid][pSpecialF] = dini_Int(string2,"SpecialF");
		    PlayerInfo[playerid][pDBanned] = dini_Int(string2,"DutyBanned");
		    PlayerInfo[playerid][pDTK] = dini_Int(string2,"DDTicket");
		    PlayerInfo[playerid][pDSTK] = dini_Int(string2,"DDSTicket");
		    PlayerInfo[playerid][pSpeedo] = dini_Int(string2,"Speedo");
		    PlayerInfo[playerid][pHunterR] = dini_Int(string2,"HunterDriver");
		    PlayerInfo[playerid][pRhinoR] = dini_Int(string2,"RhinoDriver");
		    PlayerInfo[playerid][pPredR] = dini_Int(string2,"PredatorDriver");
		    PlayerInfo[playerid][pHydraR] = dini_Int(string2,"RhinoDriver");
		    PlayerInfo[playerid][pViewPms] = dini_Int(string2,"ViewPms");
		    PlayerInfo[playerid][pAppearList] = dini_Int(string2,"AppearList");
		    PlayerInfo[playerid][pAmmuTrainTime] = dini_Int(string2,"AmmunationTime");
		    PlayerInfo[playerid][pPistSkill] = dini_Int(string2,"PistolSkill");
		    PlayerInfo[playerid][pSilenSkill] = dini_Int(string2,"SilencedSkill");
		    PlayerInfo[playerid][pDesertSkill] = dini_Int(string2,"DesertSkill");
		    PlayerInfo[playerid][pShotgSkill] = dini_Int(string2,"ShotgunSkill");
		    PlayerInfo[playerid][pSawnSkill] = dini_Int(string2,"SawnoffSkill");
		    PlayerInfo[playerid][pCombSkill] = dini_Int(string2,"CombatSkill");
		    PlayerInfo[playerid][pUziSkill] = dini_Int(string2,"UziSkill");
		    PlayerInfo[playerid][pSmgSkill] = dini_Int(string2,"SMGSkill");
		    PlayerInfo[playerid][pAkSkill] = dini_Int(string2,"AK47Skill");
		    PlayerInfo[playerid][pM4Skill] = dini_Int(string2,"M4Skill");
		    PlayerInfo[playerid][pTutDone] = dini_Int(string2,"TutorialDone");
		    PlayerInfo[playerid][pRegularCount] = dini_Int(string2,"RegularCount");
		    PlayerInfo[playerid][pPassportTime] = dini_Int(string2,"PassportTime");
		    PlayerInfo[playerid][pOfficerTime] = dini_Int(string2,"Officertime");
		    PlayerInfo[playerid][pShiftName] = dini_Int(string2,"ShiftName");
		    PlayerInfo[playerid][pWeapon] = dini_Int(string2,"Weapon");
		    PlayerInfo[playerid][pAmmo] = dini_Int(string2,"Ammo");
		    PlayerInfo[playerid][pWeapon2] = dini_Int(string2,"Weapon2");
		    PlayerInfo[playerid][pAmmo2] = dini_Int(string2,"Ammo2");
		    PlayerInfo[playerid][pWeapon3] = dini_Int(string2,"Weapon3");
		    PlayerInfo[playerid][pAmmo3] = dini_Int(string2,"Ammo3");
		    PlayerInfo[playerid][pWeapon4] = dini_Int(string2,"Weapon4");
		    PlayerInfo[playerid][pAmmo4] = dini_Int(string2,"Ammo4");
		    PlayerInfo[playerid][pWeapon5] = dini_Int(string2,"Weapon5");
		    PlayerInfo[playerid][pAmmo5] = dini_Int(string2,"Ammo5");
		    PlayerInfo[playerid][pWeapon6] = dini_Int(string2,"Weapon6");
		    PlayerInfo[playerid][pAmmo6] = dini_Int(string2,"Ammo6");
		    PlayerInfo[playerid][pWeapon7] = dini_Int(string2,"Weapon7");
		    PlayerInfo[playerid][pAmmo7] = dini_Int(string2,"Ammo7");
		    PlayerInfo[playerid][pWeapon8] = dini_Int(string2,"Weapon8");
		    PlayerInfo[playerid][pAmmo8] = dini_Int(string2,"Ammo8");
		    PlayerInfo[playerid][pWeapon9] = dini_Int(string2,"Weapon9");
		    PlayerInfo[playerid][pAmmo9] = dini_Int(string2,"Ammo9");
		    PlayerInfo[playerid][pWeapon10] = dini_Int(string2,"Weapon10");
		    PlayerInfo[playerid][pAmmo10] = dini_Int(string2,"Ammo10");
		    PlayerInfo[playerid][pWeapon11] = dini_Int(string2,"Weapon11");
		    PlayerInfo[playerid][pAmmo11] = dini_Int(string2,"Ammo11");
		    PlayerInfo[playerid][pWeapon12] = dini_Int(string2,"Weapon12");
		    PlayerInfo[playerid][pAmmo12] = dini_Int(string2,"Ammo12");
		    PlayerInfo[playerid][pAtc] = dini_Int(string2,"Atc");
		    PlayerInfo[playerid][pAtcRadio] = dini_Int(string2,"AtcRadio");
		    PlayerInfo[playerid][pPending] = dini_Int(string2,"Pending");
		    strmid(PlayerInfo[playerid][pPendingInfo],dini_Get(string2,"PendingInfo"),0,strlen(dini_Get(string2,"PendingInfo")),255);
		    PlayerInfo[playerid][pChatMode] = dini_Int(string2,"ChatMode");
		    PlayerInfo[playerid][pTruckLoad] = dini_Int(string2,"TruckLoad");
		    strmid(PlayerInfo[playerid][pPunishment1],dini_Get(string2,"Punishment1"),0,strlen(dini_Get(string2,"Punishment1")),255);
		    strmid(PlayerInfo[playerid][pPunishment2],dini_Get(string2,"Punishment2"),0,strlen(dini_Get(string2,"Punishment2")),255);
		    strmid(PlayerInfo[playerid][pPunishment3],dini_Get(string2,"Punishment3"),0,strlen(dini_Get(string2,"Punishment3")),255);
		    strmid(PlayerInfo[playerid][pPunishment4],dini_Get(string2,"Punishment4"),0,strlen(dini_Get(string2,"Punishment4")),255);
		    strmid(PlayerInfo[playerid][pPunishment5],dini_Get(string2,"Punishment5"),0,strlen(dini_Get(string2,"Punishment5")),255);
		    strmid(PlayerInfo[playerid][pPunishment6],dini_Get(string2,"Punishment6"),0,strlen(dini_Get(string2,"Punishment6")),255);
		    strmid(PlayerInfo[playerid][pPunishment7],dini_Get(string2,"Punishment7"),0,strlen(dini_Get(string2,"Punishment7")),255);
		    strmid(PlayerInfo[playerid][pPunishment8],dini_Get(string2,"Punishment8"),0,strlen(dini_Get(string2,"Punishment8")),255);
            PlayerInfo[playerid][pNextPunishment] = dini_Int(string2,"NextPunishment");
            PlayerInfo[playerid][pTazerBullets] = dini_Int(string2,"TazerBullets");
			strmid(PlayerInfo[playerid][pIP],dini_Get(string2,"IP"),0,strlen(dini_Get(string2,"IP")),255);
		    strmid(PlayerInfo[playerid][pLastSeen],dini_Get(string2,"LastLogged"),0,strlen(dini_Get(string2,"LastLogged")),255);
            PlayerInfo[playerid][pChanged] = dini_Int(string2,"Changed");
			strmid(PlayerInfo[playerid][pRegistredDate],dini_Get(string2,"RegistredDate"),0,strlen(dini_Get(string2,"RegistredDate")),255);
		    BizzEntered[playerid] = dini_Int(string2,"BizzEntered");
		    HouseEntered[playerid] = dini_Int(string2,"HouseEntered");
		}
		else
		{
	        gPlayerLogTries[playerid] += 1;
	        ShowPlayerDialog(playerid, 1245, DIALOG_STYLE_PASSWORD,"Try Again, please Log-In","You have entered an incorrect password\nType your password below to log-in","Log-in","Quit");
	        if(gPlayerLogTries[playerid] == 3) { Kick(playerid); }
	        return 1;
		}
		RingTone[playerid] = 20;
		TextDrawShowForPlayer(playerid, Textdraw44);
		TextDrawShowForPlayer(playerid, Textdraw45);
		TextDrawShowForPlayer(playerid, Textdraw49[playerid]);
		TextDrawShowForPlayer(playerid, Textdraw51[playerid]);
		TextDrawShowForPlayer(playerid, Textdraw53[playerid]);
		TextDrawShowForPlayer(playerid, Textdraw55);
		if(PlayerInfo[playerid][pWatch] == 1)
		{
			TextDrawShowForPlayer(playerid, Textdraw56);
			TextDrawShowForPlayer(playerid, Textdraw57);
			TextDrawShowForPlayer(playerid, Textdraw58);
		}
		if(CountdownRunning == 1)
		{
		    TextDrawShowForPlayer(playerid, Textdraw46);
		}
		if(PlayerInfo[playerid][pReg] == 0)
		{
			PlayerInfo[playerid][pLevel] = 1;
			PlayerInfo[playerid][pHealth] = 50.0;
			PlayerInfo[playerid][pArmour] = 0.0;
			PlayerInfo[playerid][pPassportTime] = 500;
			PlayerInfo[playerid][pRegularCount] = 144000;
			PlayerInfo[playerid][pInt] = 0;
			PlayerInfo[playerid][pLocal] = 255;
			PlayerInfo[playerid][pTeam] = 3;
			PlayerInfo[playerid][pModel] = 135;
			new randphone = 100000 + random(899999);//minimum 1000  max 9999 //giving one at the start
			PlayerInfo[playerid][pPnumber] = randphone;
			PlayerInfo[playerid][pPhousekey] = 9999;
			PlayerInfo[playerid][pPbiskey] = 9999;
			PlayerInfo[playerid][pAccount] = 0;
			PlayerInfo[playerid][pReg] = 1;
			SafeGivePlayerMoney(playerid, 300);
			new d,m,y;
			new h,mi,s;
			getdate(y,m,d);
			gettime(h,mi,s);
			format(string,sizeof(string),  "%d/%d/%d at %d:%d:%d",d,m,y,h,mi,s);
			strmid(PlayerInfo[playerid][pRegistredDate], string, 0, strlen(string), 255);
		}
		SetPlayerSkills(playerid);
		if(PlayerInfo[playerid][pPending] == 1)
		{
		    format(string, sizeof(string), "[INFO]: %s has just logged in with a pending ban, take action on him!!",playername2);
		    SendAdminMessage(COLOR_GREEN, string);
		}
		else if(PlayerInfo[playerid][pCK] > 0)
		{
		    Kick(playerid);
		}
		if(PlayerInfo[playerid][pAdmin] >= 1)
		{
			admins ++;
		}
		SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
		SafeSetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);
		SafeResetPlayerMoney(playerid);
		SafeGivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
		ClearChatbox(playerid, 8);
		SendClientMessage(playerid, COLOR_GREEN, "=======================================================================");
		format(string2, sizeof(string2), "%s welcome to States Roleplay.",playername2);
		SendClientMessage(playerid, COLOR_WHITE,string2);
		format(string2, sizeof(string2), "Current script version: %s.",Version);
		SendClientMessage(playerid, COLOR_YELLOW, string2);
		strmid(PlayerInfo[playerid][pIP], playersip, 0, strlen(playersip), 255);
		if (PlayerInfo[playerid][pAdmin] > 0)
		{
			format(string2, sizeof(string2), "SERVER: You are logged in as a Level %d Admin.",PlayerInfo[playerid][pAdmin]);
			SendClientMessage(playerid, COLOR_WHITE,string2);
		}
		SendClientMessage(playerid, COLOR_GREEN, "=======================================================================");
		SendClientMessage(playerid, COLOR_WHITE, " ");
		// Reset the FirstSpawn variable
		SetTimerEx("UnsetFirstSpawn", 5000, false, "i", playerid);
		// Unset Crash
		SetTimerEx("UnsetCrash", 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);

		if(PlayerInfo[playerid][pAdmin] >= 4)
		{
		    PlayerInfo[playerid][pAppearList] = 0;
		}
		else
		{
		    PlayerInfo[playerid][pAppearList] = 1;
		}
		SafeSetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
		SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVirWorld]);
		SpawnWorld[playerid] = GetPlayerVirtualWorld(playerid);
		SpawnInterior[playerid] = GetPlayerInterior(playerid);
		if(PlayerInfo[playerid][pBlind] == 1)
		{
			TextDrawShowForPlayer(playerid, Textdraw5);
			SendClientMessage(playerid, TEAM_CYAN_COLOR, "You were Blinded by an administrator in your last session; Use /atalk if need help from Admins.");
		}
	    if(PlayerInfo[playerid][pFrozen] == 1)
		{
			SendClientMessage(playerid, TEAM_CYAN_COLOR, "You were Freezed by an administrator in your last session; Use /atalk if need help from Admins.");
		}
		if(PlayerInfo[playerid][pMuted] == 1)
		{
			SendClientMessage(playerid, TEAM_CYAN_COLOR, "You were Muted by an administrator in your last session; Use /atalk if need help from Admins.");
		}
		if(PlayerInfo[playerid][pJailed] == 1)
		{
			format(string, sizeof(string), "You are jailed for %d Seconds; Use /atalk if need help from Admins.", PlayerInfo[playerid][pJailTime]);
			SendClientMessage(playerid, TEAM_CYAN_COLOR, string);
			TextDrawShowForPlayer(playerid, Textdraw1[playerid]);
		}
		if(PlayerInfo[playerid][pJailed] == 2)
		{
			format(string, sizeof(string), "You are Prisoned for %d Seconds; Use /atalk if need help from Admins.", PlayerInfo[playerid][pJailTime]);
			SendClientMessage(playerid, TEAM_CYAN_COLOR, string);
			TextDrawShowForPlayer(playerid, Textdraw1[playerid]);
		}
		if(PlayerInfo[playerid][pCrashed] == 0)
		{
			format(tmp2, sizeof(tmp2), "~w~Welcome ~n~~y~   %s", playername2);
		}
		GameTextForPlayer(playerid, tmp2, 5000, 1);
		SendClientMessage(playerid, COLOR_YELLOW, textmotd);
		if(PlayerInfo[playerid][pFMember] < 255)
		{
		    format(tmp2, sizeof(tmp2), "Family MOTD: %s.", FamilyInfo[PlayerInfo[playerid][pFMember]][FamilyMOTD]);
		    SendClientMessage(playerid, COLOR_YELLOW, tmp2);
		}
		for(new i = 0; i < MAX_PLAYERS; i++)
		{
	    	if(IsPlayerConnected(i))
	    	{
	        	if(PlayerInfo[i][pMaskuse] == 1)
	        	{
	            	ShowPlayerNameTagForPlayer(playerid, i, 0);
	        	}
	    	}
		}
		if(!strcmp(playername2, "Bowi_McCurdy", true))
		{
		    Untouchable[playerid] = 1;
	  	}
	  	if(!strcmp(playername2, "McCurdy", true))
		{
		    Untouchable[playerid] = 1;
	  	}

		if(PlayerInfo[playerid][pWanted] == 1)
		{
		    SetPlayerColor(playerid, 0xFF990000);
			WantedPoints[playerid] = PlayerInfo[playerid][pWantedLevel];
		    SetPlayerCriminal(playerid, 255, PlayerInfo[playerid][pCrimeReason]);
		}

		if(strlen(dini_Get("STATES/Users/Aliases/alias.txt", playersip)) == 0)
	   	{
		   	dini_Set("STATES/Users/Aliases/alias.txt", playersip, playername2);
		}
		else
		{
			if( strfind( dini_Get("STATES/Users/Aliases/alias.txt", playersip), playername2, true) == -1 )
			{
				format(string,sizeof(string),"%s, %s", dini_Get("STATES/Users/Aliases/alias.txt",playersip), playername2);
				dini_Set("STATES/Users/Aliases/alias.txt", playersip, string);
			}
		}

		new y, m, d;
		new h,mi,s;
		getdate(y,m,d);
		gettime(h,mi,s);
		format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has logged in under IP %s.",d,m,y,h,mi,s,playername2,playersip);
		LoginLog(string);
	}
	return 1;
}
Reply


Messages In This Thread
Login Interior and VirtualWorld - by McCurdy - 24.07.2012, 20:20
Re: Login Interior and VirtualWorld - by RedJohn - 24.07.2012, 20:30
Re: Login Interior and VirtualWorld - by carz0159 - 24.07.2012, 20:34
Re: Login Interior and VirtualWorld - by McCurdy - 25.07.2012, 04:08
Re: Login Interior and VirtualWorld - by Jstylezzz - 25.07.2012, 09:44
Re: Login Interior and VirtualWorld - by McCurdy - 25.07.2012, 10:05
Re: Login Interior and VirtualWorld - by Jstylezzz - 25.07.2012, 10:08
Re: Login Interior and VirtualWorld - by McCurdy - 25.07.2012, 11:04
Re: Login Interior and VirtualWorld - by FUNExtreme - 25.07.2012, 11:12
Re: Login Interior and VirtualWorld - by Jstylezzz - 25.07.2012, 11:16

Forum Jump:


Users browsing this thread: 1 Guest(s)