PDA

View Full Version : Server shut down


TheSnaKe
06/05/2014, 04:10 PM
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

}

//----------------------[ OnPlayerRegister() ] -------------------------------
public OnPlayerRegister(playerid, password[])
{
if(IsPlayerConnected(playerid))
{
new string3[32];
new playername3[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername3, sizeof(playername3));
format(string3, sizeof(string3), "users/%s.ini", playername3);
new File: hFile = fopen(string3, io_write);
if (hFile)
{
strmid(PlayerInfo[playerid][pKey], password, 0, strlen(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 s = 0; s < 12; s++)
{
format(var, 32, "Gun%d=%d\n", s, PlayerInfo[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, "OnDuty=%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 v = 0; v < MAX_PLAYERVEHICLES; v++)
{
format(var, 32, "pv%dPosX=%.1f\n", v, PlayerVehicleInfo[playerid][v][pvPosX]);fwrite(hFile, var);
format(var, 32, "pv%dPosY=%.1f\n", v, PlayerVehicleInfo[playerid][v][pvPosY]);fwrite(hFile, var);
format(var, 32, "pv%dPosZ=%.1f\n", v, PlayerVehicleInfo[playerid][v][pvPosZ]);fwrite(hFile, var);
format(var, 32, "pv%dPosAngle=%.1f\n", v, PlayerVehicleInfo[playerid][v][pvPosAngle]);fwrite(hFile, var);
format(var, 32, "pv%dModelId=%d\n", v, PlayerVehicleInfo[playerid][v][pvModelId]);fwrite(hFile, var);
format(var, 32, "pv%dLock=%d\n", v, PlayerVehicleInfo[playerid][v][pvLock]);fwrite(hFile, var);
format(var, 32, "pv%dLocked=%d\n", v, PlayerVehicleInfo[playerid][v][pvLocked]);fwrite(hFile, var);
format(var, 32, "pv%dPaintJob=%d\n", v, PlayerVehicleInfo[playerid][v][pvPaintJob]);fwrite(hFile, var);
format(var, 32, "pv%dColor1=%d\n", v, PlayerVehicleInfo[playerid][v][pvColor1]);fwrite(hFile, var);
format(var, 32, "pv%dColor2=%d\n", v, PlayerVehicleInfo[playerid][v][pvColor2]);fwrite(hFile, var);
format(var, 32, "pv%dPrice=%d\n", v, PlayerVehicleInfo[playerid][v][pvPrice]);fwrite(hFile, var);
format(var, 32, "pv%dTicket=%d\n", v, PlayerVehicleInfo[playerid][v][pvTicket]);fwrite(hFile, var);
format(var, 32, "pv%dWeapon0=%d\n", v, PlayerVehicleInfo[playerid][v][pvWeapons][0]);fwrite(hFile, var);
format(var, 32, "pv%dWeapon1=%d\n", v, PlayerVehicleInfo[playerid][v][pvWeapons][1]);fwrite(hFile, var);
format(var, 32, "pv%dWeapon2=%d\n", v, PlayerVehicleInfo[playerid][v][pvWeapons][2]);fwrite(hFile, var);
format(var, 32, "pv%dWepUpgrade=%d\n", v, PlayerVehicleInfo[playerid][v][pvWepUpgrade]);fwrite(hFile, var);
format(var, 32, "pv%dFuel=%.2f\n", v, PlayerVehicleInfo[playerid][v][pvFuel]);fwrite(hFile, var);
format(var, 32, "pv%dImpound=%d\n", v, PlayerVehicleInfo[playerid][v][pvImpounded]);fwrite(hFile, var);
//format(var, 32, "pv%dNumPlate=%s\n", v, PlayerVehicleInfo[playerid][v][pvNumberPlate]);fwrite(hFile, var);
for(new m = 0; m < MAX_MODS; m++)
{
format(var, 32, "pv%dMod%d=%d\n", v, m, PlayerVehicleInfo[playerid][v][pvMods][m]);fwrite(hFile, var);
}
//format(var, 32, "pv%dAllowedPlayer=%s\n", v, PlayerVehicleInfo[playerid][v][pvAllowPlayer]);fwrite(hFile, var);
}
for(new v = 0; v < MAX_PLAYERTOYS; v++)
{
format(var, 32, "pt%dModelID=%d\n", v, PlayerToyInfo[playerid][v][ptModelID]);fwrite(hFile, var);
format(var, 32, "pt%dBone=%d\n", v, PlayerToyInfo[playerid][v][ptBone]);fwrite(hFile, var);
format(var, 32, "pt%dPosX=%.5f\n", v, PlayerToyInfo[playerid][v][ptPosX]);fwrite(hFile, var);
format(var, 32, "pt%dPosY=%.5f\n", v, PlayerToyInfo[playerid][v][ptPosY]);fwrite(hFile, var);
format(var, 32, "pt%dPosZ=%.5f\n", v, PlayerToyInfo[playerid][v][ptPosZ]);fwrite(hFile, var);
format(var, 32, "pt%dRotX=%.5f\n", v, PlayerToyInfo[playerid][v][ptRotX]);fwrite(hFile, var);
format(var, 32, "pt%dRotY=%.5f\n", v, PlayerToyInfo[playerid][v][ptRotY]);fwrite(hFile, var);
format(var, 32, "pt%dRotZ=%.5f\n", v, PlayerToyInfo[playerid][v][ptRotZ]);fwrite(hFile, var);
format(var, 32, "pt%dScaleX=%.5f\n", v, PlayerToyInfo[playerid][v][ptScaleX]);fwrite(hFile, var);
format(var, 32, "pt%dScaleY=%.5f\n", v, PlayerToyInfo[playerid][v][ptScaleY]);fwrite(hFile, var);
format(var, 32, "pt%dScaleZ=%.5f\n", v, PlayerToyInfo[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(playerid, password);
SetPlayerPos(playerid,1715.08, -1880.13, 13.57);
SendClientMessageEx(playerid, COLOR_YELLOW, "Account registered, you have been logged in automatically.");
TotalRegister++;
}
}
return 1;

CrashDetect errors:

[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

OnPlayerSpawn code:

}

public OnPlayerSpawn(playerid)
{
if(!gPlayerLogged{playerid})
{
SendClientMessageEx(playerid, COLOR_WHITE, "ERROR: You are not logged in!");
Kick(playerid);
return 1;
}
Streamer_Update(playerid);
if(GetPVarInt(playerid, "NGPassenger") == 1)
{
new Float:X, Float:Y, Float:Z;
GetVehiclePos(GetPVarInt(playerid, "NGPassengerVeh"), X, Y, Z);
SetPlayerPos(playerid, (X-2.557), (Y-3.049), Z);
SetPlayerWeaponsEx(playerid);
GivePlayerValidWeapon(playerid, 46, 60000);
SetPlayerSkin(playerid, GetPVarInt(playerid, "NGPassengerSkin"));
SetPlayerHealth(playerid, GetPVarFloat(playerid, "NGPassengerHP"));
SetPlayerArmour(playerid, GetPVarFloat(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(playerid, GetPVarFloat(playerid, "air_Xpos"), GetPVarFloat(playerid, "air_Ypos"), GetPVarFloat(playerid, "air_Zpos"));
SetPlayerFacingAngle(playerid, GetPVarFloat(playerid, "air_Rpos"));
SetPlayerHealth(playerid, GetPVarFloat(playerid, "air_HP"));
SetPlayerArmour(playerid, GetPVarFloat(playerid, "air_Arm"));
SetPlayerWeaponsEx(playerid);
SetPlayerToTeamColor(playerid);
SetPlayerSkin(playerid, PlayerInfo[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(playerid, InsideShamal[playerid]);
return SetPlayerInterior(playerid, 1);
}
SyncPlayerTime(playerid);
if(IsPlayerNPC(playerid)) return 1;
SetPlayerWantedLevel(playerid, PlayerInfo[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(playerid, WEAPONSKILL_PISTOL, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1);
return 1;
}

stock RegisterVehicleNumberPlate(vehicleid, sz_NumPlate[]) {
new
Float: a_CarPos[4], Float: fuel; // X, Y, Z, Z Angle, Fuel

GetVehiclePos(vehicleid, a_CarPos[0], a_CarPos[1], a_CarPos[2]);
GetVehicleZAngle(vehicleid, a_CarPos[3]);
fuel = VehicleFuel[vehicleid];
SetVehicleNumberPlate(vehicleid, sz_NumPlate);
SetVehicleToRespawn(vehicleid);
SetVehiclePos(vehicleid, a_CarPos[0], a_CarPos[1], a_CarPos[2]);
SetVehicleZAngle(vehicleid, a_CarPos[3]);
VehicleFuel[vehicleid] = fuel;
return 1;
}

Log(sz_fileName[], sz_input[]) {

new
sz_logEntry[156],
i_dateTime[2][3],
File: fileHandle = fopen(sz_fileName, io_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_logEntry, sizeof(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(fileHandle, sz_logEntry);
return fclose(fileHandle);

TheSnaKe
06/05/2014, 07:04 PM
Bumb, going to 3rd page -_-

Konstantinos
06/05/2014, 07:10 PM
Use debug info: https://github.com/Zeex/samp-plugin-crashdetect/wiki/Compiling-scripts-with-debug-info

Re-compile, start the server, join and spawn. Post your server log.

Note: In Log function, you don't check if the file handle is valid and fwrite/fclose can crash the server.

TheSnaKe
06/05/2014, 07:24 PM
Use debug info: https://github.com/Zeex/samp-plugin-crashdetect/wiki/Compiling-scripts-with-debug-info

Re-compile, start the server, join and spawn. Post your server log.

Note: In Log function, you don't check if the file handle is valid and fwrite/fclose can crash the server.

By the way, this is happening only in the host, i mean when am making new accounts in the server on the local ip address 127.0.0.1 it's working fine, the problem is when am making new account on the hosted server.

Konstantinos
06/05/2014, 08:35 PM
By the way, this is happening only in the host, i mean when am making new accounts in the server on the local ip address 127.0.0.1 it's working fine, the problem is when am making new account on the hosted server.

I can't say for sure without the information from the crashdetect. Just make sure that the permissions in scriptfiles are both readable and writeable and the folder users exists to your host.