Login Interior and VirtualWorld
#1

Hey all, i want to ask...

Example, when i play and log out inside LSPD building and that my interior set to 1 and vw 0...

So, when i log in again and my interior always back to 0 and vw 0 too and i always fall from that building...

My question, how to set interior and virtualworld when login same like before we exit
Reply
#2

You reeaaaallly should write your current code about that!
Reply
#3

write your onplayerdisconnect code, and on playerconnect code, then i can help you edit it
Reply
#4

This is my OnPlayerConnect code :
Код:
public OnPlayerConnect(playerid)
{

	new string[128];
	new string2[128];
    new plname[MAX_PLAYER_NAME];
    new playersip[64];
    new zone[MAX_ZONE_NAME];
    new bancheck[64];
    new msg2[128];
    new y, m, d;
	new h,mi,s;
	getdate(y,m,d);
	gettime(h,mi,s);
    GetPlayer2DZone(playerid, zone, MAX_ZONE_NAME);
    GetPlayerName(playerid, plname, sizeof(plname));
    GetPlayerIp(playerid,playersip,sizeof(playersip));
    new namestring = strfind(plname, "_", true);
    format(string, sizeof(string),"%s",playersip);
    gPlayerUsingLoopingAnim[playerid] = 0;
	gPlayerAnimLibsPreloaded[playerid] = 0;

	if(AntiName == 1)
	{
	 	if(namestring == -1)
		{
		    format(string, sizeof(string),"%s, has been kicked by the Anticheat for having an unvalid name",plname);
			SendClientMessageToAll(COLOR_NICERED, string);
			SendClientMessage(playerid, COLOR_YELLOW2, "Immigration Department: Your name is not acceptable.");
			SendClientMessage(playerid, COLOR_YELLOW2, "Hint: Your name must be in the format Firstname_Lastname.");
			format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Anticheat Has Kicked %s for Invalid Name",d,m,y,h,mi,s,plname);
			KickLog(string);
			Kick(playerid);
			return 1;
		}
	}
 	if(IsPlayerNPC(playerid))
  	{
   		SpawnPlayer(playerid);
     	return 1;
   	}

   	TextDrawShowForPlayer(playerid, poweredby);

    SetTimerEx("showmotd",4000, false, "i", playerid);
    SetTimerEx("hidemotd", 80000, false, "i", playerid);
	gActivePlayers[playerid]++;
	numplayers++;
	TestPoints[playerid] = 0;
	IsPlayerInEVehicle[playerid] = 9999;
	Searching[playerid] = 0;
	admin[playerid] = 0;
	AFK[playerid] = 0;
	UsedAreaRecently[playerid] = 0;
	SelectChar[playerid] = 0;
	HidePM[playerid] = 0;
	PhoneOnline[playerid] = 0;
	SelectCharID[playerid] = 0;
	SelectCharPlace[playerid] = 0;
	ChosenSkin[playerid] = 0;
	GettingJob[playerid] = 0;
	GuardOffer[playerid] = 999;
	GuardPrice[playerid] = 0;
    ApprovedLawyer[playerid] = 0;
	CallLawyer[playerid] = 0;
	WantLawyer[playerid] = 0;
	KickPlayer[playerid] = 0;
	AdminPos[playerid][0] = 0.00;
	AdminPos[playerid][1] = 0.00;
	AdminPos[playerid][2] = 0.00;
	UsedFind[playerid] = 0;
	CP[playerid] = 0;
	CarOffer[playerid] = 999;
	CarPrice[playerid] = 0;
	CarID[playerid] = 0;
	CarCalls[playerid] = 0;
	MoneyMessage[playerid] = 0;
	Condom[playerid] = 0;
	Rope[playerid] = 0;
	STDPlayer[playerid] = 0;
	SexOffer[playerid] = 999;
	SexPrice[playerid] = 0;
	RepairOffer[playerid] = 999;
	RepairPrice[playerid] = 0;
	RepairCar[playerid] = 0;
	Commands[playerid] = 0;
	Text[playerid] = 0;
	votedrecently[playerid] = 0;
	Showing[playerid] = 0;
	TalkingLive[playerid] = 255;
	LiveOffer[playerid] = 999;
	TakingLesson[playerid] = 0;
	RefillOffer[playerid] = 999;
	RefillPrice[playerid] = 0;
	DrugOffer[playerid] = 999;
	PlayerCuffed[playerid] = 0;
	DrugPrice[playerid] = 0;
	CanUseUpgrade[playerid] = 0;
	CanChangeName[playerid] = 0;
	RegistrationStep[playerid] = 0;
	OnCK[playerid] = 999;
	GettingCK[playerid] = 999;
	DrugGram[playerid] = 0;
	ConnectedToPC[playerid] = 0;
	OrderReady[playerid] = 0;
	JailPrice[playerid] = 0;
	MedicTime[playerid] = 0;
	NeedMedicTime[playerid] = 0;
	MedicBill[playerid] = 0;
	GotHit[playerid] = 0;
	WantedPoints[playerid] = 0;
	GoChase[playerid] = 999;
	GetChased[playerid] = 999;
	PlacedNews[playerid] = 0;
	PlayerInfo[playerid][pDuty] = 0;
	WantedLevel[playerid] = 0;
	TestFishes[playerid] = 0;
	Fails[playerid] = 0;
	BoxWaitTime[playerid] = 0;
	SchoolSpawn[playerid] = 0;
	ChangePos2[playerid][1] = 0;
	SafeTime[playerid] = 60;
	TransportDuty[playerid] = 0;
	PlayerTied[playerid] = 0;
	BusCallTime[playerid] = 0;
	TaxiCallTime[playerid] = 0;
	MedicCallTime[playerid] = 0;
	MechanicCallTime[playerid] = 0;
	BusrouteEast[playerid][0] = 0;
	BusrouteWest[playerid][0] = 0;
	BusShowLocation[playerid][0] = 0;
	BusShowLocationC[playerid] = 0;
	FindTimePoints[playerid] = 0;
	FindTime[playerid] = 0;
	JobDuty[playerid] = 0;
	Mobile[playerid] = 255;
	Music[playerid] = 0;
	BoxOffer[playerid] = 999;
	PlayerBoxing[playerid] = 0;
	Spectate[playerid] = 255;
	PlayerDrunk[playerid] = 0;
	PlayerDrunkTime[playerid] = 0;
	Attached[playerid] = 0;
	Unspec[playerid][sLocal] = 255;
	FishCount[playerid] = 0;
	WritingPaper[playerid] = 0;
	WritingPaperNumber[playerid] = 999;
	WritingLine[playerid] = 0;
	BringingPaper[playerid] = 0;
	GotPaper[playerid] = 0;
	PaperOffer[playerid] = 999;
	ScriptMoney[playerid] = 0;
	ScriptMoneyUpdated[playerid] = 0;
	for (new c=0; c<13; c++) ScriptWeapons[playerid][c] = 0;
	ScriptWeaponsUpdated[playerid] = 0;
    gLastCar[playerid] = 0;
	FirstSpawn[playerid] = 1;
	gOoc[playerid] = 0;
	gNews[playerid] = 0;
	BigEar[playerid] = 0;
	gDice[playerid] = 0;
	gFam[playerid] = 0;
 	gGas[playerid] = 1;
	gPlayerLogged[playerid] = 0;
	gPlayerLogTries[playerid] = 0;
	gPlayerSpawned[playerid] = 0;
	PlayerTazeTime[playerid] = 0;
	PlayerStoned[playerid] = 0;
	StartTime[playerid] = 0;
	TicketOffer[playerid] = 999;
	TicketMoney[playerid] = 0;
	MatsHolding[playerid] = 0;
	TutTime[playerid] = 0;
	TaxiAccepted[playerid] = 999;
	BusAccepted[playerid] = 999;
	NoFuel[playerid] = 0;
	HireCar[playerid] = 299;
	GangCar[playerid] = 512;
	PlayersChannel[playerid] = 999;
	TransportValue[playerid] = 0;
	TransportMoney[playerid] = 0;
	TransportTime[playerid] = 0;
	TransportCost[playerid] = 0;
	TransportDriver[playerid] = 999;
	Locator[playerid] = 0;
	WatchingTV[playerid] = 0;
	Fishes[playerid][pLastFish] = 0;
	Fishes[playerid][pFishID] = 0;
	ProposeOffer[playerid] = 999;
	MarryWitness[playerid] = 999;
	MarryWitnessOffer[playerid] = 999;
	MarriageCeremoney[playerid] = 0;
	ProposedTo[playerid] = 999;
	GotProposedBy[playerid] = 999;
	DivorceOffer[playerid] = 999;
	PizzaCallTime[playerid] = 0;
	bPizza[playerid] = 0;
	sPizza[playerid] = 0;
	gEngine[playerid] = 0;
	FarmerVar[playerid] = 0;
	FarmerPickup[playerid][0] = 0;
	SmugglerWork[playerid] = 0;
	SmuggledDrugs[playerid] = 0;
	JustDied[playerid] = 0;
	KnockedDown[playerid] = 0;
	UnidentifedCall[playerid] = 0;
	LicenseOffer[playerid] = 999;
	LicensePrice[playerid] = 0;
	LicenseType[playerid] = 0;
	UsingDrugs[playerid] = 0;
	AfterTutorial[playerid] = 0;
	OwnableCarOffer[playerid] = 999;
	OwnableCarID[playerid] = 0;
	OwnableCarPrice[playerid] = 0;
	BlindFold[playerid] = 0;
	PlayerIsSweeping[playerid] = 0;
	JustReported[playerid] = 0;
	PlayerNeedsHelp[playerid] = 0;
	AdminSpec[playerid] = 0;
	IsSmoking[playerid] = 0;
	UsingSmokeAnim[playerid] = 0;
	ReduceTime[playerid] = 0;
	CreatingGun[playerid] = 0;
	CreatingGunAmmo[playerid] = 0;
	CreatingGunPrice[playerid] = 0;
	IsPuttingMaterials[playerid] = 0;
	IsTakingGun[playerid] = 0;
	InAFoodPlace[playerid] = 0;
	UcAdmin[playerid] = 0;
	Gps[playerid] = 0;
	PlayerInfo[playerid][pLevel] = 0;
	PlayerInfo[playerid][pSpawn] = 0;
	PlayerInfo[playerid][pAdmin] = 0;
	PlayerInfo[playerid][pRegularRank] = 0;
	PlayerInfo[playerid][gPupgrade] = 0;
	PlayerInfo[playerid][pConnectSeconds] = 0;
	PlayerInfo[playerid][pReg] = 0;
	PlayerInfo[playerid][pSex] = 0;
	PlayerInfo[playerid][pAge] = 0;
	PlayerInfo[playerid][pDuty] = 0;
	PlayerInfo[playerid][pOrigin] = 0;
	PlayerInfo[playerid][pExp] = 0;
	PlayerInfo[playerid][pDuty] = 0;
	PlayerInfo[playerid][pGPS] = 0;
	PlayerInfo[playerid][pBlind] = 0;
	PlayerInfo[playerid][pFrozen] = 0;
	PlayerInfo[playerid][pAccount] = 0;
	PlayerInfo[playerid][pCrimes] = 0;
	strmid(PlayerInfo[playerid][pCrimeReason], "None", 0, strlen("None"), 255);
	strmid(Typed[playerid], "None", 0, strlen("None"), 255);
	PlayerInfo[playerid][pWanted] = 0;
	PlayerInfo[playerid][pWantedLevel] = 0;
	PlayerInfo[playerid][pDeaths] = 0;
	strmid(PlayerInfo[playerid][pWhyLeft], "Unknown", 0, strlen("Unknown"), 255);
	PlayerInfo[playerid][pArrested] = 0;
	PlayerInfo[playerid][pWantedDeaths] = 0;
	PlayerInfo[playerid][pPhoneBook] = 0;
	PlayerInfo[playerid][pLottoNr] = 0;
	PlayerInfo[playerid][pFishes] = 0;
	PlayerInfo[playerid][pBiggestFish] = 0;
	PlayerInfo[playerid][pJob] = 0;
	PlayerInfo[playerid][pPayCheck] = 0;
	PlayerInfo[playerid][pHeadValue] = 0;
	PlayerInfo[playerid][pJailed] = 0;
	PlayerInfo[playerid][pJailTime] = 0;
	PlayerInfo[playerid][pRobTime] = 0;
	PlayerInfo[playerid][pMats] = 0;
	PlayerInfo[playerid][pDrugs] = 0;
	PlayerInfo[playerid][pLeader] = 0;
	PlayerInfo[playerid][pMember] = 0;
	PlayerInfo[playerid][pFMember] = 255;
	PlayerInfo[playerid][pRank] = 0;
	PlayerInfo[playerid][pChar] = 0;
	PlayerInfo[playerid][pContractTime] = 0;
	PlayerInfo[playerid][pDetSkill] = 0;
	PlayerInfo[playerid][pSexSkill] = 0;
	PlayerInfo[playerid][pBoxSkill] = 0;
	PlayerInfo[playerid][pLawSkill] = 0;
	PlayerInfo[playerid][pMechSkill] = 0;
	PlayerInfo[playerid][pJackSkill] = 0;
	PlayerInfo[playerid][pCarSkill] = 0;
	PlayerInfo[playerid][pNewsSkill] = 0;
	PlayerInfo[playerid][pDrugsSkill] = 0;
	PlayerInfo[playerid][pCookSkill] = 0;
	PlayerInfo[playerid][pFishSkill] = 0;
	PlayerInfo[playerid][pSHealth] = 0.0;
	PlayerInfo[playerid][pInt] = 0;
	PlayerInfo[playerid][pInteriorNr] = 0;
	PlayerInfo[playerid][pLocal] = 255;
	PlayerInfo[playerid][pTeam] = 3;
	PlayerInfo[playerid][pModel] = 7;
	new randphone = 100000 + random(899999);//minimum 1000  max 9999 //giving one at the start
	PlayerInfo[playerid][pPnumber] = randphone;
	PlayerInfo[playerid][pPhousekey] = 9999;
	PlayerInfo[playerid][pGangKey] = 255;
	PlayerInfo[playerid][pPbiskey] = 9999;
	PlayerInfo[playerid][pPassport] = 1;
	PlayerInfo[playerid][pCarLic] = 0;
	PlayerInfo[playerid][pFlyLic] = 0;
	PlayerInfo[playerid][pBoatLic] = 0;
	PlayerInfo[playerid][pFishLic] = 0;
	PlayerInfo[playerid][pGunLic] = 0;
	PlayerInfo[playerid][pCopLic] = 0;
	PlayerInfo[playerid][pCarTime] = 0;
	PlayerInfo[playerid][pPayDay] = 0;
	PlayerInfo[playerid][pPayDayHad] = 0;
	PlayerInfo[playerid][pWatch] = 0;
	PlayerInfo[playerid][pCrashed] = 0;
	PlayerInfo[playerid][pWins] = 0;
	PlayerInfo[playerid][pLoses] = 0;
	PlayerInfo[playerid][pAlcoholPerk] = 0;
	PlayerInfo[playerid][pDrugPerk] = 0;
	PlayerInfo[playerid][pMiserPerk] = 0;
	PlayerInfo[playerid][pPainPerk] = 0;
	PlayerInfo[playerid][pTraderPerk] = 0;
 	PlayerInfo[playerid][pTut] = 0;
 	PlayerInfo[playerid][pTutDone] = 0;
	PlayerInfo[playerid][pDTK] = 0;
	PlayerInfo[playerid][pDSTK] = 0;
	PlayerInfo[playerid][pWarned] = 0;
	PlayerInfo[playerid][pSwat] = 0;
	PlayerInfo[playerid][pDM] = 0;
	PlayerInfo[playerid][pHydraR] = 0;
	PlayerInfo[playerid][pHunterR] = 0;
	PlayerInfo[playerid][pRhinoR] = 0;
	PlayerInfo[playerid][pPredR] = 0;
	PlayerInfo[playerid][pViewPms] = 0;
	PlayerInfo[playerid][pAppearList] = 0;
	PlayerInfo[playerid][pDBanned] = 0;
	PlayerInfo[playerid][pTactical] = 0;
	PlayerInfo[playerid][pSpecialF] = 0;
	PlayerInfo[playerid][pWarns] = 0;
	PlayerInfo[playerid][pFuel] = 0;
	PlayerInfo[playerid][pVirWorld] = 0;
	PlayerInfo[playerid][pRequestingBackup] = 0;
	PlayerInfo[playerid][pRoadblock] = 0;
	PlayerInfo[playerid][pFishTool] = 0;
	strmid(PlayerInfo[playerid][pNote1], "None", 0, strlen("None"), 255);
	PlayerInfo[playerid][pNote1s] = 0;
	strmid(PlayerInfo[playerid][pNote2], "None", 0, strlen("None"), 255);
	PlayerInfo[playerid][pNote2s] = 0;
	strmid(PlayerInfo[playerid][pNote3], "None", 0, strlen("None"), 255);
	PlayerInfo[playerid][pNote3s] = 0;
	strmid(PlayerInfo[playerid][pNote4], "None", 0, strlen("None"), 255);
	PlayerInfo[playerid][pNote4s] = 0;
	strmid(PlayerInfo[playerid][pNote5], "None", 0, strlen("None"), 255);
	PlayerInfo[playerid][pNote5s] = 0;
	PlayerInfo[playerid][pInvWeapon] = 0;
	PlayerInfo[playerid][pInvAmmo] = 0;
	PlayerInfo[playerid][pInvWeapon2] = 0;
	PlayerInfo[playerid][pInvAmmo2] = 0;
	PlayerInfo[playerid][pInvWeapon3] = 0;
	PlayerInfo[playerid][pInvAmmo3] = 0;
	PlayerInfo[playerid][pInvWeapon4] = 0;
	PlayerInfo[playerid][pInvAmmo4] = 0;
	PlayerInfo[playerid][pInvWeapon5] = 0;
	PlayerInfo[playerid][pInvAmmo5] = 0;
	PlayerInfo[playerid][pInvWeapon6] = 0;
	PlayerInfo[playerid][pInvAmmo6] = 0;
	PlayerInfo[playerid][pLighter] = 0;
	PlayerInfo[playerid][pCigarettes] = 0;
	PlayerInfo[playerid][pMask] = 0;
	PlayerInfo[playerid][pMaskuse] = 0;
	PlayerInfo[playerid][pAdminDuty] = 0;
	PlayerInfo[playerid][pTesterDuty] = 0;
	PlayerInfo[playerid][pHelper] = 0;
	PlayerInfo[playerid][pTester] = 0;
	PlayerInfo[playerid][pSpeedo] = 0;
	PlayerInfo[playerid][pHideNumber] = 0;
	PlayerInfo[playerid][pSpeaker] = 0;
	PlayerInfo[playerid][pWarned] = 0;
	PlayerInfo[playerid][pSwat] = 0;
	PlayerInfo[playerid][pTactical] = 0;
	PlayerInfo[playerid][pSpecialF] = 0;
	PlayerInfo[playerid][pDBanned] = 0;
	PlayerInfo[playerid][pDesertSkill] = 0;
	PlayerInfo[playerid][pSilenSkill] = 0;
	PlayerInfo[playerid][pPistSkill] = 0;
	PlayerInfo[playerid][pShotgSkill] = 0;
	PlayerInfo[playerid][pSawnSkill] = 0;
	PlayerInfo[playerid][pUziSkill] = 0;
	PlayerInfo[playerid][pSmgSkill] = 0;
	PlayerInfo[playerid][pAkSkill] = 0;
	PlayerInfo[playerid][pM4Skill] = 0;
	PlayerInfo[playerid][pCombSkill] = 0;
	PlayerInfo[playerid][pWeapon] = 0;
	PlayerInfo[playerid][pAmmo] = 0;
	PlayerInfo[playerid][pWeapon2] = 0;
	PlayerInfo[playerid][pAmmo2] = 0;
	PlayerInfo[playerid][pWeapon3] = 0;
	PlayerInfo[playerid][pAmmo3] = 0;
	PlayerInfo[playerid][pWeapon4] = 0;
	PlayerInfo[playerid][pAmmo4] = 0;
	PlayerInfo[playerid][pWeapon5] = 0;
	PlayerInfo[playerid][pAmmo5] = 0;
	PlayerInfo[playerid][pWeapon6] = 0;
	PlayerInfo[playerid][pAmmo6] = 0;
	PlayerInfo[playerid][pWeapon7] = 0;
	PlayerInfo[playerid][pAmmo7] = 0;
	PlayerInfo[playerid][pWeapon8] = 0;
	PlayerInfo[playerid][pAmmo8] = 0;
	PlayerInfo[playerid][pWeapon9] = 0;
	PlayerInfo[playerid][pAmmo9] = 0;
	PlayerInfo[playerid][pWeapon10] = 0;
	PlayerInfo[playerid][pAmmo10] = 0;
	PlayerInfo[playerid][pWeapon11] = 0;
	PlayerInfo[playerid][pAmmo11] = 0;
	PlayerInfo[playerid][pWeapon12] = 0;
	PlayerInfo[playerid][pAmmo12] = 0;
	PlayerInfo[playerid][pAtc] = 0;
	PlayerInfo[playerid][pAtcRadio] = 0;
	PlayerInfo[playerid][pPending] = 0;
	PlayerInfo[playerid][pChatMode] = 0;
	PlayerInfo[playerid][pTruckLoad] = 0;
	strmid(PlayerInfo[playerid][pPunishment1], "None", 0, strlen("None"), 255);
	strmid(PlayerInfo[playerid][pPunishment2], "None", 0, strlen("None"), 255);
	strmid(PlayerInfo[playerid][pPunishment3], "None", 0, strlen("None"), 255);
	strmid(PlayerInfo[playerid][pPunishment4], "None", 0, strlen("None"), 255);
	strmid(PlayerInfo[playerid][pPunishment5], "None", 0, strlen("None"), 255);
	strmid(PlayerInfo[playerid][pPunishment6], "None", 0, strlen("None"), 255);
	strmid(PlayerInfo[playerid][pPunishment7], "None", 0, strlen("None"), 255);
	strmid(PlayerInfo[playerid][pPunishment8], "None", 0, strlen("None"), 255);
	strmid(PlayerInfo[playerid][pIP], "None", 0, strlen("None"), 255);
	strmid(PlayerInfo[playerid][pLastSeen], "Never", 0, strlen("None"), 255);
	strmid(PlayerInfo[playerid][pRegistredDate], "Never", 0, strlen("None"), 255);
	PlayerInfo[playerid][pNextPunishment] = 1;
	PlayerInfo[playerid][pPunished] = 0;
	PlayerInfo[playerid][pTazerBullets] = 0;
	PlayerInfo[playerid][pChanged] = 0;
	PlayerInfo[playerid][pRegularCount] = 144000;
	PlayerInfo[playerid][pPassportTime] = 500;
	PlayerInfo[playerid][pOfficerTime] = 0;
	PlayerInfo[playerid][pShiftName] = 0;
	PlayerSuspiciousInterior[playerid] = 0;
	PlayerBunnyJumping[playerid] = 0;
	PlayerMoneyHacking[playerid] = 0;
	PlayerInteriorHacking[playerid] = 0;
	PlayerSpeedHacking[playerid] = 0;
	PlayerOnCashInbalance[playerid] = 0;
	PlayerFailedToLogin[playerid] = 0;
 	PlayerSuspicious[playerid] = 0;
	PlayerSuspiciousSpeed[playerid] = 0;
	Checked[playerid] = 1;
	PlayerGotSpottedRecently[playerid] = 1;
    SetTimerEx("ResetAcWarn", 30000, 0, "i", playerid);
	RpcArmor[playerid] = 0;
	RpcMoney[playerid] = 0;
	JustWanked[playerid] = 0;
	RpcPara[playerid] = 0;
	PlayerDrankWine[playerid] = 0;
	PlayerDrankBeer[playerid] = 0;
	TimesWanked[playerid] = 0;
	IsWanking[playerid] = 0;
 	WankedRecently[playerid] = 0;
	PlayerSmokedCig[playerid] = 0;
	PlayerDrankSprunk[playerid] = 0;
	GettingBlowjob[playerid] = 0;
	GivingBlowjob[playerid] = 0;
	AcceptingBJ[playerid] = 0;
	OnSwatDuty[playerid] = 0;
	OnTacticalDuty[playerid] = 0;
	OnSpecialFDuty[playerid] = 0;
	OfferedBlowjob[playerid] = INVALID_PLAYER_ID;
	HelpMessages[playerid] = 1;
	ChangedName[playerid] = 0;
	ViewAdmin[playerid] = 1;
	ClearCrime(playerid);
	ClearFishes(playerid);
	ClearCooking(playerid);
	ClearGroceries(playerid);
	ClearMarriage(playerid);
	SetPlayerColor(playerid,0xBBBBBB00);
	HouseEntered[playerid] = 9999;
	BizzEntered[playerid] = 9999;
	Untouchable[playerid] = 0;

    Textdraw1[playerid] = TextDrawCreate(400.000000, 2.000000, " "); // jail time
	TextDrawAlignment(Textdraw1[playerid], 2);
	TextDrawBackgroundColor(Textdraw1[playerid], 255);
	TextDrawFont(Textdraw1[playerid], 1);
	TextDrawLetterSize(Textdraw1[playerid], 0.300000, 1.000000);
	TextDrawColor(Textdraw1[playerid], -1);
	TextDrawSetOutline(Textdraw1[playerid], 1);
	TextDrawSetProportional(Textdraw1[playerid], 1);

	Textdraw39[playerid] = TextDrawCreate(498.000000, 123.000000, " "); // speedo
	TextDrawBackgroundColor(Textdraw39[playerid], 255);
	TextDrawFont(Textdraw39[playerid], 1);
	TextDrawLetterSize(Textdraw39[playerid], 0.389899, 1.299900);
	TextDrawColor(Textdraw39[playerid], 13107455);
	TextDrawSetOutline(Textdraw39[playerid], 1);
	TextDrawSetProportional(Textdraw39[playerid], 1);

	Textdraw40[playerid] = TextDrawCreate(498.000000, 140.000000, " "); // fuel
	TextDrawBackgroundColor(Textdraw40[playerid], 255);
	TextDrawFont(Textdraw40[playerid], 1);
	TextDrawLetterSize(Textdraw40[playerid], 0.389999, 1.299999);
	TextDrawColor(Textdraw40[playerid], 0xFFFFFFFF);
	TextDrawSetOutline(Textdraw40[playerid], 1);
	TextDrawSetProportional(Textdraw40[playerid], 1);

	Textdraw41[playerid] = TextDrawCreate(326.000000, 134.000000, " "); // speed gun points
	TextDrawAlignment(Textdraw41[playerid], 2);
	TextDrawBackgroundColor(Textdraw41[playerid], 255);
	TextDrawFont(Textdraw41[playerid], 1);
	TextDrawLetterSize(Textdraw41[playerid], 4.499998, 17.899999);
	TextDrawColor(Textdraw41[playerid], -1);
	TextDrawSetOutline(Textdraw41[playerid], 1);
	TextDrawSetProportional(Textdraw41[playerid], 1);
	TextDrawUseBox(Textdraw41[playerid], 1);
	TextDrawBoxColor(Textdraw41[playerid], 100);
	TextDrawTextSize(Textdraw41[playerid], 160.000000, 280.000000);

	Textdraw42[playerid] = TextDrawCreate(326.000000, 192.000000, " "); // Speed gun speed string
	TextDrawAlignment(Textdraw42[playerid], 2);
	TextDrawBackgroundColor(Textdraw42[playerid], 255);
	TextDrawFont(Textdraw42[playerid], 1);
	TextDrawLetterSize(Textdraw42[playerid], 0.379999, 1.700000);
	TextDrawColor(Textdraw42[playerid], -1);
	TextDrawSetOutline(Textdraw42[playerid], 1);
	TextDrawSetProportional(Textdraw42[playerid], 1);
	TextDrawUseBox(Textdraw42[playerid], 1);
	TextDrawBoxColor(Textdraw42[playerid], 255);
	TextDrawTextSize(Textdraw42[playerid], 10.000000, 280.000000);

	Textdraw49[playerid] = TextDrawCreate(86.000000, 428.000000, " "); // area
	TextDrawAlignment(Textdraw49[playerid], 2);
	TextDrawBackgroundColor(Textdraw49[playerid], 255);
	TextDrawFont(Textdraw49[playerid], 2);
	TextDrawLetterSize(Textdraw49[playerid],0.280000, 1.100000);
	TextDrawColor(Textdraw49[playerid], -1);
	TextDrawSetOutline(Textdraw49[playerid], 1);
	TextDrawSetProportional(Textdraw49[playerid], 1);

	Textdraw51[playerid] = TextDrawCreate(608.000000, 98.000000, " "); // bank money
	TextDrawAlignment(Textdraw51[playerid], 3);
	TextDrawBackgroundColor(Textdraw51[playerid], 255);
	TextDrawFont(Textdraw51[playerid], 3);
	TextDrawLetterSize(Textdraw51[playerid], 0.650000, 2.199999);
	TextDrawColor(Textdraw51[playerid], 43775);
	TextDrawSetOutline(Textdraw51[playerid], 1);
	TextDrawSetProportional(Textdraw51[playerid], 1);

	Textdraw52[playerid] = TextDrawCreate(494.000000, 81.000000, " "); // money changes
	TextDrawAlignment(Textdraw52[playerid], 3);
	TextDrawBackgroundColor(Textdraw52[playerid], 255);
	TextDrawFont(Textdraw52[playerid], 1);
	TextDrawLetterSize(Textdraw52[playerid], 0.279999, 1.600000);
	TextDrawColor(Textdraw52[playerid], 0xFFFFFFFF);
	TextDrawSetOutline(Textdraw52[playerid], 1);
	TextDrawSetProportional(Textdraw52[playerid], 1);

	Textdraw53[playerid] = TextDrawCreate(320.000000, 341.000000, " "); // GPS
	TextDrawAlignment(Textdraw53[playerid], 2);
	TextDrawBackgroundColor(Textdraw53[playerid], 255);
	TextDrawFont(Textdraw53[playerid], 2);
	TextDrawLetterSize(Textdraw53[playerid], 0.400000, 1.500000);
	TextDrawColor(Textdraw53[playerid], -1);
	TextDrawSetOutline(Textdraw53[playerid], 1);
	TextDrawSetProportional(Textdraw53[playerid], 1);

	Textdraw54[playerid] = TextDrawCreate(331.000000, 340.000000, " "); // Spectate
	TextDrawAlignment(Textdraw54[playerid], 2);
	TextDrawBackgroundColor(Textdraw54[playerid], 255);
	TextDrawFont(Textdraw54[playerid], 1);
	TextDrawLetterSize(Textdraw54[playerid], 0.500000, 1.000000);
	TextDrawColor(Textdraw54[playerid], -1);
	TextDrawSetOutline(Textdraw54[playerid], 0);
	TextDrawSetProportional(Textdraw54[playerid], 1);
	TextDrawSetShadow(Textdraw54[playerid], 0);

	Textdraw64[playerid] = TextDrawCreate(317.000000, 253.000000, " "); // Medals
	TextDrawAlignment(Textdraw64[playerid], 2);
	TextDrawBackgroundColor(Textdraw64[playerid], 255);
	TextDrawFont(Textdraw64[playerid], 1);
	TextDrawLetterSize(Textdraw64[playerid], 0.239999, 1.200000);
	TextDrawColor(Textdraw64[playerid], -1);
	TextDrawSetOutline(Textdraw64[playerid], 1);
	TextDrawSetProportional(Textdraw64[playerid], 1);

	format(bancheck, sizeof(bancheck),"STATES/Users/Bans/%s.ban",playersip);

	if(dini_Exists(bancheck))
	{
	    ClearChatbox(playerid, 10);

		if(!strcmp(dini_Get(bancheck,"BanName"),plname,true))
		{
		    SendClientMessage(playerid, COLOR_NICERED,"=======================================YOU ARE BANNED======================================");
			SendClientMessage(playerid, COLOR_LIGHTRED,"This nickname is banned from this Server, and never was unbanned.");
			SendClientMessage(playerid, COLOR_LIGHTRED,"If you wish to be unbanned please visit our website at *forum not ready yet*");
			SendClientMessage(playerid, COLOR_LIGHTRED,"Ban Evading will result in a Permanent Range Ban.");
			SendClientMessage(playerid, COLOR_NICERED,"=======================================BAN INFORMATION===================================");
			format(msg2,sizeof(msg2),"Ban issued by administrator: %s",dini_Get(bancheck,"BannedBy"));
			SendClientMessage(playerid, COLOR_WHITE,msg2);
			format(msg2,sizeof(msg2),"Ban issued on: %s",dini_Get(bancheck,"BanDate"));
			SendClientMessage(playerid, COLOR_WHITE,msg2);
			format(msg2,sizeof(msg2),"Ban Reason: %s",dini_Get(bancheck,"BanReason"));
			SendClientMessage(playerid, COLOR_WHITE,msg2);
			SendClientMessage(playerid, COLOR_NICERED,"========================================YOU ARE BANNED=======================================");

		    format(msg2,sizeof(msg2),"[ADMIN]: %s (%d), Has been kicked for Possible Ban Evading",plname,playerid);
		    SendAdminMessage(COLOR_LIGHTRED,msg2);

		    format(msg2,sizeof(msg2),"(%d/%d/%d) [%d:%d:%d] %s Has been kicked by the anticheat for Possible Ban Evading",d,m,y,h,mi,s,plname);
		    KickLog(msg2);

            OnPlayerUpdateEx(playerid);
		    SetTimerEx("KickPlayerOut",500,false,"i",playerid);
		    return 0;
		}
		else
		{
		    SendClientMessage(playerid, COLOR_NICERED,"=======================================YOU ARE BANNED======================================");
			SendClientMessage(playerid, COLOR_LIGHTRED,"This IP Number is banned from this Server, And never was unbanned.");
			SendClientMessage(playerid, COLOR_LIGHTRED,"If you wish to be unbanned please visit our website at <changeme>");
			SendClientMessage(playerid, COLOR_LIGHTRED,"Ban Evading will result in a Permanent Range Ban.");
			SendClientMessage(playerid, COLOR_NICERED,"=======================================BAN INFORMATION=====================================");
            format(msg2,sizeof(msg2),"Name of the account Banned on the ip %s: %s",playersip, dini_Get(bancheck,"BanName"));
			SendClientMessage(playerid, COLOR_WHITE,msg2);
			format(msg2,sizeof(msg2),"Ban issued by administrator: %s",dini_Get(bancheck,"BannedBy"));
			SendClientMessage(playerid, COLOR_WHITE,msg2);
			format(msg2,sizeof(msg2),"Ban issued on date: %s",dini_Get(bancheck,"BanDate"));
			SendClientMessage(playerid, COLOR_WHITE,msg2);
			format(msg2,sizeof(msg2),"Ban Reason: %s",dini_Get(bancheck,"BanReason"));
			SendClientMessage(playerid, COLOR_WHITE,msg2);
			SendClientMessage(playerid, COLOR_NICERED,"========================================YOU ARE BANNED=======================================");

		    format(msg2,sizeof(msg2),"[ADMIN]: %s (%d), Has been kicked for Possible Ban Evading",plname,playerid);
		    SendAdminMessage(COLOR_LIGHTRED,msg2);

		    format(msg2,sizeof(msg2),"(%d/%d/%d) [%d:%d:%d] %s Has been kicked by the anticheat for Possible Ban Evading",d,m,y,h,mi,s,plname);
		    KickLog(msg2);

		    format(msg2,sizeof(msg2),"STATES/Users/%s.ini",plname);
		    if(dini_Exists(msg2))
		    {
		        dini_IntSet(msg2,"Banned",1);
			}

		    OnPlayerUpdateEx(playerid);
		    SetTimerEx("KickPlayerOut",500,false,"i",playerid);
		    return 0;
		}
	}

	format(bancheck, sizeof(bancheck),"STATES/Users/%s.ini",plname);
	if(dini_Exists(bancheck))
	{
	    if(dini_Int(bancheck,"Banned") == 1)
	    {
	        ClearChatbox(playerid, 10);

	        SendClientMessage(playerid, COLOR_NICERED,"=======================================YOU ARE BANNED=======================================");
			SendClientMessage(playerid, COLOR_LIGHTRED,"This Name is banned from this Server, And never was unbanned.");
			SendClientMessage(playerid, COLOR_LIGHTRED,"If you wish to be unbanned please visit our website at <changeme>");
			SendClientMessage(playerid, COLOR_LIGHTRED,"Ban Evading will result in a Permanent Range Ban.");
			SendClientMessage(playerid, COLOR_NICERED,"============================================================================================");
		    format(msg2,sizeof(msg2),"[ADMIN]: %s (%d), Has been banned for Possible Ban Evading",plname,playerid);
		    SendAdminMessage(COLOR_LIGHTRED,msg2);
		    format(msg2,sizeof(msg2),"[ADMIN]: IP %s has been added to the ban list by Anticheat Peter Griffin",playersip);
		    SendAdminMessage(COLOR_WHITE,msg2);

		    format(msg2,sizeof(msg2),"(%d/%d/%d) [%d:%d:%d] %s Has been kicked by the anticheat for Possible Ban Evading",d,m,y,h,mi,s,plname);
		    KickLog(msg2);

		    SetTimerEx("ScriptBan",500,false,"iis",playerid,999,"Ban Evading");
		    return 0;
		}
	}

	format(pFILE[playerid], 128, "STATES/Users/Aliases/%s.txt", plname);
	dini_Create(pFILE[playerid]);
	dini_Set(pFILE[playerid], "Nameip", playersip);

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

	new pAKA[256];
	pAKA = dini_Get("STATES/Users/Aliases/alias.txt",playersip);
	new pIPs[256];
	pIPs = dini_Get("STATES/Users/Aliases/ips.txt",plname);

	if (strlen(pAKA) < 3)
	{
		format(string,sizeof(string),"[INFO]: %s (%d) has joined States Roleplay. (%s)", plname, playerid,playersip);
		if (strlen(pIPs) < 3) SendIP = 0;
		else if (!strcmp(pIPs,playersip,true)) SendIP = 0;
		else
		{
		    if(strlen(pIPs) >= 128)
		    {
		        format(string2,sizeof(string2),"* %s (%d)'s Other IPs: -Too Many, Be Careful-", plname, playerid);
			}
			else
			{
				format(string2,sizeof(string2),"* %s (%d)'s Other IPs: %s", plname, playerid, pIPs);
			}
			SendIP = 1;
		}
	}
	else if (!strcmp(pAKA,plname,true))
	{
		format(string,sizeof(string),"[INFO]: %s (%d) has joined States Roleplay. (%s)", plname, playerid,playersip);
		if (strlen(pIPs) < 3) SendIP = 0;
		else if (!strcmp(pIPs,playersip,true)) SendIP = 0;
		else
		{
		    if(strlen(pIPs) >= 128)
		    {
		        format(string2,sizeof(string2),"* %s (%d)'s Other IPs: -Too Many, Be Careful-", plname, playerid);
			}
			else
			{
				format(string2,sizeof(string2),"* %s (%d)'s Other IPs: %s", plname, playerid, pIPs);
			}
			SendIP = 1;
		}
	}
	else
	{
		format(string,sizeof(string),"[INFO]: %s (%d) has joined the Server (%s). (Alias: %s)", plname, playerid,playersip, pAKA);
		if (strlen(pIPs) < 3) SendIP = 0;
		else if (!strcmp(pIPs,playersip,true)) SendIP = 0;
		else
		{
		    if(strlen(pIPs) >= 128)
		    {
		        format(string2,sizeof(string2),"* %s (%d)'s Other IPs: -Too Many, Be Careful-", plname, playerid);
			}
			else
			{
				format(string2,sizeof(string2),"* %s (%d)'s Other IPs: %s", plname, playerid, pIPs);
			}
			SendIP = 1;
		}
	}

	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i) && playerid != i)
		{
			if(PlayerInfo[i][pAdmin] > 1)
			{
				SendClientMessage(i,COLOR_GREEN,string);
				if(SendIP == 1)
				{
					SendClientMessage(i,COLOR_GREEN,string2);
					SendIP = 0;
				}
			}
			else
			{
				format(string,sizeof(string),"* %s (%d) has joined States Roleplay", plname, playerid);
				SendClientMessage(i,COLOR_GREY,string);
			}
		}
	}

	format(string, sizeof(string), "STATES/Users/%s.ini", plname);
	if(fexist(string))
	{
		gPlayerAccount[playerid] = 1;
	}
	else
	{
		gPlayerAccount[playerid] = 0;
	}
	//fclose(hFile);


	return 1;
}
This is my OnPlayerDisconnect code :
Код:
public OnPlayerDisconnect(playerid, reason)
{
	new textreason[64];
	new plname[24];
	GetPlayerName(playerid, plname, sizeof(plname));
	new playersip[24];
	GetPlayerIp(playerid, playersip, sizeof(playersip));
	new string2[128];
	if(PlayerInfo[playerid][pAdminDuty] == 1)
	{
		SafeResetPlayerWeapons(playerid);
	}
	if(Searching[playerid] == 1)
	{
		RemovePlayerMapIcon(playerid, 500 + playerid);
		Searching[playerid] = 0;
	}
	if(Ronned[playerid] >= 1)
	{
	    KillTimer(RonnTimer[playerid]);
	}
	if(PlayerCuffed[playerid])
	{
	    KillTimer(cufftimer[playerid]);
	}

	if(playerid == beingvoted && reason != 2)
	{
	    KillTimer(votetimer1);
	    KillTimer(votetimer2);
	    format(string2,sizeof(string2),"[VOTATION]: %s (%d) has logged out, votation over!",plname,playerid);
	    SendClientMessageToAll(TEAM_GROVE_COLOR,string2);
        votetimer1 = SetTimer("ResetVotation",300000,false);
	}
	if(PlayerCuffed[playerid] > 0)
	{
	    KillTimer(cufftimer[playerid]);
	}

	if(Tazer[playerid] == 1) { SafeGivePlayerWeapon(playerid, 24, PreTazerAmmo[playerid]); }
	Delete3DTextLabel(DutyLabel[playerid]);
	gActivePlayers[playerid]--;
	numplayers--;
	RemovePlayerMapIcon(playerid, 37 + playerid);
	TextDrawDestroy(Textdraw64[playerid]);
	TextDrawDestroy(Textdraw54[playerid]);
	TextDrawDestroy(Textdraw53[playerid]);
	TextDrawDestroy(Textdraw52[playerid]);
	TextDrawDestroy(Textdraw51[playerid]);
	TextDrawDestroy(Textdraw49[playerid]);
	TextDrawDestroy(Textdraw42[playerid]);
	TextDrawDestroy(Textdraw41[playerid]);
	TextDrawDestroy(Textdraw40[playerid]);
	TextDrawDestroy(Textdraw39[playerid]);
	TextDrawDestroy(Textdraw1[playerid]);
	KillTimer(TrainTimer[playerid]);
	KillTimer(MoneyTimer[playerid]);
	if(IsPlayerInEVehicle[playerid] != 9999)
	{
	    new i = IsPlayerInEVehicle[playerid];
		Seats[i] --;
	}
	new string[24];
	new d,m,y,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][pLastSeen], string, 0, strlen(string), 255);
	if(reason == 0)
	{
		textreason = "Crashed";
		strmid(PlayerInfo[playerid][pWhyLeft], "Crashed", 0, strlen("Crashed"), 255);
		format(string2, sizeof(string2),"[INFO]: %s has left the server. [%s]",plname, textreason);
   		SendAdminMessage(COLOR_GREEN, string2);
	}
	else if(reason == 1)
	{
		textreason = "Leaving";
		strmid(PlayerInfo[playerid][pWhyLeft], "Leaving", 0, strlen("Leaving"), 255);
		format(string2, sizeof(string2),"[INFO]: %s has left the server. [%s]",plname, textreason);
   		SendAdminMessage(COLOR_GREEN, string2);
	}
	else if(reason == 2)
	{
		strmid(PlayerInfo[playerid][pWhyLeft], "Kicked/Banned", 0, strlen("Kicked/Banned"), 255);
	}
	SaveGuns(playerid);
	OnPlayerUpdateEx(playerid);
	if(ServerRestarted == 0)
	{
	    UpdatePlayerPosition(playerid)
	}
	KillTimer(ChangeNameTimer);
	OnPlayerUpdateEx(playerid);
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
	        if(TaxiAccepted[i] < 999)
	        {
		        if(TaxiAccepted[i] == playerid)
		        {
		            TaxiAccepted[i] = 999;
		            GameTextForPlayer(i, "~w~Taxi Caller~n~~r~Left the game", 5000, 1);
		            TaxiCallTime[i] = 0;
		            DisablePlayerCheckpoint(i);
		        }
	        }
	        else if(BusAccepted[i] < 999)
	        {
		        if(BusAccepted[i] == playerid)
		        {
		            BusAccepted[i] = 999;
		            GameTextForPlayer(i, "~w~Bus Caller~n~~r~Left the game", 5000, 1);
		            BusCallTime[i] = 0;
		            DisablePlayerCheckpoint(i);
		        }
	        }
	    }
	}
	if(PlayerInfo[playerid][pAdmin] >= 1)
	{
		admins --;
		if(AFK[playerid] == 1)
		{
		    afkadmins --;
		}
	}
	KillTimer(DildoTimerReset);
	/*if(GettingCK[playerid] < 999)
	{
	    if(IsPlayerConnected(GettingCK[playerid]))
	    {
	        SendClientMessage(GettingCK[playerid], COLOR_YELLOW, "Your Character Kill has left the server, try again later.");
	        OnCK[GettingCK[playerid]] = 999;
	    }
	}*/
	if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999)
	{
	    if(IsPlayerConnected(TransportDriver[playerid]))
		{
		    new string5[64];
		    TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
		    TransportTime[TransportDriver[playerid]] = 0;
		    TransportCost[TransportDriver[playerid]] = 0;
		    format(string5, sizeof(string5), "~w~Passenger left~n~~g~Earned $%d",TransportCost[playerid]);
		    GameTextForPlayer(TransportDriver[playerid], string5, 5000, 1);
		}
	}
	if(GotHit[playerid] > 0)
	{
	    if(GetChased[playerid] < 999)
	    {
	        if(IsPlayerConnected(GetChased[playerid]))
	        {
	        	SendClientMessage(GetChased[playerid], COLOR_YELLOW, "Your Hit has left the server.");
	            GoChase[GetChased[playerid]] = 999;
			}
	    }
	}
	if(PlayersChannel[playerid] < 999)
	{
		IRCInfo[PlayersChannel[playerid]][iPlayers] -= 1;
	}
	if(HireCar[playerid] != 299)
	{
		gLastDriver[HireCar[playerid]] = 300;
		gCarLock[HireCar[playerid]] = 0;
		UnLockCar(HireCar[playerid]);
		if(reason != 0)
		{
			SetVehicleToRespawn(HireCar[playerid]);
		}
	}
	if(GangCar[playerid] != 512)
	{
		gLastDriver[GangCar[playerid]] = 520;
		gCarLock[GangCar[playerid]] = 0;
		UnLockCar(GangCar[playerid]);
	}
	if (gLastCar[playerid] > 0)
	{
		gLastDriver[gLastCar[playerid]] = 300;
		if(PlayerInfo[playerid][pPhousekey] != gLastCar[playerid]-1)
		{
			gCarLock[gLastCar[playerid]] = 0;
			UnLockCar(gLastCar[playerid]);
		}
	}
	if(PlayerBoxing[playerid] > 0)
	{
	    if(Boxer1 == playerid)
	    {
	        if(IsPlayerConnected(Boxer2))
	        {
	        	PlayerBoxing[Boxer2] = 0;
	        	SafeSetPlayerPos(Boxer2, 765.8433,3.2924,1000.7186);
	        	SafeSetPlayerInterior(Boxer2, 5);
	        	GameTextForPlayer(Boxer2, "~r~Match interupted", 5000, 1);
			}
	    }
	    else if(Boxer2 == playerid)
	    {
	        if(IsPlayerConnected(Boxer1))
	        {
	        	PlayerBoxing[Boxer1] = 0;
	        	SafeSetPlayerPos(Boxer1, 765.8433,3.2924,1000.7186);
	        	SafeSetPlayerInterior(Boxer1, 5);
	        	GameTextForPlayer(Boxer1, "~r~Match interupted", 5000, 1);
			}
	    }
	    InRing = 0;
     	RoundStarted = 0;
		Boxer1 = 255;
		Boxer2 = 255;
		TBoxer = 255;
	}
    if(TransportDuty[playerid] == 1)
	{
		TaxiDrivers -= 1;
	}
    else if(TransportDuty[playerid] == 2)
	{
		BusDrivers -= 1;
	}
