When someone joins
#1

Hello there, my server is hosted right now, and when someone joins the server, the server close and i have to start it again, i don't know why. The console doesn't show any error or something wrong, it just says that the player joined and then left because my server shut down. So am asking if there is something to fix this. This is happening only when he press the register button.

The register code

PHP код:
}
//----------------------[ OnPlayerRegister() ] -------------------------------
public OnPlayerRegister(playeridpassword[])
{
    if(
IsPlayerConnected(playerid))
    {
        new 
string3[32];
        new 
playername3[MAX_PLAYER_NAME];
        
GetPlayerName(playeridplayername3sizeof(playername3));
        
format(string3sizeof(string3), "users/%s.ini"playername3);
        new 
FilehFile fopen(string3io_write);
        if (
hFile)
        {
            
strmid(PlayerInfo[playerid][pKey], password0strlen(password), 255);
            new var[
156];
            
format(var, 32"Key=%s\n"PlayerInfo[playerid][pKey]);fwrite(hFile, var);
            
format(var, 32"Level=%d\n",PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
            
format(var, 32"AdminLevel=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
            
format(var, 32"Band=%d\n",PlayerInfo[playerid][pBanned]);fwrite(hFile, var);
            
format(var, 32"PermBand=%d\n",PlayerInfo[playerid][pPermaBanned]);fwrite(hFile, var);
            
format(var, 32"Warnings=%d\n",PlayerInfo[playerid][pWarns]);fwrite(hFile, var);
            
format(var, 32"Disabled=%d\n",PlayerInfo[playerid][pDisabled]);fwrite(hFile, var);
            
format(var, 32"DonateRank=%d\n",PlayerInfo[playerid][pDonateRank]);fwrite(hFile, var);
            
format(var, 32"BanAppealer=%d\n",PlayerInfo[playerid][pBanAppealer]);fwrite(hFile, var);
            
format(var, 32"ShopTech=%d\n",PlayerInfo[playerid][pShopTech]);fwrite(hFile, var);
            
format(var, 32"Undercover=%d\n",PlayerInfo[playerid][pUndercover]);fwrite(hFile, var);
            
format(var, 32"TogReports=%d\n",PlayerInfo[playerid][pTogReports]);fwrite(hFile, var);
            
format(var, 32"Radio=%d\n",PlayerInfo[playerid][pRadio]);fwrite(hFile, var);
            
format(var, 32"RadioFreq=%d\n",PlayerInfo[playerid][pRadioFreq]);fwrite(hFile, var);
            
format(var, 32"UpgradePoints=%d\n",PlayerInfo[playerid][gPupgrade]);fwrite(hFile, var);
            
format(var, 32"ConnectedTime=%d\n",PlayerInfo[playerid][pConnectTime]);fwrite(hFile, var);
            
format(var, 32"Registered=%d\n",PlayerInfo[playerid][pReg]);fwrite(hFile, var);
            
format(var, 32"Sex=%d\n",PlayerInfo[playerid][pSex]);fwrite(hFile, var);
            
format(var, 32"Age=%d\n",PlayerInfo[playerid][pAge]);fwrite(hFile, var);
            
format(var, 32"Origin=%d\n",PlayerInfo[playerid][pOrigin]);fwrite(hFile, var);
            
format(var, 32"Muted=%d\n",PlayerInfo[playerid][pMuted]);fwrite(hFile, var);
            
format(var, 32"Respect=%d\n",PlayerInfo[playerid][pExp]);fwrite(hFile, var);
            
format(var, 32"Money=%d\n",GetPVarInt(playerid"Cash"));fwrite(hFile, var);
            
format(var, 32"Bank=%d\n",PlayerInfo[playerid][pAccount]);fwrite(hFile, var);
            
format(var, 32"Crimes=%d\n",PlayerInfo[playerid][pCrimes]);fwrite(hFile, var);
            
format(var, 32"Accent=%d\n",PlayerInfo[playerid][pAccent]);fwrite(hFile, var);
            
format(var, 32"CHits=%d\n",PlayerInfo[playerid][pCHits]);fwrite(hFile, var);
            
format(var, 32"FHits=%d\n",PlayerInfo[playerid][pFHits]);fwrite(hFile, var);
            
format(var, 32"Arrested=%d\n",PlayerInfo[playerid][pArrested]);fwrite(hFile, var);
            
format(var, 32"Phonebook=%d\n",PlayerInfo[playerid][pPhoneBook]);fwrite(hFile, var);
            
format(var, 32"LottoNr=%d\n",PlayerInfo[playerid][pLottoNr]);fwrite(hFile, var);
            
format(var, 32"Fishes=%d\n",PlayerInfo[playerid][pFishes]);fwrite(hFile, var);
            
format(var, 32"BiggestFish=%d\n",PlayerInfo[playerid][pBiggestFish]);fwrite(hFile, var);
            
format(var, 32"Job=%d\n",PlayerInfo[playerid][pJob]);fwrite(hFile, var);
            
format(var, 32"Job2=%d\n",PlayerInfo[playerid][pJob2]);fwrite(hFile, var);
            
format(var, 32"Paycheck=%d\n",PlayerInfo[playerid][pPayCheck]);fwrite(hFile, var);
            
format(var, 32"HeadValue=%d\n",PlayerInfo[playerid][pHeadValue]);fwrite(hFile, var);
            
format(var, 32"Jailed=%d\n",PlayerInfo[playerid][pJailed]);fwrite(hFile, var);
            
format(var, 32"JailTime=%d\n",PlayerInfo[playerid][pJailTime]);fwrite(hFile, var);
            
format(var, 32"WRestricted=%d\n",PlayerInfo[playerid][pWRestricted]);fwrite(hFile, var);
            
format(var, 32"Materials=%d\n",PlayerInfo[playerid][pMats]);fwrite(hFile, var);
            
format(var, 32"Packages=%d\n",GetPVarInt(playerid"Packages"));fwrite(hFile, var);
            
format(var, 32"Crates=%d\n",PlayerInfo[playerid][pCrates]);fwrite(hFile, var);
            
format(var, 32"Pot=%d\n",PlayerInfo[playerid][pPot]);fwrite(hFile, var);
            
format(var, 32"Crack=%d\n",PlayerInfo[playerid][pCrack]);fwrite(hFile, var);
            
format(var, 32"Leader=%d\n",PlayerInfo[playerid][pLeader]);fwrite(hFile, var);
            
format(var, 32"Member=%d\n",PlayerInfo[playerid][pMember]);fwrite(hFile, var);
            
format(var, 32"Division=%d\n",PlayerInfo[playerid][pDivision]);fwrite(hFile, var);
            
format(var, 32"FMember=%d\n",PlayerInfo[playerid][pFMember]);fwrite(hFile, var);
            
format(var, 32"Rank=%d\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var);
            
format(var, 32"DetSkill=%d\n",PlayerInfo[playerid][pDetSkill]);fwrite(hFile, var);
            
format(var, 32"SexSkill=%d\n",PlayerInfo[playerid][pSexSkill]);fwrite(hFile, var);
            
format(var, 32"BoxSkill=%d\n",PlayerInfo[playerid][pBoxSkill]);fwrite(hFile, var);
            
format(var, 32"LawSkill=%d\n",PlayerInfo[playerid][pLawSkill]);fwrite(hFile, var);
            
format(var, 32"MechSkill=%d\n",PlayerInfo[playerid][pMechSkill]);fwrite(hFile, var);
            
format(var, 32"JackSkill=%d\n",PlayerInfo[playerid][pJackSkill]);fwrite(hFile, var);
            
format(var, 32"CarSkill=%d\n",PlayerInfo[playerid][pCarSkill]);fwrite(hFile, var);
            
format(var, 32"TruckSkill=%d\n",PlayerInfo[playerid][pTruckSkill]);fwrite(hFile, var);
            
format(var, 32"NewsSkill=%d\n",PlayerInfo[playerid][pNewsSkill]);fwrite(hFile, var);
            
format(var, 32"DrugsSkill=%d\n",PlayerInfo[playerid][pDrugsSkill]);fwrite(hFile, var);
            
format(var, 32"ArmsSkill=%d\n",PlayerInfo[playerid][pArmsSkill]);fwrite(hFile, var);
            
format(var, 32"SmugglerSkill=%d\n",PlayerInfo[playerid][pSmugSkill]);fwrite(hFile, var);
            
format(var, 32"FishSkill=%d\n",PlayerInfo[playerid][pFishSkill]);fwrite(hFile, var);
            
format(var, 32"FightingStyle=%d\n",PlayerInfo[playerid][pFightStyle]);fwrite(hFile, var);
            
GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
            
format(var, 32"pHealth=%.1f\n",PlayerInfo[playerid][pHealth]);fwrite(hFile, var);
            
GetPlayerArmour(playerid,PlayerInfo[playerid][pArmor]);
            
format(var, 32"pArmor=%.1f\n",PlayerInfo[playerid][pArmor]);fwrite(hFile, var);
            
format(var, 32"pSHealth=%.1f\n",PlayerInfo[playerid][pSHealth]);fwrite(hFile, var);
            
//format(var, 32, "pSArmor=%.1f\n",PlayerInfo[playerid][pSArmor]);fwrite(hFile, var);
            
format(var, 32"Int=%d\n",PlayerInfo[playerid][pInt]);fwrite(hFile, var);
            
format(var, 32"Local=%d\n",PlayerInfo[playerid][pLocal]);fwrite(hFile, var);
            
format(var, 32"VirtualWorld=%d\n",PlayerInfo[playerid][pVW]);fwrite(hFile, var);
            
format(var, 32"HouseInvite=%d\n",PlayerInfo[playerid][pHouseInvite]);fwrite(hFile, var);
            
format(var, 32"Model=%d\n",PlayerInfo[playerid][pModel]);fwrite(hFile, var);
            
format(var, 32"Clothes=%d\n",PlayerInfo[playerid][pClothes]);fwrite(hFile, var);
            
format(var, 32"PhoneNr=%d\n",PlayerInfo[playerid][pPnumber]);fwrite(hFile, var);
            
format(var, 32"Apartment=%d\n",PlayerInfo[playerid][pPhousekey]);fwrite(hFile, var);
            
format(var, 32"Apartment2=%d\n",PlayerInfo[playerid][pPhousekey2]);fwrite(hFile, var);
            
format(var, 32"Renting=%d\n",PlayerInfo[playerid][pRenting]);fwrite(hFile, var);
            
format(var, 32"Vehicles=%d\n",PlayerInfo[playerid][pVehicles]);fwrite(hFile, var);
            
format(var, 32"VehFile=%d\n",PlayerInfo[playerid][pVehFile]);fwrite(hFile, var);
            
format(var, 32"VehActive=%d\n",PlayerInfo[playerid][pVehActive]);fwrite(hFile, var);
            
format(var, 32"Type1=%d\n",PlayerInfo[playerid][pType1]);fwrite(hFile, var);
            
format(var, 32"Type2=%d\n",PlayerInfo[playerid][pType2]);fwrite(hFile, var);
            
format(var, 32"Type3=%d\n",PlayerInfo[playerid][pType3]);fwrite(hFile, var);
            
format(var, 32"Type4=%d\n",PlayerInfo[playerid][pType4]);fwrite(hFile, var);
            
format(var, 32"Type5=%d\n",PlayerInfo[playerid][pType5]);fwrite(hFile, var);
            
format(var, 32"CarLic=%d\n",PlayerInfo[playerid][pCarLic]);fwrite(hFile, var);
            
format(var, 32"FlyLic=%d\n",PlayerInfo[playerid][pFlyLic]);fwrite(hFile, var);
            
format(var, 32"BoatLic=%d\n",PlayerInfo[playerid][pBoatLic]);fwrite(hFile, var);
            
format(var, 32"FishLic=%d\n",PlayerInfo[playerid][pFishLic]);fwrite(hFile, var);
            
format(var, 32"CheckCash=%d\n",PlayerInfo[playerid][pCheckCash]);fwrite(hFile, var);
            
format(var, 32"Checks=%d\n",PlayerInfo[playerid][pChecks]);fwrite(hFile, var);
            
//format(var, 32, "MInsure=%d\n",PlayerInfo[playerid][pMInsure]);fwrite(hFile, var);
            
format(var, 32"GunLic=%d\n",PlayerInfo[playerid][pGunLic]);fwrite(hFile, var);
            for(new 
012s++)
            {
                
format(var, 32"Gun%d=%d\n"sPlayerInfo[playerid][pGuns][s]);fwrite(hFile, var);
            }
            
format(var, 32"CarTime=%d\n",PlayerInfo[playerid][pCarTime]);fwrite(hFile, var);
            
format(var, 32"DrugsTime=%d\n",PlayerInfo[playerid][pDrugsTime]);fwrite(hFile, var);
            
format(var, 32"LawyerTime=%d\n",PlayerInfo[playerid][pLawyerTime]);fwrite(hFile, var);
            
format(var, 32"LawyerFreeTime=%d\n",PlayerInfo[playerid][pLawyerFreeTime]);fwrite(hFile, var);
            
format(var, 32"MechTime=%d\n",PlayerInfo[playerid][pMechTime]);fwrite(hFile, var);
            
format(var, 32"SexTime=%d\n",PlayerInfo[playerid][pSexTime]);fwrite(hFile, var);
            
format(var, 32"PayDay=%d\n",PlayerInfo[playerid][pPayDay]);fwrite(hFile, var);
            
format(var, 32"PayDayHad=%d\n",PlayerInfo[playerid][pPayDayHad]);fwrite(hFile, var);
            
format(var, 32"CDPlayer=%d\n",PlayerInfo[playerid][pCDPlayer]);fwrite(hFile, var);
            
format(var, 32"Dice=%d\n",PlayerInfo[playerid][pDice]);fwrite(hFile, var);
            
format(var, 32"Spraycan=%d\n",PlayerInfo[playerid][pSpraycan]);fwrite(hFile, var);
            
format(var, 32"Rope=%d\n",PlayerInfo[playerid][pRope]);fwrite(hFile, var);
            
format(var, 32"Cigars=%d\n",PlayerInfo[playerid][pCigar]);fwrite(hFile, var);
            
format(var, 32"Sprunk=%d\n",PlayerInfo[playerid][pSprunk]);fwrite(hFile, var);
            
format(var, 32"Mask=%d\n",PlayerInfo[playerid][pMask]);fwrite(hFile, var);
            
format(var, 32"Bombs=%d\n",PlayerInfo[playerid][pBombs]);fwrite(hFile, var);
            
format(var, 32"Wins=%d\n",PlayerInfo[playerid][pWins]);fwrite(hFile, var);
            
format(var, 32"Loses=%d\n",PlayerInfo[playerid][pLoses]);fwrite(hFile, var);
            
format(var, 32"Tutorial=%d\n",PlayerInfo[playerid][pTut]);fwrite(hFile, var);
            
format(var, 32"On‌Duty=%d\n",PlayerInfo[playerid][pDuty]);fwrite(hFile, var);
            
format(var, 32"Hospital=%d\n",GetPVarInt(playerid"Hospital"));fwrite(hFile, var);
            
format(var, 32"Adjustable=%d\n",PlayerInfo[playerid][pAdjustable]);fwrite(hFile, var);
            
format(var, 32"Married=%d\n",PlayerInfo[playerid][pMarried]);fwrite(hFile, var);
            
format(var, 32"MarriedTo=%s\n",PlayerInfo[playerid][pMarriedTo]);fwrite(hFile, var);
            
format(var, 32"ContractBy=%s\n",PlayerInfo[playerid][pContractBy]);fwrite(hFile, var);
            
format(var, 64"ContractDetail=%s\n",PlayerInfo[playerid][pContractDetail]);fwrite(hFile, var);
            
format(var, 32"IP=%s\n",PlayerInfo[playerid][pIP]);fwrite(hFile, var);
            
format(var, 32"WantedLevel=%d\n",PlayerInfo[playerid][pWantedLevel]);fwrite(hFile, var);
            
format(var, 32"Insurance=%d\n",PlayerInfo[playerid][pInsurance]);fwrite(hFile, var);
            
//format(var, 32, "BadgeNumber=%d\n",PlayerInfo[playerid][pBadgeNumber]);fwrite(hFile, var);
            //format(var, 32, "Warrant=%d\n",PlayerInfo[playerid][pRoadblock]);fwrite(hFile, var);
            
format(var, 32"NewMuted=%d\n",PlayerInfo[playerid][pNMute]);fwrite(hFile, var);
            
format(var, 32"NewMutedTotal=%d\n",PlayerInfo[playerid][pNMuteTotal]);fwrite(hFile, var);
            
format(var, 32"AdMuted=%d\n",PlayerInfo[playerid][pADMute]);fwrite(hFile, var);
            
format(var, 32"AdMutedTotal=%d\n",PlayerInfo[playerid][pADMuteTotal]);fwrite(hFile, var);
            
format(var, 32"HelpMute=%d\n",PlayerInfo[playerid][pHelpMute]);fwrite(hFile, var);
            
//format(var, 32, "Helper=%d\n",PlayerInfo[playerid][pHelper]);fwrite(hFile, var);
            
format(var, 32"SPos_x=%.1f\n",PlayerInfo[playerid][pPos_x]);fwrite(hFile, var);
            
format(var, 32"SPos_y=%.1f\n",PlayerInfo[playerid][pPos_y]);fwrite(hFile, var);
            
format(var, 32"SPos_z=%.1f\n",PlayerInfo[playerid][pPos_z]);fwrite(hFile, var);
            
format(var, 32"SPos_r=%.1f\n",PlayerInfo[playerid][pPos_r]);fwrite(hFile, var);
            
format(var, 32"Helper=%d\n",PlayerInfo[playerid][pHelper]);fwrite(hFile, var);
            
format(var, 32"ReportMuted=%d\n",PlayerInfo[playerid][pRMuted]);fwrite(hFile, var);
            
format(var, 32"ReportMutedTotal=%d\n",PlayerInfo[playerid][pRMutedTotal]);fwrite(hFile, var);
            
format(var, 32"ReportMutedTime=%d\n",PlayerInfo[playerid][pRMutedTime]);fwrite(hFile, var);
            
format(var, 32"VIPMuted=%d\n",PlayerInfo[playerid][pVMuted]);fwrite(hFile, var);
            
format(var, 32"VIPMutedTime=%d\n",PlayerInfo[playerid][pVMutedTime]);fwrite(hFile, var);
            
format(var, 32"GiftTime=%d\n",PlayerInfo[playerid][pGiftTime]);fwrite(hFile, var);
            
format(var, 32"AdvisorDutyHours=%d\n",PlayerInfo[playerid][pDutyHours]);fwrite(hFile, var);
            
format(var, 32"AcceptedHelp=%d\n",PlayerInfo[playerid][pAcceptedHelp]);fwrite(hFile, var);
            
format(var, 32"AcceptReport=%d\n",PlayerInfo[playerid][pAcceptReport]);fwrite(hFile, var);
            
format(var, 32"TrashReport=%d\n",PlayerInfo[playerid][pTrashReport]);fwrite(hFile, var);
            
format(var, 32"FactionModerator=%d\n",PlayerInfo[playerid][pFactionModerator]);fwrite(hFile, var);
            
format(var, 32"GangModerator=%d\n",PlayerInfo[playerid][pGangModerator]);fwrite(hFile, var);
            
format(var, 32"GangWarn=%d\n",PlayerInfo[playerid][pGangWarn]);fwrite(hFile, var);
            
format(var, 32"FactionBanned=%d\n",PlayerInfo[playerid][pFactionBanned]);fwrite(hFile, var);
            
format(var, 32"CSFBanned=%d\n",PlayerInfo[playerid][pCSFBanned]);fwrite(hFile, var);
            for(new 
0MAX_PLAYERVEHICLESv++)
            {
                
format(var, 32"pv%dPosX=%.1f\n"vPlayerVehicleInfo[playerid][v][pvPosX]);fwrite(hFile, var);
                
format(var, 32"pv%dPosY=%.1f\n"vPlayerVehicleInfo[playerid][v][pvPosY]);fwrite(hFile, var);
                
format(var, 32"pv%dPosZ=%.1f\n"vPlayerVehicleInfo[playerid][v][pvPosZ]);fwrite(hFile, var);
                
format(var, 32"pv%dPosAngle=%.1f\n"vPlayerVehicleInfo[playerid][v][pvPosAngle]);fwrite(hFile, var);
                
format(var, 32"pv%dModelId=%d\n"vPlayerVehicleInfo[playerid][v][pvModelId]);fwrite(hFile, var);
                
format(var, 32"pv%dLock=%d\n"vPlayerVehicleInfo[playerid][v][pvLock]);fwrite(hFile, var);
                
format(var, 32"pv%dLocked=%d\n"vPlayerVehicleInfo[playerid][v][pvLocked]);fwrite(hFile, var);
                
format(var, 32"pv%dPaintJob=%d\n"vPlayerVehicleInfo[playerid][v][pvPaintJob]);fwrite(hFile, var);
                
format(var, 32"pv%dColor1=%d\n"vPlayerVehicleInfo[playerid][v][pvColor1]);fwrite(hFile, var);
                
format(var, 32"pv%dColor2=%d\n"vPlayerVehicleInfo[playerid][v][pvColor2]);fwrite(hFile, var);
                
format(var, 32"pv%dPrice=%d\n"vPlayerVehicleInfo[playerid][v][pvPrice]);fwrite(hFile, var);
                
format(var, 32"pv%dTicket=%d\n"vPlayerVehicleInfo[playerid][v][pvTicket]);fwrite(hFile, var);
                
format(var, 32"pv%dWeapon0=%d\n"vPlayerVehicleInfo[playerid][v][pvWeapons][0]);fwrite(hFile, var);
                
format(var, 32"pv%dWeapon1=%d\n"vPlayerVehicleInfo[playerid][v][pvWeapons][1]);fwrite(hFile, var);
                
format(var, 32"pv%dWeapon2=%d\n"vPlayerVehicleInfo[playerid][v][pvWeapons][2]);fwrite(hFile, var);
                
format(var, 32"pv%dWepUpgrade=%d\n"vPlayerVehicleInfo[playerid][v][pvWepUpgrade]);fwrite(hFile, var);
                
format(var, 32"pv%dFuel=%.2f\n"vPlayerVehicleInfo[playerid][v][pvFuel]);fwrite(hFile, var);
                
format(var, 32"pv%dImpound=%d\n"vPlayerVehicleInfo[playerid][v][pvImpounded]);fwrite(hFile, var);
                
//format(var, 32, "pv%dNumPlate=%s\n", v, PlayerVehicleInfo[playerid][v][pvNumberPlate]);fwrite(hFile, var);
                
for(new 0MAX_MODSm++)
                {
                    
format(var, 32"pv%dMod%d=%d\n"vmPlayerVehicleInfo[playerid][v][pvMods][m]);fwrite(hFile, var);
                }
                
//format(var, 32, "pv%dAllowedPlayer=%s\n", v, PlayerVehicleInfo[playerid][v][pvAllowPlayer]);fwrite(hFile, var);
            
}
               for(new 
0MAX_PLAYERTOYSv++)
            {
                
format(var, 32"pt%dModelID=%d\n"vPlayerToyInfo[playerid][v][ptModelID]);fwrite(hFile, var);
                
format(var, 32"pt%dBone=%d\n"vPlayerToyInfo[playerid][v][ptBone]);fwrite(hFile, var);
                   
format(var, 32"pt%dPosX=%.5f\n"vPlayerToyInfo[playerid][v][ptPosX]);fwrite(hFile, var);
                  
format(var, 32"pt%dPosY=%.5f\n"vPlayerToyInfo[playerid][v][ptPosY]);fwrite(hFile, var);
                  
format(var, 32"pt%dPosZ=%.5f\n"vPlayerToyInfo[playerid][v][ptPosZ]);fwrite(hFile, var);
                  
format(var, 32"pt%dRotX=%.5f\n"vPlayerToyInfo[playerid][v][ptRotX]);fwrite(hFile, var);
                  
format(var, 32"pt%dRotY=%.5f\n"vPlayerToyInfo[playerid][v][ptRotY]);fwrite(hFile, var);
                  
format(var, 32"pt%dRotZ=%.5f\n"vPlayerToyInfo[playerid][v][ptRotZ]);fwrite(hFile, var);
                  
format(var, 32"pt%dScaleX=%.5f\n"vPlayerToyInfo[playerid][v][ptScaleX]);fwrite(hFile, var);
                  
format(var, 32"pt%dScaleY=%.5f\n"vPlayerToyInfo[playerid][v][ptScaleY]);fwrite(hFile, var);
                  
format(var, 32"pt%dScaleZ=%.5f\n"vPlayerToyInfo[playerid][v][ptScaleZ]);fwrite(hFile, var);
               }
            
format(var, 32"VIPInviteDay=%d\n",PlayerInfo[playerid][pVIPInviteDay]);fwrite(hFile, var);
            
format(var, 32"TempVIP=%d\n",PlayerInfo[playerid][pTempVIP]);fwrite(hFile, var);
            
format(var, 32"BuddyInvite=%d\n",PlayerInfo[playerid][pBuddyInvited]);fwrite(hFile, var);
            
format(var, 32"Tokens=%d\n",PlayerInfo[playerid][pTokens]);fwrite(hFile, var);
            
format(var, 32"PTokens=%d\n",PlayerInfo[playerid][pPaintTokens]);fwrite(hFile, var);
            
format(var, 32"TriageTime=%d\n",PlayerInfo[playerid][pTriageTime]);fwrite(hFile, var);
            
format(var, 32"PrisonedBy=%s\n"PlayerInfo[playerid][pPrisonedBy]);fwrite(hFile, var);
            
format(var, 128"PrisonReason=%s\n"PlayerInfo[playerid][pPrisonReason]);fwrite(hFile, var);
            
format(var, 128"Flag=%s\n"PlayerInfo[playerid][pFlag]);fwrite(hFile, var);
            
format(var, 32"TaxiLicense=%d\n"PlayerInfo[playerid][pTaxiLicense]);fwrite(hFile, var);
            
format(var, 32"TicketTime=%d\n",PlayerInfo[playerid][pTicketTime]);fwrite(hFile, var);
            
format(var, 32"Screwdriver=%d\n",PlayerInfo[playerid][pScrewdriver]);fwrite(hFile, var);
            
format(var, 32"Smslog=%d\n",PlayerInfo[playerid][pSmslog]);fwrite(hFile, var);
            
format(var, 32"Wristwatch=%d\n",PlayerInfo[playerid][pWristwatch]);fwrite(hFile, var);
            
format(var, 32"Surveillance=%d\n",PlayerInfo[playerid][pSurveillance]);fwrite(hFile, var);
            
format(var, 32"Tire=%d\n",PlayerInfo[playerid][pTire]);fwrite(hFile, var);
            
format(var, 32"Firstaid=%d\n",PlayerInfo[playerid][pFirstaid]);fwrite(hFile, var);
            
format(var, 32"Rccam=%d\n",PlayerInfo[playerid][pRccam]);fwrite(hFile, var);
            
format(var, 32"Receiver=%d\n",PlayerInfo[playerid][pReceiver]);fwrite(hFile, var);
            
format(var, 32"GPS=%d\n",PlayerInfo[playerid][pGPS]);fwrite(hFile, var);
            
format(var, 32"Sweep=%d\n",PlayerInfo[playerid][pSweep]);fwrite(hFile, var);
            
format(var, 32"SweepLeft=%d\n",PlayerInfo[playerid][pSweepLeft]);fwrite(hFile, var);
            
format(var, 32"Bugged=%d\n",PlayerInfo[playerid][pBugged]);fwrite(hFile, var);
            
format(var, 256"Smslog0=%s\n",PlayerInfo[playerid][pSmslog0]);fwrite(hFile, var);
            
format(var, 256"Smslog1=%s\n",PlayerInfo[playerid][pSmslog1]);fwrite(hFile, var);
            
format(var, 256"Smslog2=%s\n",PlayerInfo[playerid][pSmslog2]);fwrite(hFile, var);
            
format(var, 256"Smslog3=%s\n",PlayerInfo[playerid][pSmslog3]);fwrite(hFile, var);
            
format(var, 256"Smslog4=%s\n",PlayerInfo[playerid][pSmslog4]);fwrite(hFile, var);
            
format(var, 256"Smslog5=%s\n",PlayerInfo[playerid][pSmslog5]);fwrite(hFile, var);
            
format(var, 256"Smslog6=%s\n",PlayerInfo[playerid][pSmslog6]);fwrite(hFile, var);
            
format(var, 256"Smslog7=%s\n",PlayerInfo[playerid][pSmslog7]);fwrite(hFile, var);
            
format(var, 256"Smslog8=%s\n",PlayerInfo[playerid][pSmslog8]);fwrite(hFile, var);
            
format(var, 256"Smslog9=%s\n",PlayerInfo[playerid][pSmslog9]);fwrite(hFile, var);
            
format(var, 256"KillLog0=%s\n",PlayerInfo[playerid][pKillLog0]);fwrite(hFile, var);
            
format(var, 256"KillLog1=%s\n",PlayerInfo[playerid][pKillLog1]);fwrite(hFile, var);
            
format(var, 256"KillLog2=%s\n",PlayerInfo[playerid][pKillLog2]);fwrite(hFile, var);
            
format(var, 256"KillLog3=%s\n",PlayerInfo[playerid][pKillLog3]);fwrite(hFile, var);
            
format(var, 256"KillLog4=%s\n",PlayerInfo[playerid][pKillLog4]);fwrite(hFile, var);
            
format(var, 256"KillLog5=%s\n",PlayerInfo[playerid][pKillLog5]);fwrite(hFile, var);
            
format(var, 256"KillLog6=%s\n",PlayerInfo[playerid][pKillLog6]);fwrite(hFile, var);
            
format(var, 256"KillLog7=%s\n",PlayerInfo[playerid][pKillLog7]);fwrite(hFile, var);
            
format(var, 256"KillLog8=%s\n",PlayerInfo[playerid][pKillLog8]);fwrite(hFile, var);
            
format(var, 256"KillLog9=%s\n",PlayerInfo[playerid][pKillLog9]);fwrite(hFile, var);
            
format(var, 256"Hospital=%d\n",PlayerInfo[playerid][pHospital]);fwrite(hFile, var);
            
format(var, 32"pWExists=%d\n",PlayerInfo[playerid][pWExists]);fwrite(hFile, var);
            
format(var, 32"pWX=%f\n",PlayerInfo[playerid][pWX]);fwrite(hFile, var);
            
format(var, 32"pWY=%f\n",PlayerInfo[playerid][pWY]);fwrite(hFile, var);
            
format(var, 32"pWZ=%f\n",PlayerInfo[playerid][pWZ]);fwrite(hFile, var);
            
format(var, 32"pWVW=%d\n",PlayerInfo[playerid][pWVW]);fwrite(hFile, var);
            
format(var, 32"pWInt=%d\n",PlayerInfo[playerid][pWInt]);fwrite(hFile, var);
            
format(var, 32"pWValue=%d\n",PlayerInfo[playerid][pWValue]);fwrite(hFile, var);
            
format(var, 32"pWSeeds=%d\n",PlayerInfo[playerid][pWSeeds]);fwrite(hFile, var);
            
format(var, 128"Warrants=%s\n",PlayerInfo[playerid][pWarrant]);fwrite(hFile, var);
            
format(var, 32"JudgeJailTime=%d\n",PlayerInfo[playerid][pJudgeJailTime]);fwrite(hFile, var);
            
format(var, 32"JudgeJailType=%d\n",PlayerInfo[playerid][pJudgeJailType]);fwrite(hFile, var);
            
format(var, 32"BeingSentenced=%d\n",PlayerInfo[playerid][pBeingSentenced]);fwrite(hFile, var);
            
format(var, 32"ProbationTime=%d\n",PlayerInfo[playerid][pProbationTime]);fwrite(hFile, var);
            
format(var, 32"DMIndicators=%d\n",PlayerInfo[playerid][pDMIndicators]);fwrite(hFile, var);
            
format(var, 32"DMKills=%d\n",PlayerInfo[playerid][pDMKills]);fwrite(hFile, var);
            
format(var, 63"DMReport0=%s\n",PlayerInfo[playerid][pDMReport0]);fwrite(hFile, var);
            
format(var, 63"DMReport1=%s\n",PlayerInfo[playerid][pDMReport1]);fwrite(hFile, var);
            
format(var, 63"DMReport2=%s\n",PlayerInfo[playerid][pDMReport2]);fwrite(hFile, var);
            
format(var, 63"DMReport3=%s\n",PlayerInfo[playerid][pDMReport3]);fwrite(hFile, var);
            
format(var, 63"DMReport4=%s\n",PlayerInfo[playerid][pDMReport4]);fwrite(hFile, var);
            
format(var, 63"DMReport5=%s\n",PlayerInfo[playerid][pDMReport5]);fwrite(hFile, var);
            
format(var, 63"DMReport6=%s\n",PlayerInfo[playerid][pDMReport6]);fwrite(hFile, var);
            
format(var, 63"DMReport7=%s\n",PlayerInfo[playerid][pDMReport7]);fwrite(hFile, var);
            
format(var, 63"DMReport8=%s\n",PlayerInfo[playerid][pDMReport8]);fwrite(hFile, var);
            
format(var, 63"DMReport9=%s\n",PlayerInfo[playerid][pDMReport9]);fwrite(hFile, var);
            
format(var, 63"Order=%d\n",PlayerInfo[playerid][pOrder]);fwrite(hFile, var);
            
format(var, 63"OBlocked=%d\n",PlayerInfo[playerid][pOBlocked]);fwrite(hFile, var);
            
format(var, 32"CallsAccepted=%d\n"PlayerInfo[playerid][pCallsAccepted]);fwrite(hFile, var);
            
format(var, 32"PatientsDelivered=%d\n",PlayerInfo[playerid][pPatientsDelivered]);fwrite(hFile, var);
            
format(var, 32"LiveBanned=%d\n",PlayerInfo[playerid][pLiveBanned]);fwrite(hFile, var);
            
format(var, 32"FreezeBank=%d\n",PlayerInfo[playerid][pFreezeBank]);fwrite(hFile, var);
            
format(var, 32"Firework=%d\n",PlayerInfo[playerid][pFirework]);fwrite(hFile, var);
            
format(var, 32"Hydration=%d\n",PlayerInfo[playerid][pHydration]);fwrite(hFile, var);
            
format(var, 32"DoubleEXP=%d\n",PlayerInfo[playerid][pDoubleEXP]);fwrite(hFile, var);
            
format(var, 32"EXPToken=%d\n",PlayerInfo[playerid][pEXPToken]);fwrite(hFile, var);
            
format(var, 32"RacePlayerLaps=%d\n",PlayerInfo[playerid][pRacePlayerLaps]);fwrite(hFile, var);
            
format(var, 32"HasRefund=%d\n",PlayerInfo[playerid][pHasRefund]);fwrite(hFile, var);
            
//if( strcmp( key, "PrisonedBy", true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pPrisonedBy], val, 0, strlen(val)-1, 255); }
            
fclose(hFile);
            
OnPlayerLogin(playeridpassword);
            
SetPlayerPos(playerid,1715.08, -1880.1313.57);
            
SendClientMessageEx(playeridCOLOR_YELLOW"Account registered, you have been logged in automatically.");
            
TotalRegister++;
        }
    }
    return 
1
Reply
#2

There might be a problem with onplayerconnect or onplayerclassrequest or maybe onplayerspawn callbacks, but anyway try using crashdetect plugin. Then wait for someone to join your server.

EDIT: Make sure there is no error or warning after you compile your fs or gm.

EDIT2: Try to use CRASHDETECT plugin.

EDIT3: Does it save the player account after he register? Any register log?
Reply
#3

Well, am getting these errors from crashdedect plugin

Quote:

[17:07:25] [debug] Server crashed while executing RGRPc.amx
[17:07:25] [debug] Backtrace (most recent call first):
[17:07:25] [debug] #0 00000004 in ?? () from RGRPc.amx
[17:07:25] [debug] #1 00057340 in OnPlayerSpawn () from RGRPc.amx

Reply
#4

Can you post your onplaterspawn code
Reply
#5

Quote:
Originally Posted by ShivRp
Посмотреть сообщение
Can you post your onplaterspawn code
PHP код:
}
public 
OnPlayerSpawn(playerid)
{
    if(!
gPlayerLogged{playerid})
    {
        
SendClientMessageEx(playeridCOLOR_WHITE"ERROR: You are not logged in!");
        
Kick(playerid);
        return 
1;
    }
    
Streamer_Update(playerid);
    if(
GetPVarInt(playerid"NGPassenger") == 1)
    {
        new 
Float:XFloat:YFloat:Z;
        
GetVehiclePos(GetPVarInt(playerid"NGPassengerVeh"), XYZ);
        
SetPlayerPos(playerid, (X-2.557), (Y-3.049), Z);
        
SetPlayerWeaponsEx(playerid);
        
GivePlayerValidWeapon(playerid4660000);
        
SetPlayerSkin(playeridGetPVarInt(playerid"NGPassengerSkin"));
        
SetPlayerHealth(playeridGetPVarFloat(playerid"NGPassengerHP"));
        
SetPlayerArmour(playeridGetPVarFloat(playerid"NGPassengerArmor"));
        
DeletePVar(playerid"NGPassenger");
        
DeletePVar(playerid"NGPassengerVeh");
        
DeletePVar(playerid"NGPassengerArmor");
        
DeletePVar(playerid"NGPassengerHP");
        
DeletePVar(playerid"NGPassengerSkin");
        return 
1;
    }
    if(
InsideShamal[playerid] != INVALID_VEHICLE_ID)
    {
        
SetPlayerPos(playeridGetPVarFloat(playerid"air_Xpos"), GetPVarFloat(playerid"air_Ypos"), GetPVarFloat(playerid"air_Zpos"));
        
SetPlayerFacingAngle(playeridGetPVarFloat(playerid"air_Rpos"));
        
SetPlayerHealth(playeridGetPVarFloat(playerid"air_HP"));
        
SetPlayerArmour(playeridGetPVarFloat(playerid"air_Arm"));
        
SetPlayerWeaponsEx(playerid);
        
SetPlayerToTeamColor(playerid);
        
SetPlayerSkin(playeridPlayerInfo[playerid][pModel]);
        
DeletePVar(playerid"air_Xpos");
        
DeletePVar(playerid"air_Ypos");
        
DeletePVar(playerid"air_Zpos");
        
DeletePVar(playerid"air_Rpos");
        
DeletePVar(playerid"air_HP");
        
DeletePVar(playerid"air_Arm");
        
SetCameraBehindPlayer(playerid);
        
SetPlayerVirtualWorld(playeridInsideShamal[playerid]);
        return 
SetPlayerInterior(playerid1);
    }
    
SyncPlayerTime(playerid);
    if(
IsPlayerNPC(playerid)) return 1;
    
SetPlayerWantedLevel(playeridPlayerInfo[playerid][pWantedLevel]);
    
STDPlayer[playerid] = 0;
    
gTeam[playerid] = PlayerInfo[playerid][pTeam];
    if(!
gPlayerLogged{playerid}) return Kick(playerid);
    
SetPlayerSpawn(playerid);
    
SetPlayerWeapons(playerid);
    
SetPlayerToTeamColor(playerid);
    
CheckPH(playerid);
    
SetPlayerSkillLevel(playeridWEAPONSKILL_PISTOL1);
    
SetPlayerSkillLevel(playeridWEAPONSKILL_MICRO_UZI1);
    return 
1;
}
stock RegisterVehicleNumberPlate(vehicleidsz_NumPlate[]) {
    new
    
Floata_CarPos[4], Floatfuel// X, Y, Z, Z Angle, Fuel
    
GetVehiclePos(vehicleida_CarPos[0], a_CarPos[1], a_CarPos[2]);
    
GetVehicleZAngle(vehicleida_CarPos[3]);
    
fuel VehicleFuel[vehicleid];
    
SetVehicleNumberPlate(vehicleidsz_NumPlate);
    
SetVehicleToRespawn(vehicleid);
    
SetVehiclePos(vehicleida_CarPos[0], a_CarPos[1], a_CarPos[2]);
    
SetVehicleZAngle(vehicleida_CarPos[3]);
    
VehicleFuel[vehicleid] = fuel;
    return 
1;
}
Log(sz_fileName[], sz_input[]) {
    new
    
sz_logEntry[156],
    
i_dateTime[2][3],
    
FilefileHandle fopen(sz_fileNameio_append);
    
gettime(i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2]);
    
getdate(i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2]);
    
format(sz_logEntrysizeof(sz_logEntry), "[%i/%i/%i - %i:%i:%i] %s\r\n"i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2], i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2], sz_input);
    
fwrite(fileHandlesz_logEntry);
    return 
fclose(fileHandle); 
Reply
#6

Post this in a correct section - http://forum.sa-mp.com/forumdisplay.php?f=12
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)