25.03.2014, 15:40
When you're spawning after registering in the server, you cant do any cmds.. When you relog you can do all the commands. What's wrong?
public OnPlayerRegister(playerid, password[])
{
if(IsPlayerConnected(playerid))
{
new string3[32];
new playername3[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername3, sizeof(playername3));
format(string3, sizeof(string3), "users/%s.ini", playername3);
new File: hFile = fopen(string3, io_write);
if (hFile)
{
strmid(PlayerInfo[playerid][pKey], password, 0, strlen(password), 255);
new var[156];
format(var, 32, "Key=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);
format(var, 32, "Level=%d\n",PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
format(var, 32, "AdminLevel=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
//format(var, 32, "AdminName=%d\n",PlayerInfo[playerid][pAdminName]);fwrite(hFile, var);
//format(var, 32, "NormalName=%d\n",PlayerInfo[playerid][pNormalName]);fwrite(hFile, var);
format(var, 32, "Band=%d\n",PlayerInfo[playerid][pBanned]);fwrite(hFile, var);
format(var, 32, "PermBand=%d\n",PlayerInfo[playerid][pPermaBanned]);fwrite(hFile, var);
format(var, 32, "Warnings=%d\n",PlayerInfo[playerid][pWarns]);fwrite(hFile, var);
format(var, 32, "Disabled=%d\n",PlayerInfo[playerid][pDisabled]);fwrite(hFile, var);
format(var, 32, "DonateRank=%d\n",PlayerInfo[playerid][pDonateRank]);fwrite(hFile, var);
format(var, 32, "BanAppealer=%d\n",PlayerInfo[playerid][pBanAppealer]);fwrite(hFile, var);
format(var, 32, "ShopTech=%d\n",PlayerInfo[playerid][pShopTech]);fwrite(hFile, var);
format(var, 32, "Undercover=%d\n",PlayerInfo[playerid][pUndercover]);fwrite(hFile, var);
format(var, 32, "TogReports=%d\n",PlayerInfo[playerid][pTogReports]);fwrite(hFile, var);
format(var, 32, "Radio=%d\n",PlayerInfo[playerid][pRadio]);fwrite(hFile, var);
format(var, 32, "RadioFreq=%d\n",PlayerInfo[playerid][pRadioFreq]);fwrite(hFile, var);
format(var, 32, "UpgradePoints=%d\n",PlayerInfo[playerid][gPupgrade]);fwrite(hFile, var);
format(var, 32, "ConnectedTime=%d\n",PlayerInfo[playerid][pConnectTime]);fwrite(hFile, var);
format(var, 32, "Registered=%d\n",PlayerInfo[playerid][pReg]);fwrite(hFile, var);
format(var, 32, "Sex=%d\n",PlayerInfo[playerid][pSex]);fwrite(hFile, var);
format(var, 32, "Age=%d\n",PlayerInfo[playerid][pAge]);fwrite(hFile, var);
format(var, 32, "Origin=%d\n",PlayerInfo[playerid][pOrigin]);fwrite(hFile, var);
format(var, 32, "Muted=%d\n",PlayerInfo[playerid][pMuted]);fwrite(hFile, var);
format(var, 32, "Respect=%d\n",PlayerInfo[playerid][pExp]);fwrite(hFile, var);
format(var, 32, "Money=%d\n",GetPVarInt(playerid, "Cash"));fwrite(hFile, var);
format(var, 32, "Bank=%d\n",PlayerInfo[playerid][pAccount]);fwrite(hFile, var);
format(var, 32, "Crimes=%d\n",PlayerInfo[playerid][pCrimes]);fwrite(hFile, var);
format(var, 32, "Accent=%d\n",PlayerInfo[playerid][pAccent]);fwrite(hFile, var);
format(var, 32, "CHits=%d\n",PlayerInfo[playerid][pCHits]);fwrite(hFile, var);
format(var, 32, "FHits=%d\n",PlayerInfo[playerid][pFHits]);fwrite(hFile, var);
format(var, 32, "Arrested=%d\n",PlayerInfo[playerid][pArrested]);fwrite(hFile, var);
format(var, 32, "Phonebook=%d\n",PlayerInfo[playerid][pPhoneBook]);fwrite(hFile, var);
format(var, 32, "LottoNr=%d\n",PlayerInfo[playerid][pLottoNr]);fwrite(hFile, var);
format(var, 32, "Fishes=%d\n",PlayerInfo[playerid][pFishes]);fwrite(hFile, var);
format(var, 32, "BiggestFish=%d\n",PlayerInfo[playerid][pBiggestFish]);fwrite(hFile, var);
format(var, 32, "Job=%d\n",PlayerInfo[playerid][pJob]);fwrite(hFile, var);
format(var, 32, "Job2=%d\n",PlayerInfo[playerid][pJob2]);fwrite(hFile, var);
format(var, 32, "Paycheck=%d\n",PlayerInfo[playerid][pPayCheck]);fwrite(hFile, var);
format(var, 32, "HeadValue=%d\n",PlayerInfo[playerid][pHeadValue]);fwrite(hFile, var);
format(var, 32, "Jailed=%d\n",PlayerInfo[playerid][pJailed]);fwrite(hFile, var);
format(var, 32, "JailTime=%d\n",PlayerInfo[playerid][pJailTime]);fwrite(hFile, var);
format(var, 32, "WRestricted=%d\n",PlayerInfo[playerid][pWRestricted]);fwrite(hFile, var);
format(var, 32, "Materials=%d\n",PlayerInfo[playerid][pMats]);fwrite(hFile, var);
format(var, 32, "Packages=%d\n",GetPVarInt(playerid, "Packages"));fwrite(hFile, var);
format(var, 32, "Crates=%d\n",PlayerInfo[playerid][pCrates]);fwrite(hFile, var);
format(var, 32, "Pot=%d\n",PlayerInfo[playerid][pPot]);fwrite(hFile, var);
format(var, 32, "Crack=%d\n",PlayerInfo[playerid][pCrack]);fwrite(hFile, var);
format(var, 32, "Leader=%d\n",PlayerInfo[playerid][pLeader]);fwrite(hFile, var);
format(var, 32, "Member=%d\n",PlayerInfo[playerid][pMember]);fwrite(hFile, var);
format(var, 32, "Division=%d\n",PlayerInfo[playerid][pDivision]);fwrite(hFile, var);
format(var, 32, "FMember=%d\n",PlayerInfo[playerid][pFMember]);fwrite(hFile, var);
format(var, 32, "Rank=%d\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var);
format(var, 32, "DetSkill=%d\n",PlayerInfo[playerid][pDetSkill]);fwrite(hFile, var);
format(var, 32, "SexSkill=%d\n",PlayerInfo[playerid][pSexSkill]);fwrite(hFile, var);
format(var, 32, "BoxSkill=%d\n",PlayerInfo[playerid][pBoxSkill]);fwrite(hFile, var);
format(var, 32, "LawSkill=%d\n",PlayerInfo[playerid][pLawSkill]);fwrite(hFile, var);
format(var, 32, "MechSkill=%d\n",PlayerInfo[playerid][pMechSkill]);fwrite(hFile, var);
format(var, 32, "JackSkill=%d\n",PlayerInfo[playerid][pJackSkill]);fwrite(hFile, var);
format(var, 32, "CarSkill=%d\n",PlayerInfo[playerid][pCarSkill]);fwrite(hFile, var);
format(var, 32, "TruckSkill=%d\n",PlayerInfo[playerid][pTruckSkill]);fwrite(hFile, var);
format(var, 32, "NewsSkill=%d\n",PlayerInfo[playerid][pNewsSkill]);fwrite(hFile, var);
format(var, 32, "DrugsSkill=%d\n",PlayerInfo[playerid][pDrugsSkill]);fwrite(hFile, var);
format(var, 32, "ArmsSkill=%d\n",PlayerInfo[playerid][pArmsSkill]);fwrite(hFile, var);
format(var, 32, "SmugglerSkill=%d\n",PlayerInfo[playerid][pSmugSkill]);fwrite(hFile, var);
format(var, 32, "FishSkill=%d\n",PlayerInfo[playerid][pFishSkill]);fwrite(hFile, var);
format(var, 32, "FightingStyle=%d\n",PlayerInfo[playerid][pFightStyle]);fwrite(hFile, var);
GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
format(var, 32, "pHealth=%.1f\n",PlayerInfo[playerid][pHealth]);fwrite(hFile, var);
GetPlayerArmour(playerid,PlayerInfo[playerid][pArmor]);
format(var, 32, "pArmor=%.1f\n",PlayerInfo[playerid][pArmor]);fwrite(hFile, var);
format(var, 32, "pSHealth=%.1f\n",PlayerInfo[playerid][pSHealth]);fwrite(hFile, var);
//format(var, 32, "pSArmor=%.1f\n",PlayerInfo[playerid][pSArmor]);fwrite(hFile, var);
format(var, 32, "Int=%d\n",PlayerInfo[playerid][pInt]);fwrite(hFile, var);
format(var, 32, "Local=%d\n",PlayerInfo[playerid][pLocal]);fwrite(hFile, var);
format(var, 32, "VirtualWorld=%d\n",PlayerInfo[playerid][pVW]);fwrite(hFile, var);
format(var, 32, "HouseInvite=%d\n",PlayerInfo[playerid][pHouseInvite]);fwrite(hFile, var);
format(var, 32, "Model=%d\n",PlayerInfo[playerid][pModel]);fwrite(hFile, var);
format(var, 32, "Clothes=%d\n",PlayerInfo[playerid][pClothes]);fwrite(hFile, var);
format(var, 32, "PhoneNr=%d\n",PlayerInfo[playerid][pPnumber]);fwrite(hFile, var);
format(var, 32, "Apartment=%d\n",PlayerInfo[playerid][pPhousekey]);fwrite(hFile, var);
format(var, 32, "Apartment2=%d\n",PlayerInfo[playerid][pPhousekey2]);fwrite(hFile, var);
format(var, 32, "Renting=%d\n",PlayerInfo[playerid][pRenting]);fwrite(hFile, var);
format(var, 32, "Vehicles=%d\n",PlayerInfo[playerid][pVehicles]);fwrite(hFile, var);
format(var, 32, "VehFile=%d\n",PlayerInfo[playerid][pVehFile]);fwrite(hFile, var);
format(var, 32, "VehActive=%d\n",PlayerInfo[playerid][pVehActive]);fwrite(hFile, var);
format(var, 32, "Type1=%d\n",PlayerInfo[playerid][pType1]);fwrite(hFile, var);
format(var, 32, "Type2=%d\n",PlayerInfo[playerid][pType2]);fwrite(hFile, var);
format(var, 32, "Type3=%d\n",PlayerInfo[playerid][pType3]);fwrite(hFile, var);
format(var, 32, "Type4=%d\n",PlayerInfo[playerid][pType4]);fwrite(hFile, var);
format(var, 32, "Type5=%d\n",PlayerInfo[playerid][pType5]);fwrite(hFile, var);
format(var, 32, "CarLic=%d\n",PlayerInfo[playerid][pCarLic]);fwrite(hFile, var);
format(var, 32, "FlyLic=%d\n",PlayerInfo[playerid][pFlyLic]);fwrite(hFile, var);
format(var, 32, "BoatLic=%d\n",PlayerInfo[playerid][pBoatLic]);fwrite(hFile, var);
format(var, 32, "FishLic=%d\n",PlayerInfo[playerid][pFishLic]);fwrite(hFile, var);
format(var, 32, "CheckCash=%d\n",PlayerInfo[playerid][pCheckCash]);fwrite(hFile, var);
format(var, 32, "Firework1=%d\n",PlayerInfo[playerid][pFirework1]);fwrite(hFile, var);
format(var, 32, "Firework2=%d\n",PlayerInfo[playerid][pFirework2]);fwrite(hFile, var);
format(var, 32, "Firework3=%d\n",PlayerInfo[playerid][pFirework3]);fwrite(hFile, var);
format(var, 32, "Checks=%d\n",PlayerInfo[playerid][pChecks]);fwrite(hFile, var);
//format(var, 32, "MInsure=%d\n",PlayerInfo[playerid][pMInsure]);fwrite(hFile, var);
format(var, 32, "GunLic=%d\n",PlayerInfo[playerid][pGunLic]);fwrite(hFile, var);
for(new s = 0; s < 12; s++)
{
format(var, 32, "Gun%d=%d\n", s, PlayerInfo[playerid][pGuns][s]);fwrite(hFile, var);
}
format(var, 32, "CarTime=%d\n",PlayerInfo[playerid][pCarTime]);fwrite(hFile, var);
format(var, 32, "DrugsTime=%d\n",PlayerInfo[playerid][pDrugsTime]);fwrite(hFile, var);
format(var, 32, "LawyerTime=%d\n",PlayerInfo[playerid][pLawyerTime]);fwrite(hFile, var);
format(var, 32, "LawyerFreeTime=%d\n",PlayerInfo[playerid][pLawyerFreeTime]);fwrite(hFile, var);
format(var, 32, "MechTime=%d\n",PlayerInfo[playerid][pMechTime]);fwrite(hFile, var);
format(var, 32, "SexTime=%d\n",PlayerInfo[playerid][pSexTime]);fwrite(hFile, var);
format(var, 32, "PayDay=%d\n",PlayerInfo[playerid][pPayDay]);fwrite(hFile, var);
format(var, 32, "PayDayHad=%d\n",PlayerInfo[playerid][pPayDayHad]);fwrite(hFile, var);
format(var, 32, "CDPlayer=%d\n",PlayerInfo[playerid][pCDPlayer]);fwrite(hFile, var);
format(var, 32, "Dice=%d\n",PlayerInfo[playerid][pDice]);fwrite(hFile, var);
format(var, 32, "Spraycan=%d\n",PlayerInfo[playerid][pSpraycan]);fwrite(hFile, var);
format(var, 32, "Rope=%d\n",PlayerInfo[playerid][pRope]);fwrite(hFile, var);
format(var, 32, "Cigars=%d\n",PlayerInfo[playerid][pCigar]);fwrite(hFile, var);
format(var, 32, "Sprunk=%d\n",PlayerInfo[playerid][pSprunk]);fwrite(hFile, var);
format(var, 32, "Bombs=%d\n",PlayerInfo[playerid][pBombs]);fwrite(hFile, var);
format(var, 32, "Wins=%d\n",PlayerInfo[playerid][pWins]);fwrite(hFile, var);
format(var, 32, "Loses=%d\n",PlayerInfo[playerid][pLoses]);fwrite(hFile, var);
format(var, 32, "Tutorial=%d\n",PlayerInfo[playerid][pTut]);fwrite(hFile, var);
format(var, 32, "OnDuty=%d\n",PlayerInfo[playerid][pDuty]);fwrite(hFile, var);
format(var, 32, "Hospital=%d\n",GetPVarInt(playerid, "Hospital"));fwrite(hFile, var);
format(var, 32, "Adjustable=%d\n",PlayerInfo[playerid][pAdjustable]);fwrite(hFile, var);
format(var, 32, "Married=%d\n",PlayerInfo[playerid][pMarried]);fwrite(hFile, var);
format(var, 32, "MarriedTo=%s\n",PlayerInfo[playerid][pMarriedTo]);fwrite(hFile, var);
format(var, 32, "ContractBy=%s\n",PlayerInfo[playerid][pContractBy]);fwrite(hFile, var);
format(var, 64, "ContractDetail=%s\n",PlayerInfo[playerid][pContractDetail]);fwrite(hFile, var);
format(var, 32, "IP=%s\n",PlayerInfo[playerid][pIP]);fwrite(hFile, var);
format(var, 32, "WantedLevel=%d\n",PlayerInfo[playerid][pWantedLevel]);fwrite(hFile, var);
format(var, 32, "Insurance=%d\n",PlayerInfo[playerid][pInsurance]);fwrite(hFile, var);
//format(var, 32, "BadgeNumber=%d\n",PlayerInfo[playerid][pBadgeNumber]);fwrite(hFile, var);
//format(var, 32, "Warrant=%d\n",PlayerInfo[playerid][pRoadblock]);fwrite(hFile, var);
format(var, 32, "NewMuted=%d\n",PlayerInfo[playerid][pNMute]);fwrite(hFile, var);
format(var, 32, "NewMutedTotal=%d\n",PlayerInfo[playerid][pNMuteTotal]);fwrite(hFile, var);
format(var, 32, "AdMuted=%d\n",PlayerInfo[playerid][pADMute]);fwrite(hFile, var);
format(var, 32, "AdMutedTotal=%d\n",PlayerInfo[playerid][pADMuteTotal]);fwrite(hFile, var);
format(var, 32, "HelpMute=%d\n",PlayerInfo[playerid][pHelpMute]);fwrite(hFile, var);
//format(var, 32, "Helper=%d\n",PlayerInfo[playerid][pHelper]);fwrite(hFile, var);
format(var, 32, "SPos_x=%.1f\n",PlayerInfo[playerid][pPos_x]);fwrite(hFile, var);
format(var, 32, "SPos_y=%.1f\n",PlayerInfo[playerid][pPos_y]);fwrite(hFile, var);
format(var, 32, "SPos_z=%.1f\n",PlayerInfo[playerid][pPos_z]);fwrite(hFile, var);
format(var, 32, "SPos_r=%.1f\n",PlayerInfo[playerid][pPos_r]);fwrite(hFile, var);
format(var, 32, "Helper=%d\n",PlayerInfo[playerid][pHelper]);fwrite(hFile, var);
format(var, 32, "ReportMuted=%d\n",PlayerInfo[playerid][pRMuted]);fwrite(hFile, var);
format(var, 32, "ReportMutedTotal=%d\n",PlayerInfo[playerid][pRMutedTotal]);fwrite(hFile, var);
format(var, 32, "ReportMutedTime=%d\n",PlayerInfo[playerid][pRMutedTime]);fwrite(hFile, var);
format(var, 32, "VIPMuted=%d\n",PlayerInfo[playerid][pVMuted]);fwrite(hFile, var);
format(var, 32, "VIPMutedTime=%d\n",PlayerInfo[playerid][pVMutedTime]);fwrite(hFile, var);
format(var, 32, "GiftTime=%d\n",PlayerInfo[playerid][pGiftTime]);fwrite(hFile, var);
format(var, 32, "AdvisorDutyHours=%d\n",PlayerInfo[playerid][pDutyHours]);fwrite(hFile, var);
format(var, 32, "AcceptedHelp=%d\n",PlayerInfo[playerid][pAcceptedHelp]);fwrite(hFile, var);
format(var, 32, "AcceptReport=%d\n",PlayerInfo[playerid][pAcceptReport]);fwrite(hFile, var);
format(var, 32, "TrashReport=%d\n",PlayerInfo[playerid][pTrashReport]);fwrite(hFile, var);
format(var, 32, "FactionModerator=%d\n",PlayerInfo[playerid][pFactionModerator]);fwrite(hFile, var);
format(var, 32, "GangModerator=%d\n",PlayerInfo[playerid][pGangModerator]);fwrite(hFile, var);
format(var, 32, "GangWarn=%d\n",PlayerInfo[playerid][pGangWarn]);fwrite(hFile, var);
format(var, 32, "FactionBanned=%d\n",PlayerInfo[playerid][pFactionBanned]);fwrite(hFile, var);
format(var, 32, "CSFBanned=%d\n",PlayerInfo[playerid][pCSFBanned]);fwrite(hFile, var);
for(new v = 0; v < MAX_PLAYERVEHICLES; v++)
{
format(var, 32, "pv%dPosX=%.1f\n", v, PlayerVehicleInfo[playerid][v][pvPosX]);fwrite(hFile, var);
format(var, 32, "pv%dPosY=%.1f\n", v, PlayerVehicleInfo[playerid][v][pvPosY]);fwrite(hFile, var);
format(var, 32, "pv%dPosZ=%.1f\n", v, PlayerVehicleInfo[playerid][v][pvPosZ]);fwrite(hFile, var);
format(var, 32, "pv%dPosAngle=%.1f\n", v, PlayerVehicleInfo[playerid][v][pvPosAngle]);fwrite(hFile, var);
format(var, 32, "pv%dModelId=%d\n", v, PlayerVehicleInfo[playerid][v][pvModelId]);fwrite(hFile, var);
format(var, 32, "pv%dLock=%d\n", v, PlayerVehicleInfo[playerid][v][pvLock]);fwrite(hFile, var);
format(var, 32, "pv%dLocked=%d\n", v, PlayerVehicleInfo[playerid][v][pvLocked]);fwrite(hFile, var);
format(var, 32, "pv%dPaintJob=%d\n", v, PlayerVehicleInfo[playerid][v][pvPaintJob]);fwrite(hFile, var);
format(var, 32, "pv%dColor1=%d\n", v, PlayerVehicleInfo[playerid][v][pvColor1]);fwrite(hFile, var);
format(var, 32, "pv%dColor2=%d\n", v, PlayerVehicleInfo[playerid][v][pvColor2]);fwrite(hFile, var);
format(var, 32, "pv%dPrice=%d\n", v, PlayerVehicleInfo[playerid][v][pvPrice]);fwrite(hFile, var);
format(var, 32, "pv%dTicket=%d\n", v, PlayerVehicleInfo[playerid][v][pvTicket]);fwrite(hFile, var);
format(var, 32, "pv%dWeapon0=%d\n", v, PlayerVehicleInfo[playerid][v][pvWeapons][0]);fwrite(hFile, var);
format(var, 32, "pv%dWeapon1=%d\n", v, PlayerVehicleInfo[playerid][v][pvWeapons][1]);fwrite(hFile, var);
format(var, 32, "pv%dWeapon2=%d\n", v, PlayerVehicleInfo[playerid][v][pvWeapons][2]);fwrite(hFile, var);
format(var, 32, "pv%dWepUpgrade=%d\n", v, PlayerVehicleInfo[playerid][v][pvWepUpgrade]);fwrite(hFile, var);
format(var, 32, "pv%dFuel=%.2f\n", v, PlayerVehicleInfo[playerid][v][pvFuel]);fwrite(hFile, var);
format(var, 32, "pv%dImpound=%d\n", v, PlayerVehicleInfo[playerid][v][pvImpounded]);fwrite(hFile, var);
//format(var, 32, "pv%dNumPlate=%s\n", v, PlayerVehicleInfo[playerid][v][pvNumberPlate]);fwrite(hFile, var);
for(new m = 0; m < MAX_MODS; m++)
{
format(var, 32, "pv%dMod%d=%d\n", v, m, PlayerVehicleInfo[playerid][v][pvMods][m]);fwrite(hFile, var);
}
//format(var, 32, "pv%dAllowedPlayer=%s\n", v, PlayerVehicleInfo[playerid][v][pvAllowPlayer]);fwrite(hFile, var);
}
for(new v = 0; v < MAX_PLAYERTOYS; v++)
{
format(var, 32, "pt%dModelID=%d\n", v, PlayerToyInfo[playerid][v][ptModelID]);fwrite(hFile, var);
format(var, 32, "pt%dBone=%d\n", v, PlayerToyInfo[playerid][v][ptBone]);fwrite(hFile, var);
format(var, 32, "pt%dPosX=%.5f\n", v, PlayerToyInfo[playerid][v][ptPosX]);fwrite(hFile, var);
format(var, 32, "pt%dPosY=%.5f\n", v, PlayerToyInfo[playerid][v][ptPosY]);fwrite(hFile, var);
format(var, 32, "pt%dPosZ=%.5f\n", v, PlayerToyInfo[playerid][v][ptPosZ]);fwrite(hFile, var);
format(var, 32, "pt%dRotX=%.5f\n", v, PlayerToyInfo[playerid][v][ptRotX]);fwrite(hFile, var);
format(var, 32, "pt%dRotY=%.5f\n", v, PlayerToyInfo[playerid][v][ptRotY]);fwrite(hFile, var);
format(var, 32, "pt%dRotZ=%.5f\n", v, PlayerToyInfo[playerid][v][ptRotZ]);fwrite(hFile, var);
format(var, 32, "pt%dScaleX=%.5f\n", v, PlayerToyInfo[playerid][v][ptScaleX]);fwrite(hFile, var);
format(var, 32, "pt%dScaleY=%.5f\n", v, PlayerToyInfo[playerid][v][ptScaleY]);fwrite(hFile, var);
format(var, 32, "pt%dScaleZ=%.5f\n", v, PlayerToyInfo[playerid][v][ptScaleZ]);fwrite(hFile, var);
}
format(var, 32, "VIPInviteDay=%d\n",PlayerInfo[playerid][pVIPInviteDay]);fwrite(hFile, var);
format(var, 32, "TempVIP=%d\n",PlayerInfo[playerid][pTempVIP]);fwrite(hFile, var);
format(var, 32, "BuddyInvite=%d\n",PlayerInfo[playerid][pBuddyInvited]);fwrite(hFile, var);
format(var, 32, "Tokens=%d\n",PlayerInfo[playerid][pTokens]);fwrite(hFile, var);
format(var, 32, "PTokens=%d\n",PlayerInfo[playerid][pPaintTokens]);fwrite(hFile, var);
format(var, 32, "TriageTime=%d\n",PlayerInfo[playerid][pTriageTime]);fwrite(hFile, var);
format(var, 32, "PrisonedBy=%s\n", PlayerInfo[playerid][pPrisonedBy]);fwrite(hFile, var);
format(var, 128, "PrisonReason=%s\n", PlayerInfo[playerid][pPrisonReason]);fwrite(hFile, var);
format(var, 128, "Flag=%s\n", PlayerInfo[playerid][pFlag]);fwrite(hFile, var);
format(var, 32, "TaxiLicense=%d\n", PlayerInfo[playerid][pTaxiLicense]);fwrite(hFile, var);
format(var, 32, "TicketTime=%d\n",PlayerInfo[playerid][pTicketTime]);fwrite(hFile, var);
format(var, 32, "Screwdriver=%d\n",PlayerInfo[playerid][pScrewdriver]);fwrite(hFile, var);
format(var, 32, "Smslog=%d\n",PlayerInfo[playerid][pSmslog]);fwrite(hFile, var);
format(var, 32, "Surveillance=%d\n",PlayerInfo[playerid][pSurveillance]);fwrite(hFile, var);
format(var, 32, "Tire=%d\n",PlayerInfo[playerid][pTire]);fwrite(hFile, var);
format(var, 32, "Firstaid=%d\n",PlayerInfo[playerid][pFirstaid]);fwrite(hFile, var);
format(var, 32, "Rccam=%d\n",PlayerInfo[playerid][pRccam]);fwrite(hFile, var);
format(var, 32, "Receiver=%d\n",PlayerInfo[playerid][pReceiver]);fwrite(hFile, var);
format(var, 32, "GPS=%d\n",PlayerInfo[playerid][pGPS]);fwrite(hFile, var);
format(var, 32, "Sweep=%d\n",PlayerInfo[playerid][pSweep]);fwrite(hFile, var);
format(var, 32, "SweepLeft=%d\n",PlayerInfo[playerid][pSweepLeft]);fwrite(hFile, var);
format(var, 32, "Bugged=%d\n",PlayerInfo[playerid][pBugged]);fwrite(hFile, var);
format(var, 256, "Smslog0=%s\n",PlayerInfo[playerid][pSmslog0]);fwrite(hFile, var);
format(var, 256, "Smslog1=%s\n",PlayerInfo[playerid][pSmslog1]);fwrite(hFile, var);
format(var, 256, "Smslog2=%s\n",PlayerInfo[playerid][pSmslog2]);fwrite(hFile, var);
format(var, 256, "Smslog3=%s\n",PlayerInfo[playerid][pSmslog3]);fwrite(hFile, var);
format(var, 256, "Smslog4=%s\n",PlayerInfo[playerid][pSmslog4]);fwrite(hFile, var);
format(var, 256, "Smslog5=%s\n",PlayerInfo[playerid][pSmslog5]);fwrite(hFile, var);
format(var, 256, "Smslog6=%s\n",PlayerInfo[playerid][pSmslog6]);fwrite(hFile, var);
format(var, 256, "Smslog7=%s\n",PlayerInfo[playerid][pSmslog7]);fwrite(hFile, var);
format(var, 256, "Smslog8=%s\n",PlayerInfo[playerid][pSmslog8]);fwrite(hFile, var);
format(var, 256, "Smslog9=%s\n",PlayerInfo[playerid][pSmslog9]);fwrite(hFile, var);
format(var, 256, "KillLog0=%s\n",PlayerInfo[playerid][pKillLog0]);fwrite(hFile, var);
format(var, 256, "KillLog1=%s\n",PlayerInfo[playerid][pKillLog1]);fwrite(hFile, var);
format(var, 256, "KillLog2=%s\n",PlayerInfo[playerid][pKillLog2]);fwrite(hFile, var);
format(var, 256, "KillLog3=%s\n",PlayerInfo[playerid][pKillLog3]);fwrite(hFile, var);
format(var, 256, "KillLog4=%s\n",PlayerInfo[playerid][pKillLog4]);fwrite(hFile, var);
format(var, 256, "KillLog5=%s\n",PlayerInfo[playerid][pKillLog5]);fwrite(hFile, var);
format(var, 256, "KillLog6=%s\n",PlayerInfo[playerid][pKillLog6]);fwrite(hFile, var);
format(var, 256, "KillLog7=%s\n",PlayerInfo[playerid][pKillLog7]);fwrite(hFile, var);
format(var, 256, "KillLog8=%s\n",PlayerInfo[playerid][pKillLog8]);fwrite(hFile, var);
format(var, 256, "KillLog9=%s\n",PlayerInfo[playerid][pKillLog9]);fwrite(hFile, var);
format(var, 256, "Hospital=%d\n",PlayerInfo[playerid][pHospital]);fwrite(hFile, var);
format(var, 32, "pWExists=%d\n",PlayerInfo[playerid][pWExists]);fwrite(hFile, var);
format(var, 32, "pWX=%f\n",PlayerInfo[playerid][pWX]);fwrite(hFile, var);
format(var, 32, "pWY=%f\n",PlayerInfo[playerid][pWY]);fwrite(hFile, var);
format(var, 32, "pWZ=%f\n",PlayerInfo[playerid][pWZ]);fwrite(hFile, var);
format(var, 32, "pWVW=%d\n",PlayerInfo[playerid][pWVW]);fwrite(hFile, var);
format(var, 32, "pWInt=%d\n",PlayerInfo[playerid][pWInt]);fwrite(hFile, var);
format(var, 32, "pWValue=%d\n",PlayerInfo[playerid][pWValue]);fwrite(hFile, var);
format(var, 32, "pWSeeds=%d\n",PlayerInfo[playerid][pWSeeds]);fwrite(hFile, var);
format(var, 128, "Warrants=%s\n",PlayerInfo[playerid][pWarrant]);fwrite(hFile, var);
format(var, 32, "JudgeJailTime=%d\n",PlayerInfo[playerid][pJudgeJailTime]);fwrite(hFile, var);
format(var, 32, "JudgeJailType=%d\n",PlayerInfo[playerid][pJudgeJailType]);fwrite(hFile, var);
format(var, 32, "BeingSentenced=%d\n",PlayerInfo[playerid][pBeingSentenced]);fwrite(hFile, var);
format(var, 32, "ProbationTime=%d\n",PlayerInfo[playerid][pProbationTime]);fwrite(hFile, var);
format(var, 32, "DMIndicators=%d\n",PlayerInfo[playerid][pDMIndicators]);fwrite(hFile, var);
format(var, 32, "DMKills=%d\n",PlayerInfo[playerid][pDMKills]);fwrite(hFile, var);
format(var, 63, "DMReport0=%s\n",PlayerInfo[playerid][pDMReport0]);fwrite(hFile, var);
format(var, 63, "DMReport1=%s\n",PlayerInfo[playerid][pDMReport1]);fwrite(hFile, var);
format(var, 63, "DMReport2=%s\n",PlayerInfo[playerid][pDMReport2]);fwrite(hFile, var);
format(var, 63, "DMReport3=%s\n",PlayerInfo[playerid][pDMReport3]);fwrite(hFile, var);
format(var, 63, "DMReport4=%s\n",PlayerInfo[playerid][pDMReport4]);fwrite(hFile, var);
format(var, 63, "DMReport5=%s\n",PlayerInfo[playerid][pDMReport5]);fwrite(hFile, var);
format(var, 63, "DMReport6=%s\n",PlayerInfo[playerid][pDMReport6]);fwrite(hFile, var);
format(var, 63, "DMReport7=%s\n",PlayerInfo[playerid][pDMReport7]);fwrite(hFile, var);
format(var, 63, "DMReport8=%s\n",PlayerInfo[playerid][pDMReport8]);fwrite(hFile, var);
format(var, 63, "DMReport9=%s\n",PlayerInfo[playerid][pDMReport9]);fwrite(hFile, var);
format(var, 63, "Order=%d\n",PlayerInfo[playerid][pOrder]);fwrite(hFile, var);
format(var, 63, "OBlocked=%d\n",PlayerInfo[playerid][pOBlocked]);fwrite(hFile, var);
format(var, 32, "CallsAccepted=%d\n", PlayerInfo[playerid][pCallsAccepted]);fwrite(hFile, var);
format(var, 32, "PatientsDelivered=%d\n",PlayerInfo[playerid][pPatientsDelivered]);fwrite(hFile, var);
format(var, 32, "LiveBanned=%d\n",PlayerInfo[playerid][pLiveBanned]);fwrite(hFile, var);
format(var, 32, "FreezeBank=%d\n",PlayerInfo[playerid][pFreezeBank]);fwrite(hFile, var);
format(var, 32, "HasRefund=%d\n",PlayerInfo[playerid][pHasRefund]);fwrite(hFile, var);
format(var, 32, "AdminPin=%d\n",PlayerInfo[playerid][pAdminPin]);fwrite(hFile, var);
format(var, 32, "AttemptedPin=%d\n",PlayerInfo[playerid][pAttemptedPin]);fwrite(hFile, var);
format(var, 32, "Scope=%d\n",PlayerInfo[playerid][pScope]);fwrite(hFile, var);
format(var, 32, "CBanned=%d\n",PlayerInfo[playerid][pCBanned]);fwrite(hFile, var);
//if( strcmp( key, "PrisonedBy", true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pPrisonedBy], val, 0, strlen(val)-1, 255); }
fclose(hFile);
OnPlayerLogin(playerid, password);
SetPlayerPos(playerid,1715.08, -1880.13, 13.57);
SendClientMessageEx(playerid, COLOR_YELLOW, "Account registered, you have been logged in automatically.");
TotalRegister++;
}
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
return 1;
}
ProxDetector(Float: f_Radius, playerid, string[],col1,col2,col3,col4,col5) {
if(WatchingTV[playerid] != 1) {
new
Float: f_playerPos[3];
GetPlayerPos(playerid, f_playerPos[0], f_playerPos[1], f_playerPos[2]);
foreach(Player, i) {
if(!BigEar[i]) {
if((InsideShamal[playerid] == GetPlayerVehicleID(i) && GetPlayerState(i) == 2) || (InsideShamal[i] == GetPlayerVehicleID(playerid) && GetPlayerState(playerid) == 2) || (InsideShamal[playerid] != INVALID_VEHICLE_ID && InsideShamal[playerid] == InsideShamal[i])) {
SendClientMessageEx(i, col1, string);
}
else if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid)) {
if(IsPlayerInRangeOfPoint(i, f_Radius / 16, f_playerPos[0], f_playerPos[1], f_playerPos[2])) {
SendClientMessageEx(i, col1, string);
}
else if(IsPlayerInRangeOfPoint(i, f_Radius / 8, f_playerPos[0], f_playerPos[1], f_playerPos[2])) {
SendClientMessageEx(i, col2, string);
}
else if(IsPlayerInRangeOfPoint(i, f_Radius / 4, f_playerPos[0], f_playerPos[1], f_playerPos[2])) {
SendClientMessageEx(i, col3, string);
}
else if(IsPlayerInRangeOfPoint(i, f_Radius / 2, f_playerPos[0], f_playerPos[1], f_playerPos[2])) {
SendClientMessageEx(i, col4, string);
}
else if(IsPlayerInRangeOfPoint(i, f_Radius, f_playerPos[0], f_playerPos[1], f_playerPos[2])) {
SendClientMessageEx(i, col5, string);
}
}
}
else SendClientMessageEx(i, col1, string);
}
}
return 1;
}
ProxDetectorS(Float:radi, playerid, targetid) {
if(WatchingTV[playerid] != 1)
{
if(Spectating[targetid] != 0 && PlayerInfo[playerid][pAdmin] < 2)
{
return 0;
}
new
Float: fp_playerPos[3];
GetPlayerPos(targetid, fp_playerPos[0], fp_playerPos[1], fp_playerPos[2]);
if(IsPlayerInRangeOfPoint(playerid, radi, fp_playerPos[0], fp_playerPos[1], fp_playerPos[2]) && GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(targetid))
{
return 1;
}
}
return 0;
}
stock PositionToPoint(Float:radi, Float:posx, Float:posy, Float:posz, Float:pointx, Float:pointy, Float:pointz)
{
new Float:tempposx, Float:tempposy, Float:tempposz;
tempposx = (posx -pointx);
tempposy = (posy -pointy);
tempposz = (posz -pointz);
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
return 0;
}
public OnPlayerDisconnect(playerid, reason)
{
EstaAutorizado[playerid] = false;
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(playerid == MAX_PLAYERS) return 1;
PlayersConnected--;
if(PlayerInfo[playerid][pWExists] == 1)
{
WeedLogout(playerid);
}
if(pTazer[playerid] == 1) GivePlayerValidWeapon(playerid,pTazerReplace[playerid],60000);
if(GetPVarInt(playerid, "SpeedRadar") == 1) GivePlayerValidWeapon(playerid, GetPVarInt(playerid, "RadarReplacement"), 60000);
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], Float:playerPos[3];
GetPlayerPos(playerid, playerPos[0], playerPos[1], playerPos[2]);
if(!playerRelogging[playerid]) {
switch (reason)
{
case 0:
{
format(string, sizeof(string), "%s has left the server (timeout).", GetPlayerNameEx(playerid));
foreach(Player, i) {
if((PlayerInfo[i][pHelper] >= 2 || PlayerInfo[i][pAdmin] >= 1) && !togJoin[playerid]) {
if(!IsPlayerInRangeOfPoint(i, 30.0, playerPos[0], playerPos[1], playerPos[2])) {
SendClientMessage(i, TEAM_AZTECAS_COLOR, string);
}
}
}
ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
if(PlayerCuffed[playerid] != 0)
{
PlayerInfo[playerid][pJailed] = 4;
PlayerInfo[playerid][pJailTime] += 20*60;
}
}
case 1:
{
format(string, sizeof(string), "%s has left the server (leaving).", GetPlayerNameEx(playerid));
foreach(Player, i) {
if((PlayerInfo[i][pHelper] >= 2 || PlayerInfo[i][pAdmin] >= 1) && !togJoin[playerid]) {
if(!IsPlayerInRangeOfPoint(i, 30.0, playerPos[0], playerPos[1], playerPos[2])) {
SendClientMessage(i, TEAM_AZTECAS_COLOR, string);
}
}
}
ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
if(PlayerCuffed[playerid] != 0)
{
PlayerInfo[playerid][pJailed] = 4;
PlayerInfo[playerid][pJailTime] += 20*60;
}
}
case 2:
{
format(string, sizeof(string), "%s has left the server (kicked/banned).", GetPlayerNameEx(playerid));
foreach(Player, i) {
if((PlayerInfo[i][pHelper] >= 2 || PlayerInfo[i][pAdmin] >= 1) && !togJoin[playerid]) {
if(!IsPlayerInRangeOfPoint(i, 30.0, playerPos[0], playerPos[1], playerPos[2])) {
SendClientMessage(i, TEAM_AZTECAS_COLOR, string);
}
}
}
ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
}
}
} else {
format(string, sizeof(string), "%s has left the server (relogging).", GetPlayerNameEx(playerid));
foreach(Player, i) {
if((PlayerInfo[i][pHelper] >= 2 || PlayerInfo[i][pAdmin] >= 1) && !togJoin[playerid]) {
if(!IsPlayerInRangeOfPoint(i, 30.0, playerPos[0], playerPos[1], playerPos[2])) {
SendClientMessage(i, TEAM_AZTECAS_COLOR, string);
}
}
}
ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
}
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(GetPVarInt(playerid, "fuelonoff") == 1)
{
DestroyProgressBar(FuelBar[playerid]);
textdrawscount--;
FuelBar[playerid] = INVALID_BAR_ID;
}
if(InsideShamal[playerid] != INVALID_VEHICLE_ID)
{
if(InsideShamal[playerid] == INVALID_VEHICLE_ID || GetVehicleModel(InsideShamal[playerid]) != 519)
{
GivePlayerValidWeapon(playerid, 46, 60000);
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, 60000);
}
}
PlayerInfo[playerid][pVW] = 0;
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerInterior(playerid, 0);
InsideShamal[playerid] = INVALID_VEHICLE_ID;
}
InsideShamal[playerid] = INVALID_VEHICLE_ID;
gActivePlayers[playerid]--;
numplayers--;
PlayerInfo[playerid][pAdjustable] = 1;
OnPlayerStatsUpdate(playerid);
UnloadPlayerVehicles(playerid);
ResetPlayerWeapons(playerid);
for(new i = 0; i < MAX_REPORTS; i++)
{
if(Reports[i][ReportFrom] == playerid)
{
Reports[i][ReportFrom] = 999;
Reports[i][BeingUsed] = 0;
Reports[i][TimeToExpire] = 0;
}
}
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(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(playerRelogging[playerid]) {
playerRelogging[playerid] = 0;
new playersIP[16], rconInput[64];
GetPlayerIp(playerid, playersIP, sizeof(playersIP));
format(rconInput, sizeof(rconInput), "unbanip %s", pIP);
SendRconCommand(rconInput);
SendRconCommand("reloadbans");
}
return 1;
}
HospitalSpawn(playerid)
{
if(GetPVarInt(playerid, "MedicBill") == 1 && PlayerInfo[playerid][pJailed] == 0)
{
if(GetPVarInt(playerid, "Hospital") == 1 && PlayerInfo[playerid][pInsurance] == 2)
{
SetPlayerArmour(playerid, PlayerInfo[playerid][pSHealth]);
SetPlayerHealth(playerid, 50.0);
DeletePVar(playerid, "MedicBill");
GivePlayerCash(playerid, -1500);
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "DOC: Your Medical Bill comes to $1,500, Have a nice day.");
SetPlayerPos(playerid, 1175.0586,-1324.2463,14.5938);
SetPlayerFacingAngle(playerid, 268.9748);
DeletePVar(playerid, "Hospital");
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
}
else if(GetPVarInt(playerid, "Hospital") == 2 && PlayerInfo[playerid][pInsurance] == 1)
{
SetPlayerArmour(playerid, PlayerInfo[playerid][pSHealth]);
SetPlayerHealth(playerid, 50.0);
DeletePVar(playerid, "MedicBill");
GivePlayerCash(playerid, -1500);
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "DOC: Your Medical Bill comes to $1,500, Have a nice day.");
SetPlayerPos(playerid, 2034.2269,-1404.3459,17.2617);
SetPlayerFacingAngle(playerid, 179.4258);
DeletePVar(playerid, "Hospital");
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
}
else if(GetPVarInt(playerid, "Hospital") == 3 && PlayerInfo[playerid][pInsurance] == 3)
{
SetPlayerArmour(playerid, PlayerInfo[playerid][pSHealth]);
SetPlayerHealth(playerid, 50.0);
DeletePVar(playerid, "MedicBill");
GivePlayerCash(playerid, -500);
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "DOC: 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)
{
SetPlayerArmour(playerid, PlayerInfo[playerid][pSHealth]);
SetPlayerHealth(playerid, 50.0);
DeletePVar(playerid, "MedicBill");
GivePlayerCash(playerid, -250);
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "DOC: Your Medical Bill comes to $250, Have a nice day.");
SetPlayerPos(playerid, -320.3253, 1049.2809, 20.3403);
SetPlayerFacingAngle(playerid, 179.4258);
DeletePVar(playerid, "Hospital");
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
}
else if(GetPVarInt(playerid, "Hospital") == 5 && PlayerInfo[playerid][pInsurance] == 5)
{
SetPlayerArmour(playerid, PlayerInfo[playerid][pSHealth]);
SetPlayerHealth(playerid, 50.0);
DeletePVar(playerid, "MedicBill");
GivePlayerCash(playerid, -250);
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "DOC: Your Medical Bill comes to $250, Have a nice day.");
SetPlayerPos(playerid, -2656.9661,623.1429,14.4531);
SetPlayerFacingAngle(playerid, 180);
DeletePVar(playerid, "Hospital");
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
}
else if(GetPVarInt(playerid, "Hospital") == 6 && PlayerInfo[playerid][pInsurance] == 0)
{
SetPlayerArmour(playerid, PlayerInfo[playerid][pSHealth]);
SetPlayerHealth(playerid, 50.0);
DeletePVar(playerid, "MedicBill");
GivePlayerCash(playerid, -2000);
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "DOC: 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.5938);
SetPlayerFacingAngle(playerid, 268.9748);
DeletePVar(playerid, "Hospital");
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
}
else if(GetPVarInt(playerid, "Hospital") == 2 && PlayerInfo[playerid][pInsurance] == 0)
{
SetPlayerArmour(playerid, PlayerInfo[playerid][pSHealth]);
SetPlayerHealth(playerid, 50.0);
DeletePVar(playerid, "MedicBill");
GivePlayerCash(playerid, -2000);
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "DOC: 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.4258);
DeletePVar(playerid, "Hospital");
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
}
else if(GetPVarInt(playerid, "Hospital") == 7 && PlayerInfo[playerid][pInsurance] == 6)
{
SetPlayerArmour(playerid, PlayerInfo[playerid][pSHealth]);
SetPlayerHealth(playerid, 50.0);
DeletePVar(playerid, "MedicBill");
GivePlayerCash(playerid, -250);
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "DOC: 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, "DOC: 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, "Objects loading...", 4000, 5);
SetPVarInt(playerid, "Loading..Interior", 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] == 8)
{
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, "DOC: Have a nice day.");
new Float:X, Float:Y, Float:Z;
GetObjectPos(Carrier[0], X, Y, Z);
SetPlayerPos(playerid, (X-0.377671),(Y-10.917018),11.6986);
SetPlayerFacingAngle(playerid, 0);
DeletePVar(playerid, "Hospital");
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
}
else if(GetPVarInt(playerid, "Hospital") == 10 && PlayerInfo[playerid][pInsurance] == 9)
{
SetPlayerArmour(playerid, PlayerInfo[playerid][pSHealth]);
SetPlayerHealth(playerid, 50.0);
DeletePVar(playerid, "MedicBill");
GivePlayerCash(playerid, -250);
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, "DOC: 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, "DOC: Your Medical Bill is free of charge, Have a nice day.");
SetPlayerPos(playerid, -1514.809204, 2526.305175, 55.759651);
SetPlayerFacingAngle(playerid, 0);
SetPlayerPos(playerid, 227.5432,1974.9200,18.2465);
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);
SetPlayerPos(playerid, 766.50, -1684.32, -6.86);
SetPlayerCameraPos(playerid, 751.93, -1673.95, 16.01);
SetPlayerCameraLookAt(playerid, 699.55, -1628.93, 5.88);
RegistrationStep[playerid] = 1;
SendClientMessageEx(playerid, COLOR_YELLOW, "Please fill in some information to proceed.");
SendClientMessageEx(playerid, COLOR_GREEN, ""OFICIAL_COLOR"Are you a Male or Female? {FFFFFF}(Type in what you are).");
SetPlayerVirtualWorld(playerid, 1984);
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, "Objects loading...", 4000, 5);
SetPVarInt(playerid, "Loading..Interior", 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, 10);
rand = random(sizeof(LSPDJail));
SetPlayerFacingAngle(playerid, 0);
SetPlayerPos(playerid, LSPDJail[rand][0], LSPDJail[rand][1], LSPDJail[rand][2]);
PlayerInfo[playerid][pVW] = 133337;
SetPlayerVirtualWorld(playerid, 133337);
SendClientMessageEx(playerid, COLOR_LIGHTRED, "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, "Objects loading...", 4000, 5);
SetPVarInt(playerid, "Loading..Interior", 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]);
SetPlayerSkin(playerid, 50);
SetPlayerColor(playerid, TEAM_ORANGE_COLOR);
return 1;
}
if(PlayerInfo[playerid][pJailed] == 4)
{
PhoneOnline[playerid] = 1;
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "Objects loading...", 4000, 5);
SetPVarInt(playerid, "Loading..Interior", 1);
SetTimerEx("SafeLoadObjects", 4000, 0, "d", playerid);
SetPlayerInterior(playerid, 1);
PlayerInfo[playerid][pInt] = 1;
rand = random(sizeof(OOCPrisonSpawns));
SetPlayerPos(playerid, OOCPrisonSpawns[rand][0], OOCPrisonSpawns[rand][1], OOCPrisonSpawns[rand][2]);
SetPlayerSkin(playerid, 50);
SetPlayerColor(playerid, TEAM_APRISON_COLOR);
new string[128];
format(string, sizeof(string), "You are in prison, reason: %s", PlayerInfo[playerid][pPrisonReason]);
SendClientMessageEx(playerid, COLOR_LIGHTRED, string);
ResetPlayerWeaponsEx(playerid);
return 1;
}
if(PlayerInfo[playerid][pJailed] == 3)
{
PhoneOnline[playerid] = 1;
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "Objects loading...", 4000, 5);
SetPVarInt(playerid, "Loading..Interior", 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_LIGHTRED, "Incomplete jail sentence, back to jail you go.");
return 1;
}
if(PlayerInfo[playerid][pJailed] == 7)
{
PhoneOnline[playerid] = 1;
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "Objects loading...", 4000, 5);
SetPVarInt(playerid, "Loading..Interior", 1);
SetTimerEx("SafeLoadObjects", 4000, 0, "d", playerid);
SetPlayerPos(playerid, 2500.3296,-1679.2875,562.7988);
PlayerInfo[playerid][pVW] = 1699;
SetPlayerVirtualWorld(playerid, 1699);
SendClientMessageEx(playerid, COLOR_LIGHTRED, "Incomplete jail sentence, back to jail you go.");
return 1;
}
if(PlayerInfo[playerid][pJailed] == 8)
{
PhoneOnline[playerid] = 1;
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "Objects loading...", 4000, 5);
SetPVarInt(playerid, "Loading..Interior", 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_LIGHTRED, "Incomplete jail sentence, back to jail you go.");
return 1;
}
if(PlayerInfo[playerid][pJailed] == 9)
{
PhoneOnline[playerid] = 1;
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "Objects loading...", 4000, 5);
SetPVarInt(playerid, "Loading..Interior", 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_LIGHTRED, "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)
{
SendEMSQueue(playerid,1);
return 1;
}
if(GetPVarInt(playerid, "MedicBill") == 1 && PlayerInfo[playerid][pJailed] == 0)
{
SendClientMessageEx( playerid, TEAM_CYAN_COLOR, "Before you are discharged, hospital staff will confiscate your weapons." );
PlayerInfo[playerid][pDuty] = 0;
PlayerInfo[playerid][pVW] = 0;
PlayerInfo[playerid][pInt] = 0;
SetPlayerVirtualWorld(playerid, 0);
/*new cut = deathcost; //PlayerInfo[playerid][pLevel]*deathcost;
GivePlayerCash(playerid, -cut);
format(string, sizeof(string), "DOC: Your Medical Bill comes to $%d, Have a nice day.", cut);
SendClientMessageEx(playerid, TEAM_CYAN_COLOR, string);*/
ResetPlayerWeapons(playerid);
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);
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);
}
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);
}
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);
}
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);
}
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.5938);
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), " San Fierro 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);
}
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", 8);
}
else if(PlayerInfo[playerid][pInsurance] == 8)
{
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.917018),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,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);
}
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);
}
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);
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, "Loading..Interior", 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);
}
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);
}
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);
}
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);
}
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.5938);
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), " San Fierro 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);
}
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", 8);
}
else if(PlayerInfo[playerid][pInsurance] == 8)
{
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.917018),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);
}
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);
}
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, 1481.3757,-1751.8569,15.4453);
SetPlayerFacingAngle(playerid, 360);
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 0);
new arrString[128]; format(arrString, sizeof(arrString), "Welcome to Virtual Life Roleplay, %s.", GetPlayerNameEx(playerid));
ShowPlayerDialog(playerid, 5200, DIALOG_STYLE_MSGBOX, arrString, "You are about to begin a new life, Pick a Package..To Get Started..", "Continue", "Next");
}
SetPlayerToTeamColor(playerid);
return 1;
}
return 1;
PlayerInfo[playerid][Muted] = 0;