[BUG] Player cash resets to '0' after every relog
#1

So, here's a bug that my players and myself are facing, everytime a player relogs, the money he had automatically resets to 0. If he had a total wealth of 10k, it would become 0 and so on. I've tried browsing my script but my Semi-Scripting skills didn't lead me no where. I would appreciate any kind of help from every one of you.
Reply
#2

Post the code when you login to load the stats, and OnPlayerDisconnect
Reply
#3

It's not a bug, it's your script.

You need to make this, to make it work.


You should ****** "Saving player stats SAMP" and you'll find various tutorials and examples of account based saving.
Reply
#4

Quote:
Originally Posted by itsCody
Посмотреть сообщение
Post the code when you login to load the stats, and OnPlayerDisconnect
onplayerstatsupdate:

Quote:

public OnPlayerStatsUpdate(playerid)
{
if(GetPVarInt(playerid, "TempName") == 1) return 1;
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged{playerid})
{
new string3[32];
new playername3[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername3, sizeof(playername3));
if(gStealth[playerid])
format(string3, sizeof(string3), "users/%s.ini", StealthName[playerid]);
else
format(string3, sizeof(string3), "users/%s.ini", playername3);
new File: hFile = fopen(string3, io_write);
if (hFile)
{
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, "LogWarnings=%d\n",PlayerInfo[playerid][pLWarns]);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, "VehModder=%d\n",PlayerInfo[playerid][pVehMods]);fwrite(hFile, var);
format(var, 32, "CarInsurance=%d\n",PlayerInfo[playerid][pCarInsurance]);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, "Heroin=%d\n",PlayerInfo[playerid][pHeroin]);fwrite(hFile, var);
format(var, 32, "Crack=%d\n",PlayerInfo[playerid][pCrack]);fwrite(hFile, var);
format(var, 32, "Meth=%d\n",PlayerInfo[playerid][pMeth]);fwrite(hFile, var);
format(var, 32, "BatteryAcid=%d\n",PlayerInfo[playerid][pBatteryAcid]);fwrite(hFile, var);
format(var, 32, "CrackStuff=%d\n",PlayerInfo[playerid][pCrackStuff]);fwrite(hFile, var);
format(var, 32, "ColdMeds=%d\n",PlayerInfo[playerid][pColdMeds]);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, "GarbageSkill=%d\n",PlayerInfo[playerid][pGarbageSkill]);fwrite(hFile, var);
format(var, 32, "UtilSkil=%d\n",PlayerInfo[playerid][pUtilSkill]);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);
if(GetPVarInt(playerid, "EventToken") != 2 && GetPVarInt(playerid, "IsInArena") == -1)
{
GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
}
format(var, 32, "pHealth=%.1f\n",PlayerInfo[playerid][pHealth]);fwrite(hFile, var);
if(GetPVarInt(playerid, "EventToken") != 2 || GetPVarInt(playerid, "IsInArena") == -1)
{
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, "CarLicP=%d\n",PlayerInfo[playerid][pCarLicP]);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);
format(var, 32, "WeedLic=%d\n",PlayerInfo[playerid][pWeedLic]);fwrite(hFile, var);
format(var, 32, "CDLic=%d\n",PlayerInfo[playerid][pCDLic]);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, "GunAmmo%d=%d\n", s, PlayerInfo[playerid][pGunAmmo][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, "Insurance=%d\n",PlayerInfo[playerid][pInsurance]);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, "Rag=%d\n",PlayerInfo[playerid][pRag]);fwrite(hFile, var);
format(var, 32, "FuelCan=%d\n",PlayerInfo[playerid][pFuelCan]);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, "9mmsSkill=%d\n",PlayerInfo[playerid][p9mmSkill]);fwrite(hFile, var);
format(var, 32, "SilencedSkill=%d\n",PlayerInfo[playerid][pSilencedSkill]);fwrite(hFile, var);
format(var, 32, "DeagleSkill=%d\n",PlayerInfo[playerid][pDeagleSkill]);fwrite(hFile, var);
format(var, 32, "ShotgunSkill=%d\n",PlayerInfo[playerid][pShotgunSkill]);fwrite(hFile, var);
format(var, 32, "SawnoffSkill=%d\n",PlayerInfo[playerid][pSawnoffSkill]);fwrite(hFile, var);
format(var, 32, "SpasSkill=%d\n",PlayerInfo[playerid][pSpasSkill]);fwrite(hFile, var);
format(var, 32, "UziSkill=%d\n",PlayerInfo[playerid][pUziSkill]);fwrite(hFile, var);
format(var, 32, "Mp5Skill=%d\n",PlayerInfo[playerid][pMp5Skill]);fwrite(hFile, var);
format(var, 32, "AKSkill=%d\n",PlayerInfo[playerid][pAKSkill]);fwrite(hFile, var);
format(var, 32, "M4Skill=%d\n",PlayerInfo[playerid][pM4Skill]);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, "OOCMuted=%d\n",PlayerInfo[playerid][pOOCMute]);fwrite(hFile, var);
format(var, 32, "OOCMutedTotal=%d\n",PlayerInfo[playerid][pOOCMuteTotal]);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, "RobTime=%d\n",PlayerInfo[playerid][pRobTime]);fwrite(hFile, var);
format(var, 32, "WepTime=%d\n",PlayerInfo[playerid][pWepTime]);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);
format(var, 32, "Dispatch=%d\n",PlayerInfo[playerid][pDispatch]);fwrite(hFile, var);
format(var, 32, "ATCCert=%d\n",PlayerInfo[playerid][pATCCert]);fwrite(hFile, var);
//format(var, 34, "Accent=%d\n",PlayerInfo[playerid][pAccent]);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%dInsurance=%d\n", v, PlayerVehicleInfo[playerid][v][pvInsurance]);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%dWepAmmo0=%d\n", v, PlayerVehicleInfo[playerid][v][pvWepAmmo][0]);fwrite(hFile, var);
format(var, 32, "pv%dWepAmmo1=%d\n", v, PlayerVehicleInfo[playerid][v][pvWepAmmo][1]);fwrite(hFile, var);
format(var, 32, "pv%dWepAmmo2=%d\n", v, PlayerVehicleInfo[playerid][v][pvWepAmmo][2]);fwrite(hFile, var);
format(var, 32, "pv%dWepUpgrade=%d\n", v, PlayerVehicleInfo[playerid][v][pvWepUpgrade]);fwrite(hFile, var);
if(PlayerVehicleInfo[playerid][v][pvImpounded] == 0) PlayerVehicleInfo[playerid][v][pvFuel] = Gas[PlayerVehicleInfo[playerid][v][pvId]];
format(var, 32, "pv%dFuel=%.2f\n", v, Gas[PlayerVehicleInfo[playerid][v][pvId]]);fwrite(hFile, var);
format(var, 32, "pv%dImpound=%d\n", v, PlayerVehicleInfo[playerid][v][pvImpounded]);fwrite(hFile, var);
format(var, 32, "pv%dPlate=%s\n", v, PlayerVehicleInfo[playerid][v][pvPlate]);fwrite(hFile, var);
format(var, 32, "pv%dBLock=%d\n", v, PlayerVehicleInfo[playerid][v][pvBLock]);fwrite(hFile, var);
format(var, 32, "pv%dBLocked=%d\n", v, PlayerVehicleInfo[playerid][v][pvBLocked]);fwrite(hFile, var);
format(var, 32, "pv%dEZPass=%d\n", v, PlayerVehicleInfo[playerid][v][pvEZPass]);fwrite(hFile, var);
format(var, 32, "pv%dTicketReason=%s\n", v, PlayerVehicleInfo[playerid][v][pvTicketReason]);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, 32, "pRawOpium=%d\n",PlayerInfo[playerid][pRawOpium]);fwrite(hFile, var);
format(var, 32, "Syringes=%d\n",PlayerInfo[playerid][pSyringe]);fwrite(hFile, var);
format(var, 32, "SpeedTickets=%d\n",PlayerInfo[playerid][pSpeedTix]);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, "pHasStereo=%d\n",PlayerInfo[playerid][pHasStereo]);fwrite(hFile, var);
format(var, 32, "pTogRadio=%d\n",PlayerInfo[playerid][pTogRadio]);fwrite(hFile, var);
format(var, 32, "pHasGPS=%d\n",PlayerInfo[playerid][pHasGPS]);fwrite(hFile, var);
format(var, 32, "pUnListed=%d\n",PlayerInfo[playerid][pUnListed]);fwrite(hFile, var);
format(var, 32, "pTruckingLevel=%d\n",PlayerInfo[playerid][pTruckingLevel]);fwrite(hFile, var);
format(var, 32, "pTruckingXP=%d\n",PlayerInfo[playerid][pTruckingXP]);fwrite(hFile, var);
format(var, 32, "pHasCarJack=%d\n",PlayerInfo[playerid][pHasCarJack]);fwrite(hFile, var);
format(var, 32, "pJackAttempts=%d\n",PlayerInfo[playerid][pJackAttempts]);fwrite(hFile, var);
format(var, 32, "pReportsAccepted=%d\n",PlayerInfo[playerid][pReportsAccepted]);fwrite(hFile, var);
format(var, 32, "pAMSSent=%d\n",PlayerInfo[playerid][pAMSSent]);fwrite(hFile, var);
format(var, 32, "pBadgeNum=%d\n",PlayerInfo[playerid][pBadgeNum]);fwrite(hFile, var);
format(var, 63, "pEmail=%s\n",PlayerInfo[playerid][pEmail]);fwrite(hFile, var);
format(var, 32, "pZip=%d\n",PlayerInfo[playerid][pZip]);fwrite(hFile, var);
format(var, 32, "pZipPot=%d\n",PlayerInfo[playerid][pZipPot]);fwrite(hFile, var);
format(var, 32, "pZipCrack=%d\n",PlayerInfo[playerid][pZipCrack]);fwrite(hFile, var);
format(var, 32, "pZipHeroin=%d\n",PlayerInfo[playerid][pZipHeroin]);fwrite(hFile, var);
format(var, 256, "Vmsg1=%s\n",PlayerInfo[playerid][pVmsg1]);fwrite(hFile, var);
format(var, 256, "Vmsg2=%s\n",PlayerInfo[playerid][pVmsg2]);fwrite(hFile, var);
format(var, 256, "Vmsg3=%s\n",PlayerInfo[playerid][pVmsg3]);fwrite(hFile, var);
format(var, 256, "Vmsg4=%s\n",PlayerInfo[playerid][pVmsg4]);fwrite(hFile, var);
format(var, 256, "Vmsg5=%s\n",PlayerInfo[playerid][pVmsg5]);fwrite(hFile, var);
format(var, 256, "Vnum1=%s\n",PlayerInfo[playerid][pVnum1]);fwrite(hFile, var);
format(var, 256, "Vnum2=%s\n",PlayerInfo[playerid][pVnum2]);fwrite(hFile, var);
format(var, 256, "Vnum3=%s\n",PlayerInfo[playerid][pVnum3]);fwrite(hFile, var);
format(var, 256, "Vnum4=%s\n",PlayerInfo[playerid][pVnum4]);fwrite(hFile, var);
format(var, 256, "Vnum5=%s\n",PlayerInfo[playerid][pVnum5]);fwrite(hFile, var);
format(var, 256, "EnrolledEZPass=%d\n",PlayerInfo[playerid][pEnrolledEZPass]);fwrite(hFile, var);
format(var, 256, "Statch=%s\n",PlayerInfo[playerid][pStatch]);fwrite(hFile, var);
format(var, 256, "ChopShopped=%s\n",PlayerInfo[playerid][pChopShopped]);fwrite(hFile, var);
format(var, 256, "pDeported=%d\n",PlayerInfo[playerid][pDeported]);fwrite(hFile, var);
format(var, 256, "pAMuteTime=%s\n",PlayerInfo[playerid][pAMuteTime]);fwrite(hFile, var);
format(var, 256, "pCMuteTime=%s\n",PlayerInfo[playerid][pCMuteTime]);fwrite(hFile, var);
format(var, 256, "pAdMuteTime=%s\n",PlayerInfo[playerid][pAdMuteTime]);fwrite(hFile, var);
format(var, 256, "pNMuteTime=%s\n",PlayerInfo[playerid][pNMuteTime]);fwrite(hFile, var);
format(var, 256, "pDeportTime=%s\n",PlayerInfo[playerid][pDeportTime]);fwrite(hFile, var);
format(var, 256, "pOOCMuteTime=%s\n",PlayerInfo[playerid][pOOCMuteTime]);fwrite(hFile, var);
fclose(hFile);
}
}
}
return 1;
}

onplayerlogin:

Quote:

public OnUserPlayerLogin(playerid,password[])
{
new string[128];
new tmp2[256];
new string2[128];
new playername2[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername2, sizeof(playername2));
format(string2, sizeof(string2), "users/%s.ini", playername2);
new File: UserFile = fopen(string2, io_read);
if ( UserFile )
{
new PassData[256];
new keytmp[256], valtmp[256];
fread( UserFile , PassData , sizeof( PassData ) );
keytmp = ini_GetKey( PassData );
if( strcmp( keytmp , "Key" , true ) == 0 )
{
valtmp = ini_GetValue( PassData );
strmid(PlayerInfo[playerid][pKey], valtmp, 0, strlen(valtmp)-1, 255);
}
if( strfind( PlayerInfo[playerid][pKey], "\r", true) != -1)
{
format(string, sizeof(string), "Warning: \\r found in player %s's password. Removing now. Password Before: %s", GetPlayerNameEx(playerid), PlayerInfo[playerid][pKey]);
//log("logs/password.log", string);
new pos = strfind( PlayerInfo[playerid][pKey], "\r", true);
strdel(PlayerInfo[playerid][pKey], pos, pos+2);
format(string, sizeof(string), "%s's Password After: %s (Note these passwords are encrypted)", GetPlayerNameEx(playerid), PlayerInfo[playerid][pKey]);
//log("logs/password.log", string);
}
//if(strcmp(PlayerInfo[playerid][pKey],password, true ) == 0 )
if(strcmp(PlayerInfo[playerid][pKey],password,true) == 0)
{
new key[ 256 ] , val[ 256 ];
new Data[ 256 ];
while ( fread( UserFile , Data , sizeof( Data ) ) )
{
key = ini_GetKey( Data );
if( strcmp( key , "Level" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLevel] = strval( val ); }
if( strcmp( key , "AdminLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdmin] = strval( val ); }
if( strcmp( key , "Band" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBanned] = strval( val ); }
if( strcmp( key , "PermBand" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPermaBanned] = strval( val ); }
if( strcmp( key , "Warnings" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWarns] = strval( val ); }
if( strcmp( key , "LogWarnings" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLWarns] = strval( val ); }
if( strcmp( key , "RPSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRPSkill] = strval( val ); }
if( strcmp( key , "Disabled" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDisabled] = strval( val ); }
if( strcmp( key , "DonateRank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDonateRank] = strval( val ); }
if( strcmp( key , "BanAppealer" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBanAppealer] = strval( val ); }
if( strcmp( key , "ShopTech" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pShopTech] = strval( val ); }
if( strcmp( key , "VehModder" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVehMods] = strval( val ); }
if( strcmp( key , "CarInsurance" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarInsurance] = strval( val ); }
if( strcmp( key , "Undercover" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pUndercover] = strval( val ); }
if( strcmp( key , "TogReports" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTogReports] = strval( val ); }
if( strcmp( key , "Radio" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRadio] = strval( val ); }
if( strcmp( key , "RadioFreq" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRadioFreq] = strval( val ); }
if( strcmp( key , "UpgradePoints" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][gPupgrade] = strval( val ); }
if( strcmp( key , "ConnectedTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pConnectTime] = strval( val ); }
if( strcmp( key , "Registered" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pReg] = strval( val ); }
if( strcmp( key , "Sex" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSex] = strval( val ); }
if( strcmp( key , "Age" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAge] = strval( val ); }
if( strcmp( key , "Origin" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOrigin] = strval( val ); }
if( strcmp( key , "Muted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMuted] = strval( val ); }
if( strcmp( key , "Respect" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pExp] = strval( val ); }
if( strcmp( key , "Money" , true ) == 0 ) { val = ini_GetValue( Data ); SetPVarInt(playerid, "Cash", strval( val )); }
if( strcmp( key , "Bank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAccount] = strval( val ); }
if( strcmp( key , "Crimes" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCrimes] = strval( val ); }
if( strcmp( key , "Accent" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAccent] = strval( val ); }
if( strcmp( key , "CHits" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCHits] = strval( val ); }
if( strcmp( key , "FHits" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFHits] = strval( val ); }
if( strcmp( key , "Arrested" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pArrested] = strval( val ); }
if( strcmp( key , "Phonebook" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPhoneBook] = strval( val ); }
if( strcmp( key , "LottoNr" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLottoNr] = strval( val ); }
if( strcmp( key , "Fishes" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFishes] = strval( val ); }
if( strcmp( key , "BiggestFish" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLottoNr] = strval( val ); }
if( strcmp( key , "Job" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJob] = strval( val ); }
if( strcmp( key , "Job2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJob2] = strval( val ); }
if( strcmp( key , "Paycheck" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayCheck] = strval( val ); }
if( strcmp( key , "HeadValue" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHeadValue] = strval( val ); }
if( strcmp( key , "Jailed" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJailed] = strval( val ); }
if( strcmp( key , "JailTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJailTime] = strval( val ); }
if( strcmp( key , "WRestricted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWRestricted] = strval( val ); }
if( strcmp( key , "Materials" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMats] = strval( val ); }
if( strcmp( key , "Packages" , true ) == 0 ) { val = ini_GetValue( Data ); SetPVarInt(playerid, key, strval( val )); }
if( strcmp( key , "Crates" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCrates] = strval( val ); }
if( strcmp( key , "Pot" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPot] = strval( val ); }
if( strcmp( key , "Heroin" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHeroin] = strval( val ); }
if( strcmp( key , "Crack" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCrack] = strval( val ); }
if( strcmp( key , "Meth" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMeth] = strval( val ); }
if( strcmp( key , "CrackStuff" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCrackStuff] = strval( val ); }
if( strcmp( key , "ColdMeds" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pColdMeds] = strval( val ); }
if( strcmp( key , "BatteryAcid" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBatteryAcid] = strval( val ); }
if( strcmp( key , "Leader" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLeader] = strval( val ); }
if( strcmp( key , "Member" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMember] = strval( val ); }
if( strcmp( key , "Division" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDivision] = strval( val ); }
if( strcmp( key , "FMember" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFMember] = strval( val ); }
if( strcmp( key , "Rank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRank] = strval( val ); }
if( strcmp( key , "DetSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDetSkill] = strval( val ); }
if( strcmp( key , "SexSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSexSkill] = strval( val ); }
if( strcmp( key , "BoxSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBoxSkill] = strval( val ); }
if( strcmp( key , "LawSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLawSkill] = strval( val ); }
if( strcmp( key , "MechSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMechSkill] = strval( val ); }
if( strcmp( key , "JackSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJackSkill] = strval( val ); }
if( strcmp( key , "CarSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarSkill] = strval( val ); }
if( strcmp( key , "TruckSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTruckSkill] = strval( val ); }
if( strcmp( key , "GarbageSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGarbageSkill] = strval( val ); }
if( strcmp( key , "UtilSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pUtilSkill] = strval( val ); }
if( strcmp( key , "NewsSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNewsSkill] = strval( val ); }
if( strcmp( key , "DrugsSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDrugsSkill] = strval( val ); }
if( strcmp( key , "ArmsSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pArmsSkill] = strval( val ); }
if( strcmp( key , "SmugglerSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSmugSkill] = strval( val ); }
if( strcmp( key , "FishSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFishSkill] = strval( val ); }
if( strcmp( key , "FightingStyle" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFightStyle] = strval( val ); }
if( strcmp( key , "pHealth" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHealth] = floatstr( val ); }
if( strcmp( key , "pArmor" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pArmor] = floatstr( val ); }
if( strcmp( key , "pSHealth" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSHealth] = floatstr( val ); }
//if( strcmp( key , "pSArmor" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSArmor] = floatstr( val ); }
if( strcmp( key , "Int" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInt] = strval( val ); }
if( strcmp( key , "Local" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLocal] = strval( val ); }
if( strcmp( key , "VirtualWorld" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVW] = strval( val ); }
if( strcmp( key , "HouseInvite" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHouseInvite] = strval( val ); }
if( strcmp( key , "Model" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pModel] = strval( val ); }
if( strcmp( key , "Clothes" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pClothes] = strval( val ); }
if( strcmp( key , "PhoneNr" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPnumber] = strval( val ); }
if( strcmp( key , "Apartment" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPhousekey] = strval( val ); }
if( strcmp( key , "Apartment2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPhousekey2] = strval( val ); }
if( strcmp( key , "Renting" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRenting] = strval( val ); }
if( strcmp( key , "CarLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarLic] = strval( val ); }
if( strcmp( key , "CarLicP" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarLicP] = strval( val ); }
if( strcmp( key , "FlyLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFlyLic] = strval( val ); }
if( strcmp( key , "BoatLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBoatLic] = strval( val ); }
if( strcmp( key , "CheckCash" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCheckCash] = strval( val ); }
if( strcmp( key , "Checks" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pChecks] = strval( val ); }
if( strcmp( key , "GunLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGunLic] = strval( val ); }
if( strcmp( key , "WeedLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWeedLic] = strval( val ); }
if( strcmp( key , "CDLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCDLic] = strval( val ); }
for(new s = 0; s < 12; s++)
{
format(string, 128, "Gun%d", s);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGuns][s] = strval( val ); }
format(string, 128, "GunAmmo%d", s);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGunAmmo][s] = strval( val ); }
}
if( strcmp( key , "CarTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarTime] = strval( val ); }
if( strcmp( key , "DrugsTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDrugsTime] = strval( val ); }
if( strcmp( key , "LawyerTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLawyerTime] = strval( val ); }
if( strcmp( key , "LawyerFreeTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLawyerFreeTime] = strval( val ); }
if( strcmp( key , "MechTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMechTime] = strval( val ); }
if( strcmp( key , "SexTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSexTime] = strval( val ); }
if( strcmp( key , "PayDay" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayDay] = strval( val ); }
if( strcmp( key , "PayDayHad" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayDayHad] = strval( val ); }
if( strcmp( key , "CDPlayer" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCDPlayer] = strval( val ); }
if( strcmp( key , "Dice" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDice] = strval( val ); }
if( strcmp( key , "Spraycan" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSpraycan] = strval( val ); }
if( strcmp( key , "Rope" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRope] = strval( val ); }
if( strcmp( key , "Rag" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRag] = strval( val ); }
if( strcmp( key , "FuelCan" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFuelCan] = strval( val ); }
if( strcmp( key , "Cigars" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCigar] = strval( val ); }
if( strcmp( key , "Sprunk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSprunk] = strval( val ); }
if( strcmp( key , "Mask" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[MAX_PLAYERS][pMask] = strval( val ); }
if( strcmp( key , "Bombs" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBombs] = strval( val ); }
if( strcmp( key , "Wins" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWins] = strval( val ); }
if( strcmp( key , "Loses" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLoses] = strval( val ); }
if( strcmp( key , "Tutorial" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTut] = strval( val ); }
if( strcmp( key , "OnDuty" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDuty] = strval( val ); }
if( strcmp( key , "Hospital" , true ) == 0 ) { val = ini_GetValue( Data ); SetPVarInt(playerid, key, strval( val )); }
if( strcmp( key , "Adjustable" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdjustable] = strval( val ); }
if( strcmp( key , "Married" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMarried] = strval( val ); }
if( strcmp( key , "MarriedTo" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pMarriedTo], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "ContractBy" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pContractBy], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "ContractDetail" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pContractDetail], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "IP" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pIP], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "WantedLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWantedLevel] = strval( val ); }
if( strcmp( key , "9mmsSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][p9mmSkill] = strval( val ); }
if( strcmp( key , "SilencedSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSilencedSkill] = strval( val ); }
if( strcmp( key , "DeagleSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDeagleSkill] = strval( val ); }
if( strcmp( key , "ShotgunSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pShotgunSkill] = strval( val ); }
if( strcmp( key , "SawnoffSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSawnoffSkill] = strval( val ); }
if( strcmp( key , "SpasSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSpasSkill] = strval( val ); }
if( strcmp( key , "UziSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pUziSkill] = strval( val ); }
if( strcmp( key , "Mp5Skill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMp5Skill] = strval( val ); }
if( strcmp( key , "AKSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAKSkill] = strval( val ); }
if( strcmp( key , "M4Skill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pM4Skill] = strval( val ); }
if( strcmp( key , "Insurance" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInsurance] = strval( val ); }
if( strcmp( key , "NewMuted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNMute] = strval( val ); }
if( strcmp( key , "NewMutedTotal" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNMuteTotal] = strval( val ); }
if( strcmp( key , "AdMuted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pADMute] = strval( val ); }
if( strcmp( key , "AdMutedTotal" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pADMuteTotal] = strval( val ); }
if( strcmp( key , "OOCMuted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOOCMute] = strval( val ); }
if( strcmp( key , "OOCMutedTotal" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOOCMuteTotal] = strval( val ); }
if( strcmp( key , "AMMuted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmute] = strval( val ); }
if( strcmp( key , "AMMutedTotal" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmuteTotal] = strval( val ); }
if( strcmp( key , "CMuted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCMute] = strval( val ); }
if( strcmp( key , "HelpMute" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHelpMute] = strval( val ); }
/*if( strcmp( key , "Warrant" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRoadblock] = strval( val ); }
if( strcmp( key , "Helper" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHelper] = strval( val ); }
if( strcmp( key , "Interor" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInterior] = strval( val ); }
if( strcmp( key , "playerrob" , true ) == 0 ) { val = ini_GetValue( Data ); playerrob[playerid] = strval( val ); }
if( strcmp( key , "felon" , true ) == 0 ) { val = ini_GetValue( Data ); felon[playerid] = strval( val ); }
if( strcmp( key , "StreetRep" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pStreetRep] = strval( val ); }
if( strcmp( key , "RepHandOut" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRepHandOut] = strval( val ); }*/
if( strcmp( key , "SPos_x" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_x] = floatstr( val ); }
if( strcmp( key , "SPos_y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_y] = floatstr( val ); }
if( strcmp( key , "SPos_z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_z] = floatstr( val ); }
if( strcmp( key , "SPos_r" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_r] = floatstr( val ); }
if( strcmp( key , "Helper" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHelper] = strval( val ); }
if( strcmp( key , "ReportMuted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRMuted] = strval( val ); }
if( strcmp( key , "ReportMutedTotal" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRMutedTotal] = strval( val ); }
if( strcmp( key , "ReportMutedTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRMutedTime] = strval( val ); }
if( strcmp( key , "VIPMuted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVMuted] = strval( val ); }
if( strcmp( key , "VIPMutedTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVMutedTime] = strval( val ); }
if( strcmp( key , "GiftTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGiftTime] = strval( val ); }
if( strcmp( key , "RobTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRobTime] = strval( val ); }
if( strcmp( key , "WepTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWepTime] = strval( val ); }
if( strcmp( key , "AdvisorDutyHours" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDutyHours] = strval( val ); }
if( strcmp( key , "AcceptedHelp" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAcceptedHelp] = strval( val ); }
if( strcmp( key , "AcceptReport" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAcceptReport] = strval( val ); }
if( strcmp( key , "TrashReport" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTrashReport] = strval( val ); }
if( strcmp( key , "FactionModerator" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFactionModerator] = strval( val ); }
if( strcmp( key , "GangModerator" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGangModerator] = strval( val ); }
if( strcmp( key , "GangWarn" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGangWarn] = strval( val ); }
if( strcmp( key , "FactionBanned" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFactionBanned] = strval( val ); }
if( strcmp( key , "CSFBanned" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCSFBanned] = strval( val ); }
if( strcmp( key , "Dispatch" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDispatch] = strval( val ); }
if( strcmp( key , "ATCCert" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pATCCert] = strval( val ); }
for(new v = 0; v < MAX_PLAYERVEHICLES; v++)
{
format(string, 128, "pv%dPosX",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvPosX] = floatstr( val ); }
format(string, 128, "pv%dPosY",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvPosY] = floatstr( val ); }
format(string, 128, "pv%dPosZ",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvPosZ] = floatstr( val ); }
format(string, 128, "pv%dPosAngle",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvPosAngle] = floatstr( val ); }
format(string, 128, "pv%dModelId",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvModelId] = strval( val ); }
format(string, 128, "pv%dLock",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvLock] = strval( val ); }
format(string, 128, "pv%dLocked",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvLocked] = strval( val ); }
format(string, 128, "pv%dInsurance",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvInsurance] = strval( val ); }
format(string, 128, "pv%dPaintJob",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvPaintJob] = strval( val ); }
format(string, 128, "pv%dColor1",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvColor1] = strval( val ); }
format(string, 128, "pv%dColor2",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvColor2] = strval( val ); }
format(string, 128, "pv%dPrice",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvPrice] = strval( val ); }
format(string, 128, "pv%dTicket",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvTicket] = strval( val ); }
format(string, 128, "pv%dWeapon0",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvWeapons][0] = strval( val ); }
format(string, 128, "pv%dWeapon1",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvWeapons][1] = strval( val ); }
format(string, 128, "pv%dWeapon2",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvWeapons][2] = strval( val ); }
format(string, 128, "pv%dWepAmmo0",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvWepAmmo][0] = strval( val ); }
format(string, 128, "pv%dWepAmmo1",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvWepAmmo][1] = strval( val ); }
format(string, 128, "pv%dWepAmmo2",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvWepAmmo][2] = strval( val ); }
format(string, 128, "pv%dWepUpgrade",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvWepUpgrade] = strval( val ); }
format(string, 128, "pv%dFuel",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvFuel] = floatstr( val ); }
format(string, 128, "pv%dImpound",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvImpounded] = strval( val ); }
format(string, 128, "pv%dPlate",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerVehicleInfo[playerid][v][pvPlate], val, 0, strlen(val)-1, 255);}
format(string, 128, "pv%dBLock",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvBLock] = strval( val ); }
format(string, 128, "pv%dBLocked",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvBLocked] = strval( val ); }
format(string, 128, "pv%dEZPass",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvEZPass] = strval( val ); }
format(string, 128, "pv%dTicketReason",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerVehicleInfo[playerid][v][pvTicketReason], val, 0, strlen(val)-1, 255); }
//format(string, 128, "pv%dNumPlate",v);
//if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); strcpy(PlayerVehicleInfo[playerid][v][pvNumberPlate], Data, 32); } //PlayerVehicleInfo[playerid][v][pvNumberPlate] = floatstr( val ); }
for(new m = 0; m < MAX_MODS; m++)
{
format(string, 128, "pv%dMod%d", v, m);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerVehicleInfo[playerid][v][pvMods][m] = strval( val ); }
}
//format(string, 128, "pv%dAllowedPlayer",v);
//if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerVehicleInfo[playerid][v][pvAllowPlayer], val, 0, strlen(val)-1, 255); }
}
for(new v = 0; v < MAX_PLAYERTOYS; v++)
{
format(string, 128, "pt%dModelID",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerToyInfo[playerid][v][ptModelID] = strval( val ); }
format(string, 128, "pt%dBone",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerToyInfo[playerid][v][ptBone] = strval( val ); }
format(string, 128, "pt%dPosX",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerToyInfo[playerid][v][ptPosX] = floatstr( val ); }
format(string, 128, "pt%dPosY",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerToyInfo[playerid][v][ptPosY] = floatstr( val ); }
format(string, 128, "pt%dPosZ",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerToyInfo[playerid][v][ptPosZ] = floatstr( val ); }
format(string, 128, "pt%dRotX",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerToyInfo[playerid][v][ptRotX] = floatstr( val ); }
format(string, 128, "pt%dRotY",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerToyInfo[playerid][v][ptRotY] = floatstr( val ); }
format(string, 128, "pt%dRotZ",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerToyInfo[playerid][v][ptRotZ] = floatstr( val ); }
format(string, 128, "pt%dScaleX",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerToyInfo[playerid][v][ptScaleX] = floatstr( val ); }
format(string, 128, "pt%dScaleY",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerToyInfo[playerid][v][ptScaleY] = floatstr( val ); }
format(string, 128, "pt%dScaleZ",v);
if( strcmp( key , string , true ) == 0 ) { val = ini_GetValue( Data ); PlayerToyInfo[playerid][v][ptScaleZ] = floatstr( val ); }
}
if( strcmp( key , "VIPInviteDay" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVIPInviteDay] = strval( val ); }
if( strcmp( key , "TempVIP" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTempVIP] = strval( val ); }
if( strcmp( key , "BuddyInvite" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBuddyInvited] = strval( val ); }
if( strcmp( key , "Tokens" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTokens] = strval( val ); }
if( strcmp( key , "PTokens" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPaintTokens] = strval( val ); }
if( strcmp( key , "TriageTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTriageTime] = strval( val ); }
if( strcmp( key, "PrisonedBy", true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pPrisonedBy], val, 0, strlen(val)-1, 255); }
if( strcmp( key, "PrisonReason", true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pPrisonReason], val, 0, strlen(val)-1, 255); }
if( strcmp( key, "Flag", true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pFlag], val, 0, strlen(val)-1, 255); }
if( strcmp( key, "TaxiLicense" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTaxiLicense] = strval( val ); }
if( strcmp( key , "TicketTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTicketTime] = strval( val ); }
if( strcmp( key , "Screwdriver" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pScrewdriver] = strval( val ); }
if( strcmp( key , "Smslog" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSmslog] = strval( val ); }
if( strcmp( key , "Wristwatch" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWristwatch] = strval( val ); }
if( strcmp( key , "Surveillance" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSurveillance] = strval( val ); }
if( strcmp( key , "Tire" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTire] = strval( val ); }
if( strcmp( key , "Firstaid" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFirstaid] = strval( val ); }
if( strcmp( key , "Rccam" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRccam] = strval( val ); }
if( strcmp( key , "Receiver" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pReceiver] = strval( val ); }
if( strcmp( key , "GPS" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGPS] = strval( val ); }
if( strcmp( key , "Sweep" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSweep] = strval( val ); }
if( strcmp( key , "SweepLeft" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSweepLeft] = strval( val ); }
if( strcmp( key , "Bugged" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBugged] = strval( val ); }
if( strcmp( key , "Smslog0" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pSmslog0], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Smslog1" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pSmslog1], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Smslog2" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pSmslog2], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Smslog3" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pSmslog3], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Smslog4" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pSmslog4], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Smslog5" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pSmslog5], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Smslog6" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pSmslog6], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Smslog7" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pSmslog7], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Smslog8" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pSmslog8], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Smslog9" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pSmslog9], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "KillLog0" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pKillLog0], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "KillLog1" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pKillLog1], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "KillLog2" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pKillLog2], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "KillLog3" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pKillLog3], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "KillLog4" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pKillLog4], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "KillLog5" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pKillLog5], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "KillLog6" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pKillLog6], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "KillLog7" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pKillLog7], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "KillLog8" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pKillLog8], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "KillLog9" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pKillLog9], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Hospital" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHospital] = strval( val ); }
if( strcmp( key , "pWExists" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWExists] = strval( val ); }
if( strcmp( key , "pWX" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWX] = floatstr( val ); }
if( strcmp( key , "pWY" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWY] = floatstr( val ); }
if( strcmp( key , "pWZ" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWZ] = floatstr( val ); }
if( strcmp( key , "pWVW" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWVW] = strval( val ); }
if( strcmp( key , "pWInt" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWInt] = strval( val ); }
if( strcmp( key , "pWValue" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWValue] = strval( val ); }
if( strcmp( key , "pWSeeds" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWSeeds] = strval( val ); }
if( strcmp( key , "pRawOpium" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRawOpium] = strval( val ); }
if( strcmp( key , "Syringes" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSyringe] = strval( val ); }
if( strcmp( key , "SpeedTickets" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSpeedTix] = strval( val ); }
if( strcmp( key , "Warrants" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pWarrant], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "JudgeJailTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJudgeJailTime] = strval( val ); }
if( strcmp( key , "JudgeJailType" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJudgeJailType] = strval( val ); }
if( strcmp( key , "BeingSentenced" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBeingSentenced] = strval( val ); }
if( strcmp( key , "ProbationTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pProbationTime] = strval( val ); }
if( strcmp( key , "DMIndicators" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDMIndicators] = strval( val ); }
if( strcmp( key , "DMKills" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDMKills] = strval( val ); }
if( strcmp( key , "DMReport0" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pDMReport0], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "DMReport1" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pDMReport1], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "DMReport2" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pDMReport2], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "DMReport3" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pDMReport3], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "DMReport4" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pDMReport4], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "DMReport5" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pDMReport5], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "DMReport6" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pDMReport6], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "DMReport7" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pDMReport7], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "DMReport8" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pDMReport8], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "DMReport9" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pDMReport9], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "Order" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOrder] = strval( val ); }
if( strcmp( key , "OBlocked" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOBlocked] = strval( val ); }
if( strcmp( key , "CallsAccepted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCallsAccepted] = strval( val ); }
if( strcmp( key , "PatientsDelivered" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPatientsDelivered] = strval( val ); }
if( strcmp( key , "LiveBanned" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLiveBanned] = strval( val ); }
if( strcmp( key , "FreezeBank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFreezeBank] = strval( val ); }
if( strcmp( key , "pHasStereo" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHasStereo] = strval( val ); }
if( strcmp( key , "pTogRadio" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTogRadio] = strval( val ); }
if( strcmp( key , "pHasGPS" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHasGPS] = strval( val ); }
if( strcmp( key , "pUnListed" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pUnListed] = strval( val ); }
if( strcmp( key , "pTruckingLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTruckingLevel] = strval( val ); }
if( strcmp( key , "pTruckingXP" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTruckingXP] = strval( val ); }
if( strcmp( key , "pHasCarJack" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHasCarJack] = strval( val ); }
if( strcmp( key , "pJackAttempts" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJackAttempts] = strval( val ); }
if( strcmp( key , "pReportsAccepted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pReportsAccepted] = strval( val ); }
if( strcmp( key , "pAMSSent" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAMSSent] = strval( val ); }
if( strcmp( key , "pBadgeNum" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBadgeNum] = strval( val ); }
if( strcmp( key , "pEmail" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pEmail], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "p911sAccepted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][p911sAccepted] = strval( val ); }
if( strcmp( key , "pArrestsMade" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pArrestsMade] = strval( val ); }
if( strcmp( key , "pInfractionsIssued" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInfractionsIssued] = strval( val ); }
if( strcmp( key , "pZip" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pZip] = strval( val ); }
if( strcmp( key , "pZipPot" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pZipPot] = strval( val ); }
if( strcmp( key , "pZipCrack" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pZipCrack] = strval( val ); }
if( strcmp( key , "pZipHeroin" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pZipHeroin] = strval( val ); }
if( strcmp( key , "pVmsg1" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pVmsg1], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "pVmsg2" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pVmsg2], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "pVmsg3" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pVmsg3], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "pVmsg4" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pVmsg4], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "pVmsg5" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pVmsg5], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "pVnum1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVnum1] = strval( val ); }
if( strcmp( key , "pVnum2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVnum2] = strval( val ); }
if( strcmp( key , "pVnum3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVnum3] = strval( val ); }
if( strcmp( key , "pVnum4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVnum4] = strval( val ); }
if( strcmp( key , "pVnum5" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pVnum5] = strval( val ); }
if( strcmp( key , "pEnrolledEZPass" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pEnrolledEZPass] = strval( val ); }
if( strcmp( key , "pStatch" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pStatch], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "pChopShopped" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pChopShopped] = strval( val ); }
if( strcmp( key , "pDeported" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDeported] = strval( val ); }
if( strcmp( key , "pAMuteTime" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pAMuteTime], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "pCMuteTime" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pCMuteTime], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "pAdMuteTime" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pAdMuteTime], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "pNMuteTime" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pNMuteTime], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "pDeportTime" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pDeportTime], val, 0, strlen(val)-1, 255); }
if( strcmp( key , "pOOCMuteTime" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pOOCMuteTime], val, 0, strlen(val)-1, 255); }

}//end while
fclose(UserFile);//close the file after everything has been read in the while
}
else
{
ShowMainMenuDialog(playerid, 3);
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 3) {
ShowPlayerDialog(playerid, DIALOG_SHOW_INFO, DIALOG_STYLE_MSGBOX, "{FFFFFF}Kicked from Server", "{FF0000}Wrong password, you have been kicked out automatically.", "Ok", "Cancel");
SetTimerEx("SendToKick", 1500, 0, "i", playerid);
}
return 1;
}
PlayerInfo[playerid][pAdjustable] = 0;
ResetPlayerMoney(playerid);
CurrentMoney[playerid] = GetPVarInt(playerid, "Cash");
TotalLogin++;
OnHelp[playerid] = 0;
PlayerInfo[playerid][pJustLogged] = 30;
PlayerInfo[playerid][pLoggedIn] = 1;
PlayerInfo[playerid][pLoginTime] = 0;

if(PlayerInfo[playerid][pTruckingLevel] == 0) PlayerInfo[playerid][pTruckingLevel] = 1;

if( PlayerInfo[playerid][pPermaBanned] == 3 || PlayerInfo[playerid][pBanned] >= 1 )
{
GetPlayerIp(playerid, PlayerInfo[playerid][pIP], 32);
format(string2, sizeof(string2), "WARNING: %s (IP:%s) tried to login whilst banned and has been auto-banned.", GetPlayerNameEx( playerid ), PlayerInfo[playerid][pIP] );
ABroadCast(COLOR_YELLOW, string2, 2);
SendClientMessageEx( playerid, COLOR_LIGHTRED, "You're banned from this server. Appeal @ gta-xgrp.com/forum/index.php" );
AddBan(PlayerInfo[playerid][pIP]);
Kick(playerid);
//log("logs/ban.log", string2);
}
if(PlayerInfo[playerid][pAdmin] > 0)
{
new tempip[32];
GetPlayerIp(playerid, tempip, 32);
if(strcmp(tempip, PlayerInfo[playerid][pIP], true))
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s has logged on with the new IP %s - Original IP: %s", name, tempip, PlayerInfo[playerid][pIP]);
ABroadCast(COLOR_YELLOW, string, 2);
format(string, sizeof(string), "%s has logged on with the IP %s - Original IP: %s", name, tempip, PlayerInfo[playerid][pIP]);
//log("logs/security.log", string);
}
}

GetPlayerIp(playerid, PlayerInfo[playerid][pIP], 32);
SetPlayerScore(playerid, PlayerInfo[playerid][pLevel]);
if(PlayerInfo[playerid][pReg] == 0)
{
PlayerInfo[playerid][pLevel] = 1;
PlayerInfo[playerid][pSHealth] = 0.0;
PlayerInfo[playerid][pSArmor] = 0.0;
PlayerInfo[playerid][pHealth] = 50.0;
PlayerInfo[playerid][pPcarkey] = 999;
PlayerInfo[playerid][pPcarkey2] = 999;
PlayerInfo[playerid][pPcarkey3] = 999;
PlayerInfo[playerid][pLocal] = 255;
PlayerInfo[playerid][pTeam] = 3;
PlayerInfo[playerid][pPnumber] = 0;
PlayerInfo[playerid][pSpeedTix] = 0;
PlayerInfo[playerid][pPhousekey] = INVALID_HOUSE_ID;
PlayerInfo[playerid][pPhousekey2] = INVALID_HOUSE_ID;
PlayerInfo[playerid][pAccount] = 20000;
PlayerInfo[playerid][pReg] = 1;
GivePlayerCash(playerid, 10000);
}

if(PlayerInfo[playerid][pHospital] == 1)
{
PlayerInfo[playerid][pHospital] = 0;
SetPVarInt(playerid, "MedicBill", 1);
}

if( PlayerInfo[playerid][pBanAppealer] >= 1 && PlayerInfo[playerid][pAdmin] < 1) PlayerInfo[playerid][pBanAppealer] = 0;

if( PlayerInfo[playerid][pUndercover] >= 1 && PlayerInfo[playerid][pAdmin] < 1) PlayerInfo[playerid][pUndercover] = 0;

if( PlayerInfo[playerid][pFactionModerator] >= 1 && PlayerInfo[playerid][pAdmin] < 1) PlayerInfo[playerid][pFactionModerator] = 0;

if( PlayerInfo[playerid][pBanAppealer] > 1) PlayerInfo[playerid][pBanAppealer] = 0;

if( PlayerInfo[playerid][pShopTech] > 1) PlayerInfo[playerid][pShopTech] = 0;

if( PlayerInfo[playerid][pUndercover] > 1) PlayerInfo[playerid][pUndercover] = 0;

if( PlayerInfo[playerid][pFactionModerator] > 1) PlayerInfo[playerid][pFactionModerator] = 0;

if( PlayerInfo[playerid][pGangModerator] > 1) PlayerInfo[playerid][pGangModerator] = 0;

if( PlayerInfo[playerid][pHelper] == 1 && PlayerInfo[playerid][pAdmin] == 1) PlayerInfo[playerid][pHelper] = 0;

HideMainMenuGUI(playerid);

if(PlayerInfo[playerid][pDisabled] != 0)
{
SendClientMessageEx(playerid, COLOR_WHITE, "This account is locked for usage due to a possible ban!");
//Kick(playerid);
return 1;
}
if(PlayerInfo[playerid][pJob2] >= 1 && PlayerInfo[playerid][pDonateRank] < 1)
{
PlayerInfo[playerid][pJob2] = 0;
SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have lost your secondary job due to the fact that you are longer a VIP.");
}
if(PlayerInfo[playerid][pDonateRank] >= 4 && PlayerInfo[playerid][pArmsSkill] < 400)
{
PlayerInfo[playerid][pArmsSkill] = 401;
SendClientMessageEx(playerid, COLOR_YELLOW, "Platinum VIP Feature: You have been given Level 5 Arms Dealer.");
}

if (PlayerInfo[playerid][pAdmin] >= 2)
{
PlayerInfo[playerid][pToggedVIPChat] = 1;
}
if (PlayerInfo[playerid][pLevel] < 6 || PlayerInfo[playerid][pAdmin] > 0)
{
gNewbie[playerid] = 0;
}
if (PlayerInfo[playerid][pHelper] >= 1 || PlayerInfo[playerid][pAdmin] == 1)
{
gHelp[playerid] = 0;
gNewbie[playerid] = 0;
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "INFO: Don't forget to /cduty and /tognewbie to begin helping players!");
}
if (PlayerInfo[playerid][pAdmin] > 0)
{
if(PlayerInfo[playerid][pAdmin] == 1)
{
SendClientMessageEx(playerid, COLOR_WHITE,"You are logged in as a Server Moderator.");
}
else
{
format(string2, sizeof(string2), "You are logged in as a Level %d Admin.",PlayerInfo[playerid][pAdmin]);
SendClientMessageEx(playerid, COLOR_WHITE,string2);
}

if(PlayerInfo[playerid][pAdmin] == 1)
{
format( string2, sizeof( string2 ), "%s has logged in as a Server Moderator.", GetPlayerNameEx( playerid ));
}
else
{
format( string2, sizeof( string2 ), "%s has logged in as a Level %d Admin.", GetPlayerNameEx( playerid ), PlayerInfo[playerid][pAdmin] );
}

foreach(Player, i)
{
if( PlayerInfo[i][pAdmin] >= 1337 )
{
if(PlayerInfo[i][pAdmin] >= PlayerInfo[playerid][pAdmin]) SendClientMessageEx(i, COLOR_WHITE, string2);
}
}

}

new playerip[32];
ToggleMainMenu(playerid, 0);
GetPlayerIp(playerid, playerip, sizeof(playerip));
format(PlayerInfo[playerid][pIP], 32, "%s", playerip);
printf("%s has logged in.",playername2);
format(tmp2, sizeof(tmp2), "Welcome, %s.", GetPlayerNameEx(playerid));
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, tmp2);
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);
SkinDelay(playerid);

if(PlayerInfo[playerid][pInt] > 0 || PlayerInfo[playerid][pVW] > 0)
{
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "Objects loading...", 4000, 5);
SetPVarInt(playerid, "LoadingObjects", 1);
SetTimerEx("SafeLoadObjects", 4000, 0, "d", playerid);
}
if(gTeam[playerid] == 0)
{
gTeam[playerid] = 3;
}
else
{
gTeam[playerid] = PlayerInfo[playerid][pTeam];
}
gPlayerLogged{playerid} = 1;
SetPVarInt(playerid, "MedicBill", 0);
SpawnPlayer(playerid);
format(tmp2, sizeof(tmp2), "~w~Welcome~n~~y~%s~n~~h~~b~www.project-crp.boards.net", playername2);
GameTextForPlayer(playerid, tmp2, 5000, 1);
SendClientMessageEx(playerid, COLOR_YELLOW, GlobalMOTD);
if(PlayerInfo[playerid][pAdmin] >= 1)
{
SendClientMessageEx(playerid, COLOR_YELLOW, AdminMOTD);
}
if(PlayerInfo[playerid][pAdmin] > 0)
{
SendClientMessageEx(playerid, TEAM_AZTECAS_COLOR, CAMOTD);
}
if(PlayerInfo[playerid][pDonateRank] >= 1) SendClientMessageEx(playerid, COLOR_VIP, VIPMOTD);
if(PlayerInfo[playerid][pHelper] >= 1) SendClientMessageEx(playerid, TEAM_AZTECAS_COLOR, CAMOTD);
if(PlayerInfo[playerid][pMember] == 1) SendClientMessageEx(playerid, COLOR_DBLUE, PDMOTD);
if(PlayerInfo[playerid][pMember] == 19) SendClientMessageEx(playerid, COLOR_DBLUE, LVPDMOTD);
SetPlayerFightingStyle(playerid, PlayerInfo[playerid][pFightStyle]);
LoadPlayerVehicles(playerid);
WeedLogin(playerid);
SetPlayerToTeamColor(playerid);
if(PlayerInfo[playerid][pFMember] < 255)
{
format(tmp2, sizeof(tmp2), "Family MOTD: %s.", FamilyInfo[PlayerInfo[playerid][pFMember]][FamilyMOTD]);
SendClientMessageEx(playerid, TEAM_VAGOS_COLOR, tmp2);
}

//Convert old flags to new system
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "flags/%s.ini",playername);
if(fexist(string))
{
new fReason[128];
new File: file = fopen(string, io_read);
if (file)
{
fread(file, fReason);
format(PlayerInfo[playerid][pFlag],128,"%s",fReason);
fclose(file);
fremove(string);
}
}

if(strlen(PlayerInfo[playerid][pFlag]) > 0)
{
format(string2, sizeof(string2), "SERVER: %s has an player account flag please read by doing /showflags.",playername2);
ABroadCast(COLOR_WHITE, string2, 2);
}
if(PlayerInfo[playerid][pOrder] > 0)
{
format(string2, sizeof(string2), "SERVER: %s has an outstanding market place order.",playername2);
ShopTechBroadCast(COLOR_WHITE, string2);
}

new hcheck, hcheck2, name[MAX_PLAYER_NAME];
hcheck = INVALID_HOUSE_ID;
hcheck2 = INVALID_HOUSE_ID;
GetPlayerName(playerid, name, sizeof(name));
for(new i = 0; i < MAX_HOUSES; i++)
{
if(!strcmp(name, HouseInfo[i][hOwner], false) && HouseInfo[i][hOwned] != 0)
{
if(hcheck != INVALID_HOUSE_ID)
{
hcheck2 = i;
}
else
{
hcheck = i;
}
}
}
if(hcheck != INVALID_HOUSE_ID)
{
PlayerInfo[playerid][pPhousekey] = hcheck;
}
if(hcheck2 != INVALID_HOUSE_ID)
{
PlayerInfo[playerid][pPhousekey2] = hcheck2;
}
if(hcheck == INVALID_HOUSE_ID)
{
PlayerInfo[playerid][pPhousekey] = INVALID_HOUSE_ID;
return 1;
}
if(hcheck2 == INVALID_HOUSE_ID)
{
PlayerInfo[playerid][pPhousekey2] = INVALID_HOUSE_ID;
return 1;
}
}
return 1;
}

onplayerdisconnect:

Quote:

public OnPlayerDisconnect(playerid, reason)
{
if(IsLoaded[playerid]) IsLoaded[playerid] = 0;
//Speedos
PlayerTextDrawDestroy(playerid,SpeedoText0);
PlayerTextDrawDestroy(playerid,SpeedoText1);
PlayerTextDrawDestroy(playerid,SpeedoText2);
PlayerTextDrawDestroy(playerid,SpeedoText3);
PlayerTextDrawDestroy(playerid,SpeedoText4);

//Samsung Galaxy
PlayerTextDrawDestroy(playerid,CalculatorTD2);

//Random News
//PlayerTextDrawDestroy(playerid, ServerTips);
//PayerTextDrawDestroy(playerid, MessagesTD);
PlayerTextDrawDestroy(playerid, ServerBanner);
PlayerTextDrawDestroy(playerid, TeamspeakBanner);

//Radar
PlayerTextDrawDestroy(playerid,RadarHud);
PlayerTextDrawDestroy(playerid,SpeedAndModel);

//Baitcar
PlayerTextDrawDestroy(playerid, Textdraw0);
PlayerTextDrawDestroy(playerid, Textdraw1);
PlayerTextDrawDestroy(playerid, Textdraw2);
PlayerTextDrawDestroy(playerid, Textdraw3);
PlayerTextDrawDestroy(playerid, Textdraw4);
PlayerTextDrawDestroy(playerid, Textdraw5);
PlayerTextDrawDestroy(playerid, Textdraw6);
PlayerTextDrawDestroy(playerid, Textdraw7);
PlayerTextDrawDestroy(playerid, Textdraw;
PlayerTextDrawDestroy(playerid, Textdraw9);
PlayerTextDrawDestroy(playerid, Textdraw10);
PlayerTextDrawDestroy(playerid, Textdraw11);
PlayerTextDrawDestroy(playerid, Textdraw12);
BaitMonitor[playerid] = 0;
Pursuit[playerid] = 0;

DestroyDynamic3DTextLabel(PlayerInfo[playerid][aMeID]);
PlayerInfo[playerid][aMeStatus] =0;

new activewep, activeammo;
activewep = GetPVarInt(playerid, "activesling");
activeammo = GetPVarInt(playerid, "activeslingammo");

if(activewep > 0)
{
new
szWeapon[16],
szMessage[128];

GetWeaponName(activewep, szWeapon, sizeof(szWeapon));
GivePlayerValidWeapon(playerid, activewep, activeammo);

format(szMessage, sizeof(szMessage), "You have unslung the %s from your back.", szWeapon);
SendClientMessageEx(playerid, COLOR_WHITE, szMessage);
format(szMessage, sizeof(szMessage), "* %s unslings a %s from their back.", GetPlayerNameEx(playerid), szWeapon);
ProxDetector(30.0, playerid, szMessage, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
DeletePVar(playerid, "activesling");
}

// Vehicle Assignments
for(new v=0; v<MAX_DP_CARS; v++)
{
if(DPCar[v][dpOfficerID] == playerid)
{
new hours, minutes, seconds, string[128];
new callsign[10];
gettime(hours, minutes, seconds);
GetPlayerCallSign(playerid, callsign);

new carnum = v;

format(string, sizeof(string), "** DISPATCH-0: %s-%d has been un-assigned from car number %d [%d:%d:%d]**", callsign, PlayerInfo[playerid][pBadgeNum], DPCar[carnum][dpCarID], hours, minutes, seconds);
SendDispatchMessage(string);
format(string, sizeof(string), "** DISPATCH-0: %s-%d is now 10-7 [%d:%d:%d]**", callsign, PlayerInfo[playerid][pBadgeNum], hours, minutes, seconds);
SendDispatchMessage(string);

UnAssignDispatchCar(carnum);
}
}

// Unload Placed Stereo
if(PlayerInfo[playerid][pHasStereo] == 1)
{
if(pPortableStereo[playerid][pSPlaced] == 1)
{
pPortableStereo[playerid][pSPosX] =0;
pPortableStereo[playerid][pSPosY] =0;
pPortableStereo[playerid][pSPosZ] =0;
pPortableStereo[playerid][pSPlaced] =0;
DestroyDynamicObject(pPortableStereo[playerid][pSOID]);
DestroyDynamic3DTextLabel(pPortableStereo[playerid][pSLID]);
}
}

// Crash Fix - GhoulSlayeR
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(!strcmp(name, "InvalidNick", true)) return 1;
if(!strcmp(name, "BannedPlayer", true)) return 1;
if(GetPVarInt(playerid, "runningRadar") >= 1)
{
new vehid = gLastCar[playerid];
if(CheckingSpeed[vehid] > 0)
{
KillTimer(CheckingSpeed[vehid]);
CheckingSpeed[vehid] = 0;
}
PlayerTextDrawDestroy(playerid, RadarHud);
PlayerTextDrawDestroy(playerid, SpeedAndModel);
DeletePVar(playerid, "runningRadar");
Radars -= 1;
}
if(GetPVarInt(playerid, "neon"))
{
DestroyDynamicObject(GetPVarInt(playerid, "neon"));
DestroyDynamicObject(GetPVarInt(playerid, "neon1"));
DeletePVar(playerid, "neon0");
DeletePVar(playerid, "neon1");
}
if(playerid == MAX_PLAYERS) return 1;
PlayersConnected--;
if(PlayerInfo[playerid][pWExists] == 1)
{
WeedLogout(playerid);
}
if(pTazer[playerid] == 1) GivePlayerValidWeapon(playerid,pTazerReplace[playerid],PlayerInfo[playerid][pGuns][2]);
if(GetPVarInt(playerid, "SpeedRadar") == 1) GivePlayerValidWeapon(playerid, GetPVarInt(playerid, "RadarReplacement"), PlayerInfo[playerid][pGuns][9]);
if(GetPVarInt(playerid, "MovingStretcher") != -1)
{
KillTimer(GetPVarInt(playerid, "TickEMSMove"));
DeletePVar(GetPVarInt(playerid, "MovingStretcher"), "OnStretcher");
SetPVarInt(playerid, "MovingStretcher", -1);
}
if(GetPVarInt(playerid, "Hospital") > 0)
{
PlayerInfo[playerid][pHospital] = 1;
}
if(GetPVarInt(playerid, "Injured") == 1)
{
PlayerInfo[playerid][pHospital] = 1;
KillEMSQueue(playerid);
ResetPlayerWeaponsEx(playerid);
}
for(new s = 0; s < 12; s++)
{
if(PlayerInfo[playerid][pAGuns][s] != 0)
{
RemovePlayerWeapon(playerid, PlayerInfo[playerid][pAGuns][s]);
}
}
if(control[playerid] == 1)
{
control[playerid] = 0;
KillTimer(ControlTimer[playerid]);
}
if(PlayerInfo[playerid][pLockCar] != INVALID_VEHICLE_ID)
{
vehicle_unlock_doors(PlayerInfo[playerid][pLockCar]);
}
if(PlayerInfo[playerid][pVehicleKeysFrom] != INVALID_PLAYER_ID)
{
PlayerVehicleInfo[PlayerInfo[playerid][pVehicleKeysFrom]][PlayerInfo[playerid][pVehicleKeys]][pvAllowedPlayerId] = INVALID_PLAYER_ID;
}
new string[128];
switch (reason)
{
case 0:
{
format(string, sizeof(string), "%s has left the server (timeout).", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLO W,COLOR_YELLOW);
if(PlayerCuffed[playerid] != 0)
{
PlayerInfo[playerid][pJailed] = 4;
PlayerInfo[playerid][pJailTime] += 20*60;
}
if(arr_Wrecking[playerid] != INVALID_VEHICLE_ID)
{
//UnwreckVehicle(arr_Wrecking[playerid], 1);
arr_Wrecking[playerid] = INVALID_VEHICLE_ID;
}
}
case 1:
{
format(string, sizeof(string), "%s has left the server (leaving).", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLO W,COLOR_YELLOW);
if(PlayerCuffed[playerid] != 0)
{
PlayerInfo[playerid][pJailed] = 4;
PlayerInfo[playerid][pJailTime] += 20*60;
}
if(arr_Wrecking[playerid] != INVALID_VEHICLE_ID)
{
//UnwreckVehicle(arr_Wrecking[playerid], 1);
arr_Wrecking[playerid] = INVALID_VEHICLE_ID;
}
}
case 2:
{
format(string, sizeof(string), "%s has left the server (kicked/banned).", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLO W,COLOR_YELLOW);
if(PlayerCuffed[playerid] != 0)
{
PlayerInfo[playerid][pJailed] = 4;
PlayerInfo[playerid][pJailTime] += 20*60;
}
if(arr_Wrecking[playerid] != INVALID_VEHICLE_ID)
{
//UnwreckVehicle(arr_Wrecking[playerid], 1);
arr_Wrecking[playerid] = INVALID_VEHICLE_ID;
}
}
}
if(EventKernel[EventRequest] == playerid)
{
EventKernel[EventRequest] = 999;
ABroadCast( COLOR_YELLOW, "{AA3333}AdmWarning{FFFF00}: The player that was requesting an event has disconnected/crashed.", 4 );
}
if(EventKernel[EventCreator] == playerid)
{
EventKernel[EventCreator] = 999;
ABroadCast( COLOR_YELLOW, "{AA3333}AdmWarning{FFFF00}: The player that was creating an event has disconnected/crashed.", 4 );
}
if(EventKernel[EventStaff][0] == playerid)
{
EventKernel[EventStaff][0] = 999;
}
else if(EventKernel[EventStaff][1] == playerid)
{
EventKernel[EventStaff][1] = 999;
}
else if(EventKernel[EventStaff][2] == playerid)
{
EventKernel[EventStaff][2] = 999;
}
else if(EventKernel[EventStaff][3] == playerid)
{
EventKernel[EventStaff][3] = 999;
}
else if(EventKernel[EventStaff][4] == playerid)
{
EventKernel[EventStaff][4] = 999;
}
if(GetPVarInt(playerid, "IsInArena") >= 0)
{
LeavePaintballArena(playerid, GetPVarInt(playerid, "IsInArena"));
PlayerInfo[playerid][pInt] = GetPVarInt(playerid, "pbOldInt");
PlayerInfo[playerid][pVW] = GetPVarInt(playerid, "pbOldVW");
PlayerInfo[playerid][pPos_x] = GetPVarFloat(playerid, "pbOldX");
PlayerInfo[playerid][pPos_y] = GetPVarFloat(playerid, "pbOldY");
PlayerInfo[playerid][pPos_z] = GetPVarFloat(playerid, "pbOldZ");
PlayerInfo[playerid][pHealth] = GetPVarFloat(playerid, "pbOldHealth");
PlayerInfo[playerid][pArmor] = GetPVarFloat(playerid, "pbOldArmor");
SetPlayerHealth(playerid,GetPVarFloat(playerid, "pbOldHealth"));
SetPlayerArmour(playerid,GetPVarFloat(playerid, "pbOldArmor"));
}
else if(GetPVarInt(playerid, "EventToken") == 0)
{
new Float: x, Float: y, Float: z;
PlayerInfo[playerid][pInt] = GetPlayerInterior(playerid);
PlayerInfo[playerid][pVW] = GetPlayerVirtualWorld(playerid);
PlayerInfo[playerid][pChar] = PlayerInfo[playerid][pModel];
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, PlayerInfo[playerid][pPos_r]);
PlayerInfo[playerid][pPos_x] = x;
PlayerInfo[playerid][pPos_y] = y;
PlayerInfo[playerid][pPos_z] = z;
}
else if(GetPVarInt(playerid, "EventToken") == 1)
{
PlayerInfo[playerid][pInt] = EventLastInt[playerid];
PlayerInfo[playerid][pVW] = EventLastVW[playerid];
PlayerInfo[playerid][pChar] = PlayerInfo[playerid][pModel];
PlayerInfo[playerid][pPos_r] = EventFloats[playerid][0];
PlayerInfo[playerid][pPos_x] = EventFloats[playerid][1];
PlayerInfo[playerid][pPos_y] = EventFloats[playerid][2];
PlayerInfo[playerid][pPos_z] = EventFloats[playerid][3];
}
if(WatchingTV[playerid] == 1)
{
PlayerInfo[playerid][pInt] = BroadcastLastInt[playerid];
PlayerInfo[playerid][pVW] = BroadcastLastVW[playerid];
PlayerInfo[playerid][pPos_r] = BroadcastFloats[playerid][0];
PlayerInfo[playerid][pPos_x] = BroadcastFloats[playerid][1];
PlayerInfo[playerid][pPos_y] = BroadcastFloats[playerid][2];
PlayerInfo[playerid][pPos_z] = BroadcastFloats[playerid][3];
WatchingTV[playerid] = 0;
viewers--;
UpdateSANewsBroadcast();
}
if(Spectate[playerid] < 553)
{
PlayerInfo[playerid][pInt] = GetPVarInt(playerid, "SpecInt");
PlayerInfo[playerid][pVW] = GetPVarInt(playerid, "SpecVW");
PlayerInfo[playerid][pChar] = PlayerInfo[playerid][pModel];
PlayerInfo[playerid][pPos_x] = GetPVarFloat(playerid, "SpecPosX");
PlayerInfo[playerid][pPos_y] = GetPVarFloat(playerid, "SpecPosY");
PlayerInfo[playerid][pPos_z] = GetPVarFloat(playerid, "SpecPosZ");
GettingSpectated[Spectate[playerid]] = 999;
Spectate[playerid] = 999;
}
if(gBike[playerid] >= 0 && gBikeRenting[playerid] == 1)
{
gBike[playerid] = 0;
gBikeRenting[playerid] = 0;
KillTimer(GetPVarInt(playerid, "RentTime"));
}

if(GetPVarInt(playerid, "gpsonoff") == 1) TextDrawDestroy(GPS[playerid]);

if(InsideShamal[playerid] != INVALID_VEHICLE_ID)
{
if(InsideShamal[playerid] == INVALID_VEHICLE_ID || GetVehicleModel(InsideShamal[playerid]) != 519)
{
GivePlayerValidWeapon(playerid, 46, 1);
PlayerInfo[playerid][pPos_x] = 0.000000;
PlayerInfo[playerid][pPos_y] = 0.000000;
PlayerInfo[playerid][pPos_z] = 420.000000;
}
else
{
new Float:X, Float:Y, Float:Z;
GetVehiclePos(InsideShamal[playerid], X, Y, Z);
PlayerInfo[playerid][pPos_x] = X;
PlayerInfo[playerid][pPos_y] = Y;
PlayerInfo[playerid][pPos_z] = Z;

new Float:XB, Float:YB, Float:ZB;
GetVehiclePos(InsideShamal[playerid], XB, YB, ZB);
if(ZB > 50.0)
{
GivePlayerValidWeapon(playerid, 46, 1);
}
}
PlayerInfo[playerid][pVW] = 0;
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerInterior(playerid, 0);
InsideShamal[playerid] = INVALID_VEHICLE_ID;
}
InsideShamal[playerid] = INVALID_VEHICLE_ID;

DestroyDynamicObject(GetPVarInt(playerid, "neon"));
DestroyDynamicObject(GetPVarInt(playerid, "neon1"));
DeletePVar(playerid, "neon0");
DeletePVar(playerid, "neon1");

gActivePlayers[playerid]--;
numplayers--;
PlayerInfo[playerid][pAdjustable] = 1;
OnPlayerStatsUpdate(playerid);
UnloadPlayerVehicles(playerid);
ResetPlayerWeapons(playerid);
ToBeKicked[playerid] = 0;

ClearReport(GetPlayerActiveReport(playerid));
foreach(Player, i)
{
if(TaxiAccepted[i] == playerid)
{
TaxiAccepted[i] = 999;
GameTextForPlayer(i, "~w~Taxi Caller~n~~r~Left the game", 5000, 1);
TaxiCallTime[i] = 0;
DisablePlayerCheckpoint(i);
}
if(EMSAccepted[i] == playerid)
{
EMSAccepted[i] = 999;
GameTextForPlayer(i, "~w~EMS Caller~n~~r~Left the game", 5000, 1);
EMSCallTime[i] = 0;
DisablePlayerCheckpoint(i);
}
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(MedicAccepted[i] == playerid)
{
TaxiAccepted[playerid] = 999; BusAccepted[playerid] = 999; MedicAccepted[playerid] = 999;
GameTextForPlayer(i, "~w~Medic Caller~n~~r~Left the game", 5000, 1);
MedicCallTime[i] = 0;
DisablePlayerCheckpoint(i);
}
if(RRAccepted[i] == playerid)
{
RRAccepted[playerid] = 999;
GameTextForPlayer(i, "~w~RR Caller~n~~r~Left the game", 5000, 1);
RRCallTime[i] = 0;
DisablePlayerCheckpoint(i);
}
if(OrderAssignedTo[i] == playerid)
{
OrderAssignedTo[i] = INVALID_PLAYER_ID;
}
}
if(HaveGPS[playerid])
{
KillTimer(GPSTimer[playerid]);
HaveGPS[playerid] = false;
GPSTimer[playerid] = 0;
}
if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999)
{
if(IsPlayerConnected(TransportDriver[playerid]))
{
TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
TransportTime[TransportDriver[playerid]] = 0;
TransportCost[TransportDriver[playerid]] = 0;
format(string, sizeof(string), "~w~Passenger left~n~~g~Earned $%d",TransportCost[playerid]);
GameTextForPlayer(TransportDriver[playerid], string, 5000, 1);
TransportDriver[playerid] = 999;
}
}
if(GotHit[playerid] > 0)
{
if(GetChased[playerid] < 999)
{
if(IsPlayerConnected(GetChased[playerid]))
{
SendClientMessageEx(GetChased[playerid], COLOR_YELLOW, "Your hit has left the server.");
GoChase[GetChased[playerid]] = 999;
}
}
}
if(GoChase[playerid] < 999)
{
GetChased[GoChase[playerid]] = 999;
GotHit[GoChase[playerid]] = 999;
}
if(HireCar[playerid] != 299)
{
gLastDriver[HireCar[playerid]] = 300;
vehicle_unlock_doors(HireCar[playerid]);
}
if (gLastCar[playerid] > 0)
{
gLastDriver[gLastCar[playerid]] = 300;
if(PlayerInfo[playerid][pPhousekey] != gLastCar[playerid]-1)
{
vehicle_unlock_doors(gLastCar[playerid]);
}
}
if(PlayerBoxing[playerid] > 0)
{
if(Boxer1 == playerid)
{
if(IsPlayerConnected(Boxer2))
{
if(IsPlayerInRangeOfPoint(PlayerBoxing[Boxer2], 20.0, 768.94, -70.87, 1001.56))
{
PlayerBoxing[Boxer2] = 0;
SetPlayerPos(Boxer2, 768.48, -73.66, 1000.57);
SetPlayerInterior(Boxer2, 7);
GameTextForPlayer(Boxer2, "~r~Match interupted", 5000, 1);
return 1;
}
PlayerBoxing[Boxer2] = 0;
SetPlayerPos(Boxer2, 765.8433,3.2924,1000.7186);
SetPlayerInterior(Boxer2, 5);
GameTextForPlayer(Boxer2, "~r~Match interupted", 5000, 1);
}
}
else if(Boxer2 == playerid)
{
if(IsPlayerConnected(Boxer1))
{
if(IsPlayerInRangeOfPoint(PlayerBoxing[Boxer1],20.0,764.35, -66.48, 1001.56))
{
PlayerBoxing[Boxer1] = 0;
SetPlayerPos(Boxer1, 768.48, -73.66, 1000.57);
SetPlayerInterior(Boxer1, 7);
GameTextForPlayer(Boxer1, "~r~Match interupted", 5000, 1);
return 1;
}
PlayerBoxing[Boxer1] = 0;
SetPlayerPos(Boxer1, 765.8433,3.2924,1000.7186);
SetPlayerInterior(Boxer1, 5);
GameTextForPlayer(Boxer1, "~r~Match interupted", 5000, 1);
}
}
InRing = 0;
RoundStarted = 0;
Boxer1 = INVALID_PLAYER_ID;
Boxer2 = INVALID_PLAYER_ID;
TBoxer = INVALID_PLAYER_ID;
}
if(GetPVarInt(playerid, "AdvisorDuty") == 1)
{
Advisors--;
}
if(TransportDuty[playerid] == 1)
{
TaxiDrivers -= 1;
}
else if(TransportDuty[playerid] == 2)
{
BusDrivers -= 1;
}
if(PlayerInfo[playerid][pJob] == 11 || PlayerInfo[playerid][pJob2] == 11)
{
if(JobDuty[playerid] == 1) { Medics -= 1; }
}
if(PlayerInfo[playerid][pJob] == 7 || PlayerInfo[playerid][pJob2] == 7)
{
if(JobDuty[playerid] == 1) { Mechanics -= 1; }
}
if(PlayerInfo[playerid][pJob] == 11 || PlayerInfo[playerid][pJob2] == 11)
{
if(JobDuty[playerid] == 1) { Coastguard -= 1; }
}

if(RoadblockActive[playerid] == 1)
{
DestroyObject(ROADBLOCK[playerid]);
RoadblockActive[playerid]=0;
}
return 1;
}

HospitalSpawn(playerid)
{
if(GetPVarInt(playerid, "MedicBill") == 1 && PlayerInfo[playerid][pJailed] == 0)
{
if(GetPVarInt(playerid, "Hospital") == 1 && PlayerInfo[playerid][pInsurance] == 2) // All Saints
{
SetPlayerArmour(playerid, PlayerInfo[playerid][pSHealth]);
SetPlayerHealth(playerid, 50.0);
DeletePVar(playerid, "MedicBill");
GivePlayerCash(playerid, -1500);
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Hospital: Your Medical Bill comes to $1,500, Have a nice day.");
SetPlayerPos(playerid, 1175.0586,-1324.2463,14.593;
SetPlayerFacingAngle(playerid, 268.974;
DeletePVar(playerid, "Hospital");
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
}
else if(GetPVarInt(playerid, "Hospital") == 2 && PlayerInfo[playerid][pInsurance] == 1) // County General Hospital
{
SetPlayerArmour(playerid, PlayerInfo[playerid][pSHealth]);
SetPlayerHealth(playerid, 50.0);
DeletePVar(playerid, "MedicBill");
GivePlayerCash(playerid, -1500);
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Hospital: Your Medical Bill comes to $1,500, Have a nice day.");
SetPlayerPos(playerid, 2034.2269,-1404.3459,17.2617);
SetPlayerFacingAngle(playerid, 179.425;
DeletePVar(playerid, "Hospital");
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
}
else if(GetPVarInt(playerid, "Hospital") == 3 && PlayerInfo[playerid][pInsurance] == 3) // Jefferson Hospital
{
SetPlayerArmour(playerid, PlayerInfo[playerid][pSHealth]);
SetPlayerHealth(playerid, 50.0);
DeletePVar(playerid, "MedicBill");
GivePlayerCash(playerid, -500);
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Hospital: Your Medical Bill comes to $500, Have a nice day.");
SetPlayerPos(playerid, 1241.4888,325.9947,19.7555);
SetPlayerFacingAngle(playerid, 345.0);
DeletePVar(playerid, "Hospital");
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
}
/*else if(GetPVarInt(playerid, "Hospital") == 4 && PlayerInfo[playerid][pInsurance] == 4) // Fort Carson Medical Center
{
SetPlayerArmour(playerid, PlayerInfo[playerid][pSHealth]);
SetPlayerHealth(playerid, 50.0);
DeletePVar(playerid, "MedicBill");
GivePlayerCash(playerid, -250);
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Hospital: Your Medical Bill comes to $250, Have a nice day.");
SetPlayerPos(playerid, -320.3253, 1049.2809, 20.3403);
SetPlayerFacingAngle(playerid, 179.425;
DeletePVar(playerid, "Hospital");
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
}
else if(GetPVarInt(playerid, "Hospital") == 5 && PlayerInfo[playerid][pInsurance] == 5) // LV Hospital
{
SetPlayerArmour(playerid, PlayerInfo[playerid][pSHealth]);
SetPlayerHealth(playerid, 50.0);
DeletePVar(playerid, "MedicBill");
GivePlayerCash(playerid, -250);
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Hospital: Your Medical Bill comes to $250, Have a nice day.");
SetPlayerPos(playerid, 1581.0273,1768.8224,10.7452);
SetPlayerFacingAngle(playerid, 180);
DeletePVar(playerid, "Hospital");
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
}*/
else if(GetPVarInt(playerid, "Hospital") == 6 && PlayerInfo[playerid][pInsurance] == 0) // All Saints
{
SetPlayerArmour(playerid, PlayerInfo[playerid][pSHealth]);
SetPlayerHealth(playerid, 50.0);
DeletePVar(playerid, "MedicBill");
GivePlayerCash(playerid, -2000);
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Hospital: Your Medical Bill comes to $2,000, Have a nice day.");
GameTextForPlayer( playerid, "~w~You are presently uninsured, ~n~buy insurance!", 5000, 6 );
SendClientMessageEx( playerid, COLOR_WHITE, "(( Look for the insurance points next to each hospital. Type /insurehelp for more details. ))" );
SetPlayerPos(playerid, 1175.0586,-1324.2463,14.593;
SetPlayerFacingAngle(playerid, 268.974;
DeletePVar(playerid, "Hospital");
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);

}
else if(GetPVarInt(playerid, "Hospital") == 2 && PlayerInfo[playerid][pInsurance] == 0) // County General
{
SetPlayerArmour(playerid, PlayerInfo[playerid][pSHealth]);
SetPlayerHealth(playerid, 50.0);
DeletePVar(playerid, "MedicBill");
GivePlayerCash(playerid, -2000);
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Hospital: Your Medical Bill comes to $2,000, Have a nice day.");
GameTextForPlayer( playerid, "~w~You are presently uninsured, ~n~buy insurance!", 5000, 6 );
SendClientMessageEx( playerid, COLOR_WHITE, "(( Look for the insurance points next to each hospital. Type /insurehelp for more details. ))" );
SetPlayerPos(playerid, 2034.2269,-1404.3459,17.2617);
SetPlayerFacingAngle(playerid, 179.425;
DeletePVar(playerid, "Hospital");
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);

}
/*else if(GetPVarInt(playerid, "Hospital") == 12 && PlayerInfo[playerid][pInsurance] == 0)
{
SetPlayerArmour(playerid, PlayerInfo[playerid][pSHealth]);
SetPlayerHealth(playerid, 50.0);
DeletePVar(playerid, "MedicBill");
GivePlayerCash(playerid, -2000);
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Hospital: Your Medical Bill comes to $2,000, Have a nice day.");
GameTextForPlayer( playerid, "~w~You are presently uninsured, ~n~buy insurance!", 5000, 6 );
SendClientMessageEx( playerid, COLOR_WHITE, "(( Look for the insurance points next to each hospital. Type /insurehelp for more details. ))" );
SetPlayerPos(playerid, 1581.0273,1768.8224,10.7452);
SetPlayerFacingAngle(playerid, 180);
DeletePVar(playerid, "Hospital");
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);

}*/
else if(GetPVarInt(playerid, "Hospital") == 7 && PlayerInfo[playerid][pInsurance] == 6) // VIP Lounge
{
SetPlayerArmour(playerid, PlayerInfo[playerid][pSHealth]);
SetPlayerHealth(playerid, 50.0);
DeletePVar(playerid, "MedicBill");
GivePlayerCash(playerid, -250);
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Hospital: Your Medical Bill comes to $250, Have a nice day.");
SetPlayerPos(playerid, 2785.553955, 2394.641845, 1240.531127);
SetPlayerFacingAngle(playerid, 266.41);
SetPlayerInterior(playerid, 1);
DeletePVar(playerid, "Hospital");
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
}
else if(GetPVarInt(playerid, "Hospital") == 8 && PlayerInfo[playerid][pInsurance] == 7)
{
SetPlayerArmour(playerid, PlayerInfo[playerid][pSHealth]);
SetPlayerHealth(playerid, 50.0);
DeletePVar(playerid, "MedicBill");
GivePlayerCash(playerid, -250);
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Hospital: Your Medical Bill comes to $250, Have a nice day.");
SendClientMessageEx(playerid, COLOR_YELLOW, "Platinum VIP: You have spawned at your home.");

for(new i = 0; i < sizeof(HouseInfo); i++)
{
if(PlayerInfo[playerid][pPhousekey] == i || PlayerInfo[playerid][pPhousekey2] == i)
{
Streamer_UpdateEx(playerid, HouseInfo[i][hInteriorX],HouseInfo[i][hInteriorY],HouseInfo[i][hInteriorZ]);
SetPlayerInterior(playerid,HouseInfo[i][hHInteriorWorld]);
if(HouseInfo[i][hCustomInterior] == 1)
{
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "Loading Objects.", 4000, 5);
SetPVarInt(playerid, "LoadingObjects", 1);
SetTimerEx("SafeLoadObjects", 4000, 0, "d", playerid);
}
SetPlayerPos(playerid,HouseInfo[i][hInteriorX],HouseInfo[i][hInteriorY],HouseInfo[i][hInteriorZ]);
GameTextForPlayer(playerid, "~w~Welcome Home", 5000, 1);
PlayerInfo[playerid][pInt] = HouseInfo[i][hHInteriorWorld];
PlayerInfo[playerid][pLocal] = i+6000;
PlayerInfo[playerid][pVW] = i+6000;
SetPlayerVirtualWorld(playerid, i+6000);
}
}

DeletePVar(playerid, "Hospital");
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
}
else if(GetPVarInt(playerid, "Hospital") == 9 && PlayerInfo[playerid][pInsurance] ==
{
if(PlayerInfo[playerid][pMember] != 11 && PlayerInfo[playerid][pLeader] != 11)
{
PlayerInfo[playerid][pInsurance] = 0;
HospitalSpawn(playerid);
}
SetPlayerArmour(playerid, PlayerInfo[playerid][pSHealth]);
SetPlayerHealth(playerid, 50.0);
DeletePVar(playerid, "MedicBill");
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Hospital: Have a nice day.");
new Float:X, Float:Y, Float:Z;
GetObjectPos(Carrier[0], X, Y, Z);
SetPlayerPos(playerid, (X-0.377671),(Y-10.91701,11.6986);
SetPlayerFacingAngle(playerid, 0);
DeletePVar(playerid, "Hospital");
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
}
/*else if(GetPVarInt(playerid, "Hospital") == 10 && PlayerInfo[playerid][pInsurance] == 9) // El Quebrado Medical Center
{
SetPlayerArmour(playerid, PlayerInfo[playerid][pSHealth]);
SetPlayerHealth(playerid, 50.0);
DeletePVar(playerid, "MedicBill");
GivePlayerCash(playerid, -250);
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Hospital: Your Medical Bill comes to $250, Have a nice day.");
SetPlayerPos(playerid, -1514.809204, 2526.305175, 55.759651);
SetPlayerFacingAngle(playerid, 357.79);
DeletePVar(playerid, "Hospital");
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
}*/
else if(GetPVarInt(playerid, "Hospital") == 11 && PlayerInfo[playerid][pInsurance] == 10)
{
if(PlayerInfo[playerid][pMember] != 11 && PlayerInfo[playerid][pLeader] != 11)
{
PlayerInfo[playerid][pInsurance] = 0;
HospitalSpawn(playerid);
}
SetPlayerArmour(playerid, PlayerInfo[playerid][pSHealth]);
SetPlayerHealth(playerid, 50.0);
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "Hospital: Your Medical Bill is free of charge, Have a nice day.");
SetPlayerPos(playerid, 1169.7209472656,-1348.3218994141,2423.0461425781);
SetPlayerFacingAngle(playerid, 0);
SetPlayerPos(playerid, 1169.7209472656,-1348.3218994141,2423.0461425781);
DeletePVar(playerid, "Hospital");
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
}
}
}

SetPlayerSpawn(playerid)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pChar] > 0)
{
SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]);
}
else
{
SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
}
if(GetPVarInt(playerid, "IsInArena") >= 0)
{
SpawnPaintballArena(playerid, GetPVarInt(playerid, "IsInArena"));
return 1;
}
if( GetPVarInt(playerid, "SpecOff" ) == 1 )
{
SetPlayerPos(playerid, GetPVarFloat(playerid, "SpecPosX"), GetPVarFloat(playerid, "SpecPosY"), GetPVarFloat(playerid, "SpecPosZ"));
SetPlayerInterior(playerid, GetPVarInt(playerid, "SpecInt"));
SetPlayerVirtualWorld(playerid, GetPVarInt(playerid, "SpecVW"));
SetPVarInt(playerid, "SpecOff", 0 );
SetPVarInt(playerid, "SpecState", -1 );
return 1;
}
if(PlayerInfo[playerid][pTut] == 0)
{
gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
TogglePlayerControllable(playerid,0);
SetPlayerColor(playerid,TEAM_HIT_COLOR);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
Streamer_UpdateEx(playerid, 2229.4968,-1722.0701,13.5625);
SetPlayerPos(playerid, 2229.4968,-1722.0701,-10.0);
SetPlayerCameraPos(playerid, 2211.1460,-1748.3509,29.3744);
SetPlayerCameraLookAt(playerid, 2229.4968,-1722.0705,13.5625);

RegistrationStep[playerid] = 1;
ShowPlayerDialog(playerid, REGISTERSEX, DIALOG_STYLE_LIST, "{FF0606}Is your character male or female? - www.project-crp.boards.net", "Male\nFemale", "Submit", "");
return 1;
}
new rand;
if(PlayerInfo[playerid][pBeingSentenced] > 0)
{
PhoneOnline[playerid] = 1;
rand = random(sizeof(WarrantJail));
SetPlayerPos(playerid, WarrantJail[rand][0], WarrantJail[rand][1], WarrantJail[rand][2]);
if(rand != 0) courtjail[playerid] = 2;
else courtjail[playerid] = 1;
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "Loading Objects.", 4000, 5);
SetPVarInt(playerid, "LoadingObjects", 1);
SetTimerEx("SafeLoadObjects", 4000, 0, "d", playerid);
SetPlayerInterior(playerid, 0);
PlayerInfo[playerid][pInt] = 0;
return 1;
}
if(PlayerInfo[playerid][pJailed] == 1 || PlayerInfo[playerid][pJailed] == 1000)
{
PhoneOnline[playerid] = 1;
SetPlayerInterior(playerid, 1);
//rand = random(sizeof(LSPDJail));
SetPlayerFacingAngle(playerid, 0);
SetPlayerPos(playerid,1856.9955,-1657.1003,5215.6299);
//SetPlayerPos(playerid, LSPDJail[rand][0], LSPDJail[rand][1], LSPDJail[rand][2]);
PlayerInfo[playerid][pVW] = 0;
SetPlayerVirtualWorld(playerid, 0);
SendClientMessageEx(playerid, COLOR_YELLOW, "Incomplete jail sentence, back to jail you go.");
//ApprovedLawyer[playerid] = 1;
return 1;
}
if(PlayerInfo[playerid][pJailed] == 2)
{
PhoneOnline[playerid] = 1;
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "Loading Objects.", 4000, 5);
SetPVarInt(playerid, "LoadingObjects", 1);
SetTimerEx("SafeLoadObjects", 4000, 0, "d", playerid);
SetPlayerInterior(playerid, 1);
PlayerInfo[playerid][pInt] = 1;
//rand = random(sizeof(ICPrisonSpawns));
//SetPlayerPos(playerid, ICPrisonSpawns[rand][0], ICPrisonSpawns[rand][1], ICPrisonSpawns[rand][2]);
SetPlayerPos(playerid,1856.9955,-1657.1003,5215.6299);
SetPlayerColor(playerid, TEAM_ORANGE_COLOR);
return 1;
}
if(PlayerInfo[playerid][pJailed] == 4)
{
PhoneOnline[playerid] = 1;
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "Loading Objects.", 4000, 5);
SetPVarInt(playerid, "LoadingObjects", 1);
SetTimerEx("SafeLoadObjects", 4000, 0, "d", playerid);
SetPlayerInterior(playerid, 1);
PlayerInfo[playerid][pInt] = 1;
rand = random(sizeof(AJailSpawns));
SetPlayerPos(playerid, AJailSpawns[rand][0], AJailSpawns[rand][1], AJailSpawns[rand][2]);
//SetPlayerSkin(playerid, 50);
//SetPlayerPos(playerid,1830.803,-1731.561,5203.459);
SetPlayerColor(playerid, TEAM_APRISON_COLOR);
new string[128];
format(string, sizeof(string), "You are in prison, reason: %s", PlayerInfo[playerid][pPrisonReason]);
SendClientMessageEx(playerid, COLOR_YELLOW, string);
ResetPlayerWeaponsEx(playerid);
return 1;
}
if(PlayerInfo[playerid][pJailed] == 3)
{
PhoneOnline[playerid] = 1;
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "Loading Objects.", 4000, 5);
SetPVarInt(playerid, "LoadingObjects", 1);
SetTimerEx("SafeLoadObjects", 4000, 0, "d", playerid);

SetPlayerInterior(playerid, 1);
PlayerInfo[playerid][pVW] = 1324123;
PlayerInfo[playerid][pInt] = 1;
SetPlayerVirtualWorld(playerid, 1324123);
SetPlayerInterior(playerid, 1);
SetPlayerPos(playerid,315.1677,-1451.5564,-33.5292);
return 1;
}
if(PlayerInfo[playerid][pJailed] == 6)
{
PhoneOnline[playerid] = 1;
SetPlayerInterior(playerid, 4);
SetPlayerFacingAngle(playerid, 0);
SetPlayerPos(playerid, 318.5971,312.9619,999.1484);
PlayerInfo[playerid][pVW] = 4;
SetPlayerVirtualWorld(playerid, 4);
SendClientMessageEx(playerid, COLOR_YELLOW, "Incomplete jail sentence, back to jail you go.");
return 1;
}
if(PlayerInfo[playerid][pJailed] == 7)
{
PhoneOnline[playerid] = 1;
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "Loading Objects.", 4000, 5);
SetPVarInt(playerid, "LoadingObjects", 1);
SetTimerEx("SafeLoadObjects", 4000, 0, "d", playerid);
SetPlayerPos(playerid, 2500.3296,-1679.2875,562.798;
PlayerInfo[playerid][pVW] = 1699;
SetPlayerVirtualWorld(playerid, 1699);
SendClientMessageEx(playerid, COLOR_YELLOW, "Incomplete jail sentence, back to jail you go.");
return 1;
}
if(PlayerInfo[playerid][pJailed] ==
{
PhoneOnline[playerid] = 1;
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "Loading Objects.", 4000, 5);
SetPVarInt(playerid, "LoadingObjects", 1);
SetTimerEx("SafeLoadObjects", 4000, 0, "d", playerid);
SetPlayerPos(playerid, 198.1944,175.9581,1003.0234);
SetPlayerInterior(playerid, 3);
PlayerInfo[playerid][pInt] = 3;
PlayerInfo[playerid][pVW] = 0;
SetPlayerVirtualWorld(playerid, 0);
SendClientMessageEx(playerid, COLOR_YELLOW, "Incomplete jail sentence, back to jail you go.");
return 1;
}
if(PlayerInfo[playerid][pJailed] == 9)
{
PhoneOnline[playerid] = 1;
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "Loading Objects.", 4000, 5);
SetPVarInt(playerid, "LoadingObjects", 1);
SetTimerEx("SafeLoadObjects", 4000, 0, "d", playerid);
SetPlayerPos(playerid, 319.554931, 312.155181, 999.148437);
SetPlayerInterior(playerid, 5);
PlayerInfo[playerid][pInt] = 5;
PlayerInfo[playerid][pVW] = 99;
SetPlayerVirtualWorld(playerid, 99);
SendClientMessageEx(playerid, COLOR_YELLOW, "Incomplete jail sentence, back to jail you go.");
return 1;
}
if(GetPVarInt(playerid, "EventToken") == 1)
{
DeletePVar(playerid, "EventToken");
SetPlayerWeapons(playerid);
SetPlayerPos(playerid,EventFloats[playerid][1],EventFloats[playerid][2],EventFloats[playerid][3]);
//PlayerInfo[playerid][pInterior] = PlayerInfo[playerid][pInt];
SetPlayerVirtualWorld(playerid, EventLastVW[playerid]);
SetPlayerFacingAngle(playerid, EventFloats[playerid][0]);
SetPlayerInterior(playerid,EventLastInt[playerid]);
SetPlayerHealth(playerid, EventFloats[playerid][4]);
SetPlayerArmour(playerid, EventFloats[playerid][5]);
for(new i = 0; i < 6; i++)
{
EventFloats[playerid][i] = 0.0;
}
EventLastVW[playerid] = 0;
EventLastInt[playerid] = 0;
return 1;
}
for(new i; i < 5; i++)
{
if(EventKernel[EventStaff][i] == playerid)
{
SetPlayerWeapons(playerid);
SetPlayerPos(playerid,EventFloats[playerid][1],EventFloats[playerid][2],EventFloats[playerid][3]);
//PlayerInfo[playerid][pInterior] = PlayerInfo[playerid][pInt];
SetPlayerVirtualWorld(playerid, EventLastVW[playerid]);
SetPlayerFacingAngle(playerid, EventFloats[playerid][0]);
SetPlayerInterior(playerid,EventLastInt[playerid]);
SetPlayerHealth(playerid, EventFloats[playerid][4]);
SetPlayerArmour(playerid, EventFloats[playerid][5]);
for(new d = 0; d < 6; d++)
{
EventFloats[playerid][d] = 0.0;
}
EventLastInt[playerid] = 0;
EventLastVW[playerid] = 0;
EventKernel[EventStaff][i] = 999;
}
}
if(GetPVarInt(playerid, "Injured") == 1 && PlayerInfo[playerid][pJustLogged] == 0)
{
SendEMSQueue(playerid,1);
return 1;
}
if(GetPVarInt(playerid, "IsOnFire") && PlayerInfo[playerid][pJustLogged] != 0)
{
TogglePlayerBurning(playerid, false);
CanPlayerBurn(playerid, 1);
return 1;
}
if(GetPVarInt(playerid, "Injured") == 1 && PlayerInfo[playerid][pJustLogged] != 0)
{
SendEMSQueue(playerid,1);
SendClientMessageEx(playerid, COLOR_WHITE, "You have been caught in a death bug, you will be automatically revived in 5 seconds ...");
SetTimerEx("AutoRevive", 5000, 0, "i", playerid);
return 1;
}
if(GetPVarInt(playerid, "MedicBill") == 1 && PlayerInfo[playerid][pJailed] == 0)
{
PlayerInfo[playerid][pDuty] = 0;
PlayerInfo[playerid][pVW] = 0;
PlayerInfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid, 0);
if(IsACop(playerid) || IsALVMPDCop(playerid))
{
SendClientMessageEx( playerid, TEAM_CYAN_COLOR, "Hospital: Hospital staff has cleared and discharged you for patrol. Your duty weapons have been returned." );
SetPlayerWeapons(playerid);
}
else
{
SendClientMessageEx( playerid, TEAM_CYAN_COLOR, "Hospital: Before you are discharged, hospital staff will confiscate your weapons." );
ResetPlayerWeapons(playerid);
}

if( GetPVarInt( playerid, "EventToken" ) == 1 )
{
//SendClientMessageEx( playerid, COLOR_WHITE, "As you've just come from an event, your weapons have been refunded." );
}

SetPVarInt(playerid, "MedicBill", 1);
SetPlayerInterior(playerid, 0);
new string[70+MAX_PLAYER_NAME];
if(PlayerInfo[playerid][pInsurance] == 1)
{
if(PlayerInfo[playerid][pWantedLevel] >= 1)
{
SendClientMessageEx(playerid, COLOR_YELLOW, " The police has been warned that you are wanted and they are on their way.");
format(string, sizeof(string), " County General Hospital has reported %s as a wanted person.", GetPlayerNameEx(playerid));
SendRadioMessage(1, DEPTRADIO, string);
SendRadioMessage(2, DEPTRADIO, string);
SendRadioMessage(3, DEPTRADIO, string);
SendRadioMessage(5, DEPTRADIO, string);
SendRadioMessage(7, DEPTRADIO, string);
SendRadioMessage(11, DEPTRADIO, string);
SendRadioMessage(13, DEPTRADIO, string);
SendRadioMessage(18, DEPTRADIO, string);
}
SetPlayerCameraPos(playerid,1999.5308,-1449.3281,13.5594+6.0);
SetPlayerCameraLookAt(playerid,2036.2179,-1410.3223,17.1641);
SetPlayerPos(playerid, 1999.5308,-1449.3281,10.5594);
SetPVarInt(playerid, "Hospital", 2);
}
else if(PlayerInfo[playerid][pInsurance] == 2)
{
if(PlayerInfo[playerid][pWantedLevel] >= 1)
{
SendClientMessageEx(playerid, COLOR_YELLOW, " The police has been warned that you are wanted and they are on their way.");
format(string, sizeof(string), " All Saints Hospital has reported %s as a wanted person.", GetPlayerNameEx(playerid));
SendRadioMessage(1, DEPTRADIO, string);
SendRadioMessage(2, DEPTRADIO, string);
SendRadioMessage(3, DEPTRADIO, string);
SendRadioMessage(5, DEPTRADIO, string);
SendRadioMessage(7, DEPTRADIO, string);
SendRadioMessage(11, DEPTRADIO, string);
SendRadioMessage(13, DEPTRADIO, string);
SendRadioMessage(18, DEPTRADIO, string);
}
SetPlayerCameraPos(playerid,1188.4574,-1309.2242,13.5625+6.0);
SetPlayerCameraLookAt(playerid,1175.5581,-1324.7922,18.1610);
SetPlayerPos(playerid, 1188.4574,-1309.2242,10.5625); // Warp the player
SetPVarInt(playerid, "Hospital", 1);
}
else if(PlayerInfo[playerid][pInsurance] == 3)
{
if(PlayerInfo[playerid][pWantedLevel] >= 1)
{
SendClientMessageEx(playerid, COLOR_YELLOW, " The police has been warned that you are wanted and they are on their way.");
format(string, sizeof(string), " Red County Hospital has reported %s as a wanted person.", GetPlayerNameEx(playerid));
SendRadioMessage(1, DEPTRADIO, string);
SendRadioMessage(2, DEPTRADIO, string);
SendRadioMessage(3, DEPTRADIO, string);
SendRadioMessage(5, DEPTRADIO, string);
SendRadioMessage(7, DEPTRADIO, string);
SendRadioMessage(11, DEPTRADIO, string);
SendRadioMessage(13, DEPTRADIO, string);
SendRadioMessage(18, DEPTRADIO, string);
}
SetPlayerCameraPos(playerid,1248.4147,338.8385,19. 4063+6.0);
SetPlayerCameraLookAt(playerid,1241.4449,326.3389, 19.7555);
SetPlayerPos(playerid, 1248.4147,338.8385,19.4063);
SetPVarInt(playerid, "Hospital", 3);
}
else if(PlayerInfo[playerid][pInsurance] == 4)
{
if(PlayerInfo[playerid][pWantedLevel] >= 1)
{
SendClientMessageEx(playerid, COLOR_YELLOW, " The police has been warned that you are wanted and they are on their way.");
format(string, sizeof(string), " Fort Carson Hospital has reported %s as a wanted person.", GetPlayerNameEx(playerid));
SendRadioMessage(1, DEPTRADIO, string);
SendRadioMessage(2, DEPTRADIO, string);
SendRadioMessage(3, DEPTRADIO, string);
SendRadioMessage(5, DEPTRADIO, string);
SendRadioMessage(7, DEPTRADIO, string);
SendRadioMessage(11, DEPTRADIO, string);
SendRadioMessage(13, DEPTRADIO, string);
SendRadioMessage(18, DEPTRADIO, string);
}
SetPlayerCameraPos(playerid,-314.0242,1060.7919,19.5938+6.0);
SetPlayerCameraLookAt(playerid,-320.0992,1049.0341,20.3403);
SetPlayerPos(playerid, -314.0242,1060.7919,19.593;
SetPVarInt(playerid, "Hospital", 4);
}
else if(PlayerInfo[playerid][pInsurance] == 5)
{
if(PlayerInfo[playerid][pWantedLevel] >= 1)
{
SendClientMessageEx(playerid, COLOR_YELLOW, " The police has been warned that you are wanted and they are on their way.");
format(string, sizeof(string), " Las Vegas Medical Center has reported %s as a wanted person.", GetPlayerNameEx(playerid));
SendRadioMessage(1, DEPTRADIO, string);
SendRadioMessage(2, DEPTRADIO, string);
SendRadioMessage(3, DEPTRADIO, string);
SendRadioMessage(5, DEPTRADIO, string);
SendRadioMessage(7, DEPTRADIO, string);
SendRadioMessage(11, DEPTRADIO, string);
SendRadioMessage(13, DEPTRADIO, string);
SendRadioMessage(18, DEPTRADIO, string);
SendRadioMessage(19, DEPTRADIO, string);
}
SetPlayerCameraPos(playerid,-2571.2766,558.7813,68.1754);
SetPlayerCameraLookAt(playerid,-2619.2883,596.2850,49.0966);
SetPlayerPos(playerid, -2653.6685,626.6485,4.8930);
SetPVarInt(playerid, "Hospital", 5);
}
else if(PlayerInfo[playerid][pInsurance] == 6)
{
SetPlayerCameraPos(playerid,2787.102050, 2392.162841, 1243.898681);
SetPlayerCameraLookAt(playerid,2801.281982, 2404.575683, 1240.531127);
SetPlayerPos(playerid, 2788.561523, 2387.321044, 1227.350219);
SetPVarInt(playerid, "Hospital", 7);
}
else if(PlayerInfo[playerid][pInsurance] == 7)
{
SetPlayerCameraPos(playerid,2787.102050, 2392.162841, 1243.898681);
SetPlayerCameraLookAt(playerid,2801.281982, 2404.575683, 1240.531127);
SetPlayerPos(playerid, 2788.561523, 2387.321044, 1227.350219);
SetPVarInt(playerid, "Hospital", ;
}
else if(PlayerInfo[playerid][pInsurance] ==
{
if(PlayerInfo[playerid][pMember] != 11 && PlayerInfo[playerid][pLeader] != 11)
{
PlayerInfo[playerid][pInsurance] = 0;
SetPlayerSpawn(playerid);
}
new Float:X, Float:Y, Float:Z;
GetObjectPos(Carrier[0], X, Y, Z);
SetPlayerCameraPos(playerid,(X-100),(Y-100),30);
SetPlayerCameraLookAt(playerid,X, Y, Z);
SetPlayerPos(playerid, (X-0.377671),(Y-10.91701,0);
SetPVarInt(playerid, "Hospital", 9);
}
else if(PlayerInfo[playerid][pInsurance] == 9)
{
SetPlayerCameraPos(playerid, -1529.847167, 2539.394042, 62.038913);
SetPlayerCameraLookAt(playerid, -1514.883300, 2527.161132, 55.743553);
SetPlayerPos(playerid, -1514.809204, 2526.305175, 51.865501);
SetPVarInt(playerid, "Hospital", 10);
}
else if(PlayerInfo[playerid][pInsurance] == 10)
{
if(PlayerInfo[playerid][pMember] != 11 && PlayerInfo[playerid][pLeader] != 11)
{
PlayerInfo[playerid][pInsurance] = 0;
SetPlayerSpawn(playerid);
}
SetPlayerPos(playerid, 272.3733,2043.6031,-100.0);
SetPlayerCameraPos(playerid, 150.1812,2000.4531,51.3394);
SetPlayerCameraLookAt(playerid, 150.1812,2000.4531,51.3394);
TogglePlayerControllable(playerid, 0);
SetPVarInt(playerid, "Hospital", 11);
}
if(PlayerInfo[playerid][pInsurance] == 0)
{
new randhos = Random(1,4);
switch (randhos)
{
case 1:
{
if(PlayerInfo[playerid][pWantedLevel] >= 1)
{
SendClientMessageEx(playerid, COLOR_YELLOW, " The police has been warned that you are wanted and they are on their way.");
format(string, sizeof(string), " All Saints Hospital has reported %s as a wanted person.", GetPlayerNameEx(playerid));
SendRadioMessage(1, DEPTRADIO, string);
SendRadioMessage(2, DEPTRADIO, string);
SendRadioMessage(3, DEPTRADIO, string);
SendRadioMessage(5, DEPTRADIO, string);
SendRadioMessage(7, DEPTRADIO, string);
SendRadioMessage(11, DEPTRADIO, string);
SendRadioMessage(13, DEPTRADIO, string);
SendRadioMessage(18, DEPTRADIO, string);
}

SetPlayerCameraPos(playerid,1188.4574,-1309.2242,13.5625+6.0);
SetPlayerCameraLookAt(playerid,1175.5581,-1324.7922,18.1610);
SetPlayerPos(playerid, 1188.4574,-1309.2242,10.5625); // Warp the player
SetPVarInt(playerid, "Hospital", 6);
}
case 2:
{
if(PlayerInfo[playerid][pWantedLevel] >= 1)
{
SendClientMessageEx(playerid, COLOR_YELLOW, " The police has been warned that you are wanted and they are on their way.");
format(string, sizeof(string), " County General Hospital has reported %s as a wanted person.", GetPlayerNameEx(playerid));
SendRadioMessage(1, DEPTRADIO, string);
SendRadioMessage(2, DEPTRADIO, string);
SendRadioMessage(3, DEPTRADIO, string);
SendRadioMessage(5, DEPTRADIO, string);
SendRadioMessage(7, DEPTRADIO, string);
SendRadioMessage(11, DEPTRADIO, string);
SendRadioMessage(13, DEPTRADIO, string);
SendRadioMessage(18, DEPTRADIO, string);
}

SetPlayerCameraPos(playerid,1999.5308,-1449.3281,13.5594+6.0);
SetPlayerCameraLookAt(playerid,2036.2179,-1410.3223,17.1641);
SetPlayerPos(playerid, 1999.5308,-1449.3281,10.5594);
SetPVarInt(playerid, "Hospital", 2);
}
case 3:
{
if(PlayerInfo[playerid][pWantedLevel] >= 1)
{
SendClientMessageEx(playerid, COLOR_YELLOW, " The police has been warned that you are wanted and they are on their way.");
format(string, sizeof(string), " Las Vegas Medical Center has reported %s as a wanted person.", GetPlayerNameEx(playerid));
SendRadioMessage(1, DEPTRADIO, string);
SendRadioMessage(2, DEPTRADIO, string);
SendRadioMessage(3, DEPTRADIO, string);
SendRadioMessage(5, DEPTRADIO, string);
SendRadioMessage(7, DEPTRADIO, string);
SendRadioMessage(11, DEPTRADIO, string);
SendRadioMessage(13, DEPTRADIO, string);
SendRadioMessage(18, DEPTRADIO, string);
SendRadioMessage(19, DEPTRADIO, string);
}

SetPlayerCameraPos(playerid,-2571.2766,558.7813,68.1754);
SetPlayerCameraLookAt(playerid,-2619.2883,596.2850,49.0966);
SetPlayerPos(playerid, -2653.6685,626.6485,4.8930);
SetPVarInt(playerid, "Hospital", 12);
}
}
}

TogglePlayerControllable(playerid, 0);
SetPlayerHealth(playerid, 0.5);
SetPVarInt(playerid, "HospitalTimer", 30);
SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_HOSPITALTIMER);
return 1;
}
if(GetPVarInt(playerid, "FirstSpawn") == 1 && GetPVarInt(playerid, "Hospital") == 0)
{
SetPlayerPos(playerid,PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z]);
//PlayerInfo[playerid][pInterior] = PlayerInfo[playerid][pInt];
SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVW]);
SetPlayerFacingAngle(playerid, PlayerInfo[playerid][pPos_r]);
SetPlayerInterior(playerid,PlayerInfo[playerid][pInt]);
SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
SetPlayerArmour(playerid, PlayerInfo[playerid][pArmor]);
SetCameraBehindPlayer(playerid);
if(PlayerInfo[playerid][pInt] > 0)
{
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "Objects loading...", 4000, 5);
SetPVarInt(playerid, "LoadingObjects", 1);
SetTimerEx("SafeLoadObjects", 4000, 0, "d", playerid);
}
}
else if(GetPVarInt(playerid, "FirstSpawn") == 1 && GetPVarInt(playerid, "Hospital") != 0)
{
PlayerInfo[playerid][pDuty] = 0;
PlayerInfo[playerid][pVW] = 0;
PlayerInfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid, 0);
if( GetPVarInt( playerid, "EventToken" ) == 1 )
{
//SendClientMessageEx( playerid, COLOR_WHITE, "As you've just come from an event, your weapons have been refunded." );
}
else
{
ResetPlayerWeaponsEx(playerid);
}

SetPVarInt(playerid, "MedicBill", 1);
new string[70+MAX_PLAYER_NAME];
if(PlayerInfo[playerid][pInsurance] == 1)
{
if(PlayerInfo[playerid][pWantedLevel] >= 1)
{
SendClientMessageEx(playerid, COLOR_YELLOW, "The police have been informed of your current location and are on their way.");
format(string, sizeof(string), " County General Hospital has reported %s as a wanted person.", GetPlayerNameEx(playerid));
SendRadioMessage(1, DEPTRADIO, string);
SendRadioMessage(2, DEPTRADIO, string);
SendRadioMessage(3, DEPTRADIO, string);
SendRadioMessage(5, DEPTRADIO, string);
SendRadioMessage(7, DEPTRADIO, string);
SendRadioMessage(11, DEPTRADIO, string);
SendRadioMessage(13, DEPTRADIO, string);
SendRadioMessage(18, DEPTRADIO, string);
}
SetPlayerCameraPos(playerid,1999.5308,-1449.3281,13.5594+6.0);
SetPlayerCameraLookAt(playerid,2036.2179,-1410.3223,17.1641);
SetPlayerPos(playerid, 1999.5308,-1449.3281,10.5594);
SetPVarInt(playerid, "Hospital", 2);
}
else if(PlayerInfo[playerid][pInsurance] == 2)
{
if(PlayerInfo[playerid][pWantedLevel] >= 1)
{
SendClientMessageEx(playerid, COLOR_YELLOW, "The police have been informed of your current location and are on their way.");
format(string, sizeof(string), " All Saints Hospital has reported %s as a wanted person.", GetPlayerNameEx(playerid));
SendRadioMessage(1, DEPTRADIO, string);
SendRadioMessage(2, DEPTRADIO, string);
SendRadioMessage(3, DEPTRADIO, string);
SendRadioMessage(5, DEPTRADIO, string);
SendRadioMessage(7, DEPTRADIO, string);
SendRadioMessage(11, DEPTRADIO, string);
SendRadioMessage(13, DEPTRADIO, string);
SendRadioMessage(18, DEPTRADIO, string);
}
SetPlayerCameraPos(playerid,1188.4574,-1309.2242,13.5625+6.0);
SetPlayerCameraLookAt(playerid,1175.5581,-1324.7922,18.1610);
SetPlayerPos(playerid, 1188.4574,-1309.2242,10.5625); // Warp the player
SetPVarInt(playerid, "Hospital", 1);
}
else if(PlayerInfo[playerid][pInsurance] == 3)
{
if(PlayerInfo[playerid][pWantedLevel] >= 1)
{
SendClientMessageEx(playerid, COLOR_YELLOW, "The police have been informed of your current location and are on their way.");
format(string, sizeof(string), " Red County Hospital has reported %s as a wanted person.", GetPlayerNameEx(playerid));
SendRadioMessage(1, DEPTRADIO, string);
SendRadioMessage(2, DEPTRADIO, string);
SendRadioMessage(3, DEPTRADIO, string);
SendRadioMessage(5, DEPTRADIO, string);
SendRadioMessage(7, DEPTRADIO, string);
SendRadioMessage(11, DEPTRADIO, string);
SendRadioMessage(13, DEPTRADIO, string);
SendRadioMessage(18, DEPTRADIO, string);
}
SetPlayerCameraPos(playerid,1248.4147,338.8385,19. 4063+6.0);
SetPlayerCameraLookAt(playerid,1241.4449,326.3389, 19.7555);
SetPlayerPos(playerid, 1248.4147,338.8385,19.4063);
SetPVarInt(playerid, "Hospital", 3);
}
else if(PlayerInfo[playerid][pInsurance] == 4)
{
if(PlayerInfo[playerid][pWantedLevel] >= 1)
{
SendClientMessageEx(playerid, COLOR_YELLOW, "The police have been informed of your current location and are on their way.");
format(string, sizeof(string), " Fort Carson Hospital has reported %s as a wanted person.", GetPlayerNameEx(playerid));
SendRadioMessage(1, DEPTRADIO, string);
SendRadioMessage(2, DEPTRADIO, string);
SendRadioMessage(3, DEPTRADIO, string);
SendRadioMessage(5, DEPTRADIO, string);
SendRadioMessage(7, DEPTRADIO, string);
SendRadioMessage(11, DEPTRADIO, string);
SendRadioMessage(13, DEPTRADIO, string);
SendRadioMessage(18, DEPTRADIO, string);
}
SetPlayerCameraPos(playerid,-314.0242,1060.7919,19.5938+6.0);
SetPlayerCameraLookAt(playerid,-320.0992,1049.0341,20.3403);
SetPlayerPos(playerid, -314.0242,1060.7919,19.593;
SetPVarInt(playerid, "Hospital", 4);
}
else if(PlayerInfo[playerid][pInsurance] == 5)
{
if(PlayerInfo[playerid][pWantedLevel] >= 1)
{
SendClientMessageEx(playerid, COLOR_YELLOW, " The police has been warned that you are wanted and they are on their way.");
format(string, sizeof(string), " Las Vegas Medical Center has reported %s as a wanted person.", GetPlayerNameEx(playerid));
SendRadioMessage(1, DEPTRADIO, string);
SendRadioMessage(2, DEPTRADIO, string);
SendRadioMessage(3, DEPTRADIO, string);
SendRadioMessage(5, DEPTRADIO, string);
SendRadioMessage(7, DEPTRADIO, string);
SendRadioMessage(11, DEPTRADIO, string);
SendRadioMessage(13, DEPTRADIO, string);
SendRadioMessage(18, DEPTRADIO, string);
SendRadioMessage(19, DEPTRADIO, string);
}
SetPlayerCameraPos(playerid,-2571.2766,558.7813,68.1754);
SetPlayerCameraLookAt(playerid,-2619.2883,596.2850,49.0966);
SetPlayerPos(playerid, -2653.6685,626.6485,4.8930);
SetPVarInt(playerid, "Hospital", 5);
}
else if(PlayerInfo[playerid][pInsurance] == 6)
{
SetPlayerCameraPos(playerid,2787.102050, 2392.162841, 1243.898681);
SetPlayerCameraLookAt(playerid,2801.281982, 2404.575683, 1240.531127);
SetPlayerPos(playerid, 2788.561523, 2387.321044, 1227.350219);
SetPVarInt(playerid, "Hospital", 7);
}
else if(PlayerInfo[playerid][pInsurance] == 7)
{
SetPlayerCameraPos(playerid,2787.102050, 2392.162841, 1243.898681);
SetPlayerCameraLookAt(playerid,2801.281982, 2404.575683, 1240.531127);
SetPlayerPos(playerid, 2788.561523, 2387.321044, 1227.350219);
SetPVarInt(playerid, "Hospital", ;
}
else if(PlayerInfo[playerid][pInsurance] ==
{
new Float:X, Float:Y, Float:Z;
GetObjectPos(Carrier[0], X, Y, Z);
SetPlayerCameraPos(playerid,(X-100),(Y-100),30);
SetPlayerCameraLookAt(playerid,X, Y, Z);
SetPlayerPos(playerid, (X-0.377671),(Y-10.91701,0);
SetPVarInt(playerid, "Hospital", 9);
}
else if(PlayerInfo[playerid][pInsurance] == 9)
{
SetPlayerCameraPos(playerid, -1529.847167, 2539.394042, 62.038913);
SetPlayerCameraLookAt(playerid, -1514.883300, 2527.161132, 55.743553);
SetPlayerPos(playerid, -1514.809204, 2526.305175, 51.865501);
SetPVarInt(playerid, "Hospital", 10);
}
if(PlayerInfo[playerid][pInsurance] == 0)
{
new randhos = Random(1,3);
switch(randhos)
{
case 1:
{
if(PlayerInfo[playerid][pWantedLevel] >= 1)
{
SendClientMessageEx(playerid, COLOR_YELLOW, " The police has been warned that you are wanted and they are on their way.");
format(string, sizeof(string), " All Saints Hospital has reported %s as a wanted person.", GetPlayerNameEx(playerid));
SendRadioMessage(1, DEPTRADIO, string);
SendRadioMessage(2, DEPTRADIO, string);
SendRadioMessage(3, DEPTRADIO, string);
SendRadioMessage(5, DEPTRADIO, string);
SendRadioMessage(7, DEPTRADIO, string);
SendRadioMessage(11, DEPTRADIO, string);
SendRadioMessage(13, DEPTRADIO, string);
SendRadioMessage(18, DEPTRADIO, string);
}

SetPlayerCameraPos(playerid,1188.4574,-1309.2242,13.5625+6.0);
SetPlayerCameraLookAt(playerid,1175.5581,-1324.7922,18.1610);
SetPlayerPos(playerid, 1188.4574,-1309.2242,10.5625); // Warp the player
SetPVarInt(playerid, "Hospital", 6);
}
case 2:
{
if(PlayerInfo[playerid][pWantedLevel] >= 1)
{
SendClientMessageEx(playerid, COLOR_YELLOW, " The police has been warned that you are wanted and they are on their way.");
format(string, sizeof(string), " County General Hospital has reported %s as a wanted person.", GetPlayerNameEx(playerid));
SendRadioMessage(1, DEPTRADIO, string);
SendRadioMessage(2, DEPTRADIO, string);
SendRadioMessage(3, DEPTRADIO, string);
SendRadioMessage(5, DEPTRADIO, string);
SendRadioMessage(7, DEPTRADIO, string);
SendRadioMessage(11, DEPTRADIO, string);
SendRadioMessage(13, DEPTRADIO, string);
SendRadioMessage(18, DEPTRADIO, string);
}

SetPlayerCameraPos(playerid,1999.5308,-1449.3281,13.5594+6.0);
SetPlayerCameraLookAt(playerid,2036.2179,-1410.3223,17.1641);
SetPlayerPos(playerid, 1999.5308,-1449.3281,10.5594);
SetPVarInt(playerid, "Hospital", 2);
}
}
}
TogglePlayerControllable(playerid, 0);
SetPlayerHealth(playerid, 0.5);
SetPVarInt(playerid, "HospitalTimer", 30);
SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_HOSPITALTIMER);
}
new Float: x, Float: y, Float: z;
GetPlayerPos(playerid, x, y, z);
if(x == 0.0 && y == 0.0)
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 1715.1201,-1903.1711,13.5665);
SetPlayerFacingAngle(playerid, 359.4621);
SetCameraBehindPlayer(playerid);
}
SetPlayerToTeamColor(playerid);
return 1;
}
return 1;

Reply
#5

You are using fwrite & fread to save stats?
Reply
#6

Quote:
Originally Posted by xTURBOx
Посмотреть сообщение
You are using fwrite & fread to save stats?
Why wouldn't he? (Not saying that it should work)



It's actually the old Godfather script. It's so old that it'd be better to get a better up-to-date gamemode.
Reply
#7

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
Why wouldn't he? (Not saying that it should work)



It's actually the old Godfather script. It's so old that it'd be better to get a better up-to-date gamemode.
Lol no? It's the PLA script lmao... But I've ran this script before as well but it didn't seem to bug then.
Reply
#8

Quote:
Originally Posted by DrakeBell
Посмотреть сообщение
Lol no? It's the PLA script lmao... But I've ran this script before as well but it didn't seem to bug then.
There is a reason that code and even better php tags exist, so you wouldn't put it under quote tags, lemme put this delicately, your code has so many loading lines that I even got bored scrolling over them with no color, let alone reading them.
And as a suggestion, convert your code into INI at least (I don't really recommend it, but if you insist on using files, at least do it optimized) because I'm sure your loading takes a couple secs at best.
Reply
#9

Quote:
Originally Posted by DrakeBell
Посмотреть сообщение
Lol no? It's the PLA script lmao... But I've ran this script before as well but it didn't seem to bug then.
Regardless of what edit you think it is, It's still GodFather, and it's still an edit.


Especially that it uses the fwrite, for the userfiles, and the rest.
Reply
#10

GivePlayerCash(playerid, GetPVarInt(playerid, "Money));

I couldn't find that anywhere in your code, so try adding it.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)