/*	if(PlayerInfo[playerid][pJob] == 11)
	{
	    if(JobDuty[playerid] == 1) { Medics -= 1; }
	}*/
	else if(PlayerInfo[playerid][pJob] == 7)
	{
	    if(JobDuty[playerid] == 1) { Mechanics -= 1; }
	}
	else if(PlayerInfo[playerid][pJob] == 17)
	{
		if(JobDuty[playerid] == 1) { PizzaBoys -= 1; }
	}
	if (PlayerInfo[playerid][pRoadblock] != 0)
	{
		RemoveRoadblock(playerid);
	}
	BusrouteEast[playerid][0] = 0;
	BusrouteWest[playerid][0] = 0;
}
Reply
#5

Please show us your saving code, then we can add the saving part for the interior/vworld
Reply
#6

Quote:
Originally Posted by Jari_Johnson*
Посмотреть сообщение
Please show us your saving code, then we can add the saving part for the interior/vworld
Код:
public OnPlayerUpdateEx(playerid)
{
    if(IsPlayerConnected(playerid))
	{
        if(gPlayerLogged[playerid] == 1)
	    {
			new string3[64];
			new playername3[MAX_PLAYER_NAME];
			GetPlayerName(playerid, playername3, sizeof(playername3));
			format(string3, sizeof(string3), "STATES/Users/%s.ini", playername3);

			dini_IntSet(string3, "Password",PlayerInfo[playerid][pKey]);
			dini_IntSet(string3, "Level",PlayerInfo[playerid][pLevel]);
			dini_IntSet(string3, "Spawn",PlayerInfo[playerid][pSpawn]);
			dini_IntSet(string3, "TesterLevel",PlayerInfo[playerid][pTester]);
			dini_IntSet(string3, "HelperLevel",PlayerInfo[playerid][pHelper]);
		    dini_IntSet(string3, "AdminLevel",PlayerInfo[playerid][pAdmin]);
		    dini_IntSet(string3, "RegularRank",PlayerInfo[playerid][pRegularRank]);
		    dini_IntSet(string3, "UpgradePoints",PlayerInfo[playerid][gPupgrade]);
		    dini_IntSet(string3, "ConnectedTime",PlayerInfo[playerid][pConnectSeconds]);
		    dini_IntSet(string3, "Registered",PlayerInfo[playerid][pReg]);
		    dini_IntSet(string3, "Sex",PlayerInfo[playerid][pSex]);
		    dini_IntSet(string3, "Age",PlayerInfo[playerid][pAge]);
		    dini_IntSet(string3, "GPS",PlayerInfo[playerid][pGPS]);
		    dini_IntSet(string3, "Origin",PlayerInfo[playerid][pOrigin]);
		    dini_IntSet(string3, "CK",PlayerInfo[playerid][pCK]);
		    dini_IntSet(string3, "Muted",PlayerInfo[playerid][pMuted]);
		    dini_IntSet(string3, "Frozen",PlayerInfo[playerid][pFrozen]);
		    dini_IntSet(string3, "Blind",PlayerInfo[playerid][pBlind]);
		    dini_IntSet(string3, "Respect",PlayerInfo[playerid][pExp]);
		    dini_IntSet(string3, "Money",PlayerInfo[playerid][pCash]);
		    PlayerInfo[playerid][pCash] = ScriptMoney[playerid];
		    dini_IntSet(string3, "Bank",PlayerInfo[playerid][pAccount]);
	        dini_IntSet(string3, "Crimes",PlayerInfo[playerid][pCrimes]);
		    dini_Set(string3, "CrimeReason",PlayerInfo[playerid][pCrimeReason]);
		    dini_IntSet(string3, "Wanted",PlayerInfo[playerid][pWanted]);
		    dini_IntSet(string3, "WantedLevel",PlayerInfo[playerid][pWantedLevel]);
		    dini_IntSet(string3, "Kills",PlayerInfo[playerid][pKills]);
		    dini_IntSet(string3, "Deaths",PlayerInfo[playerid][pDeaths]);
		    dini_IntSet(string3, "Arrested",PlayerInfo[playerid][pArrested]);
		    dini_IntSet(string3, "WantedDeaths",PlayerInfo[playerid][pWantedDeaths]);
		    dini_IntSet(string3, "Phonebook",PlayerInfo[playerid][pPhoneBook]);
		    dini_IntSet(string3, "LottoNr",PlayerInfo[playerid][pLottoNr]);
		    dini_IntSet(string3, "Fishes",PlayerInfo[playerid][pFishes]);
		    dini_IntSet(string3, "BiggestFish",PlayerInfo[playerid][pBiggestFish]);
		    dini_IntSet(string3, "Job",PlayerInfo[playerid][pJob]);
		    dini_IntSet(string3, "Paycheck",PlayerInfo[playerid][pPayCheck]);
		    dini_IntSet(string3, "HeadValue",PlayerInfo[playerid][pHeadValue]);
		    dini_IntSet(string3, "Jailed",PlayerInfo[playerid][pJailed]);
		    dini_IntSet(string3, "JailTime",PlayerInfo[playerid][pJailTime]);
		    dini_IntSet(string3, "CanRobTime",PlayerInfo[playerid][pRobTime]);
		    dini_IntSet(string3, "Materials",PlayerInfo[playerid][pMats]);
		    dini_IntSet(string3, "Drugs",PlayerInfo[playerid][pDrugs]);
	        dini_IntSet(string3, "Leader",PlayerInfo[playerid][pLeader]);
		    dini_IntSet(string3, "Member",PlayerInfo[playerid][pMember]);
		    dini_IntSet(string3, "FMember",PlayerInfo[playerid][pFMember]);
		    dini_IntSet(string3, "Rank",PlayerInfo[playerid][pRank]);
		    dini_IntSet(string3, "Char",PlayerInfo[playerid][pChar]);
		    dini_IntSet(string3, "ContractTime",PlayerInfo[playerid][pContractTime]);
		    dini_IntSet(string3, "DetSkill",PlayerInfo[playerid][pDetSkill]);
		    dini_IntSet(string3, "SexSkill",PlayerInfo[playerid][pSexSkill]);
		    dini_IntSet(string3, "BoxSkill",PlayerInfo[playerid][pBoxSkill]);
		    dini_IntSet(string3, "LawSkill",PlayerInfo[playerid][pLawSkill]);
		    dini_IntSet(string3, "MechSkill",PlayerInfo[playerid][pMechSkill]);
		    dini_IntSet(string3, "JackSkill",PlayerInfo[playerid][pJackSkill]);
		    dini_IntSet(string3, "CarSkill",PlayerInfo[playerid][pCarSkill]);
		    dini_IntSet(string3, "NewsSkill",PlayerInfo[playerid][pNewsSkill]);
		    dini_IntSet(string3, "DrugsSkill",PlayerInfo[playerid][pDrugsSkill]);
		    dini_IntSet(string3, "CookSkill",PlayerInfo[playerid][pCookSkill]);
		    dini_IntSet(string3, "FishSkill",PlayerInfo[playerid][pFishSkill]);
	    	dini_FloatSet(string3, "pHealth",PlayerInfo[playerid][pHealth]);
		    dini_FloatSet(string3, "pArmour",PlayerInfo[playerid][pArmour]);
		    dini_IntSet(string3, "Int",PlayerInfo[playerid][pInt]);
		    dini_IntSet(string3, "InteriorNr",PlayerInfo[playerid][pInteriorNr]);
		    dini_IntSet(string3, "Local",PlayerInfo[playerid][pLocal]);
		    dini_IntSet(string3, "Team",PlayerInfo[playerid][pTeam]);
		    dini_IntSet(string3, "Model",PlayerInfo[playerid][pModel]);
		    dini_IntSet(string3, "PhoneNr",PlayerInfo[playerid][pPnumber]);
		    dini_IntSet(string3, "House",PlayerInfo[playerid][pPhousekey]);
		    dini_IntSet(string3, "Bizz",PlayerInfo[playerid][pPbiskey]);
		    dini_FloatSet(string3, "Pos_x",PlayerInfo[playerid][pPos_x]);
		    dini_FloatSet(string3, "Pos_y",PlayerInfo[playerid][pPos_y]);
		    dini_FloatSet(string3, "Pos_z",PlayerInfo[playerid][pPos_z]);
		    dini_IntSet(string3, "Passport",PlayerInfo[playerid][pPassport]);
	        dini_IntSet(string3, "CarLic",PlayerInfo[playerid][pCarLic]);
		    dini_IntSet(string3, "FlyLic",PlayerInfo[playerid][pFlyLic]);
		    dini_IntSet(string3, "BoatLic",PlayerInfo[playerid][pBoatLic]);
		    dini_IntSet(string3, "FishLic",PlayerInfo[playerid][pFishLic]);
		    dini_IntSet(string3, "GunLic",PlayerInfo[playerid][pGunLic]);
		    dini_IntSet(string3, "CopLic",PlayerInfo[playerid][pCopLic]);
		    dini_IntSet(string3, "CarTime",PlayerInfo[playerid][pCarTime]);
		    dini_IntSet(string3, "PayDay",PlayerInfo[playerid][pPayDay]);
		    dini_IntSet(string3, "PayDayHad",PlayerInfo[playerid][pPayDayHad]);
		    dini_IntSet(string3, "Watch",PlayerInfo[playerid][pWatch]);
		    dini_IntSet(string3, "Crashed",PlayerInfo[playerid][pCrashed]);
		    dini_IntSet(string3, "Wins",PlayerInfo[playerid][pWins]);
	  		dini_IntSet(string3, "Loses",PlayerInfo[playerid][pLoses]);
		    dini_IntSet(string3, "AlcoholPerk",PlayerInfo[playerid][pAlcoholPerk]);
		    dini_IntSet(string3, "DrugPerk",PlayerInfo[playerid][pDrugPerk]);
		    dini_IntSet(string3, "MiserPerk",PlayerInfo[playerid][pMiserPerk]);
		    dini_IntSet(string3, "PainPerk",PlayerInfo[playerid][pPainPerk]);
		    dini_IntSet(string3, "TraderPerk",PlayerInfo[playerid][pTraderPerk]);
			dini_IntSet(string3, "Tutorial",PlayerInfo[playerid][pTut]);
			dini_IntSet(string3, "VirWorld",PlayerInfo[playerid][pVirWorld]);
			dini_IntSet(string3, "Fuel",PlayerInfo[playerid][pFuel]);
			dini_IntSet(string3, "Married",PlayerInfo[playerid][pMarried]);
			dini_Set(string3, "MarriedTo",PlayerInfo[playerid][pMarriedTo]);
			dini_IntSet(string3, "FishTool",PlayerInfo[playerid][pFishTool]);
			dini_Set(string3, "WhyLeft",PlayerInfo[playerid][pWhyLeft]);
			dini_Set(string3, "Note1",PlayerInfo[playerid][pNote1]);
	        dini_IntSet(string3, "Note1s",PlayerInfo[playerid][pNote1s]);
	        dini_Set(string3, "Note2",PlayerInfo[playerid][pNote2]);
	        dini_IntSet(string3, "Note2s",PlayerInfo[playerid][pNote2s]);
	        dini_Set(string3, "Note3",PlayerInfo[playerid][pNote3]);
	        dini_IntSet(string3, "Note3s",PlayerInfo[playerid][pNote3s]);
	        dini_Set(string3, "Note4",PlayerInfo[playerid][pNote4]);
	        dini_IntSet(string3, "Note4s",PlayerInfo[playerid][pNote4s]);
	        dini_Set(string3, "Note5",PlayerInfo[playerid][pNote5]);
	        dini_IntSet(string3, "Note5s",PlayerInfo[playerid][pNote5s]);
	        dini_IntSet(string3, "InvWeapon",PlayerInfo[playerid][pInvWeapon]);
		    dini_IntSet(string3, "InvAmmo",PlayerInfo[playerid][pInvAmmo]);
		    dini_IntSet(string3, "InvWeapon2",PlayerInfo[playerid][pInvWeapon2]);
		    dini_IntSet(string3, "InvAmmo2",PlayerInfo[playerid][pInvAmmo2]);
		    dini_IntSet(string3, "InvWeapon3",PlayerInfo[playerid][pInvWeapon3]);
		    dini_IntSet(string3, "InvAmmo3",PlayerInfo[playerid][pInvAmmo3]);
		    dini_IntSet(string3, "InvWeapon4",PlayerInfo[playerid][pInvWeapon4]);
		    dini_IntSet(string3, "InvAmmo4",PlayerInfo[playerid][pInvAmmo4]);
		    dini_IntSet(string3, "InvWeapon5",PlayerInfo[playerid][pInvWeapon5]);
		    dini_IntSet(string3, "InvAmmo5",PlayerInfo[playerid][pInvAmmo5]);
	        dini_IntSet(string3, "InvWeapon6",PlayerInfo[playerid][pInvWeapon6]);
		    dini_IntSet(string3, "InvAmmo6",PlayerInfo[playerid][pInvAmmo6]);
			dini_IntSet(string3, "Lighter",PlayerInfo[playerid][pLighter]);
		    dini_IntSet(string3, "Cigarettes",PlayerInfo[playerid][pCigarettes]);
		    dini_IntSet(string3, "DDManager",PlayerInfo[playerid][pDM]);
		    dini_IntSet(string3, "OnDuty",PlayerInfo[playerid][pDuty]);
		    dini_IntSet(string3, "Warnings",PlayerInfo[playerid][pWarned]);
		    dini_IntSet(string3, "Swat",PlayerInfo[playerid][pSwat]);
		    dini_IntSet(string3, "Fighting",PlayerInfo[playerid][pFS]);
		    dini_IntSet(string3, "Boxing",PlayerInfo[playerid][pBoxiSkill]);
		    dini_IntSet(string3, "KneeHead",PlayerInfo[playerid][pKneeSkill]);
	        dini_IntSet(string3, "KungFu",PlayerInfo[playerid][pKungSkill]);
		    dini_IntSet(string3, "GrabKick",PlayerInfo[playerid][pGrabSkill]);
		    dini_IntSet(string3, "Elbow",PlayerInfo[playerid][pElbowSkill]);
		    dini_IntSet(string3, "Tactical",PlayerInfo[playerid][pTactical]);
		    dini_IntSet(string3, "SpecialF",PlayerInfo[playerid][pSpecialF]);
		    dini_IntSet(string3, "DutyBanned",PlayerInfo[playerid][pDBanned]);
		    dini_IntSet(string3, "DDTicket",PlayerInfo[playerid][pDTK]);
		    dini_IntSet(string3, "DDSTicket",PlayerInfo[playerid][pDSTK]);
		    dini_IntSet(string3, "Speedo",PlayerInfo[playerid][pSpeedo]);
	        dini_IntSet(string3, "HydraDriver",PlayerInfo[playerid][pHydraR]);
		    dini_IntSet(string3, "HunterDriver",PlayerInfo[playerid][pHunterR]);
		    dini_IntSet(string3, "RhinoDriver",PlayerInfo[playerid][pRhinoR]);
		    dini_IntSet(string3, "PredatorDriver",PlayerInfo[playerid][pPredR]);
		    dini_IntSet(string3, "ViewPms",PlayerInfo[playerid][pViewPms]);
		    dini_IntSet(string3, "AppearList",PlayerInfo[playerid][pAppearList]);
		    dini_IntSet(string3, "AmmunationTime",PlayerInfo[playerid][pAmmuTrainTime]);
		    dini_IntSet(string3, "PistolSkill",PlayerInfo[playerid][pPistSkill]);
		    dini_IntSet(string3, "SilencedSkill",PlayerInfo[playerid][pSilenSkill]);
	        dini_IntSet(string3, "DesertSkill",PlayerInfo[playerid][pDesertSkill]);
		    dini_IntSet(string3, "ShotgunSkill",PlayerInfo[playerid][pShotgSkill]);
		    dini_IntSet(string3, "SawnoffSkill",PlayerInfo[playerid][pSawnSkill]);
		    dini_IntSet(string3, "CombatSkill",PlayerInfo[playerid][pCombSkill]);
		    dini_IntSet(string3, "UziSkill",PlayerInfo[playerid][pUziSkill]);
		    dini_IntSet(string3, "SMGSkill",PlayerInfo[playerid][pSmgSkill]);
		    dini_IntSet(string3, "AK47Skill",PlayerInfo[playerid][pAkSkill]);
		    dini_IntSet(string3, "M4Skill",PlayerInfo[playerid][pM4Skill]);
		    dini_IntSet(string3, "TutorialDone",PlayerInfo[playerid][pTutDone]);
		    dini_IntSet(string3, "RegularCount",PlayerInfo[playerid][pRegularCount]);
		    dini_IntSet(string3, "PassportTime",PlayerInfo[playerid][pPassportTime]);
		    dini_IntSet(string3, "OfficerTime",PlayerInfo[playerid][pOfficerTime]);
		    dini_IntSet(string3, "ShiftName",PlayerInfo[playerid][pShiftName]);
		    dini_IntSet(string3, "Weapon",PlayerInfo[playerid][pWeapon]);
		    dini_IntSet(string3, "Ammo",PlayerInfo[playerid][pAmmo]);
		    dini_IntSet(string3, "Weapon2",PlayerInfo[playerid][pWeapon2]);
		    dini_IntSet(string3, "Ammo2",PlayerInfo[playerid][pAmmo2]);
		    dini_IntSet(string3, "Weapon3",PlayerInfo[playerid][pWeapon3]);
		    dini_IntSet(string3, "Ammo3",PlayerInfo[playerid][pAmmo3]);
		    dini_IntSet(string3, "Weapon4",PlayerInfo[playerid][pWeapon4]);
		    dini_IntSet(string3, "Ammo4",PlayerInfo[playerid][pAmmo4]);
		    dini_IntSet(string3, "Weapon5",PlayerInfo[playerid][pWeapon5]);
		    dini_IntSet(string3, "Ammo5",PlayerInfo[playerid][pAmmo5]);
		    dini_IntSet(string3, "Weapon6",PlayerInfo[playerid][pWeapon6]);
		    dini_IntSet(string3, "Ammo6",PlayerInfo[playerid][pAmmo6]);
		    dini_IntSet(string3, "Weapon7",PlayerInfo[playerid][pWeapon7]);
		    dini_IntSet(string3, "Ammo7",PlayerInfo[playerid][pAmmo7]);
		    dini_IntSet(string3, "Weapon8",PlayerInfo[playerid][pWeapon8]);
		    dini_IntSet(string3, "Ammo8",PlayerInfo[playerid][pAmmo8]);
		    dini_IntSet(string3, "Weapon9",PlayerInfo[playerid][pWeapon9]);
		    dini_IntSet(string3, "Ammo9",PlayerInfo[playerid][pAmmo9]);
		    dini_IntSet(string3, "Weapon10",PlayerInfo[playerid][pWeapon10]);
		    dini_IntSet(string3, "Ammo10",PlayerInfo[playerid][pAmmo10]);
		    dini_IntSet(string3, "Weapon11",PlayerInfo[playerid][pWeapon11]);
		    dini_IntSet(string3, "Ammo11",PlayerInfo[playerid][pAmmo11]);
		    dini_IntSet(string3, "Weapon12",PlayerInfo[playerid][pWeapon12]);
		    dini_IntSet(string3, "Ammo12",PlayerInfo[playerid][pAmmo12]);
		    dini_IntSet(string3, "Atc",PlayerInfo[playerid][pAtc]);
		    dini_IntSet(string3, "AtcRadio",PlayerInfo[playerid][pAtcRadio]);
		    dini_IntSet(string3, "Pending",PlayerInfo[playerid][pPending]);
		    dini_Set(string3, "PendingInfo",PlayerInfo[playerid][pPendingInfo]);
		    dini_IntSet(string3, "ChatMode",PlayerInfo[playerid][pChatMode]);
		    dini_Set(string3, "Punishment1",PlayerInfo[playerid][pPunishment1]);
		    dini_Set(string3, "Punishment2",PlayerInfo[playerid][pPunishment2]);
		    dini_Set(string3, "Punishment3",PlayerInfo[playerid][pPunishment3]);
		    dini_Set(string3, "Punishment4",PlayerInfo[playerid][pPunishment4]);
		    dini_Set(string3, "Punishment5",PlayerInfo[playerid][pPunishment5]);
		    dini_Set(string3, "Punishment6",PlayerInfo[playerid][pPunishment6]);
		    dini_Set(string3, "Punishment7",PlayerInfo[playerid][pPunishment7]);
		    dini_Set(string3, "Punishment8",PlayerInfo[playerid][pPunishment8]);
		    dini_IntSet(string3, "NextPunishment",PlayerInfo[playerid][pNextPunishment]);
		    dini_IntSet(string3, "PunishedTimes",PlayerInfo[playerid][pPunished]);
		    dini_IntSet(string3, "TazerBullets",PlayerInfo[playerid][pTazerBullets]);
		    dini_Set(string3, "IP",PlayerInfo[playerid][pIP]);
		    dini_Set(string3, "LastLogged",PlayerInfo[playerid][pLastSeen]);
		    dini_IntSet(string3, "Changed",PlayerInfo[playerid][pChanged]);
		    dini_Set(string3, "RegistredDate",PlayerInfo[playerid][pRegistredDate]);
		    dini_IntSet(string3, "BizzEntered",BizzEntered[playerid]);
		    dini_IntSet(string3, "HouseEntered",HouseEntered[playerid]);
		    dini_IntSet(string3, "Banned",PlayerInfo[playerid][pBanned]);
		}
	}
	return 1;
}
Reply
#7

ok, add this below it:
pawn Код:
dini_IntSet(string3, "Interior",GetPlayerInterior(playerid));
    dini_IntSet(string3, "VirtualWorld",GetPlayerVirtualWorld(playerid));
can you show us the loading part now?
Reply
#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
#9

Would you mind telling me where "OnPlayerUpdateEx" is called? *Off-topic*
Reply
#10

add below HouseEntered[playerid] = dini_Int(string2,"HouseEntered");
pawn Код:
PlayerInfo[playerid][Interior] = dini_Int(string2,"Interior");
PlayerInfo[playerid][VirtualWorld] = dini_Int(string2,"VirtualWorld");
also, show me your enum playerinfo, we need to add something there
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)