Server not saving accounts.
#1

ok When i create account and logged in when i relog and login again it Show login
on top but when type the pass i get register Dialog again Help me Please


-----OnPlayerDisconnect Dialog --------

Код:
public OnPlayerDisconnect(playerid, reason)
{
	if(IsLoaded[playerid]) IsLoaded[playerid] = 0;
    if(!isnull(unbanip[playerid]))
	{
	    new string[26];
	    format(string, sizeof(string), "unbanip %s", unbanip[playerid]);
	    SendRconCommand(string);
	}
	// Why save on people who haven't logged in!
	if(gPlayerLogged{playerid} == 1)
	{
		g_mysql_RemoveDumpFile(GetPlayerSQLId(playerid));

		if (GetPVarInt(playerid, "_BikeParkourStage") > 0)
		{
			new slot = GetPVarInt(playerid, "_BikeParkourSlot");
			new biz = InBusiness(playerid);
			
			DestroyDynamicPickup(GetPVarInt(playerid, "_BikeParkourPickup"));
			
			Businesses[biz][bGymBikePlayers][slot] = INVALID_PLAYER_ID;
			
			if (GetPVarInt(playerid, "_BikeParkourStage") > 1)
			{
				DestroyVehicle(Businesses[biz][bGymBikeVehicles][slot]);
				Businesses[biz][bGymBikeVehicles][slot] = INVALID_VEHICLE_ID;
			}
		}
		if(GetPVarType(playerid, "Gas_TrailerID"))
		{
		    if(GetVehicleModel(GetPVarInt(playerid, "Gas_TrailerID")) == 584)
		    {
		        printf("Deleting Trailer. Veh ID %d Player %s", GetPVarInt(playerid, "Gas_TrailerID"), GetPlayerNameExt(playerid));
		        DestroyVehicle(GetPVarInt(playerid, "Gas_TrailerID"));
		    }
		}
		if (GetPVarType(playerid, "_BoxingFight"))
		{
			new fighterid = GetPVarInt(playerid, "_BoxingFight") - 1;
			DeletePVar(fighterid, "_BoxingFight");
			SendClientMessageEx(fighterid, COLOR_GREY, "The person you were fighting left the arena.");
			SetPVarInt(fighterid, "_BoxingFightOver", gettime() + 1);
			new biz = InBusiness(fighterid);
			
			if (Businesses[biz][bGymBoxingArena1][0] == fighterid || Businesses[biz][bGymBoxingArena1][1] == fighterid) // first arena
			{
				Businesses[biz][bGymBoxingArena1][0] = INVALID_PLAYER_ID;
				Businesses[biz][bGymBoxingArena1][1] = INVALID_PLAYER_ID;
			}
			else if (Businesses[biz][bGymBoxingArena2][0] == fighterid || Businesses[biz][bGymBoxingArena2][1] == fighterid) // second arena
			{
				Businesses[biz][bGymBoxingArena2][0] = INVALID_PLAYER_ID;
				Businesses[biz][bGymBoxingArena2][1] = INVALID_PLAYER_ID;
			}
			
			PlayerInfo[playerid][pPos_x] = 2913.2175;
			PlayerInfo[playerid][pPos_y] = -2288.1914;
			PlayerInfo[playerid][pPos_z] = 7.2543;
		}
		
		if(GetPVarType(playerid, "pBoomBox"))
		{
		    DestroyDynamicObject(GetPVarInt(playerid, "pBoomBox"));
		    DestroyDynamic3DTextLabel(Text3D:GetPVarInt(playerid, "pBoomBoxLabel"));
		    if(GetPVarType(playerid, "pBoomBoxArea"))
		    {
		        new string[128];
				format(string, sizeof(string), "The boombox owner (%s) has logged off", GetPlayerNameEx(playerid));
		        foreach(new i: Player)
		        {
		            if(IsPlayerInDynamicArea(i, GetPVarInt(playerid, "pBoomBoxArea")))
		            {
		                StopAudioStreamForPlayerEx(i);
		                SendClientMessage(i, COLOR_PURPLE, string);
					}
				}
			}
		}
---------OnPlayerConnect--------

Код:
public OnPlayerConnect(playerid) {
	if(IsPlayerNPC(playerid)) return 1;

	g_arrQueryHandle{playerid} = random(256);

	TotalConnect++;
	if(Iter_Count(Player) > MaxPlayersConnected) {
		MaxPlayersConnected = Iter_Count(Player);
		getdate(MPYear,MPMonth,MPDay);
	}

	SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1);
	SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1);

	SetPVarInt(playerid, "IsInArena", -1);
	SetPVarInt(playerid, "ArenaNumber", -1);
	SetPVarInt(playerid, "ArenaEnterPass", -1);
	SetPVarInt(playerid, "ArenaEnterTeam", -1);
	SetPVarInt(playerid, "EditingTurfs", -1);
	SetPVarInt(playerid, "EditingTurfsStage", -1);
	SetPVarInt(playerid, "EditingHillStage", -1);
	SetPVarInt(playerid, "EditingFamC", -1);
	SetPVarInt(playerid, "editingfamhq", INVALID_FAMILY_ID);
	SetPVarInt(playerid, "UsingSurfAttachedObject", -1);
	SetPVarInt(playerid, "UsingBriefAttachedObject", -1);
	SetPVarInt(playerid, "AOSlotPaintballFlag", -1);
	SetPVarInt(playerid, "MovingStretcher", -1);
	SetPVarInt(playerid, "DraggingPlayer", INVALID_PLAYER_ID);


   
	for(new i = 0; i < 3; i++) {
		StopaniFloats[playerid][i] = 0;
	}

	for(new i = 0; i < 3; i++) {
        ConfigEventCPs[playerid][i] = 0;
    }
    ConfigEventCPId[playerid] = 0;
    RCPIdCurrent[playerid] = 0;

	for(new i = 0; i < 6; i++) {
	    EventFloats[playerid][i] = 0.0;
	}
	EventLastInt[playerid] = 0; EventLastVW[playerid] = 0;

	for(new i = 0; i < 6; i++) {
		HHcheckFloats[playerid][i] = 0;
	}
	for(new i = 0; i < MAX_PLAYERVEHICLES; ++i) {
		PlayerVehicleInfo[playerid][i][pvModelId] = 0;
		PlayerVehicleInfo[playerid][i][pvId] = INVALID_PLAYER_VEHICLE_ID;
		PlayerVehicleInfo[playerid][i][pvSpawned] = 0;
		PlayerVehicleInfo[playerid][i][pvSlotId] = 0;
	}

	for(new i = 0; i < 5; i++) {
		LottoNumbers[playerid][i] = 0;
	}
	
	for(new i = 0; i < MAX_BUSINESSSALES; i++) {
        Selected[playerid][i] = 0;
	}
	for(new x=0; x < mS_SELECTION_ITEMS; x++) {
        gSelectionItems[playerid][x] = PlayerText:INVALID_TEXT_DRAW;
	}
	
	gHeaderTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
    gBackgroundTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
    gCurrentPageTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
    gNextButtonTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
    gPrevButtonTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
    gCancelButtonTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;

	SpoofKill[playerid] = 0;
	KillTime[playerid] = 0;
	gItemAt[playerid] = 0;
	TruckUsed[playerid] = INVALID_VEHICLE_ID;
	pDrunkLevelLast[playerid] = 0;
    pFPS[playerid] = 0;
	BackupClearTimer[playerid] = 0;
	Backup[playerid] = 0;
    CarRadars[playerid] = 0;
    CurrentArmor[playerid] = 0.0;
	PlayerInfo[playerid][pReg] = 0;
	HHcheckVW[playerid] = 0;
	HHcheckInt[playerid] = 0;
	OrderAssignedTo[playerid] = INVALID_PLAYER_ID;
	TruckUsed[playerid] = INVALID_VEHICLE_ID;
	HouseOffer[playerid] = INVALID_PLAYER_ID;
	House[playerid] = 0;
	HousePrice[playerid] = 0;
	playerTabbed[playerid] = 0;
	playerAFK[playerid] = 0;
	gBug{playerid} = 1;
	TazerTimeout[playerid] = 0;
	gRadio{playerid} = 1;
	playerLastTyped[playerid] = 0;
	pTazer{playerid} = 0;
	pTazerReplace{playerid} = 0;
	pCurrentWeapon{playerid} = 0;
	MedicAccepted[playerid] = INVALID_PLAYER_ID;
	DefendOffer[playerid] = INVALID_PLAYER_ID;
	AppealOffer[playerid] = INVALID_PLAYER_ID;
	AppealOfferAccepted[playerid] = 0;
	PlayerInfo[playerid][pWantedLevel] = 0;
	DefendPrice[playerid] = 0;
	Spectating[playerid] = 0;
	GettingSpectated[playerid] = INVALID_PLAYER_ID;
	PlayerInfo[playerid][pPhonePrivacy] = 0;
	NewbieTimer[playerid] = 0;
	g_iPlayerMask{playerid} = 0;
	HlKickTimer[playerid] = 0;
	HelperTimer[playerid] = 0;
	VehicleOffer[playerid] = INVALID_PLAYER_ID;
	VehiclePrice[playerid] = 0;
	VehicleId[playerid] = -1;
	NOPTrigger[playerid] = 0;
	JustReported[playerid] = -1;
	UsedCrack[playerid] = 0;
	UsedWeed[playerid] = 0;
	SexOffer[playerid] = INVALID_PLAYER_ID;
	DrinkOffer[playerid] =  INVALID_PLAYER_ID;
	PotOffer[playerid] = INVALID_PLAYER_ID;
	PotStorageID[playerid] = -1;
	CrackOffer[playerid] = INVALID_PLAYER_ID;
	CrackStorageID[playerid] = -1;
	GunOffer[playerid] = INVALID_PLAYER_ID;
	GunStorageID[playerid] = -1;
	CraftOffer[playerid] = INVALID_PLAYER_ID;
	RepairOffer[playerid] = INVALID_PLAYER_ID;
	GuardOffer[playerid] = INVALID_PLAYER_ID;
	LiveOffer[playerid] = INVALID_PLAYER_ID;
	RefillOffer[playerid] = INVALID_PLAYER_ID;
	MatsOffer[playerid] = INVALID_PLAYER_ID;
	MatsStorageID[playerid] = -1;
	MatsPrice[playerid] = 0;
	MatsAmount[playerid] = 0;
	BoxOffer[playerid] = INVALID_PLAYER_ID;
	MarryWitnessOffer[playerid] = INVALID_PLAYER_ID;
	ProposeOffer[playerid] = INVALID_PLAYER_ID;
	DivorceOffer[playerid] = INVALID_PLAYER_ID;
	HidePM[playerid] = 0;
	PhoneOnline[playerid] = 0;
	unbanip[playerid][0] = 0;
    advisorchat[playerid] = 1;
	ChosenSkin[playerid]=0;
	SelectFChar[playerid]=0;
	MatsHolding[playerid]=0;
	MatDeliver[playerid]=0;
	MatDeliver2[playerid]=0;
	szAdvert[playerid][0] = 0;
	SelectFCharPlace[playerid]=0;
	GettingJob[playerid]=0;
	GettingJob2[playerid]=0;
	GuardOffer[playerid]= INVALID_PLAYER_ID;
	GuardPrice[playerid]=0;
	ApprovedLawyer[playerid]=0;
	CallLawyer[playerid]=0;
	WantLawyer[playerid]=0;
	CurrentMoney[playerid]=0;
	UsedFind[playerid]=0;
	CP[playerid]=0;
	Condom[playerid]=0;
	SexOffer[playerid]= INVALID_PLAYER_ID;
	SexPrice[playerid]=0;
	PlayerInfo[playerid][pAdmin]=0;
	RepairOffer[playerid]= INVALID_PLAYER_ID;
	RepairPrice[playerid]=0;
	RepairCar[playerid]=0;
	TalkingLive[playerid]=INVALID_PLAYER_ID;
	LiveOffer[playerid]= INVALID_PLAYER_ID;
	RefillOffer[playerid]= INVALID_PLAYER_ID;
	RefillPrice[playerid]=0;
	InsidePlane[playerid]=INVALID_VEHICLE_ID;
	InsideMainMenu{playerid}=0;
	InsideTut{playerid}=0;
	PotOffer[playerid]= INVALID_PLAYER_ID;
	PotStorageID[playerid]=-1;
	CrackOffer[playerid]= INVALID_PLAYER_ID;
	CrackStorageID[playerid]=-1;
	PlayerCuffed[playerid]=0;
	PlayerCuffedTime[playerid]=0;
	PotPrice[playerid]=0;
	CrackPrice[playerid]=0;
	RegistrationStep[playerid]=0;
	PotGram[playerid]=0;
	CrackGram[playerid]=0;
	PlayerInfo[playerid][pBanned]=0;
	ConnectedToPC[playerid]=0;
	OrderReady[playerid]=0;
	GunId[playerid]=0;
	GunMats[playerid]=0;
	CraftId[playerid]=0;
	CraftMats[playerid]=0;
	HitOffer[playerid]= INVALID_PLAYER_ID;
	HitToGet[playerid]= INVALID_PLAYER_ID;
	InviteOffer[playerid]= INVALID_PLAYER_ID;
	InviteFamily[playerid]=INVALID_FAMILY_ID;
	hInviteHouse[playerid]=INVALID_HOUSE_ID;
	hInviteOffer[playerid]= INVALID_PLAYER_ID;
	hInviteSlot[playerid]=0;
	JailPrice[playerid]=0;
	GotHit[playerid]=0;
	GoChase[playerid]= INVALID_PLAYER_ID;
	GetChased[playerid]= INVALID_PLAYER_ID;
	CalledCops[playerid]=0;
	CopsCallTime[playerid]=0;
	BoxWaitTime[playerid]=0;
	CalledMedics[playerid]=0;
	TransportDuty[playerid]=0;
	PlayerTied[playerid]=0;
	MedicsCallTime[playerid]=0;
	BusCallTime[playerid]=0;
	TaxiCallTime[playerid]=0;
	EMSCallTime[playerid]=0;
	MedicCallTime[playerid]=0;
	MechanicCallTime[playerid]=0;
	FindTimePoints[playerid]=0;
	FindingPlayer[playerid]=-1;
	FindTime[playerid]=0;
	JobDuty[playerid]=0;
	Mobile[playerid]=INVALID_PLAYER_ID;
	Music[playerid]=0;
	BoxOffer[playerid]= INVALID_PLAYER_ID;
	PlayerBoxing[playerid]=0;
	Spectate[playerid]= INVALID_PLAYER_ID;
	PlayerDrunk[playerid]=0;
	PlayerDrunkTime[playerid]=0;
	format(PlayerInfo[playerid][pPrisonReason],128,"None");
	FishCount[playerid]=0;
	HelpingNewbie[playerid]= INVALID_PLAYER_ID;
	turfWarsRadar[playerid]=0;
	courtjail[playerid]=0;
	gLastCar[playerid]=0;
	FirstSpawn[playerid]=0;
	JetPack[playerid]=0;
	PlayerInfo[playerid][pKills]=0;
	PlayerInfo[playerid][pPaintTeam]=0;
	TextSpamTimes[playerid] = 0;
	TextSpamUnmute[playerid] = 0;
 	CommandSpamTimes[playerid] = 0;
	CommandSpamUnmute[playerid] = 0;
	gOoc[playerid] = 0;
	arr_Towing[playerid] = INVALID_VEHICLE_ID;
	gNews[playerid] = 0;
	gNewbie[playerid] = 1;
	gHelp[playerid] = 1;
	gFam[playerid] = 0;
	gPlayerLogged{playerid} = 0;
	gPlayerLogTries[playerid] = 0;
	PlayerStoned[playerid] = 0;
	PlayerInfo[playerid][pPot] = 0;
	StartTime[playerid] = 0;
	TicketOffer[playerid] = INVALID_PLAYER_ID;
	TicketMoney[playerid] = 0;
	PlayerInfo[playerid][pVehicleKeysFrom] = INVALID_PLAYER_ID;
	ActiveChatbox[playerid] = 1;
	TutStep[playerid] = 0;
	PlayerInfo[playerid][pVehicleKeys] = INVALID_PLAYER_VEHICLE_ID;
	TaxiAccepted[playerid] = INVALID_PLAYER_ID;
	EMSAccepted[playerid] = INVALID_PLAYER_ID;
	BusAccepted[playerid] = INVALID_PLAYER_ID;
	PlayerInfo[playerid][pCrack] = 0;
	HireCar[playerid] = 299;
	TransportValue[playerid] = 0;
	TransportMoney[playerid] = 0;
	TransportTime[playerid] = 0;
	TransportCost[playerid] = 0;
	TransportDriver[playerid] = INVALID_PLAYER_ID;
	Locator[playerid] = 0;
	Spectating[playerid] = 0;
	ReleasingMenu[playerid] = INVALID_PLAYER_ID;
	Fishes[playerid][pLastFish] = 0;
	Fishes[playerid][pFishID] = 0;
	ProposeOffer[playerid] = INVALID_PLAYER_ID;
	MarryWitness[playerid] = INVALID_PLAYER_ID;
	MarryWitnessOffer[playerid] = INVALID_PLAYER_ID;
	MarriageCeremoney[playerid] = 0;
	ProposedTo[playerid] = INVALID_PLAYER_ID;
	GotProposedBy[playerid] = INVALID_PLAYER_ID;
	DivorceOffer[playerid] = INVALID_PLAYER_ID;
	gBike[playerid] = 0;
	gBikeRenting[playerid] = 0;
	Fixr[playerid] = 0;
	VehicleSpawned[playerid] = 0;
	ReportCount[playerid] = 0;
	ReportHourCount[playerid] = 0;
	Homes[playerid] = 0;
	******Checkvar[playerid] = 0;
	******CheckIsDone[playerid] = 0;
	IsPlayerFrozen[playerid] = 0;

	// These need to be reset to prevent some bugs (DO NOT REMOVE)
	PlayerInfo[playerid][pModel] = 0;
	PlayerInfo[playerid][pLeader] = INVALID_GROUP_ID;
	PlayerInfo[playerid][pMember] = INVALID_GROUP_ID;
	PlayerInfo[playerid][pDivision] = INVALID_DIVISION;
	PlayerInfo[playerid][pFMember] = INVALID_FAMILY_ID;
	PlayerInfo[playerid][pRank] = INVALID_RANK;
	PlayerInfo[playerid][pOrder] = 0;
	PlayerInfo[playerid][pOrderConfirmed] = 0;
	PlayerInfo[playerid][pBusiness] = INVALID_BUSINESS_ID;
	acstruct[playerid][LastOnFootPosition][0] = 0.0; acstruct[playerid][LastOnFootPosition][1] = 0.0; acstruct[playerid][LastOnFootPosition][2] = 0.0;
	acstruct[playerid][checkmaptp] = 0; acstruct[playerid][maptplastclick] = 0;
	acstruct[playerid][maptp][0] = 0.0; acstruct[playerid][maptp][1] = 0.0; acstruct[playerid][maptp][2] = 0.0;

	for(new x = 0; x < MAX_PLAYERS; x++)
	{
	    ShotPlayer[playerid][x] = 0;
	}

	for(new v = 0; v < MAX_PLAYERVEHICLES; v++) {
		PlayerVehicleInfo[playerid][v][pvAllowedPlayerId] = INVALID_PLAYER_ID;
	}

	for(new s = 0; s < 12; s++) {
		PlayerInfo[playerid][pAGuns][s] = 0;
		PlayerInfo[playerid][pGuns][s] = 0;
	}

	for(new s = 0; s < 40; s++) {
		ListItemReportId[playerid][s] = -1;
	}

	for(new s = 0; s < 20; s++) {
		ListItemRCPId[playerid][s] = -1;
	}

	CancelReport[playerid] = -1;
	GiveKeysTo[playerid] = INVALID_PLAYER_ID;
	RocketExplosions[playerid] = -1;
	ClearFishes(playerid);
	ClearMarriage(playerid);

	// Crash Fix - GhoulSlayeR
	if(!InvalidNameCheck(playerid)) {
		return 1;
	}

	CheckBanEx(playerid);

	// Main Menu Features
	InsideMainMenu{playerid} = 0;
	InsideTut{playerid} = 0;

	ShowMainMenuGUI(playerid);
	SetPlayerJoinCamera(playerid);
	ClearChatbox(playerid);
	SetPlayerVirtualWorld(playerid, 0);

	SetPlayerColor(playerid,TEAM_HIT_COLOR);
	SendClientMessage( playerid, COLOR_WHITE, "SERVER: First Gaming Roleplay." );

	SyncPlayerTime(playerid);

	ShowNoticeGUIFrame(playerid, 1);

	RemoveBuildings(playerid);
	return 1;
}
Reply
#2

Well becuase this is NGG script...I dont think you should have it or run a server with this script!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)