Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Just to begin with, i've never taken any credit of parts that were created by Astro (Denver) aka
- Denver the creator of PEN1.
- Valhalla Gaming Comunity has indeed paid me for this very script you are about to read, where they
- only paid for the systems and parts that were created by me.
- They received this script a few months ago, and their server owner is trying to rip me off.
- Due to this fact + i'm not scripting anymore, i release this script so that everyone can use it.
- Credits to Astro.
- Credits to Tratulla for his 2 .ini Functions.
- Credits to the Fuel System creator on SA-MP forums.
- Credits to Morph for the Name Showing timer.
- */
- #include <a_samp>
- #include <core>
- #include <float>
- #include <time>
- #include <file>
- #include <dprop>
- #include <utils>
- #include <morphinc>
- static gTeam[MAX_PLAYERS];
- #define MAX_STRING 255
- #define CHECKPOINT_NONE 0
- #define CHECKPOINT_HOME 12
- #define COLOR_GRAD1 0xB4B5B7FF
- #define COLOR_GRAD2 0xBFC0C2FF
- #define COLOR_GRAD3 0xCBCCCEFF
- #define COLOR_GRAD4 0xD8D8D8FF
- #define COLOR_GRAD5 0xE3E3E3FF
- #define COLOR_GRAD6 0xF0F0F0FF
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_RED 0xAA3333AA
- #define COLOR_LIGHTRED 0xFF6347AA
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- #define COLOR_LIGHTGREEN 0x9ACD32AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_YELLOW2 0xF5DEB3AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_FADE1 0xE6E6E6E6
- #define COLOR_FADE2 0xC8C8C8C8
- #define COLOR_FADE3 0xAAAAAAAA
- #define COLOR_FADE4 0x8C8C8C8C
- #define COLOR_FADE5 0x6E6E6E6E
- #define COLOR_PURPLE 0xC2A2DAAA
- #define COLOR_DBLUE 0x2641FEAA
- #define COLOR_ALLDEPT 0xFF8282AA
- #define COLOR_NEWS 0xFFA500AA
- #define COLOR_OOC 0xE0FFFFAA
- #define TEAM_CYAN 1
- #define TEAM_BLUE 2
- #define TEAM_GREEN 3
- #define TEAM_ORANGE 4
- #define TEAM_COR 5
- #define TEAM_BAR 6
- #define TEAM_TAT 7
- #define TEAM_CUN 8
- #define TEAM_STR 9
- #define TEAM_HIT 10
- #define TEAM_ADMIN 11
- #define OBJECTIVE_COLOR 0x64000064
- #define TEAM_GREEN_COLOR 0xFFFFFFAA
- #define TEAM_JOB_COLOR 0xFFB6C1AA
- #define TEAM_HIT_COLOR 0xFFFFFF00
- #define TEAM_BLUE_COLOR 0x8D8DFF00
- #define COLOR_ADD 0x63FF60AA
- #define TEAM_GROVE_COLOR 0x00D900C8
- #define TEAM_VAGOS_COLOR 0xFFC801C8
- #define TEAM_BALLAS_COLOR 0xD900D3C8
- #define TEAM_AZTECAS_COLOR 0x01FCFFC8
- #define TEAM_CYAN_COLOR 0xFF8282AA
- #define TEAM_ORANGE_COLOR 0xFF830000
- #define TEAM_COR_COLOR 0x39393900
- #define TEAM_BAR_COLOR 0x00D90000
- #define TEAM_TAT_COLOR 0xBDCB9200
- #define TEAM_CUN_COLOR 0xD900D300
- #define TEAM_STR_COLOR 0x01FCFF00
- #define TEAM_ADMIN_COLOR 0x00808000
- #define COLOR_INVIS 0xAFAFAF00
- #define COLOR_SPEC 0xBFC0C200
- forward LoadProperty();
- forward LoadBizz();
- forward LoadSBizz();
- forward LoadStuff();
- forward SaveStuff();
- forward LoadCK();
- forward SaveCK();
- forward LoadFamilies();
- forward SaveFamilies();
- forward LoadTurfs();
- forward SaveTurfs();
- forward LoadIRC();
- forward SaveIRC();
- forward LoadPapers();
- forward SavePapers();
- forward LoadBoxer();
- forward SaveBoxer();
- forward OnPropUpdate();
- forward ExtortionBiz(bizid, money);
- forward ExtortionSBiz(bizid, money);
- forward JoinChannel(playerid, number, line[]);
- forward JoinChannelNr(playerid, number);
- forward IsAtClothShop(playerid);
- forward IsAtGasStation(playerid);
- forward IsAtFishPlace(playerid);
- forward IsAtCookPlace(playerid);
- forward IsAtBar(playerid);
- forward SearchingHit(playerid);
- forward DollahScoreUpdate();
- forward SetPlayerSpawn(playerid);
- forward SetupPlayerForClassSelection(playerid);
- forward SetPlayerTeamFromClass(playerid,classid);
- forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
- forward CrimInRange(Float:radi, playerid,copid);
- forward SendEnemyMessage(color, string[]);
- forward SendTeamBeepMessage(team, color, string[]);
- forward ABroadCast(color,const string[],level);
- forward DateProp(playerid);
- forward GetClosestPlayer(p1);
- forward IsPlayerInTurf(playerid, turfid);
- forward LoadMission(playerid,name[]);
- forward SaveMission(playerid,name[]);
- forward PrintBizInfo(playerid,targetid);
- forward PrintSBizInfo(playerid,targetid);
- forward SetPlayerUnjail();
- forward OtherTimer();
- forward RingTonerRev();
- forward RingToner();
- forward HireCost(carid);
- forward BanLog(string[]);
- forward KickLog(string[]);
- forward PayLog(string[]);
- forward CKLog(string[]);
- forward IsATruck(carid);
- forward IsAnAmbulance(carid);
- forward IsACopCar(carid);
- forward IsAPlane(carid);
- forward IsABoat(carid);
- forward IsACop(playerid);
- forward IsAMember(playerid);
- forward IsAnInstructor(playerid);
- forward Spectator();
- forward ConvertTicks(ticks);
- forward Encrypt(string[]);
- forward KartingEnded();
- forward StartKarting();
- forward PrepareKarting();
- forward PaintballEnded();
- forward StartPaintball();
- forward PreparePaintball();
- forward Float:GetDistanceBetweenPlayers(p1,p2);
- forward GameModeExitFunc();
- forward SetAllPlayerCheckpoint(Float:allx, Float:ally, Float:allz, Float:radi, num);
- forward SetAllCopCheckpoint(Float:allx, Float:ally, Float:allz, Float:radi);
- forward SetPlayerCriminal(playerid,declare,reason[]);
- forward SetPlayerFree(playerid,declare,reason[]);
- forward SetPlayerWeapons(playerid);
- forward ShowStats(playerid,targetid);
- forward SetPlayerToTeamColor(playerid);
- forward GameModeInitExitFunc();
- forward split(const strsrc[], strdest[][], delimiter);
- forward OnPlayerLogin(playerid,password[]);
- forward OnPlayerUpdate(playerid);
- forward BroadCast(color,const string[]);
- forward OOCOff(color,const string[]);
- forward OOCNews(color,const string[]);
- forward SendJobMessage(job, color, string[]);
- forward SendFamilyMessage(family, color, string[]);
- forward SendNewFamilyMessage(family, color, string[]);
- forward SendIRCMessage(channel, color, string[]);
- forward SendTeamMessage(team, color, string[]);
- forward SendRadioMessage(member, color, string[]);
- forward SendAdminMessage(color, string[]);
- forward AddCar(carcoords);
- forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
- forward ProxDetectorS(Float:radi, playerid, targetid);
- forward ClearCK(ck);
- forward ClearFamily(family);
- forward ClearMarriage(playerid);
- forward ClearPaper(paper);
- forward ClearCrime(playerid);
- forward FishCost(playerid, fish);
- forward ClearFishes(playerid);
- forward ClearFishID(playerid, fish);
- forward ClearCooking(playerid);
- forward ClearCookingID(playerid, cook);
- forward ClearGroceries(playerid);
- forward Lotto(number);
- forward CarCheck();
- forward CarInit();
- forward CarTow(carid);
- forward CarRespawn(carid);
- forward LockCar(carid);
- forward UnLockCar(carid);
- forward InitLockDoors(playerid);
- forward CheckGas();
- forward Fillup();
- forward StoppedVehicle();
- forward SyncTime();
- forward SyncUp();
- forward SaveAccounts();
- forward IsPlayerInZone(playerid, zoneid);
- forward Production();
- forward Checkprop();
- forward PayDay();
- forward ini_GetKey( line[] );
- forward ini_GetValue( line[] );
- forward PlayerPlayMusic(playerid);
- forward StopMusic();
- forward PlayerFixRadio(playerid);
- forward PlayerFixRadio2();
- forward HouseLevel(playerid);
- forward CHouseLevel(houseid);
- forward CustomPickups();
- forward IdleKick();
- forward SetCamBack(playerid);
- forward FixHour(hour);
- forward AddsOn();
- //------------------------------------------------------------------------------------------------------
- new Security = 0;
- new CreatedCars[100];
- new CreatedCar = 0;
- new Tax = 0;
- new TaxValue = 0;
- new Jackpot = 0;
- new StartingPaintballRound = 0;
- new AnnouncedPaintballRound = 0;
- new PaintballPlayers = 0;
- new PaintballRound = 0;
- new PaintballWinner = 999;
- new PaintballWinnerKills = 0;
- new StartingKartRound = 0;
- new EndingKartRound = 0;
- new AnnouncedKartRound = 0;
- new KartingPlayers = 0;
- new KartingRound = 0;
- new FirstKartWinner = 999;
- new SecondKartWinner = 999;
- new ThirdKartWinner = 999;
- new InRing = 0;
- new RoundStarted = 0;
- new BoxDelay = 0;
- new Boxer1 = 255;
- new Boxer2 = 255;
- new TBoxer = 255;
- new PlayerBoxing[MAX_PLAYERS];
- new hitfound = 0;
- new hitid = 999;
- new Medics = 0;
- new MedicCall = 999;
- new MedicCallTime[MAX_PLAYERS];
- new Mechanics = 0;
- new MechanicCall = 999;
- new MechanicCallTime[MAX_PLAYERS];
- new TaxiDrivers = 0;
- new TaxiCall = 999;
- new TaxiCallTime[MAX_PLAYERS];
- new TaxiAccepted[MAX_PLAYERS];
- new BusDrivers = 0;
- new BusCall = 999;
- new BusCallTime[MAX_PLAYERS];
- new BusAccepted[MAX_PLAYERS];
- new TransportDuty[MAX_PLAYERS];
- new TransportValue[MAX_PLAYERS];
- new TransportMoney[MAX_PLAYERS];
- new TransportTime[MAX_PLAYERS];
- new TransportCost[MAX_PLAYERS];
- new TransportDriver[MAX_PLAYERS];
- new JobDuty[MAX_PLAYERS];
- new RegistrationStep[MAX_PLAYERS];
- new MapIconsShown[MAX_PLAYERS];
- new OnCK[MAX_PLAYERS];
- new GettingCK[MAX_PLAYERS];
- new PlayerPaintballing[MAX_PLAYERS];
- new PlayerPaintballKills[MAX_PLAYERS];
- new PlayerKarting[MAX_PLAYERS];
- new PlayerInKart[MAX_PLAYERS];
- new SchoolSpawn[MAX_PLAYERS];
- new TakingLesson[MAX_PLAYERS];
- new UsedFind[MAX_PLAYERS];
- new PlayersChannel[MAX_PLAYERS];
- new PlayerOnMission[MAX_PLAYERS];
- new MissionCheckpoint[MAX_PLAYERS];
- new WatchingTV[MAX_PLAYERS];
- new NoFuel[MAX_PLAYERS];
- new MatsHolding[MAX_PLAYERS];
- new DivorceOffer[MAX_PLAYERS];
- new MarriageCeremoney[MAX_PLAYERS];
- new ProposeOffer[MAX_PLAYERS];
- new ProposedTo[MAX_PLAYERS];
- new GotProposedBy[MAX_PLAYERS];
- new MarryWitness[MAX_PLAYERS];
- new MarryWitnessOffer[MAX_PLAYERS];
- new TicketOffer[MAX_PLAYERS];
- new TicketMoney[MAX_PLAYERS];
- new PlayerStoned[MAX_PLAYERS];
- new ConsumingMoney[MAX_PLAYERS];
- new BringingPaper[MAX_PLAYERS]; //Paper Boys must pick up a Paper first, then use /deliver
- new GotPaper[MAX_PLAYERS]; //The player has a paper so he can use /read
- new WritingPaper[MAX_PLAYERS]; //Used for onplayertext so he can type in lines
- new WritingPaperNumber[MAX_PLAYERS]; //To which Paper in PaperInfo will it be written
- new WritingLine[MAX_PLAYERS]; //Used for onplayertext to see which line he's at
- new FishCount[MAX_PLAYERS];
- new SpawnChange[MAX_PLAYERS];
- new TutTime[MAX_PLAYERS];
- new PlayerDrunk[MAX_PLAYERS];
- new PlayerDrunkTime[MAX_PLAYERS];
- new PlayerTazeTime[MAX_PLAYERS];
- new FindTimePoints[MAX_PLAYERS];
- new FindTime[MAX_PLAYERS];
- new BoxWaitTime[MAX_PLAYERS];
- new TestFishes[MAX_PLAYERS];
- new PaperOffer[MAX_PLAYERS];
- new BoxOffer[MAX_PLAYERS];
- new CarOffer[MAX_PLAYERS];
- new CarPrice[MAX_PLAYERS];
- new CarID[MAX_PLAYERS];
- new CarCalls[MAX_PLAYERS];
- new GotHit[MAX_PLAYERS];
- new GoChase[MAX_PLAYERS];
- new GetChased[MAX_PLAYERS];
- new OrderReady[MAX_PLAYERS];
- new ConnectedToPC[MAX_PLAYERS];
- new MedicTime[MAX_PLAYERS];
- new NeedMedicTime[MAX_PLAYERS];
- new MedicBill[MAX_PLAYERS];
- new PlayerTied[MAX_PLAYERS];
- new PlayerCuffed[MAX_PLAYERS];
- new PlayerCuffedTime[MAX_PLAYERS];
- new LiveOffer[MAX_PLAYERS];
- new TalkingLive[MAX_PLAYERS];
- new PlacedNews[MAX_PLAYERS];
- new SelectChar[MAX_PLAYERS];
- new SelectCharID[MAX_PLAYERS];
- new SelectCharPlace[MAX_PLAYERS];
- new ChosenSkin[MAX_PLAYERS];
- new GettingJob[MAX_PLAYERS];
- new GuardOffer[MAX_PLAYERS];
- new GuardPrice[MAX_PLAYERS];
- new ApprovedLawyer[MAX_PLAYERS];
- new CallLawyer[MAX_PLAYERS];
- new WantLawyer[MAX_PLAYERS];
- new CurrentMoney[MAX_PLAYERS];
- new KickPlayer[MAX_PLAYERS];
- new Robbed[MAX_PLAYERS];
- new RobbedTime[MAX_PLAYERS];
- new CP[MAX_PLAYERS];
- new MoneyMessage[MAX_PLAYERS];
- new Condom[MAX_PLAYERS];
- new STDPlayer[MAX_PLAYERS];
- new SexOffer[MAX_PLAYERS];
- new SexPrice[MAX_PLAYERS];
- new RepairOffer[MAX_PLAYERS];
- new RepairPrice[MAX_PLAYERS];
- new RefillOffer[MAX_PLAYERS];
- new RefillPrice[MAX_PLAYERS];
- new RepairCar[MAX_PLAYERS];
- new DrugOffer[MAX_PLAYERS];
- new DrugPrice[MAX_PLAYERS];
- new DrugGram[MAX_PLAYERS];
- new JailPrice[MAX_PLAYERS];
- new WantedPoints[MAX_PLAYERS];
- new WantedLevel[MAX_PLAYERS];
- new OnDuty[MAX_PLAYERS];
- new gPlayerCheckpointStatus[MAX_PLAYERS];
- new gPlayerLogged[MAX_PLAYERS];
- new gPlayerLogTries[MAX_PLAYERS];
- new gPlayerSpawned[MAX_PLAYERS];
- new gActivePlayers[MAX_PLAYERS];
- new gLastCar[301];
- new gOoc[MAX_PLAYERS];
- new gNews[MAX_PLAYERS];
- new gFam[MAX_PLAYERS];
- new BigEar[MAX_PLAYERS];
- new Spectate[MAX_PLAYERS];
- new CellTime[MAX_PLAYERS];
- new StartTime[MAX_PLAYERS];
- new HireCar[MAX_PLAYERS];
- new SafeTime[MAX_PLAYERS];
- new HidePM[MAX_PLAYERS];
- new PhoneOnline[MAX_PLAYERS];
- new gDice[MAX_PLAYERS];
- new gGas[MAX_PLAYERS];
- new gSpeedo[MAX_PLAYERS];
- new gSpentCash[MAX_PLAYERS];
- new FirstSpawn[MAX_PLAYERS];
- new SwitchKey[MAX_PLAYERS];
- new Fixr[MAX_PLAYERS];
- new Locator[MAX_PLAYERS];
- new Mobile[MAX_PLAYERS];
- new RingTone[MAX_PLAYERS];
- new CallCost[MAX_PLAYERS];
- new gPlayerAccount[MAX_PLAYERS];
- new gPlayerMission[MAX_PLAYERS];
- new gLastDriver[302];
- new gCarLock[265];
- new MissionPlayable = 0;
- new noooc = 0;
- new adds = 1;
- new addtimer = 60000;
- new Float:rx, Float:ry, Float:rz;
- new carselect[15];
- new objstore[128];
- new cbjstore[128];
- new motd[256];
- new rccounter = 0;
- //new RStart;
- new ghour = 0;
- new gminute = 0;
- new gsecond = 0;
- new numplayers = 0;
- new dollah = 1000; // Amount player recieves on spawn.
- new realtime = 1;
- new wtime = 15;
- new levelcost = 25000;
- new deathcost = 500;
- new callcost = 10; //20 seconds
- new realchat = 1;
- new timeshift = -1;
- new shifthour;
- new othtimer;
- new synctimer;
- new newmistimer;
- new unjailtimer;
- new turftimer;
- new pickuptimer;
- new spectatetimer;
- new idletimer;
- new productiontimer;
- new accountstimer;
- new checkgastimer;
- new stoppedvehtimer;
- new cartimer;
- new intrate = 1;
- new levelexp = 4;
- new idletime = 600000; //10 mins
- new civnokill = 0;
- new suecost = 2000;
- new cchargetime = 60;
- new txtcost = 25;
- new pickups;
- new CIV[] = {7,19,20,23,73,101,122};
- new STD1[] = {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3};
- new STD2[] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3};
- new STD3[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3};
- new STD4[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 3};
- new SELLCAR1[] = { 1000, 1124, 1245, 1349, 1475, 1574, 1636, 1762, 1895, 1946, 2000 };
- new SELLCAR2[] = { 2099, 2135, 2255, 2378, 2457, 2563, 2614, 2721, 2878, 2988, 3000 };
- new SELLCAR3[] = { 3058, 3175, 3212, 3377, 3454, 3555, 3678, 3751, 3865, 3964, 4000 };
- new SELLCAR4[] = { 4077, 4123, 4275, 4378, 4422, 4565, 4613, 4752, 4897, 4911, 5000 };
- new Float:ChangePos[MAX_PLAYERS][3];
- new ChangePos2[MAX_PLAYERS][2];
- new Float:PlayerPos[MAX_PLAYERS][6];
- new Float:TeleportDest[MAX_PLAYERS][3];
- new Float:TelePos[MAX_PLAYERS][6];
- #define GasMax 100
- #define RunOutTime 15000
- #define RefuelWait 5000
- #define CAR_AMOUNT 700 //Change to Your Vehicle Amount
- new Gas[CAR_AMOUNT];
- new Refueling[MAX_PLAYERS];
- enum SavePlayerPosEnum
- {
- Float:LastX,
- Float:LastY,
- Float:LastZ
- }
- new SavePlayerPos[MAX_PLAYERS][SavePlayerPosEnum];
- new SpeedMode = 1;
- new UpdateSeconds = 1;
- public Float:GetDistanceBetweenPlayers(p1,p2)
- {
- new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
- if(!IsPlayerConnected(p1) || !IsPlayerConnected(p2))
- {
- return -1.00;
- }
- GetPlayerPos(p1,x1,y1,z1);
- GetPlayerPos(p2,x2,y2,z2);
- return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
- }
- new Music[MAX_PLAYERS];
- new Songs[7][1] = {
- {1187},
- {1185},
- {1183},
- {1097},
- {1076},
- {1068},
- {1062}
- };
- new FishNamesNumber = 22;
- new FishNames[22][20] = {
- {"Jacket"},
- {"Amberjack"},
- {"Grouper"},
- {"Red Snapper"},
- {"Pants"},
- {"Trout"},
- {"Blue Marlin"},
- {"Can"},
- {"Mackeral"},
- {"Sea Bass"},
- {"Shoes"},
- {"Pike"},
- {"Sail Fish"},
- {"Garbage"},
- {"Tuna"},
- {"Eel"},
- {"Dolphin"},
- {"Shark"},
- {"Turtle"},
- {"Catfish"},
- {"Money Bag"},
- {"Swordfish"}
- };
- new Float:PaintballSpawns[7][3] = {
- {-394.8027,2232.2317,42.4297},
- {-430.8412,2240.5371,42.9834},
- {-369.2361,2248.3127,42.4844},
- {-350.8910,2218.0215,42.4912},
- {-384.0544,2206.2908,42.4235},
- {-395.7100,2214.9480,42.4297},
- {-445.3718,2222.5481,42.4297}
- };
- new Float:gRandomPlayerSpawns[1][3] = {
- {2223.8,-1147.1,1025.7} // sp1
- };
- new Float:gInviteSpawns[10][4] = {
- {-1976.5912,166.1818,36.9623,272.6393},
- {-1975.8610,162.1945,36.9623,272.0126},
- {-1975.7461,157.5404,36.9623,276.1093},
- {-1975.2136,151.4920,36.9623,268.2993},
- {-1974.9963,145.3430,36.9623,269.2628},
- {-1975.5842,140.8170,36.9623,269.8895},
- {-1975.7874,134.0368,36.9623,271.7696},
- {-1975.1681,129.0926,36.9623,270.8531},
- {-1975.9069,121.4700,36.9623,270.5631},
- {-1975.3311,112.7078,36.9623,267.7665}
- };
- new Float:gMedicSpawns[2][3] = {
- {317.9066,315.6765,999.1484},
- {317.6252,311.8465,999.1484}
- };
- new Float:gCopPlayerSpawns[2][3] = {
- {1530.8369,-1664.8872,6.2188},
- {1530.6913,-1669.4760,6.2188}
- //{614.8,-608.2,17.2},
- //{611.5,-607.8,17.2}
- };
- new Float:gMedPlayerSpawns[2][3] = {
- {1178.1,-1321.0,14.1},
- {1177.7,-1325.0,14.0}
- };
- enum pBoxingStats
- {
- TitelName[128],
- TitelWins,
- TitelLoses,
- };
- new Titel[pBoxingStats];
- enum cCKInfo
- {
- cSendername[20],
- cGiveplayer[20],
- cUsed,
- };
- new CKInfo[10][cCKInfo];
- enum pPaperInfo
- {
- PaperUsed,
- PaperMaker[20],
- PaperTitle[64],
- PaperText1[128],
- PaperText2[128],
- PaperText3[128],
- PaperText4[128],
- PaperText5[128],
- PaperText6[128],
- PaperText7[128],
- SafeSaving,
- };
- new PaperInfo[10][pPaperInfo];
- enum pPaper
- {
- pMaker[20],
- pTitle[64],
- pLine1[128],
- pLine2[128],
- pLine3[128],
- pLine4[128],
- pLine5[128],
- pLine6[128],
- pLine7[128],
- };
- new Paper[MAX_PLAYERS][pPaper];
- enum fInfo
- {
- FamilyTaken,
- FamilyName[20],
- FamilyMOTD[128],
- FamilyColor[20],
- FamilyLeader[MAX_PLAYER_NAME],
- FamilyMembers,
- Float:FamilySpawn[4],
- FamilyInterior,
- };
- new FamilyInfo[10][fInfo];
- enum zInfo
- {
- zOwner[64],
- zColor[20],
- Float:zMinX,
- Float:zMinY,
- Float:zMaxX,
- Float:zMaxY,
- };
- new TurfInfo[6][zInfo];
- new Turfs[6];
- enum pFishing
- {
- pFish1[20],
- pFish2[20],
- pFish3[20],
- pFish4[20],
- pFish5[20],
- pWeight1,
- pWeight2,
- pWeight3,
- pWeight4,
- pWeight5,
- pFid1,
- pFid2,
- pFid3,
- pFid4,
- pFid5,
- pLastFish,
- pFishID,
- pLastWeight,
- };
- new Fishes[MAX_PLAYERS][pFishing];
- enum pCooking
- {
- pCook1[20],
- pCook2[20],
- pCook3[20],
- pCook4[20],
- pCook5[20],
- pCWeight1,
- pCWeight2,
- pCWeight3,
- pCWeight4,
- pCWeight5,
- pCookID1,
- pCookID2,
- pCookID3,
- pCookID4,
- pCookID5,
- };
- new Cooking[MAX_PLAYERS][pCooking];
- enum pGroceries
- {
- pChickens,
- pChicken,
- pHamburgers,
- pHamburger,
- pPizzas,
- pPizza,
- };
- new Groceries[MAX_PLAYERS][pGroceries];
- enum pSpec
- {
- Float:Coords[3],
- Float:sPx,
- Float:sPy,
- Float:sPz,
- sPint,
- sLocal,
- sCam,
- };
- new Unspec[MAX_PLAYERS][pSpec];
- enum eCars
- {
- model_id,
- Float:pos_x,
- Float:pos_y,
- Float:pos_z,
- Float:z_angle,
- };
- enum hNews
- {
- hTaken1,
- hTaken2,
- hTaken3,
- hTaken4,
- hTaken5,
- hAdd1[128],
- hAdd2[128],
- hAdd3[128],
- hAdd4[128],
- hAdd5[128],
- hContact1[128],
- hContact2[128],
- hContact3[128],
- hContact4[128],
- hContact5[128],
- };
- new News[hNews];
- enum pInfo
- {
- pKey[128],
- pLevel,
- pAdmin,
- pDonateRank,
- gPupgrade,
- pConnectTime,
- pReg,
- pSex,
- pAge,
- pOrigin,
- pCK,
- pMuted,
- pExp,
- pCash,
- pAccount,
- pCrimes,
- pKills,
- pDeaths,
- pArrested,
- pWantedDeaths,
- pPhoneBook,
- pLottoNr,
- pFishes,
- pBiggestFish,
- pJob,
- pPayCheck,
- pHeadValue,
- pJailed,
- pJailTime,
- pMats,
- pDrugs,
- pLeader,
- pMember,
- pFMember,
- pRank,
- pChar,
- pContractTime,
- pDetSkill,
- pSexSkill,
- pBoxSkill,
- pLawSkill,
- pMechSkill,
- pJackSkill,
- pCarSkill,
- pNewsSkill,
- pDrugsSkill,
- pCookSkill,
- pFishSkill,
- Float:pHealth,
- Float:pSHealth,
- pInt,
- pLocal,
- pTeam,
- pModel,
- pPnumber,
- pPhousekey,
- pPbiskey,
- Float:pPos_x,
- Float:pPos_y,
- Float:pPos_z,
- pCarLic,
- pFlyLic,
- pBoatLic,
- pFishLic,
- pGunLic,
- pGun1,
- pGun2,
- pGun3,
- pGun4,
- pAmmo1,
- pAmmo2,
- pAmmo3,
- pAmmo4,
- pCarTime,
- pPayDay,
- pPayDayHad,
- pCDPlayer,
- pWins,
- pLoses,
- pAlcoholPerk,
- pDrugPerk,
- pMiserPerk,
- pPainPerk,
- pTraderPerk,
- pTut,
- pMissionNr,
- pWarns,
- pAdjustable,
- pFuel,
- pMarried,
- pMarriedTo[128],
- };
- new PlayerInfo[MAX_PLAYERS][pInfo];
- enum hInfo
- {
- Float:hEntrancex,
- Float:hEntrancey,
- Float:hEntrancez,
- Float:hExitx,
- Float:hExity,
- Float:hExitz,
- hHealthx,
- hHealthy,
- hHealthz,
- hArmourx,
- hArmoury,
- hArmourz,
- hOwner[MAX_PLAYER_NAME],
- hDiscription[MAX_PLAYER_NAME],
- hValue,
- hHel,
- hArm,
- hInt,
- hLock,
- hOwned,
- hRooms,
- hRent,
- hRentabil,
- hTakings,
- hVec,
- hVcol1,
- hVcol2,
- hDate,
- hLevel,
- };
- new HouseInfo[34][hInfo];
- enum bInfo
- {
- bOwned,
- bOwner[64],
- bMessage[128],
- bExtortion[MAX_PLAYER_NAME],
- Float:bEntranceX,
- Float:bEntranceY,
- Float:bEntranceZ,
- Float:bExitX,
- Float:bExitY,
- Float:bExitZ,
- bLevelNeeded,
- bBuyPrice,
- bEntranceCost,
- bTill,
- bLocked,
- bInterior,
- bProducts,
- bMaxProducts,
- bPriceProd,
- };
- new BizzInfo[5][bInfo];
- enum sbInfo
- {
- sbOwned,
- sbOwner[64],
- sbMessage[128],
- sbExtortion[MAX_PLAYER_NAME],
- Float:sbEntranceX,
- Float:sbEntranceY,
- Float:sbEntranceZ,
- sbLevelNeeded,
- sbBuyPrice,
- sbEntranceCost,
- sbTill,
- sbLocked,
- sbInterior,
- sbProducts,
- sbMaxProducts,
- sbPriceProd,
- };
- new SBizzInfo[12][sbInfo];
- enum pHaul
- {
- pCapasity,
- pLoad,
- };
- new PlayerHaul[100][pHaul];
- enum pCrime
- {
- pBplayer[32],
- pAccusing[32],
- pAccusedof[32],
- pVictim[32],
- };
- new PlayerCrime[MAX_PLAYERS][pCrime];
- enum mInfo
- {
- mTitle[128],
- mText1[128],
- mText2[128],
- mText3[128],
- mText4[128],
- mText5[128],
- mText6[128],
- mText7[128],
- mText8[128],
- mText9[128],
- mText10[128],
- mText11[128],
- mText12[128],
- mText13[128],
- mText14[128],
- mText15[128],
- mText16[128],
- mText17[128],
- mText18[128],
- mGText1[128],
- mGText2[128],
- mGText3[128],
- mGText4[128],
- mGText5[128],
- mGText6[128],
- Float:mCP1[3],
- Float:mCP2[3],
- Float:mCP3[3],
- Float:mCP4[3],
- Float:mCP5[3],
- Float:mCP6[3],
- mReward,
- mToggle,
- };
- new MissionInfo[mInfo];
- enum kInfo
- {
- kTitle[128],
- kMaker[MAX_PLAYER_NAME],
- kText1[128],
- kText2[128],
- kText3[128],
- kText4[128],
- kText5[128],
- kText6[128],
- kText7[128],
- kText8[128],
- kText9[128],
- kText10[128],
- kText11[128],
- kText12[128],
- kText13[128],
- kText14[128],
- kText15[128],
- kText16[128],
- kText17[128],
- kText18[128],
- kGText1[128],
- kGText2[128],
- kGText3[128],
- kGText4[128],
- kGText5[128],
- kGText6[128],
- Float:kCP1[3],
- Float:kCP2[3],
- Float:kCP3[3],
- Float:kCP4[3],
- Float:kCP5[3],
- Float:kCP6[3],
- kNumber,
- kReward,
- kToggle,
- };
- new PlayMission[kInfo];
- enum iInfo
- {
- iAdmin[128],
- iMOTD[128],
- iPassword[128],
- iNeedPass,
- iLock,
- iPlayers,
- };
- new IRCInfo[10][iInfo];
- new RandCars[20][1] = {
- {496},{542},{507},{585},
- {466},{492},{579},{559},
- {400},{551},{516},{475},
- {561},{550},{566},{558},
- {562},{562},{603},{560}
- };
- new RandLCars[1][1] = {
- {431}// coach
- };
- new GunPrice[30][1] = {
- {500}, //parachute
- {400}, //golfclub
- {300}, //nightstick
- {200}, //knife
- {700}, //baseballbat
- {300}, //shovel
- {100}, //poolcue
- {400}, //purpledildo
- {780}, //whitedildo
- {560}, //longwhitedildo
- {530}, //whitedildo2
- {200}, //flowers
- {600}, //cane
- {500}, //sdpistol
- {1000}, //colt45
- {3000}, //deagle
- {2000}, //Tec9
- {3000}, //uzi
- {2500}, //mp5
- {3000}, //shotgun
- {6000}, //spas12
- {4000}, //sawnoff
- {5000}, //ak47
- {5000}, //m4
- {1000}, //rifle
- {25}, //pistolammo
- {40}, //shotgunammo
- {25}, //smgammo
- {40}, //assaultammo
- {50} //rifle
- };
- new JoinPed[52][1] = {
- {280},//POLICE_FORCE
- {281},
- {282},
- {283},
- {284},
- {285},
- {288},
- {71},
- {166},
- {295},
- {148},
- {286},//FBI/ATF
- {164},
- {163},
- {287},//NATIONAL_GUARD
- {285},
- {70},//FIRE/AMBULANCE
- {274},
- {275},
- {276},
- {277},
- {278},
- {279},
- {258},//LA_COSA_NOSTRA
- {127},
- {126},
- {125},
- {124},
- {113},
- {111},
- {98},
- {120},//YAKUZA
- {121},
- {122},
- {123},
- {169},
- {186},
- {228},
- {127},//HITMANS
- {165},
- {186},
- {93},
- {141},
- {148},//NEWS_REPORTERS
- {188},
- {187},
- {255},//TAXI_CAB_COMPANY
- {253},
- {59},//DRIVING/FLYING_SCHOOL
- {60},//DRIVING/FLYING_SCHOOL
- {76},//DRIVING/FLYING_SCHOOL
- {150}//DRIVING/FLYING_SCHOOL
- };
- new Peds[217][1] = {
- {264},
- {288},//TEAM_ADMIN
- {286},{287},{228},{113},{120},{147},{294},{227},{61},{171},
- {247},//CIVILIANS DOWN HERE
- {248},{100},{256},{263},{262},{261},{260},{259},{258},{257},{256},{255},
- {253},{252},{251},{249},{246},{245},{244},{243},{242},{241},{240},{239},
- {238},{237},{236},{235},{234},{233},{232},{231},{230},{229},
- {226},{225},{173},{174},{175},{224},{223},{222},{221},{220},{219},{218},
- {217},{216},{215},{214},{213},{212},{211},{210},{209},
- {207},{206},{205},{204},{203},{202},{201},{200},{199},{198},{197},{196},
- {195},{194},{193},{192},{191},{190},{189},{185},{184},{183},
- {182},{181},{180},{179},{178},{176},{172},{170},{168},{167},{162},
- {161},{160},{159},{158},{157},{156},{155},{154},{153},{152},{151},
- {146},{145},{144},{143},{142},{141},{140},{139},{138},{137},{136},{135},
- {134},{133},{132},{131},{130},{129},{128},{254},{99},{97},{96},{95},{94},
- {92},{90},{89},{88},{87},{85},{84},{83},{82},{81},{80},{79},{78},{77},{76},
- {75},{73},{72},{69},{68},{67},{66},{64},{63},{62},{58},{57},{56},{55},
- {54},{53},{52},{51},{50},{49},{45},{44},{43},{41},{39},{38},{37},{36},{35},
- {34},{33},{32},{31},{30},{29},{28},{27},{26},{25},{24},{23},{22},{21},{20},
- {19},{18},{17},{16},{15},{14},{13},{12},{11},{10},{1},{2},
- {290},//ROSE
- {291},//PAUL
- {292},//CESAR
- {293},//OGLOC
- {187},
- {296},//JIZZY
- {297},//MADDOGG
- {298},//CAT
- {299}//ZERO
- };
- new Float:HouseCarSpawns[34][4] = {
- {-2637.2544,165.0454,4.2919,179.9976},//House 2
- {2064.4,-1694.4,13.1,271.1561},//House 1
- {-2712.7625,870.3005,70.5348,89.1608},//House 2
- {1109.8,-968.0,42.7,0.0},//house 3
- {2497.6274,-2025.6306,13.2521,355.4281}, // House 4
- {2645.0,-1990.8,13.1,180.0},//House - 5
- {-2724.8965,914.8384,67.4253,110.1072},//house 6
- {1910.5149,-1120.5304,25.4493,177.8350},//house 7
- {828.8,-887.0,68.5,230.7095},//House 8
- {2149.6,-1610.9,14.0,90.7904},//House 9
- {760.1,-1687.8,4.3,180.6},//House 10
- {645.5,-1616.1,14.9,0.0},//House 11
- {-2635.2371,931.1931,71.5643,215.3709},//House 12
- {-2665.9224,989.9724,64.6955,1.7814},//House 13
- {959.5864,-901.0845,45.8584,177.3087},//House 14
- {2445.8,-1326.8,23.6,18.4},//House 15
- {2845.9,-1286.8,18.9,90.0},//house 16
- {2159.8,-1803.9,13.3,271.4}, //House 17
- {-2693.7847,132.3186,4.1676,89.5330},//House 18
- {-2723.0105,977.7357,54.2926,359.9068},//House 19
- {1514.0,-694.6,94.5,90.0},//House 20
- {1246.7,-1107.6,25.5,266.4},//House 21
- {831.7,-857.5,69.9,180.0},//House 22
- {1007.9,-659.4,121.1,130.6194},//House 23
- {1110.0,-726.4,100.1,90.0},//House 24
- {259.7,-1221.0,74.7,202.0011},//House 25
- {1463.7,-901.7,55.8,359.0},//house 26
- {1440.1,-890.6,51.2,0.0},//house 27
- {-2528.8298,2250.2998,4.8112,334.9590},//house 28
- {-2554.7874,2270.5356,4.9064,333.9774}, //House 29
- {-2371.1323,2438.4104,9.0698,159.2582},//House 30
- {-2237.9492,893.7390,66.4872,89.7571},//House 31
- {-2529.4817,-142.6608,19.7107,4.2929}, //House 32
- {-2616.1897,-108.4479,4.1693,269.8246}//House 33
- };
- new CarSpawns[182][eCars] = {
- {405,-2125.7424,658.0462,52.2988,93.9612},//carid 90
- {426,-2158.0222,657.3932,52.2775,272.8372},
- {445,-1926.3204,585.6179,34.9963,359.8303},
- {492,2229.2,-1170.2,25.7,86.9},
- {507,-2214.8047,-82.7890,35.0474,0.6476},
- {545,2217.0,-1157.2,25.7,269.8},
- {547,405.9748,-1264.3921,50.1237,24.2110},
- {550,-1497.4576,845.8479,6.9382,88.5201},
- {551,-1741.0051,811.0620,24.5782,270.6681},
- {560,2106.4695,-1248.7920,24.0461,0.1524},
- {566,2196.2891,-1277.7905,24.2147,180.4522},
- {402,-1704.3132,999.7747,17.3646,90.0725},
- {405,216.5521,-1431.4004,13.0853,132.5749},
- {554,334.2231,-1343.7405,14.3828,209.9581},
- {507,697.4343,-1230.9486,16.5063,298.7916},
- {545,723.9850,-1121.5535,18.1450,333.9010},
- {536,666.8468,-467.6579,16.0734,90.8623},
- {560,668.1161,-546.2436,16.0413,89.4239},
- {540,912.2176,-996.2035,38.1402,7.5764},
- {482,-1758.3512,910.7219,24.5923,269.8633},
- {547,981.8715,-917.3546,41.5443,88.0589},
- {550,1188.4082,-925.1859,42.8590,277.5563},
- {400,-1699.4597,1035.9624,45.0934,91.6588},
- {405,1450.2,-937.1,36.2,269.6909}, //116
- {492,2148.3257,-1175.2518,24.1959,269.6909},
- {507,-1786.7155,1205.1598,24.7812,178.8758},
- {545,-1716.5907,1350.4829,6.8346,44.2506},
- {540,2348.2910,-1167.9983,27.3637,323.1586},
- {482,2502.0388,-1134.9507,39.1953,150.9506},
- {547,-2166.4534,1251.1536,27.2650,1.0352},
- {550,2853.1858,-1326.8011,11.1511,278.9301},
- {551,-2040.4761,1107.7072,53.4166,89.8473},
- {533,2796.9031,-1567.2024,10.6386,272.4041},
- {482,2813.2175,-1673.0276,9.6638,2.3369},
- {547,2827.6736,-1703.9755,9.7308,77.2896},
- {550,2809.3872,-1837.2391,9.7398,268.9880},
- {551,-2438.0784,1341.1190,7.6988,84.5107},
- {566,2411.5386,-2134.7576,13.9352,0.7795},
- {554,1389.7467,-2695.9370,13.4164,121.1818},
- {405,783.1359,-1601.8208,13.2577,270.9069},
- {554,782.7205,-1619.3584,13.2653,93.0550},
- {426,923.0841,-1361.7990,13.0324,181.1371},
- {445,-2644.6819,1342.3251,6.8981,270.7903},
- {492,1174.6599,-922.1939,43.1189,276.8927},
- {507,1363.0210,-1288.3124,13.2839,180.1453},
- {545,1363.2723,-1260.8229,13.0954,179.5841},
- {540,2383.5627,-1927.9207,13.2436,359.6281},
- {482,-2635.0933,1377.1693,6.8692,180.6415},
- {547,-2513.1277,1209.6135,37.1506,270.2610},
- {550,2396.6899,-1966.8123,13.2793,271.6838},
- {551,2391.1135,-1500.6554,23.6355,269.7709},
- {560,-2273.8679,921.3550,66.3095,0.6336},
- {405,-2153.0779,953.6602,79.7271,180.3209},
- {554,334.3586,-1789.3143,4.6717,178.7722},
- {426,343.8039,-1808.9827,4.3090,181.8368},
- {445,-2129.2915,787.6183,69.3346,87.1812},
- {492,646.4998,-1771.6411,13.2905,348.7706},
- {507,-2151.9524,395.9857,34.9395,180.7696},//150
- {545,-2078.8027,265.4074,35.1672,268.0607},
- {540,-2034.8334,178.8471,28.5682,269.9615},
- {482,438.9431,-1625.4088,25.7951,0.1850},
- {547,453.3896,-1494.3240,30.7917,7.7513},
- {550,487.6469,-1516.2312,20.0235,185.5384},
- {551,300.5775,-1490.8882,24.3748,235.1359},
- {560,-2180.1323,41.8542,35.1717,269.9866},
- {566,524.0590,-1375.0093,15.8231,193.3626},
- {405,598.9131,-1519.1414,14.8214,180.4083},
- {554,-2488.1333,-133.0336,25.3507,90.1064},
- {426,-2499.5225,45.0666,25.2641,89.9251},
- {445,-2636.7976,-55.4094,4.0630,359.9826},
- {492,-2718.5115,-124.4794,4.3505,269.1428},
- {507,736.8572,-1337.1550,13.3140,271.3832},
- {545,856.7003,-1363.1852,13.4093,179.8542},//165
- {482,888.1506,-1659.2727,13.3296,1.2414},
- {547,879.1024,-1669.2560,13.3305,180.5853},
- {550,-2134.1443,-453.9576,35.1479,95.0877},
- {551,920.4441,-1823.0966,12.3452,84.1821},
- {560,-1639.3900,-567.5057,13.9530,80.1994},
- {566,1062.6744,-1757.9412,13.1956,89.0572},
- {405,-2265.1501,148.9554,34.8837,269.3405},
- {554,1081.8948,-1629.9564,13.4064,90.0880},
- {426,981.7941,-1523.5115,13.3379,267.2751},
- {445,1014.7464,-1434.4586,13.3292,266.3129},
- {492,492.6386,-1555.3513,17.1462,213.1128},//DERBY
- {507,2684.6,-2019.0,13.3 ,0.8777},
- {545,1096.1,-1379.9,13.3,270.1909},//178
- {540,-2743.6772,-303.1675,7.1422,49.0919},//179 DERBY
- {482,1182.2568,-1219.2407,18.4163,0.5578},
- {547,1260.9978,-1187.1921,23.3559,183.3606},
- {550,1331.9304,-1081.3899,24.9941,90.4092},
- {551,1284.8755,-1525.5013,13.3451,269.4388},//near taxi
- {560,1279.1887,-1539.2032,13.3201,94.8070},//near taxi
- {566,1275.9120,-1646.7448,13.3273,267.2669},
- {405,-2200.5999,-2503.3606,30.4213,321.7648},
- {554,1253.9153,-1833.3832,13.1734,175.3692},
- {426,1279.2875,-1814.4156,13.1657,93.6385},
- {445,-2205.5234,-2439.3523,30.4224,51.1660},
- {492,1479.9131,-1737.8813,13.2418,269.5805},
- {507,1508.1047,-1737.7089,13.2418,270.0250},
- {545,1618.0411,-1891.1044,13.3278,0.3364},
- {540,1623.7291,-1892.7234,13.3307,180.0126},
- {482,-2079.6389,-2303.7983,30.3466,322.7155},
- {547,1743.5837,-1844.6041,13.3557,180.3384},
- {550,1838.1904,-1871.3842,13.1703,358.5452},
- {551,-1557.8568,-2741.5632,48.3481,144.5150},
- {560,1777.1376,-1910.0310,13.1681,91.0725},
- {566,-16.7753,-2503.6228,36.4593,121.7103},
- {566,1981.0780,-1986.3513,13.3275,2.1479},
- {405,218.4485,-173.3024,1.3809,90.0117},
- {554,199.5586,-155.4912,1.3827,0.3471},
- {426,1984.7471,-2066.7776,13.1625,359.7226},
- {445,1938.0565,-2086.8459,13.3429,268.3414},
- {492,318.4840,-86.0588,2.0804,90.9324},
- {507,-113.9556,-39.4382,2.9209,164.0464},
- {545,115.3321,-217.1147,1.3028,89.7911},
- {540,1748.0751,-2084.2090,13.3324,0.4337},
- {482,1560.5026,-2260.5457,13.3258,268.7398},
- {547,1461.6943,-1505.1688,13.2541,356.9007},
- {550,1426.4930,-1402.3170,13.1800,181.0290},
- {551,1435.0645,-1325.6835,13.2580,270.9400},
- {560,1513.9486,-1272.5691,14.2685,181.0697},
- {566,1583.7561,-1338.7435,16.1896,359.8619},
- {405,-2760.5156,-312.1838,7.1557,3.8747},//DERBY
- {554,-2766.6875,-281.2887,7.1613,180.1256},//DERBY
- {426,1430.2316,-1054.8555,22.8693,359.3625},
- {445,1574.1168,-1036.7643,23.6151,145.6786},
- //{492,1617.6676,-1009.8663,23.6052,356.8697},
- {507,1645.3188,-1036.5238,23.6027,0.7258},
- {545,485.9422,-1467.4543,18.3154,157.6833},//DERBY
- {540,1770.4874,-1060.9886,23.6658,179.2750},
- {482,-2781.4741,-281.6054,7.1515,181.0279},//DERBY
- {547,1653.1766,-1134.8994,23.6110,178.6835},
- {550,1617.3746,-1132.8293,23.6117,91.7300},
- {551,1790.0190,-1292.9065,13.2653,267.2964},
- {560,1754.3009,-1476.8170,13.2402,269.6320},
- {554,2003.3417,-1121.4993,26.3879,357.4926},
- {426,2084.2334,-1170.0986,24.2042,91.8975},
- {492,2229.2278,-1345.4033,23.6892,93.3009},
- {507,2332.5684,-1362.4845,23.7297,358.1198},
- {545,2384.1567,-1275.6326,23.9198,101.6528},
- {540,2432.3149,-1226.0785,24.9941,17.9805},
- {482,2426.9612,-1224.4158,25.0000,202.7159},
- {547,2438.4309,-1321.6925,24.1225,269.7535},
- {551,2612.9702,-1262.6970,48.2461,269.4752},
- {560,2659.4529,-1428.4343,30.1790,266.5051},
- {566,2659.7053,-1422.6743,30.1714,89.8159},
- {405,2485.5313,-1556.1823,23.7478,178.8338},
- {554,2478.7664,-1555.7006,23.7226,183.6043},
- {426,2605.3967,-1365.8829,34.6461,359.9891},
- {445,2754.7136,-1373.0253,40.1154,91.4169},
- {492,2717.3662,-1468.0308,30.0894,1.0298},
- {507,2816.7195,-1449.4285,15.9549,268.9106},
- {545,2816.9937,-1441.5880,15.9544,90.7779},
- {540,2681.9016,-1673.3879,9.1290,0.5605},
- {482,2442.5845,-1642.7507,13.1644,180.3454},
- {547,2361.3120,-1674.6146,13.2505,357.4959},
- {550,2298.3535,-1633.7542,14.3849,80.8107},
- {551,2297.9077,-1639.9464,14.4352,94.4292},
- {560,2255.4045,-1664.5736,15.1304,74.6898},
- {566,2234.1057,-1726.9386,13.1665,271.7536},
- {405,2319.3833,-1716.6823,13.2518,359.8540},
- {554,2474.5105,-1755.9194,13.2522,270.5967},
- {426,2501.8213,-1754.2794,13.1208,176.4916}, //= 255
- {445,2489.1560,-1952.6886,13.1366,178.1629},
- {492,2495.4326,-1953.2922,13.1299,356.5514},
- {507,2306.7168,-1989.6796,13.2639,184.8385},
- {482,2056.1807,-1904.7751,13.2502,2.2910},
- {550,2064.9871,-1919.1674,13.2504,180.8575},
- {551,1886.4812,-2022.9338,13.0964,179.4265},
- {560,1824.8976,-2019.8374,13.0875,272.5273},
- {566,1942.1669,-1862.6425,13.2679,264.5590},
- {405,1923.9409,-1795.5616,13.0877,90.0886},
- {554,1807.0905,-1571.7120,13.1659,125.1048},
- {426,1809.9016,-1676.0603,13.2422,180.7589},
- {445,1809.6266,-1653.3402,13.2365,180.6530},
- {492,1809.7056,-1660.3019,13.2380,180.6262},
- {507,1978.4003,-1675.0157,15.6741,269.7336},
- {545,1974.8230,-1693.5488,15.6741,92.1162},
- {540,1929.2253,-1584.6954,13.2700,185.5542},
- {482,1731.9725,-1590.8959,13.1630,77.7249},
- {547,1721.5776,-1589.2834,13.1526,80.9057},
- {550,1695.1428,-1519.2667,13.1671,0.7121},
- {551,1694.7080,-1501.7454,13.1675,357.8150}
- };
- //------------------------------------------------------------------------------------------------------
- main()
- {
- print(" ");
- print(" ");
- print(" The Godfather: LS/SF");
- print("_____________________");
- print(" By: Fear & parts of Astro");
- print(" ");
- }
- //------------------------------------------------------------------------------------------------------
- public SearchingHit(playerid)
- {
- new string[256];
- new giveplayer[MAX_PLAYER_NAME];
- new searchhit = 0;
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(searchhit == 0)
- {
- if(PlayerInfo[i][pHeadValue] > 0 && GotHit[i] == 0 && PlayerInfo[i][pMember] != 8)
- {
- GetPlayerName(i, giveplayer, sizeof(giveplayer));
- searchhit = 1;
- hitfound = 1;
- hitid = i;
- for(new k=0; k<MAX_PLAYERS; k++)
- {
- if(IsPlayerConnected(k))
- {
- if(PlayerInfo[k][pMember] == 8 || PlayerInfo[k][pLeader] == 8)
- {
- SendClientMessage(k, COLOR_WHITE, "|__________________ Hitman Agency News __________________|");
- SendClientMessage(k, COLOR_DBLUE, "*** Incoming Message: A Hit has become available. ***");
- format(string, sizeof(string), "Person: %s ID: %d Value: $%d", giveplayer, i, PlayerInfo[i][pHeadValue]);
- SendClientMessage(k, COLOR_DBLUE, string);
- SendClientMessage(k, COLOR_YELLOW, "Use Givehit hitmanid, to assign the Contract to one of the Hitmans.");
- SendClientMessage(k, COLOR_WHITE, "|________________________________________________________|");
- }
- }
- }
- return 0;
- }
- }
- }
- }
- if(searchhit == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " No Contracts available !");
- }
- return 0;
- }
- public ExtortionBiz(bizid, money)
- {
- new string[256];
- format(string, sizeof(string), "No-one");
- if(strcmp(BizzInfo[bizid][bExtortion],string, true ) == 0 )
- {
- return 0;
- }
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- new name[MAX_PLAYER_NAME];
- new wstring[MAX_PLAYER_NAME];
- GetPlayerName(i, name, sizeof(name));
- format(string, sizeof(string), "%s", name);
- strmid(wstring, string, 0, strlen(string), 255);
- if(strcmp(BizzInfo[bizid][bExtortion] ,wstring, true ) == 0 )
- {
- new value = money / 100;
- value = value * 10;
- GivePlayerMoney(i, value);
- BizzInfo[bizid][bTill] -= value;
- }
- }
- }
- return 1;
- }
- public ExtortionSBiz(bizid, money)
- {
- new string[256];
- format(string, sizeof(string), "No-one");
- if(strcmp(SBizzInfo[bizid][sbExtortion],string, true ) == 0 )
- {
- return 0;
- }
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- new name[MAX_PLAYER_NAME];
- new wstring[MAX_PLAYER_NAME];
- GetPlayerName(i, name, sizeof(name));
- format(string, sizeof(string), "%s", name);
- strmid(wstring, string, 0, strlen(string), 255);
- if(strcmp(SBizzInfo[bizid][sbExtortion] ,wstring, true ) == 0 )
- {
- new value = money / 100;
- value = value * 10;
- GivePlayerMoney(i, value);
- SBizzInfo[bizid][sbTill] -= value;
- }
- }
- }
- return 1;
- }
- public PreparePaintball()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerPaintballing[i] != 0)
- {
- SendClientMessage(i, COLOR_YELLOW, "Paintball Match will start in 20 seconds.");
- }
- }
- }
- SetTimer("StartPaintball", 20000, 0);
- return 1;
- }
- public StartPaintball()
- {
- PaintballRound = 1;
- StartingPaintballRound = 0;
- PaintballWinner = 999;
- PaintballWinnerKills = 0;
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerPaintballing[i] != 0)
- {
- ResetPlayerWeapons(i);
- GivePlayerWeapon(i, 29, 999);
- TogglePlayerControllable(i, 1);
- SendClientMessage(i, COLOR_YELLOW, "Paintball Match started, 4 minutes left.");
- PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
- }
- }
- }
- SetTimer("PaintballEnded", 240000, 0);
- return 1;
- }
- public PaintballEnded()
- {
- new string[256];
- new name[MAX_PLAYER_NAME];
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerPaintballing[i] != 0)
- {
- if(IsPlayerConnected(PaintballWinner))
- {
- GetPlayerName(PaintballWinner, name, sizeof(name));
- format(string,sizeof(string), "** %s won the Paintball Match with %d kills **",name,PaintballWinnerKills);
- SendClientMessage(i, COLOR_WHITE, string);
- }
- ResetPlayerWeapons(i);
- PlayerPaintballing[i] = 0;
- SetPlayerPos(i, SBizzInfo[10][sbEntranceX],SBizzInfo[10][sbEntranceY],SBizzInfo[10][sbEntranceZ]);
- }
- }
- }
- AnnouncedPaintballRound = 0;
- PaintballRound = 0;
- return 1;
- }
- public PrepareKarting()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
- {
- CP[i] = 9;
- SetPlayerCheckpoint(i,2308.3540,-2354.0039,12.6842,8.0);
- SendClientMessage(i, COLOR_YELLOW, "Kart Race will start in 20 seconds, go to the starting line.");
- }
- }
- }
- SetTimer("StartKarting", 20000, 0);
- return 1;
- }
- public StartKarting()
- {
- KartingRound = 1;
- StartingKartRound = 0;
- EndingKartRound = 0;
- FirstKartWinner = 999;
- SecondKartWinner = 999;
- ThirdKartWinner = 999;
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
- {
- CP[i] = 10;
- SendClientMessage(i, COLOR_YELLOW, "Green light, go go go !");
- PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
- SetPlayerCheckpoint(i,2308.3540,-2354.0039,12.6842,8.0);
- }
- }
- }
- SetTimer("KartingEnded", 240000, 0);
- return 1;
- }
- public KartingEnded()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
- {
- CP[i] = 0;
- DisablePlayerCheckpoint(i);
- }
- }
- }
- AnnouncedKartRound = 0;
- KartingRound = 0;
- return 1;
- }
- public DollahScoreUpdate()
- {
- new LevScore;
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- LevScore = PlayerInfo[i][pLevel];
- SetPlayerScore(i, LevScore);
- }
- }
- return 1;
- }
- public Encrypt(string[])
- {
- for(new x=0; x < strlen(string); x++)
- {
- string[x] += (3^x) * (x % 15);
- if(string[x] > (0xff))
- {
- string[x] -= 256;
- }
- }
- return 1;
- }
- stock right(source[], len)
- {
- new retval[MAX_STRING], srclen;
- srclen = strlen(source);
- strmid(retval, source, srclen - len, srclen, MAX_STRING);
- return retval;
- }
- public Spectator()
- {
- new string[256];
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(KickPlayer[i]==1) { Kick(i); }
- else if(KickPlayer[i]==2) { Ban(i); }
- //if(GetPlayerPing(i) >= 500 && PlayerInfo[i][pAdmin] < 1) { Kick(i); }
- if(Spectate[i] < 253 && Spectate[i] != 255)
- {
- SetPlayerColor(i,COLOR_SPEC);
- TogglePlayerControllable(i, 0);
- new targetid = Spectate[i];
- if(IsPlayerConnected(targetid))
- {
- TogglePlayerSpectating(i, 1);
- if(PlayerInfo[i][pAdmin] >= 1)
- {
- new Float:health;
- new name[MAX_PLAYER_NAME];
- GetPlayerName(targetid, name, sizeof(name));
- GetPlayerHealth(targetid, health);
- format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~y~%s(ID:%d)~n~~y~health:%.1f",name,targetid,health);
- GameTextForPlayer(i, string, 2500, 3);
- }
- if(IsPlayerInAnyVehicle(targetid))
- {
- new carid = GetPlayerVehicleID(targetid);
- PlayerSpectateVehicle(i, carid);
- }
- else
- {
- PlayerSpectatePlayer(i, targetid);
- }
- if(GetPlayerInterior(targetid) == 0)
- {
- SetPlayerInterior(i,0);
- }
- else if(GetPlayerInterior(targetid) > 0)
- {
- SetPlayerInterior(i,GetPlayerInterior(targetid));
- }
- }//Targetid connected
- }
- if(Spectate[i] == 253)
- {
- TogglePlayerControllable(i, 1);
- TogglePlayerSpectating(i, 0);
- SetPlayerInterior(i,Unspec[i][sPint]);
- PlayerInfo[i][pInt] = Unspec[i][sPint];
- PlayerInfo[i][pLocal] = Unspec[i][sLocal];
- Unspec[i][sLocal] = 255;
- SetSpawnInfo(i, PlayerInfo[i][pTeam], PlayerInfo[i][pModel], Unspec[i][sPx], Unspec[i][sPy], Unspec[i][sPz]-1.0, 1.0, -1, -1, -1, -1, -1, -1);
- gTeam[i] = PlayerInfo[i][pTeam];
- SetPlayerToTeamColor(i);
- MedicBill[i] = 0;
- if(PlayerInfo[i][pDonateRank] > 0)
- {
- SetSpawnInfo(i, PlayerInfo[i][pTeam], PlayerInfo[i][pModel], Unspec[i][Coords][0], Unspec[i][Coords][1], Unspec[i][Coords][2], 10.0, -1, -1, -1, -1, -1, -1);
- SpawnPlayer(i);
- SetCameraBehindPlayer(i);
- }
- else
- {
- SpawnPlayer(i);
- }
- Spectate[i] = 255;
- }
- if(Spectate[i] == 254)
- {
- TogglePlayerControllable(i, 1);
- SetPlayerInterior(i,Unspec[i][sPint]);
- PlayerInfo[i][pInt] = Unspec[i][sPint];
- PlayerInfo[i][pLocal] = Unspec[i][sLocal];
- SetPlayerPos(i, Unspec[i][sPx], Unspec[i][sPy], Unspec[i][sPz]);
- Spectate[i] = 255;
- }
- if(Spectate[i] == 256)
- {
- SetPlayerToTeamColor(i);
- Spectate[i] = 255;
- }
- if(Spectate[i] == 257)
- {
- Spectate[i] = 254;
- }
- }
- }
- }
- //------------------------------------------------------------------------------------------------------
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- if(gTeam[playerid] >= 3)
- {
- if (IsACopCar(vehicleid) && !ispassenger)
- {
- if(PlayerInfo[playerid][pLeader]==1||PlayerInfo[playerid][pLeader]==2||PlayerInfo[playerid][pLeader]==3) {}
- else { WantedPoints[playerid]+=2; SetPlayerCriminal(playerid,255, "Stealing A Police Vehicle"); }
- }
- if (IsAnAmbulance(vehicleid) && !ispassenger)
- {
- if(PlayerInfo[playerid][pMember]==4||PlayerInfo[playerid][pLeader]==4) { }
- else { WantedPoints[playerid]+=2; SetPlayerCriminal(playerid,255, "Stealing An Ambulance"); }
- }
- }
- return 1;
- }
- public IsAnInstructor(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- new leader = PlayerInfo[playerid][pLeader];
- new member = PlayerInfo[playerid][pMember];
- if(member==11)
- {
- return 1;
- }
- if(leader==11)
- {
- return 1;
- }
- }
- return 0;
- }
- public IsAMember(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- new leader = PlayerInfo[playerid][pLeader];
- new member = PlayerInfo[playerid][pMember];
- if(member==5 || member==6 || member==8)
- {
- return 1;
- }
- if(leader==5 || leader==6 || leader==8)
- {
- return 1;
- }
- }
- return 0;
- }
- public IsACop(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- new leader = PlayerInfo[playerid][pLeader];
- new member = PlayerInfo[playerid][pMember];
- if(member==1 || member==2 || member==3)
- {
- return 1;
- }
- else if(leader==1 || leader==2 || leader==3)
- {
- return 1;
- }
- }
- return 0;
- }
- public IsAtClothShop(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerToPoint(25.0,playerid,207.5627,-103.7291,1005.2578) || PlayerToPoint(25.0,playerid,203.9068,-41.0728,1001.8047))
- {//Binco & Suburban
- return 1;
- }
- else if(PlayerToPoint(30.0,playerid,214.4470,-7.6471,1001.2109) || PlayerToPoint(50.0,playerid,161.3765,-83.8416,1001.8047))
- {//Zip & Victim
- return 1;
- }
- }
- return 0;
- }
- public IsAtGasStation(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerToPoint(6.0,playerid,1004.0070,-939.3102,42.1797) || PlayerToPoint(6.0,playerid,1944.3260,-1772.9254,13.3906))
- {//LS
- return 1;
- }
- else if(PlayerToPoint(6.0,playerid,-90.5515,-1169.4578,2.4079) || PlayerToPoint(6.0,playerid,-1609.7958,-2718.2048,48.5391))
- {//LS
- return 1;
- }
- else if(PlayerToPoint(6.0,playerid,-2029.4968,156.4366,28.9498) || PlayerToPoint(8.0,playerid,-2408.7590,976.0934,45.4175))
- {//SF
- return 1;
- }
- else if(PlayerToPoint(5.0,playerid,-2243.9629,-2560.6477,31.8841) || PlayerToPoint(8.0,playerid,-1676.6323,414.0262,6.9484))
- {//Between LS and SF
- return 1;
- }
- else if(PlayerToPoint(6.0,playerid,2202.2349,2474.3494,10.5258) || PlayerToPoint(10.0,playerid,614.9333,1689.7418,6.6968))
- {//LV
- return 1;
- }
- else if(PlayerToPoint(8.0,playerid,-1328.8250,2677.2173,49.7665) || PlayerToPoint(6.0,playerid,70.3882,1218.6783,18.5165))
- {//LV
- return 1;
- }
- else if(PlayerToPoint(8.0,playerid,2113.7390,920.1079,10.5255) || PlayerToPoint(6.0,playerid,-1327.7218,2678.8723,50.0625))
- {//LV
- return 1;
- }
- }
- return 0;
- }
- public IsAtFishPlace(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerToPoint(1.0,playerid,403.8266,-2088.7598,7.8359) || PlayerToPoint(1.0,playerid,398.7553,-2088.7490,7.8359))
- {//Fishplace at the bigwheel
- return 1;
- }
- else if(PlayerToPoint(1.0,playerid,396.2197,-2088.6692,7.8359) || PlayerToPoint(1.0,playerid,391.1094,-2088.7976,7.8359))
- {//Fishplace at the bigwheel
- return 1;
- }
- else if(PlayerToPoint(1.0,playerid,383.4157,-2088.7849,7.8359) || PlayerToPoint(1.0,playerid,374.9598,-2088.7979,7.8359))
- {//Fishplace at the bigwheel
- return 1;
- }
- else if(PlayerToPoint(1.0,playerid,369.8107,-2088.7927,7.8359) || PlayerToPoint(1.0,playerid,367.3637,-2088.7925,7.8359))
- {//Fishplace at the bigwheel
- return 1;
- }
- else if(PlayerToPoint(1.0,playerid,362.2244,-2088.7981,7.8359) || PlayerToPoint(1.0,playerid,354.5382,-2088.7979,7.8359))
- {//Fishplace at the bigwheel
- return 1;
- }
- }
- return 0;
- }
- public IsAtCookPlace(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerToPoint(3.0,playerid,369.9786,-4.0798,1001.8589))
- {//Cluckin Bell
- return 1;
- }
- else if(PlayerToPoint(3.0,playerid,376.4466,-60.9574,1001.5078) || PlayerToPoint(3.0,playerid,378.1215,-57.4928,1001.5078))
- {//Burgershot
- return 1;
- }
- else if(PlayerToPoint(3.0,playerid,374.1185,-113.6361,1001.4922) || PlayerToPoint(3.0,playerid,377.7971,-113.7668,1001.4922))
- {//Well Stacked Pizza
- return 1;
- }
- }
- return 0;
- }
- public IsAtBar(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerToPoint(4.0,playerid,495.7801,-76.0305,998.7578) || PlayerToPoint(4.0,playerid,499.9654,-20.2515,1000.6797))
- {//In grove street bar (with girlfriend), and in Havanna
- return 1;
- }
- else if(PlayerToPoint(4.0,playerid,1215.9480,-13.3519,1000.9219) || PlayerToPoint(10.0,playerid,-2658.9749,1407.4136,906.2734))
- {//PIG Pen
- return 1;
- }
- }
- return 0;
- }
- public IsABoat(carid)
- {
- if(carid >= 86 && carid <=90)
- {
- return 1;
- }
- return 0;
- }
- public IsAPlane(carid)
- {
- if(carid==39||carid==40||carid==60||carid==83||carid==91||carid==92||carid==93||carid==95||carid==96||carid==99||carid==100||carid==101||carid==102||carid==103||carid==104||carid==105||carid==106||carid==107||carid==108||carid==109)
- {
- return 1;
- }
- return 0;
- }
- public IsACopCar(carid)
- {
- if((carid >= 35) && (carid <= 60) || carid == 66 || carid == 67 || carid == 91 || carid == 92 || carid == 93 || carid == 36)
- {
- if(carid == 45 || carid == 46 || carid == 55 || carid == 59) { return 0; }
- return 1;
- }
- return 0;
- }
- public IsAnAmbulance(carid)
- {
- if((carid >= 61) && (carid <= 63)|| carid == 83)
- {
- return 1;
- }
- return 0;
- }
- public IsATruck(carid)
- {
- if(carid >= 78 && carid <= 81)
- {
- return 1;
- }
- return 0;
- }
- //------------------------------------------------------------------------------------------------------
- public OnPlayerConnect(playerid)
- {
- if(Security != 0)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "Host has broken one of the Agreement rules, action has been taken.");
- Kick(playerid);
- return 1;
- }
- gActivePlayers[playerid]++;
- numplayers++;
- new plname[MAX_PLAYER_NAME];
- new string[MAX_PLAYER_NAME];
- SelectChar[playerid] = 0; HidePM[playerid] = 0; PhoneOnline[playerid] = 0;
- SelectCharID[playerid] = 0; SelectCharPlace[playerid] = 0; ChosenSkin[playerid] = 0;
- GettingJob[playerid] = 0; GuardOffer[playerid] = 999; GuardPrice[playerid] = 0;
- ApprovedLawyer[playerid] = 0; CallLawyer[playerid] = 0; WantLawyer[playerid] = 0;
- KickPlayer[playerid] = 0; CurrentMoney[playerid] = 0; UsedFind[playerid] = 0;
- CP[playerid] = 0; Robbed[playerid] = 0; SpawnChange[playerid] = 1;
- CarOffer[playerid] = 999; CarPrice[playerid] = 0; CarID[playerid] = 0; CarCalls[playerid] = 0;
- RobbedTime[playerid] = 0; MoneyMessage[playerid] = 0; Condom[playerid] = 0;
- STDPlayer[playerid] = 0; SexOffer[playerid] = 999; SexPrice[playerid] = 0;
- RepairOffer[playerid] = 999; RepairPrice[playerid] = 0; RepairCar[playerid] = 0;
- TalkingLive[playerid] = 255; LiveOffer[playerid] = 999; TakingLesson[playerid] = 0;
- RefillOffer[playerid] = 999; RefillPrice[playerid] = 0; MapIconsShown[playerid] = 0;
- DrugOffer[playerid] = 999; PlayerCuffed[playerid] = 0; PlayerCuffedTime[playerid] = 0;
- DrugPrice[playerid] = 0; RegistrationStep[playerid] = 0; OnCK[playerid] = 999; GettingCK[playerid] = 999;
- DrugGram[playerid] = 0; ConnectedToPC[playerid] = 0; OrderReady[playerid] = 0;
- JailPrice[playerid] = 0; MedicTime[playerid] = 0; NeedMedicTime[playerid] = 0; MedicBill[playerid] = 0; GotHit[playerid] = 0;
- WantedPoints[playerid] = 0; GoChase[playerid] = 999; GetChased[playerid] = 999; PlacedNews[playerid] = 0;
- OnDuty[playerid] = 0; WantedLevel[playerid] = 0; TestFishes[playerid] = 0;
- BoxWaitTime[playerid] = 0; SchoolSpawn[playerid] = 0; ChangePos2[playerid][1] = 0;
- SafeTime[playerid] = 60; TransportDuty[playerid] = 0; PlayerTied[playerid] = 0;
- BusCallTime[playerid] = 0; TaxiCallTime[playerid] = 0; MedicCallTime[playerid] = 0; MechanicCallTime[playerid] = 0;
- FindTimePoints[playerid] = 0; FindTime[playerid] = 0; JobDuty[playerid] = 0;
- Mobile[playerid] = 255; Music[playerid] = 0; BoxOffer[playerid] = 999; PlayerBoxing[playerid] = 0;
- Spectate[playerid] = 255; PlayerDrunk[playerid] = 0; PlayerDrunkTime[playerid] = 0;
- Unspec[playerid][sLocal] = 255; FishCount[playerid] = 0;
- WritingPaper[playerid] = 0; WritingPaperNumber[playerid] = 999; WritingLine[playerid] = 0; BringingPaper[playerid] = 0; GotPaper[playerid] = 0;
- PaperOffer[playerid] = 999; ConsumingMoney[playerid] = 0;
- gLastCar[playerid] = 0; FirstSpawn[playerid] = 0;
- gOoc[playerid] = 0; gNews[playerid] = 0; BigEar[playerid] = 0; gDice[playerid] = 0; gFam[playerid] = 0;
- gSpeedo[playerid] = 0; gGas[playerid] = 0;
- gPlayerLogged[playerid] = 0; gPlayerLogTries[playerid] = 0; gPlayerAccount[playerid] = 0;
- gPlayerSpawned[playerid] = 0; PlayerKarting[playerid] = 0; PlayerInKart[playerid] = 0;
- PlayerTazeTime[playerid] = 0; PlayerStoned[playerid] = 0;
- StartTime[playerid] = 0; TicketOffer[playerid] = 999; TicketMoney[playerid] = 0;
- MatsHolding[playerid] = 0; TutTime[playerid] = 0;
- gPlayerMission[playerid] = 0; TaxiAccepted[playerid] = 999; BusAccepted[playerid] = 999;
- PlayerInfo[playerid][pCash] = dollah; NoFuel[playerid] = 0;
- HireCar[playerid] = 299; PlayersChannel[playerid] = 999;
- TransportValue[playerid] = 0; TransportMoney[playerid] = 0; TransportTime[playerid] = 0; TransportCost[playerid] = 0; TransportDriver[playerid] = 999;
- Locator[playerid] = 0; PlayerOnMission[playerid] = 0; MissionCheckpoint[playerid] = 0;
- WatchingTV[playerid] = 0; PlayerPaintballing[playerid] = 0; PlayerPaintballKills[playerid] = 0;
- Fishes[playerid][pLastFish] = 0; Fishes[playerid][pFishID] = 0;
- ProposeOffer[playerid] = 999; MarryWitness[playerid] = 999; MarryWitnessOffer[playerid] = 999; MarriageCeremoney[playerid] = 0; ProposedTo[playerid] = 999; GotProposedBy[playerid] = 999; DivorceOffer[playerid] = 999;
- GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
- PlayerInfo[playerid][pLevel] = 0;
- PlayerInfo[playerid][pAdmin] = 0;
- PlayerInfo[playerid][pDonateRank] = 0;
- PlayerInfo[playerid][gPupgrade] = 0;
- PlayerInfo[playerid][pConnectTime] = 0;
- PlayerInfo[playerid][pReg] = 0;
- PlayerInfo[playerid][pSex] = 0;
- PlayerInfo[playerid][pAge] = 0;
- PlayerInfo[playerid][pOrigin] = 0;
- PlayerInfo[playerid][pExp] = 0;
- PlayerInfo[playerid][pAccount] = 0;
- PlayerInfo[playerid][pCrimes] = 0;
- PlayerInfo[playerid][pDeaths] = 0;
- PlayerInfo[playerid][pArrested] = 0;
- PlayerInfo[playerid][pWantedDeaths] = 0;
- PlayerInfo[playerid][pPhoneBook] = 0;
- PlayerInfo[playerid][pLottoNr] = 0;
- PlayerInfo[playerid][pFishes] = 0;
- PlayerInfo[playerid][pBiggestFish] = 0;
- PlayerInfo[playerid][pJob] = 0;
- PlayerInfo[playerid][pPayCheck] = 0;
- PlayerInfo[playerid][pHeadValue] = 0;
- PlayerInfo[playerid][pJailed] = 0;
- PlayerInfo[playerid][pJailTime] = 0;
- PlayerInfo[playerid][pMats] = 0;
- PlayerInfo[playerid][pDrugs] = 0;
- PlayerInfo[playerid][pLeader] = 0;
- PlayerInfo[playerid][pMember] = 0;
- PlayerInfo[playerid][pFMember] = 255;
- PlayerInfo[playerid][pRank] = 0;
- PlayerInfo[playerid][pChar] = 0;
- PlayerInfo[playerid][pContractTime] = 0;
- PlayerInfo[playerid][pDetSkill] = 0;
- PlayerInfo[playerid][pSexSkill] = 0;
- PlayerInfo[playerid][pBoxSkill] = 0;
- PlayerInfo[playerid][pLawSkill] = 0;
- PlayerInfo[playerid][pMechSkill] = 0;
- PlayerInfo[playerid][pJackSkill] = 0;
- PlayerInfo[playerid][pCarSkill] = 0;
- PlayerInfo[playerid][pNewsSkill] = 0;
- PlayerInfo[playerid][pDrugsSkill] = 0;
- PlayerInfo[playerid][pCookSkill] = 0;
- PlayerInfo[playerid][pFishSkill] = 0;
- PlayerInfo[playerid][pSHealth] = 0.0;
- PlayerInfo[playerid][pHealth] = 50.0;
- PlayerInfo[playerid][pPos_x] = 2246.6;
- PlayerInfo[playerid][pPos_y] = -1161.9;
- PlayerInfo[playerid][pPos_z] = 1029.7;
- PlayerInfo[playerid][pInt] = 15;
- PlayerInfo[playerid][pLocal] = 255;
- PlayerInfo[playerid][pTeam] = 3;
- PlayerInfo[playerid][pModel] = 264;
- new randphone = 1000 + random(8999);//minimum 1000 max 9999 //giving one at the start
- PlayerInfo[playerid][pPnumber] = randphone;
- PlayerInfo[playerid][pPhousekey] = 255;
- PlayerInfo[playerid][pPbiskey] = 255;
- PlayerInfo[playerid][pCarLic] = 0;
- PlayerInfo[playerid][pFlyLic] = 0;
- PlayerInfo[playerid][pBoatLic] = 0;
- PlayerInfo[playerid][pFishLic] = 0;
- PlayerInfo[playerid][pGunLic] = 0;
- PlayerInfo[playerid][pGun1] = 0;
- PlayerInfo[playerid][pGun2] = 0;
- PlayerInfo[playerid][pGun3] = 0;
- PlayerInfo[playerid][pGun4] = 0;
- PlayerInfo[playerid][pAmmo1] = 0;
- PlayerInfo[playerid][pAmmo2] = 0;
- PlayerInfo[playerid][pAmmo3] = 0;
- PlayerInfo[playerid][pAmmo4] = 0;
- PlayerInfo[playerid][pCarTime] = 0;
- PlayerInfo[playerid][pPayDay] = 0;
- PlayerInfo[playerid][pPayDayHad] = 0;
- PlayerInfo[playerid][pCDPlayer] = 0;
- PlayerInfo[playerid][pWins] = 0;
- PlayerInfo[playerid][pLoses] = 0;
- PlayerInfo[playerid][pAlcoholPerk] = 0;
- PlayerInfo[playerid][pDrugPerk] = 0;
- PlayerInfo[playerid][pMiserPerk] = 0;
- PlayerInfo[playerid][pPainPerk] = 0;
- PlayerInfo[playerid][pTraderPerk] = 0;
- PlayerInfo[playerid][pTut] = 0;
- PlayerInfo[playerid][pMissionNr] = 0;
- PlayerInfo[playerid][pWarns] = 0;
- PlayerInfo[playerid][pFuel] = 0;
- PlayerInfo[playerid][pAdjustable] = 0;
- ClearCrime(playerid);
- ClearFishes(playerid);
- ClearCooking(playerid);
- ClearGroceries(playerid);
- ClearMarriage(playerid);
- SetPlayerColor(playerid,COLOR_GRAD2);
- GetPlayerName(playerid, plname, sizeof(plname));
- format(string, sizeof(string), "%s.ini", plname);
- if(fexist(string))
- {
- gPlayerAccount[playerid] = 1;
- SendClientMessage(playerid, COLOR_YELLOW, "SERVER: That nick is registered, please login");
- SendClientMessage(playerid, COLOR_WHITE, "HINT: You can now login by typing /login <password>");
- return 1;
- }
- else
- {
- gPlayerAccount[playerid] = 0;
- SendClientMessage(playerid,COLOR_YELLOW,"You dont have an account. Register at our site: www.godfather-rp.com");
- KickPlayer[playerid] = 1;
- return 1;
- }
- }
- public JoinChannel(playerid, number, line[])
- {
- if(IsPlayerConnected(playerid))
- {
- if(strcmp(IRCInfo[number][iPassword],line, true ) == 0 )
- {
- JoinChannelNr(playerid, number);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Wrong Channel Password !");
- }
- }
- return 1;
- }
- public JoinChannelNr(playerid, number)
- {
- if(IsPlayerConnected(playerid))
- {
- new string[256];
- new sendername[MAX_PLAYER_NAME];
- GetPlayerName(playerid, sendername, sizeof(sendername));
- if(PlayersChannel[playerid] < 999)
- {
- format(string, sizeof(string), "* %s has left the Channel.", sendername);
- SendIRCMessage(PlayersChannel[playerid], COLOR_GREEN, string);
- IRCInfo[PlayersChannel[playerid]][iPlayers] -= 1;
- }
- new channel; channel = number; channel += 1;
- PlayersChannel[playerid] = number;
- IRCInfo[PlayersChannel[playerid]][iPlayers] += 1;
- new wstring[128];
- format(string, sizeof(string), "%s", sendername);
- strmid(wstring, string, 0, strlen(string), 255);
- if(strcmp(IRCInfo[number][iAdmin],wstring, true ) == 0 )
- {
- format(string, sizeof(string), "* You have joined IRC Channel %d as the Administrator.", channel);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- }
- else
- {
- format(string, sizeof(string), "* You have joined IRC Channel %d, Admin: %s.", channel, IRCInfo[number][iAdmin]);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- }
- format(string, sizeof(string), "MOTD: %s.", IRCInfo[number][iMOTD]);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- format(string, sizeof(string), "* %s has joined the Channel.", sendername);
- SendIRCMessage(number, COLOR_GREEN, string);
- }
- return 1;
- }
- public ClearCK(ck)
- {
- new string[MAX_PLAYER_NAME];
- format(string, sizeof(string), "No-one");
- strmid(CKInfo[ck][cSendername], string, 0, strlen(string), 255);
- strmid(CKInfo[ck][cGiveplayer], string, 0, strlen(string), 255);
- CKInfo[ck][cUsed] = 0;
- SaveCK();
- return 1;
- }
- public ClearMarriage(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- new string[MAX_PLAYER_NAME];
- format(string, sizeof(string), "No-one");
- strmid(PlayerInfo[playerid][pMarriedTo], string, 0, strlen(string), 255);
- PlayerInfo[playerid][pMarried] = 0;
- }
- return 1;
- }
- public ClearPaper(paper)
- {
- new string[MAX_PLAYER_NAME];
- format(string, sizeof(string), "None");
- PaperInfo[paper][PaperUsed] = 0;
- strmid(PaperInfo[paper][PaperMaker], string, 0, strlen(string), 255);
- strmid(PaperInfo[paper][PaperTitle], string, 0, strlen(string), 255);
- strmid(PaperInfo[paper][PaperText1], string, 0, strlen(string), 255);
- strmid(PaperInfo[paper][PaperText2], string, 0, strlen(string), 255);
- strmid(PaperInfo[paper][PaperText3], string, 0, strlen(string), 255);
- strmid(PaperInfo[paper][PaperText4], string, 0, strlen(string), 255);
- strmid(PaperInfo[paper][PaperText5], string, 0, strlen(string), 255);
- strmid(PaperInfo[paper][PaperText6], string, 0, strlen(string), 255);
- strmid(PaperInfo[paper][PaperText7], string, 0, strlen(string), 255);
- SavePapers();
- return 1;
- }
- public ClearFamily(family)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pFMember] == family)
- {
- SendClientMessage(i, COLOR_LIGHTBLUE, "* The Family you are in got Deleted by the Organisation Leader, you got kicked out automaticly.");
- PlayerInfo[i][pFMember] = 255;
- }
- }
- }
- new string[MAX_PLAYER_NAME];
- format(string, sizeof(string), "None");
- FamilyInfo[family][FamilyTaken] = 0;
- strmid(FamilyInfo[family][FamilyName], string, 0, strlen(string), 255);
- strmid(FamilyInfo[family][FamilyMOTD], string, 0, strlen(string), 255);
- strmid(FamilyInfo[family][FamilyLeader], string, 0, strlen(string), 255);
- format(string, sizeof(string), "0xFF000069");
- strmid(FamilyInfo[family][FamilyColor], string, 0, strlen(string), 255);
- FamilyInfo[family][FamilyMembers] = 0;
- FamilyInfo[family][FamilySpawn][0] = 0.0;
- FamilyInfo[family][FamilySpawn][1] = 0.0;
- FamilyInfo[family][FamilySpawn][2] = 0.0;
- FamilyInfo[family][FamilySpawn][3] = 0.0;
- FamilyInfo[family][FamilyInterior] = 0;
- SaveFamilies();
- return 1;
- }
- public ClearCrime(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- new string[MAX_PLAYER_NAME];
- format(string, sizeof(string), "********");
- strmid(PlayerCrime[playerid][pBplayer], string, 0, strlen(string), 255);
- strmid(PlayerCrime[playerid][pVictim], string, 0, strlen(string), 255);
- strmid(PlayerCrime[playerid][pAccusing], string, 0, strlen(string), 255);
- strmid(PlayerCrime[playerid][pAccusedof], string, 0, strlen(string), 255);
- }
- return 1;
- }
- public FishCost(playerid, fish)
- {
- if(IsPlayerConnected(playerid))
- {
- new cost = 0;
- switch (fish)
- {
- case 1:
- {
- cost = 1;
- }
- case 2:
- {
- cost = 3;
- }
- case 3:
- {
- cost = 3;
- }
- case 5:
- {
- cost = 5;
- }
- case 6:
- {
- cost = 2;
- }
- case 8:
- {
- cost = 8;
- }
- case 9:
- {
- cost = 12;
- }
- case 11:
- {
- cost = 9;
- }
- case 12:
- {
- cost = 7;
- }
- case 14:
- {
- cost = 12;
- }
- case 15:
- {
- cost = 9;
- }
- case 16:
- {
- cost = 7;
- }
- case 17:
- {
- cost = 7;
- }
- case 18:
- {
- cost = 10;
- }
- case 19:
- {
- cost = 4;
- }
- case 21:
- {
- cost = 3;
- }
- }
- return cost;
- }
- return 0;
- }
- public ClearFishes(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- Fishes[playerid][pFid1] = 0; Fishes[playerid][pFid2] = 0; Fishes[playerid][pFid3] = 0;
- Fishes[playerid][pFid4] = 0; Fishes[playerid][pFid5] = 0;
- Fishes[playerid][pWeight1] = 0; Fishes[playerid][pWeight2] = 0; Fishes[playerid][pWeight3] = 0;
- Fishes[playerid][pWeight4] = 0; Fishes[playerid][pWeight5] = 0;
- new string[MAX_PLAYER_NAME];
- format(string, sizeof(string), "None");
- strmid(Fishes[playerid][pFish1], string, 0, strlen(string), 255);
- strmid(Fishes[playerid][pFish2], string, 0, strlen(string), 255);
- strmid(Fishes[playerid][pFish3], string, 0, strlen(string), 255);
- strmid(Fishes[playerid][pFish4], string, 0, strlen(string), 255);
- strmid(Fishes[playerid][pFish5], string, 0, strlen(string), 255);
- }
- return 1;
- }
- public ClearFishID(playerid, fish)
- {
- if(IsPlayerConnected(playerid))
- {
- new string[MAX_PLAYER_NAME];
- format(string, sizeof(string), "None");
- switch (fish)
- {
- case 1:
- {
- strmid(Fishes[playerid][pFish1], string, 0, strlen(string), 255);
- Fishes[playerid][pWeight1] = 0;
- Fishes[playerid][pFid1] = 0;
- }
- case 2:
- {
- strmid(Fishes[playerid][pFish2], string, 0, strlen(string), 255);
- Fishes[playerid][pWeight2] = 0;
- Fishes[playerid][pFid2] = 0;
- }
- case 3:
- {
- strmid(Fishes[playerid][pFish3], string, 0, strlen(string), 255);
- Fishes[playerid][pWeight3] = 0;
- Fishes[playerid][pFid3] = 0;
- }
- case 4:
- {
- strmid(Fishes[playerid][pFish4], string, 0, strlen(string), 255);
- Fishes[playerid][pWeight4] = 0;
- Fishes[playerid][pFid4] = 0;
- }
- case 5:
- {
- strmid(Fishes[playerid][pFish5], string, 0, strlen(string), 255);
- Fishes[playerid][pWeight5] = 0;
- Fishes[playerid][pFid5] = 0;
- }
- }
- }
- return 1;
- }
- public ClearCooking(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- Cooking[playerid][pCookID1] = 0; Cooking[playerid][pCookID2] = 0; Cooking[playerid][pCookID3] = 0;
- Cooking[playerid][pCookID4] = 0; Cooking[playerid][pCookID5] = 0;
- Cooking[playerid][pCWeight1] = 0; Cooking[playerid][pCWeight2] = 0; Cooking[playerid][pCWeight3] = 0;
- Cooking[playerid][pCWeight4] = 0; Cooking[playerid][pCWeight5] = 0;
- new string[MAX_PLAYER_NAME];
- format(string, sizeof(string), "Nothing");
- strmid(Cooking[playerid][pCook1], string, 0, strlen(string), 255);
- strmid(Cooking[playerid][pCook2], string, 0, strlen(string), 255);
- strmid(Cooking[playerid][pCook3], string, 0, strlen(string), 255);
- strmid(Cooking[playerid][pCook4], string, 0, strlen(string), 255);
- strmid(Cooking[playerid][pCook5], string, 0, strlen(string), 255);
- }
- return 1;
- }
- public ClearCookingID(playerid, cook)
- {
- if(IsPlayerConnected(playerid))
- {
- new string[MAX_PLAYER_NAME];
- format(string, sizeof(string), "Nothing");
- switch (cook)
- {
- case 1:
- {
- strmid(Cooking[playerid][pCook1], string, 0, strlen(string), 255);
- Cooking[playerid][pCWeight1] = 0;
- Cooking[playerid][pCookID1] = 0;
- }
- case 2:
- {
- strmid(Cooking[playerid][pCook2], string, 0, strlen(string), 255);
- Cooking[playerid][pCWeight2] = 0;
- Cooking[playerid][pCookID2] = 0;
- }
- case 3:
- {
- strmid(Cooking[playerid][pCook3], string, 0, strlen(string), 255);
- Cooking[playerid][pCWeight3] = 0;
- Cooking[playerid][pCookID3] = 0;
- }
- case 4:
- {
- strmid(Cooking[playerid][pCook4], string, 0, strlen(string), 255);
- Cooking[playerid][pCWeight4] = 0;
- Cooking[playerid][pCookID4] = 0;
- }
- case 5:
- {
- strmid(Cooking[playerid][pCook5], string, 0, strlen(string), 255);
- Cooking[playerid][pCWeight5] = 0;
- Cooking[playerid][pCookID5] = 0;
- }
- }
- }
- return 1;
- }
- public ClearGroceries(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- Groceries[playerid][pChickens] = 0; Groceries[playerid][pChicken] = 0;
- Groceries[playerid][pHamburgers] = 0; Groceries[playerid][pHamburger] = 0;
- Groceries[playerid][pPizzas] = 0; Groceries[playerid][pPizza] = 0;
- }
- return 1;
- }
- public Lotto(number)
- {
- new JackpotFallen = 0;
- new string[256];
- new winner[MAX_PLAYER_NAME];
- format(string, sizeof(string), "Lottery News: Today the Winning Number has fallen on: %d.", number);
- OOCOff(COLOR_WHITE, string);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pLottoNr] > 0)
- {
- if(PlayerInfo[i][pLottoNr] == number)
- {
- JackpotFallen = 1;
- GetPlayerName(i, winner, sizeof(winner));
- format(string, sizeof(string), "Lottery News: %s has won the Jackpot of $%d with his Lottery Ticket.", winner, Jackpot);
- OOCOff(COLOR_WHITE, string);
- format(string, sizeof(string), "* You have Won $%d with your Lottery Ticket.", Jackpot);
- SendClientMessage(i, COLOR_YELLOW, string);
- ConsumingMoney[i] = 1;
- GivePlayerMoney(i, Jackpot);
- }
- else
- {
- SendClientMessage(i, COLOR_LIGHTBLUE, "* You haven't won with your Lottery Ticket this time.");
- }
- }
- PlayerInfo[i][pLottoNr] = 0;
- }
- }
- if(JackpotFallen)
- {
- new rand = random(125000); rand += 15789;
- Jackpot = rand;
- SaveStuff();
- format(string, sizeof(string), "Lottery News: The new Jackpot has been started with $%d.", Jackpot);
- OOCOff(COLOR_WHITE, string);
- }
- else
- {
- new rand = random(15000); rand += 2158;
- Jackpot += rand;
- SaveStuff();
- format(string, sizeof(string), "Lottery News: The Jackpot has been raised to $%d.", Jackpot);
- OOCOff(COLOR_WHITE, string);
- }
- return 1;
- }
- //------------------------------------------------------------------------------------------------------
- public OnPlayerDisconnect(playerid)
- {
- gActivePlayers[playerid]--;
- numplayers--;
- PlayerInfo[playerid][pAdjustable] = 1;
- OnPlayerUpdate(playerid);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(TaxiAccepted[i] < 999)
- {
- if(TaxiAccepted[i] == playerid)
- {
- TaxiAccepted[i] = 999;
- GameTextForPlayer(i, "~w~Taxi Caller~n~~r~Left the game", 5000, 1);
- TaxiCallTime[i] = 0;
- DisablePlayerCheckpoint(i);
- }
- }
- else if(BusAccepted[i] < 999)
- {
- 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(GettingCK[playerid] < 999)
- {
- if(IsPlayerConnected(GettingCK[playerid]))
- {
- SendClientMessage(GettingCK[playerid], COLOR_YELLOW, "Your Character Kill has left the server, try again later.");
- OnCK[GettingCK[playerid]] = 999;
- }
- }
- if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999)
- {
- if(IsPlayerConnected(TransportDriver[playerid]))
- {
- new string[64];
- 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);
- }
- }
- if(GotHit[playerid] > 0)
- {
- if(GetChased[playerid] < 999)
- {
- if(IsPlayerConnected(GetChased[playerid]))
- {
- SendClientMessage(GetChased[playerid], COLOR_YELLOW, "Your Hit has left the server.");
- GoChase[GetChased[playerid]] = 999;
- }
- }
- }
- if(PlayerPaintballing[playerid] != 0)
- {
- PaintballPlayers --;
- }
- if(PlayerKarting[playerid] > 0 && PlayerInKart[playerid] > 0)
- {
- KartingPlayers --;
- }
- if(PlayersChannel[playerid] < 999)
- {
- IRCInfo[PlayersChannel[playerid]][iPlayers] -= 1;
- }
- if(HireCar[playerid] != 299)
- {
- gLastDriver[HireCar[playerid]] = 300;
- gCarLock[HireCar[playerid]] = 0;
- UnLockCar(HireCar[playerid]);
- }
- if (gLastCar[playerid] > 0)
- {
- gLastDriver[gLastCar[playerid]] = 300;
- if(PlayerInfo[playerid][pPhousekey] != gLastCar[playerid]-1)
- {
- gCarLock[gLastCar[playerid]] = 0;
- UnLockCar(gLastCar[playerid]);
- }
- }
- if(PlayerBoxing[playerid] > 0)
- {
- if(Boxer1 == playerid)
- {
- if(IsPlayerConnected(Boxer2))
- {
- 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))
- {
- 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 = 255;
- Boxer2 = 255;
- TBoxer = 255;
- }
- if(TransportDuty[playerid] == 1)
- {
- TaxiDrivers -= 1;
- }
- else if(TransportDuty[playerid] == 2)
- {
- BusDrivers -= 1;
- }
- if(PlayerInfo[playerid][pJob] == 11)
- {
- if(JobDuty[playerid] == 1) { Medics -= 1; }
- }
- else if(PlayerInfo[playerid][pJob] == 7)
- {
- if(JobDuty[playerid] == 1) { Mechanics -= 1; }
- }
- }
- public SetPlayerSpawn(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pTut] == 0)
- {
- gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
- TogglePlayerControllable(playerid, 0);
- RegistrationStep[playerid] = 1;
- SendClientMessage(playerid, COLOR_YELLOW, "Welcome to Role Play - The Godfather server, please fill in some information to proceed.");
- SendClientMessage(playerid, COLOR_LIGHTRED, "Are you a Male or Female? (Type in what you are).");
- }
- new rand;
- new house = PlayerInfo[playerid][pPhousekey];
- if(PlayerPaintballing[playerid] != 0)
- {
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 29, 999);
- rand = random(sizeof(PaintballSpawns));
- SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
- return 1;
- }
- if(PlayerInfo[playerid][pJailed] == 1)
- {
- SetPlayerInterior(playerid, 6);
- SetPlayerPos(playerid,264.6288,77.5742,1001.0391);
- SendClientMessage(playerid, COLOR_LIGHTRED, "Incomplete Jail Sentence, back to jail.");
- return 1;
- }
- if(PlayerInfo[playerid][pJailed] == 2)
- {
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid,268.5777,1857.9351,9.8133);
- SetPlayerWorldBounds(playerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811
- return 1;
- }
- if(MedicBill[playerid] == 1 && PlayerInfo[playerid][pJailed] == 0 && PlayerPaintballing[playerid] == 0)
- {
- new string[256];
- new cut = deathcost; //PlayerInfo[playerid][pLevel]*deathcost;
- GivePlayerMoney(playerid, -cut);
- format(string, sizeof(string), "DOC: Your Medical Bill comes to $%d, Have a nice day.", cut);
- SendClientMessage(playerid, TEAM_CYAN_COLOR, string);
- MedicBill[playerid] = 0;
- MedicTime[playerid] = 0;
- NeedMedicTime[playerid] = 0;
- PlayerInfo[playerid][pDeaths] += 1;
- SetPlayerHealth(playerid, 25.0);
- /*SetPlayerInterior(playerid, 5);
- rand = random(sizeof(gMedicSpawns));
- SetPlayerPos(playerid, gMedicSpawns[rand][0], gMedicSpawns[rand][1], gMedicSpawns[rand][2]); // Warp the player
- SetPlayerFacingAngle(playerid, 270.0);
- TogglePlayerControllable(playerid, 0);
- GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~y~You are recovering from your ~r~wounds~y~...", 35000, 3);
- MedicTime[playerid] = 1;
- if(PlayerInfo[playerid][pDonateRank] > 0)
- {
- NeedMedicTime[playerid] = 30;
- }
- else
- {
- NeedMedicTime[playerid] = 60;
- }
- PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0);
- return 1;*/
- }
- if(house !=255)
- {
- if(SpawnChange[playerid]) //If 1, then you get to your house, else spawn somewhere else
- {
- SetPlayerToTeamColor(playerid);
- SetPlayerInterior(playerid,HouseInfo[house][hInt]);
- SetPlayerPos(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity],HouseInfo[house][hExitz]); // Warp the player
- PlayerInfo[playerid][pLocal] = house;
- PlayerInfo[playerid][pInt] = HouseInfo[house][hInt];
- return 1;
- }
- }
- if(PlayerInfo[playerid][pLeader] == 7)//Mayor spawn
- {
- SetPlayerToTeamColor(playerid);
- SetPlayerInterior(playerid, 3);
- SetPlayerPos(playerid, 356.2998,151.9914,1025.7891);
- PlayerInfo[playerid][pInt] = 3;
- PlayerInfo[playerid][pLocal] = 241;
- return 1;
- }
- if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 1)//Police Force spawn & FBI/ATF
- {
- SetPlayerToTeamColor(playerid);
- rand = random(sizeof(gCopPlayerSpawns));
- SetPlayerPos(playerid, gCopPlayerSpawns[rand][0], gCopPlayerSpawns[rand][1], gCopPlayerSpawns[rand][2]); // Warp the player
- SetPlayerFacingAngle(playerid, 270.0);
- SetPlayerInterior(playerid,0);
- PlayerInfo[playerid][pInt] = 0;
- return 1;
- }
- if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)//National Guard spawn
- {
- SetPlayerToTeamColor(playerid);
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, -1346.2050,492.3983,11.2027);
- PlayerInfo[playerid][pInt] = 0;
- return 1;
- }
- if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)//Fire/Ambulance spawn
- {
- SetPlayerToTeamColor(playerid);
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, -2656.0393,635.0596,14.4531);
- PlayerInfo[playerid][pInt] = 0;
- return 1;
- }
- if (PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)//LaCosaNostra spawn
- {
- SetPlayerToTeamColor(playerid);
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 1124.2415,-2037.1274,69.8847);
- PlayerInfo[playerid][pInt] = 0;
- return 1;
- }
- if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)//Yakuza spawn
- {
- SetPlayerToTeamColor(playerid);
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, -2192.3020,646.8816,49.4375);
- PlayerInfo[playerid][pInt] = 0;
- return 1;
- }
- if (PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8) //Hitman spawn
- {
- SetPlayerToTeamColor(playerid);
- SetPlayerPos(playerid, 1102.7017,-299.0774,73.9922);
- SetPlayerInterior(playerid,0);
- PlayerInfo[playerid][pInt] = 0;
- return 1;
- }
- if (PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9) //News spawn
- {
- SetPlayerToTeamColor(playerid);
- SetPlayerPos(playerid, -2050.8962,460.0262,35.1719);
- SetPlayerInterior(playerid,0);
- PlayerInfo[playerid][pInt] = 0;
- return 1;
- }
- if (PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10) //Taxi Cab Company spawn
- {
- SetPlayerToTeamColor(playerid);
- SetPlayerPos(playerid, -1978.5934,102.9237,27.6875);
- SetPlayerInterior(playerid,0);
- PlayerInfo[playerid][pInt] = 0;
- return 1;
- }
- if(IsAnInstructor(playerid)) //Driving/Flying School spawn
- {
- if(SchoolSpawn[playerid] == 0)
- {
- SetPlayerToTeamColor(playerid);
- SetPlayerPos(playerid, -2032.6810,-117.4816,1035.1719);
- SetPlayerFacingAngle(playerid, 275.1114);
- SetPlayerInterior(playerid,3);
- PlayerInfo[playerid][pInt] = 3;
- }
- else if(SchoolSpawn[playerid] == 1)
- {
- SetPlayerToTeamColor(playerid);
- SetPlayerPos(playerid, 414.4144,2531.9580,19.1565);
- SetPlayerFacingAngle(playerid, 4.6505);
- SetPlayerInterior(playerid,0);
- PlayerInfo[playerid][pInt] = 0;
- }
- return 1;
- }
- if ((gTeam[playerid]) == 1)
- {
- SetPlayerToTeamColor(playerid);
- rand = random(sizeof(gMedPlayerSpawns));
- SetPlayerPos(playerid, gMedPlayerSpawns[rand][0], gMedPlayerSpawns[rand][1], gMedPlayerSpawns[rand][2]); // Warp the player
- SetPlayerFacingAngle(playerid, 270.0);
- SetPlayerInterior(playerid,0);
- PlayerInfo[playerid][pInt] = 0;
- return 1;
- }
- if(PlayerInfo[playerid][pFMember] != 255)
- {
- new family = PlayerInfo[playerid][pFMember];
- SetPlayerToTeamColor(playerid);
- SetPlayerInterior(playerid, FamilyInfo[family][FamilyInterior]);
- SetPlayerPos(playerid, FamilyInfo[family][FamilySpawn][0],FamilyInfo[family][FamilySpawn][1],FamilyInfo[family][FamilySpawn][2]);
- SetPlayerFacingAngle(playerid, FamilyInfo[family][FamilySpawn][3]);
- return 1;
- }
- else
- {
- SetPlayerToTeamColor(playerid);
- if(PlayerInfo[playerid][pOrigin] == 1)//USA
- {
- SetPlayerPos(playerid,-2721.2612,-317.8447,7.8438);
- SetPlayerFacingAngle(playerid, 46.8583);
- SetPlayerInterior(playerid,0);
- PlayerInfo[playerid][pInt] = 0;
- }
- else if(PlayerInfo[playerid][pOrigin] == 2)//Europe
- {
- SetPlayerPos(playerid,477.8121,-1499.7649,20.5001);
- SetPlayerFacingAngle(playerid, 262.9963);
- SetPlayerInterior(playerid,0);
- PlayerInfo[playerid][pInt] = 0;
- }
- else if(PlayerInfo[playerid][pOrigin] == 3)//Asia
- {
- SetPlayerPos(playerid,-2155.4368,635.8173,52.3672);
- SetPlayerFacingAngle(playerid, 272.3543);
- SetPlayerInterior(playerid,0);
- PlayerInfo[playerid][pInt] = 0;
- }
- else
- {
- rand = random(sizeof(gRandomPlayerSpawns));
- SetPlayerPos(playerid, gRandomPlayerSpawns[rand][0], gRandomPlayerSpawns[rand][1], gRandomPlayerSpawns[rand][2]); // Warp the player
- SetPlayerFacingAngle(playerid, 270.0);
- SetPlayerInterior(playerid,15);
- PlayerInfo[playerid][pInt] = 15;
- }
- return 1;
- }
- }
- return 1;
- }
- //------------------------------------------------------------------------------------------------------
- public OnPlayerDeath(playerid, killerid, reason)
- {
- new name[MAX_PLAYER_NAME];
- new string[256];
- //new dmessage[128];
- //new deathreason[20];
- new playercash;
- new victimteam;
- new Float:px,Float:py,Float:pz;
- new killerteam;
- victimteam = gTeam[playerid];
- killerteam = gTeam[killerid];
- gPlayerSpawned[playerid] = 0;
- GetPlayerName(playerid, name, sizeof(name));
- PlayerInfo[playerid][pLocal] = 255;
- GetPlayerPos(playerid, px, py, pz);
- if(killerid != 255)
- {
- if(GetPlayerState(killerid) == 2)
- {
- SendClientMessage(killerid, COLOR_YELLOW, "DriveBy Kill, dont abuse it, On foot gets you $$$!");
- return 1;
- }
- }
- if(reason == 38)
- {
- new kstring[128];
- new kickname[MAX_PLAYER_NAME];
- if(IsPlayerConnected(killerid))
- {
- GetPlayerName(killerid, kickname, sizeof(kickname));
- format(string, 256, "AdmWarning: [%d]%s just killed a player with minigun, be sure he's not fake-killing.",killerid,kickname);
- ABroadCast(COLOR_YELLOW,string,1);
- printf("%s", kstring);
- }
- }
- if (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11)
- {
- DisablePlayerCheckpoint(playerid);
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
- }
- new caller = Mobile[playerid];
- if(caller != 255)
- {
- if(caller < 255)
- {
- SendClientMessage(caller, COLOR_GRAD2, " The line just went dead....");
- CellTime[caller] = 0;
- CellTime[playerid] = 0;
- Mobile[caller] = 255;
- }
- Mobile[playerid] = 255;
- CellTime[playerid] = 0;
- }
- ClearCrime(playerid);
- if(PlayerPaintballing[playerid] != 0)
- {
- PlayerPaintballKills[killerid] ++;
- if(PlayerPaintballKills[killerid] > PaintballWinnerKills)
- {
- new killer[MAX_PLAYER_NAME];
- PaintballWinner = killerid;
- PaintballWinnerKills = PlayerPaintballKills[killerid];
- GetPlayerName(killerid, killer, sizeof(killer));
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerPaintballing[i] != 0)
- {
- format(string, sizeof(string), "* %s is in the lead with %d Kills.",killer,PaintballWinnerKills);
- SendClientMessage(i, COLOR_WHITE, string);
- }
- }
- }
- }
- return 1;
- }
- if(GettingCK[playerid] < 999 || OnCK[playerid] < 999)
- {
- if(IsPlayerConnected(killerid))
- {
- if(GettingCK[killerid] < 999 || OnCK[playerid] < 999)
- {
- new killer[MAX_PLAYER_NAME];
- new dier[MAX_PLAYER_NAME];
- GetPlayerName(playerid, dier, sizeof(dier));
- GetPlayerName(killerid, killer, sizeof(killer));
- format(string, sizeof(string), "* %s has performed a Character Kill on you, you aren't able to play with this Character anymore.",killer);
- SendClientMessage(playerid, COLOR_LIGHTRED, string);
- format(string, sizeof(string), "** %s has Character Killed %s **",killer,dier);
- CKLog(string);
- PlayerInfo[playerid][pCK] = 1;
- if(GettingCK[playerid] < 999) { GettingCK[playerid] = 999; }
- else if(OnCK[playerid] < 999) { OnCK[playerid] = 999; }
- if(GettingCK[killerid] < 999) { GettingCK[killerid] = 999; }
- else if(OnCK[killerid] < 999) { OnCK[killerid] = 999; }
- KickPlayer[playerid] = 1;
- }
- }
- }
- if(PlayerInfo[playerid][pHeadValue] > 0)
- {
- if(IsPlayerConnected(killerid))
- {
- if(gTeam[killerid] == 10 || PlayerInfo[killerid][pLeader] == 8)
- {
- if(GoChase[killerid] == playerid)
- {
- ConsumingMoney[killerid] = 1;
- new killer[MAX_PLAYER_NAME];
- GetPlayerName(killerid, killer, sizeof(killer));
- GivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]);
- format(string,128,"<< Hitman %s has fulfilled the contract on %s and collected $%d >>",killer,name,PlayerInfo[playerid][pHeadValue]);
- SendFamilyMessage(8, COLOR_YELLOW, string);
- PlayerInfo[playerid][pHeadValue] = 0;
- GotHit[playerid] = 0;
- GetChased[playerid] = 999;
- GoChase[killerid] = 999;
- }
- }
- }
- }
- if(victimteam >= 4)
- {
- if(IsPlayerConnected(killerid))
- {
- //new killer[MAX_PLAYER_NAME];
- //GetPlayerName(killerid, killer, sizeof(killer));
- new slice = 100; //$100
- playercash = GetPlayerMoney(playerid);
- if(gTeam[killerid] != 2) { WantedPoints[killerid] += 2; } //+ 2 wanted points
- if(SafeTime[playerid] <= 0)
- {
- if(gTeam[killerid] != gTeam[playerid])
- {
- if(GetPlayerState(killerid) == 1)
- {
- PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills] + 2;
- }
- else
- {
- PlayerInfo[killerid][pKills]++;
- }
- PlayerInfo[playerid][pKills]--;
- }
- }
- /*if (strlen(deathreason) > 0)// patch
- {
- if (((gTeam[killerid]) == 1) || ((gTeam[killerid]) == 3 && civnokill) || gTeam[killerid] == gTeam[playerid])//med kill criminal
- {
- format(string, sizeof(string), ".: %s murdered %s. (%s) :.", killer, name, deathreason);
- }
- else
- {
- format(string, sizeof(string), ".: %s murdered %s. (%s) for $%d :.", killer, name, deathreason, slice);
- }
- }
- else
- {
- if (((gTeam[killerid]) == 1) || ((gTeam[killerid]) == 3 && civnokill || gTeam[killerid] == gTeam[playerid]))
- {
- format(string, sizeof(string), ".: %s murdered %s :.", killer, name);
- }
- else
- {
- format(string, sizeof(string), ".: %s murdered %s for $%d :.", killer, name, slice);
- }
- }*/
- if (((gTeam[killerid]) == 1) || ((gTeam[killerid]) == 3 && civnokill) || (gTeam[killerid] == gTeam[playerid] && gTeam[playerid] != 4))
- {
- slice = 0;
- }
- if (((gTeam[killerid]) != 4) && ((gTeam[killerid]) == gTeam[playerid]))//no team kill
- {
- slice = 0;
- }
- if (playercash > 0)
- {
- GivePlayerMoney(playerid, -slice);
- }
- else
- {
- slice = slice+500;
- }
- GivePlayerMoney(killerid, slice);
- //GameTextForPlayer(playerid, dmessage, 5000, 2);
- PlayerPlaySound(killerid, 1083, 0.0, 0.0, 0.0);
- if (((gTeam[killerid]) == 3) && reason != 49)
- {
- SetPlayerCriminal(killerid,255, "First Degree Murder");
- }
- else if (((gTeam[killerid]) == 3) && reason == 49)
- {
- SetPlayerCriminal(killerid,255, "Hit And Run");
- }
- }
- }
- else if (victimteam == 2)
- {
- if(IsPlayerConnected(killerid))
- {
- //new killer[MAX_PLAYER_NAME];
- //GetPlayerName(killerid, killer, sizeof(killer));
- // Cop kill
- PlayerInfo[playerid][pKills]--;
- if (gTeam[killerid] == 2)//cops kill cop
- {
- //format(string,128,".: Officer %s murdered Officer %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
- PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
- GivePlayerMoney(killerid, -suecost);
- GivePlayerMoney(playerid, suecost+100);//+100pays hospital bill
- }
- else
- {
- //format(string,128,".: %s murdered Officer %s (%s) :.",killer,name,deathreason);
- }
- if (gTeam[killerid] >= 3)
- {
- WantedPoints[killerid] += 2; //+ 2 wanted points
- if(reason != 49)
- {
- SetPlayerCriminal(killerid,255, "First Degree Murder");
- }
- else if (reason == 49)
- {
- SetPlayerCriminal(killerid,255, "Hit And Run");
- }
- }
- if(gTeam[killerid] >= 5 && SafeTime[playerid] <= 0)
- {
- if(GetPlayerState(killerid) == 1)
- {
- PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills]+2;
- }
- else
- {
- PlayerInfo[killerid][pKills]++;
- }
- WantedPoints[killerid]+=2;
- }
- //BroadCast(COLOR_RED, string);
- }
- }
- else if (victimteam == 3)
- {
- if(IsPlayerConnected(killerid))
- {
- //new killer[MAX_PLAYER_NAME];
- //GetPlayerName(killerid, killer, sizeof(killer));
- // Civ kill
- if ((gTeam[killerid]) == 2)//cops kill civ
- {
- if(WantedLevel[playerid] < 1)
- {
- //format(string,128,".: Officer %s murdered %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
- PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
- GivePlayerMoney(killerid, -suecost);
- GivePlayerMoney(playerid, suecost+100);//+100pays hospital bill
- }
- }
- else
- {
- //format(string,128,".: %s murdered %s (%s) :.",killer,name,deathreason);
- WantedPoints[killerid] += 2;
- }
- if (((gTeam[killerid]) >= 3 || (gTeam[killerid]) == 1) && reason != 49)
- {
- SetPlayerCriminal(killerid,255, "First Degree Murder");
- }
- else if (((gTeam[killerid]) >= 3 || (gTeam[killerid]) == 1) && reason == 49)
- {
- SetPlayerCriminal(killerid,255, "Hit And Run");
- }
- //BroadCast(COLOR_RED, string);
- }
- }
- else if (victimteam == 1)
- {
- if(IsPlayerConnected(killerid))
- {
- //new killer[MAX_PLAYER_NAME];
- //GetPlayerName(killerid, killer, sizeof(killer));
- // Civ kill
- if ((gTeam[killerid]) == 2)//cops kill civ
- {
- //format(string,128,".: Officer %s murdered Paramedic %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
- PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
- GivePlayerMoney(killerid, -suecost);
- GivePlayerMoney(playerid, suecost+100);//+100pays hospital bill
- }
- else if ((gTeam[killerid]) == 1)//med kill civ
- {
- //format(string,128,".: Paramedic %s murdered %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
- PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
- GivePlayerMoney(killerid, -suecost);
- GivePlayerMoney(playerid, suecost+100);//+100pays hospital bill
- }
- else
- {
- //format(string,128,".: %s murdered %s (%s) :.",killer,name,deathreason);
- }
- if (((gTeam[killerid]) == 4) && reason != 49)
- {
- SetPlayerCriminal(killerid,255, "First Degree Murder");
- }
- else if (((gTeam[killerid]) == 3) && reason == 49)
- {
- SetPlayerCriminal(killerid,255, "Hit And Run");
- }
- //BroadCast(COLOR_RED, string);
- }
- }
- if (victimteam >= 3 && WantedPoints[playerid] > 0 && killerteam == 2)
- {
- SetPlayerFree(playerid,killerid, "Got Killed");
- }
- killerid = INVALID_PLAYER_ID;
- SetPlayerColor(playerid,COLOR_GRAD2);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- InitLockDoors(playerid);
- STDPlayer[playerid] = 0;
- gTeam[playerid] = PlayerInfo[playerid][pTeam]; //Set the Team
- if (gTeam[playerid] == 4) //medic / criminal reset team
- {
- gTeam[playerid] = 3;
- }
- if(gPlayerLogged[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "** This server requires a Login BEFORE spawn (Kicked) **");
- KickPlayer[playerid] = 1;
- }
- if(gTeam[playerid] == 11 && PlayerInfo[playerid][pLeader] < 1)
- {
- MedicBill[playerid] = 0;
- new rand = random(sizeof(CIV));
- SendClientMessage(playerid, COLOR_LIGHTRED, "You are not an Approved Leader, you are now a Civilian !");
- PlayerInfo[playerid][pTeam] = 3;
- gTeam[playerid] = 3;
- SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
- PlayerInfo[playerid][pModel] = CIV[rand];
- SpawnPlayer(playerid);
- }
- if(gTeam[playerid] == 5)
- {
- if(PlayerInfo[playerid][pMember] < 1)
- {
- MedicBill[playerid] = 0;
- new rand = random(sizeof(CIV));
- SendClientMessage(playerid, COLOR_LIGHTRED, "You are not a Family Member, you are now a Civilian !");
- PlayerInfo[playerid][pTeam] = 3;
- gTeam[playerid] = 3;
- SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
- PlayerInfo[playerid][pModel] = CIV[rand];
- SpawnPlayer(playerid);
- }
- }
- if(gTeam[playerid] == 10)
- {
- if(PlayerInfo[playerid][pMember] != 8)
- {
- MedicBill[playerid] = 0;
- new rand = random(sizeof(CIV));
- SendClientMessage(playerid, COLOR_LIGHTRED, "You are not a Member of this Agency, you are now a Civilian !");
- PlayerInfo[playerid][pTeam] = 3;
- gTeam[playerid] = 3;
- SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
- PlayerInfo[playerid][pModel] = CIV[rand];
- SpawnPlayer(playerid);
- }
- }
- if(gTeam[playerid] == 2 && PlayerInfo[playerid][pMember] > 3)
- {
- MedicBill[playerid] = 0;
- new rand = random(sizeof(CIV));
- SendClientMessage(playerid, COLOR_LIGHTRED, "You haven't applied for being an Officer / FBI / National Guard, you are now a Civilian !");
- PlayerInfo[playerid][pTeam] = 3;
- gTeam[playerid] = 3;
- SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
- PlayerInfo[playerid][pModel] = CIV[rand];
- SpawnPlayer(playerid);
- }
- if(gTeam[playerid] == 3)
- {
- if(PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pLeader] > 0)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "You are part of a Family/Force, you've been forced to the right Class + Char !");
- MedicBill[playerid] = 0;
- new model = PlayerInfo[playerid][pChar];
- if(PlayerInfo[playerid][pMember] == 1) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; PlayerInfo[playerid][pModel] = model; }
- else if(PlayerInfo[playerid][pMember] == 2) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; PlayerInfo[playerid][pModel] = model; }
- else if(PlayerInfo[playerid][pMember] == 3) { SetSpawnInfo(playerid, 2, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; PlayerInfo[playerid][pModel] = model; }
- else if(PlayerInfo[playerid][pMember] == 4) { SetSpawnInfo(playerid, 1, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 1; gTeam[playerid] = 1; PlayerInfo[playerid][pModel] = model; }
- else if(PlayerInfo[playerid][pMember] == 5) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }
- else if(PlayerInfo[playerid][pMember] == 6) { SetSpawnInfo(playerid, 5, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 5; gTeam[playerid] = 5; PlayerInfo[playerid][pModel] = model; }
- else if(PlayerInfo[playerid][pMember] == 8) { SetSpawnInfo(playerid, 10, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 10; gTeam[playerid] = 10; PlayerInfo[playerid][pModel] = model; }
- else if(PlayerInfo[playerid][pMember] == 9) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }
- else if(PlayerInfo[playerid][pMember] == 10) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }
- else if(PlayerInfo[playerid][pMember] == 11) { SetSpawnInfo(playerid, 12, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; PlayerInfo[playerid][pModel] = model; }
- else if(PlayerInfo[playerid][pLeader] == 1) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
- else if(PlayerInfo[playerid][pLeader] == 2) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
- else if(PlayerInfo[playerid][pLeader] == 3) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
- else if(PlayerInfo[playerid][pLeader] == 4) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
- else if(PlayerInfo[playerid][pLeader] == 5) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
- else if(PlayerInfo[playerid][pLeader] == 6) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
- else if(PlayerInfo[playerid][pLeader] == 7) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
- else if(PlayerInfo[playerid][pLeader] == 8) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
- else if(PlayerInfo[playerid][pLeader] == 9) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
- else if(PlayerInfo[playerid][pLeader] == 10) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
- else if(PlayerInfo[playerid][pLeader] == 11) { SetSpawnInfo(playerid, 11, model,0.0,0.0,0.0,0,0,0,0,0,0,0); PlayerInfo[playerid][pTeam] = 11; gTeam[playerid] = 11; PlayerInfo[playerid][pModel] = model; }
- //SetSpawnInfo(playerid, team, model,0.0,0.0,0.0,0,0,0,0,0,0,0);
- SpawnPlayer(playerid);
- }
- }
- if(PlayerInfo[playerid][pChar] > 0) { SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]); }
- else { SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]); }
- SetPlayerWeapons(playerid);
- SetPlayerSpawn(playerid);
- SetPlayerToTeamColor(playerid);
- PlayerFixRadio(playerid);
- for(new i = 0; i < sizeof(Turfs); i++)
- {
- GangZoneShowForPlayer(playerid, i, TurfInfo[i][zColor]);
- }
- if(MapIconsShown[playerid] != 1)
- {
- MapIconsShown[playerid] = 1;
- for(new i = 0; i < sizeof(BizzInfo); i++)
- {
- SetPlayerMapIcon(playerid,i + 1,BizzInfo[i][bEntranceX],BizzInfo[i][bEntranceY],BizzInfo[i][bEntranceZ],36,COLOR_LIGHTRED);
- }
- for(new i = 0; i < sizeof(SBizzInfo); i++)
- {
- SetPlayerMapIcon(playerid,i + 20,SBizzInfo[i][sbEntranceX],SBizzInfo[i][sbEntranceY],SBizzInfo[i][sbEntranceZ],36,COLOR_LIGHTRED);
- }
- }
- return 1;
- }
- public CKLog(string[])
- {
- new entry[256];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("ck.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public PayLog(string[])
- {
- new entry[256];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("pay.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public KickLog(string[])
- {
- new entry[256];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("kick.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public BanLog(string[])
- {
- new entry[256];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("ban.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- new string[128];
- new name[MAX_PLAYER_NAME];
- if(TaxiCallTime[playerid] > 0 && TaxiAccepted[playerid] < 999)
- {
- TaxiAccepted[playerid] = 999;
- GameTextForPlayer(playerid, "~w~Reached destination", 5000, 1);
- TaxiCallTime[playerid] = 0;
- DisablePlayerCheckpoint(playerid);
- }
- else if(BusCallTime[playerid] > 0 && BusAccepted[playerid] < 999)
- {
- BusAccepted[playerid] = 999;
- GameTextForPlayer(playerid, "~w~Reached destination", 5000, 1);
- BusCallTime[playerid] = 0;
- DisablePlayerCheckpoint(playerid);
- }
- else if(CP[playerid]==1)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- PlayerInfo[playerid][pJackSkill] ++;
- if(PlayerInfo[playerid][pJackSkill] == 50)
- { SendClientMessage(playerid, COLOR_YELLOW, "* Your Car Jack Skill is now Level 2, you will earn more Money and quicker Reload Time."); }
- else if(PlayerInfo[playerid][pJackSkill] == 100)
- { SendClientMessage(playerid, COLOR_YELLOW, "* Your Car Jack Skill is now Level 3, you will earn more Money and quicker Reload Time."); }
- else if(PlayerInfo[playerid][pJackSkill] == 200)
- { SendClientMessage(playerid, COLOR_YELLOW, "* Your Car Jack Skill is now Level 4, you will earn more Money and quicker Reload Time."); }
- else if(PlayerInfo[playerid][pJackSkill] == 400)
- { SendClientMessage(playerid, COLOR_YELLOW, "* Your Car Jack Skill is now Level 5, you will earn more Money and quicker Reload Time."); }
- new level = PlayerInfo[playerid][pJackSkill];
- if(level >= 0 && level <= 50)
- {
- new rand = random(sizeof(SELLCAR1));
- format(string, sizeof(string), "You sold a car for $%d, your reload time is 20 minutes.", SELLCAR1[rand]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- GivePlayerMoney(playerid, SELLCAR1[rand]);
- PlayerInfo[playerid][pCarTime] = 1200;
- }
- else if(level >= 51 && level <= 100)
- {
- new rand = random(sizeof(SELLCAR2));
- format(string, sizeof(string), "You sold a car for $%d, your reload time is 18 minutes.", SELLCAR2[rand]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- GivePlayerMoney(playerid, SELLCAR2[rand]);
- PlayerInfo[playerid][pCarTime] = 1080;
- }
- else if(level >= 101 && level <= 200)
- {
- new rand = random(sizeof(SELLCAR3));
- format(string, sizeof(string), "You sold a car for $%d, your reload time is 16 minutes.", SELLCAR3[rand]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- GivePlayerMoney(playerid, SELLCAR3[rand]);
- PlayerInfo[playerid][pCarTime] = 960;
- }
- else if(level >= 201 && level <= 400)
- {
- new rand = random(sizeof(SELLCAR4));
- format(string, sizeof(string), "You sold a car for $%d, your reload time is 14 minutes.", SELLCAR4[rand]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- GivePlayerMoney(playerid, SELLCAR4[rand]);
- PlayerInfo[playerid][pCarTime] = 840;
- }
- else if(level >= 401)
- {
- new money = 6000;
- format(string, sizeof(string), "You sold a car for $%d, your reload time is 12 minutes.", money);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- GivePlayerMoney(playerid, money);
- PlayerInfo[playerid][pCarTime] = 720;
- }
- GameTextForPlayer(playerid, "~y~Sold the car", 2500, 1);
- CP[playerid] = 0;
- DisablePlayerCheckpoint(playerid);
- SetVehicleToRespawn(GetPlayerVehicleID(playerid));
- }
- else
- {
- GameTextForPlayer(playerid, "Not in a car", 5000, 1);
- }
- }
- else if(CP[playerid] == 5)
- {
- GameTextForPlayer(playerid, "~y~At the Missions Checkpoint", 2500, 1);
- CP[playerid] = 0;
- DisablePlayerCheckpoint(playerid);
- }
- else if(CP[playerid] == 9)//Karting
- {
- GameTextForPlayer(playerid, "~r~Wait here for more Kart Racers", 4000, 3);
- DisablePlayerCheckpoint(playerid);
- }
- else if(CP[playerid] == 10) { CP[playerid] = 11; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2258.7874,-2402.9712,12.7035,8.0); }
- else if(CP[playerid] == 11) { CP[playerid] = 12; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2225.8755,-2461.3875,12.7190,8.0); }
- else if(CP[playerid] == 12) { CP[playerid] = 13; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2276.9983,-2662.8328,12.8580,8.0); }
- else if(CP[playerid] == 13) { CP[playerid] = 14; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2449.1399,-2663.0562,12.8138,8.0); }
- else if(CP[playerid] == 14) { CP[playerid] = 15; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2566.9814,-2504.5686,12.7692,8.0); }
- else if(CP[playerid] == 15) { CP[playerid] = 16; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2719.0520,-2503.5962,12.7706,8.0); }
- else if(CP[playerid] == 16) { CP[playerid] = 17; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2720.7881,-2405.6589,12.7441,8.0); }
- else if(CP[playerid] == 17) { CP[playerid] = 18; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2571.5195,-2401.1531,12.7528,8.0); }
- else if(CP[playerid] == 18) { CP[playerid] = 19; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2406.6995,-2423.1182,12.6641,8.0); }
- else if(CP[playerid] == 19) { CP[playerid] = 20; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2322.9194,-2341.5715,12.6664,8.0); }
- else if(CP[playerid] == 20)//End of Karting
- {
- CP[playerid] = 0;
- DisablePlayerCheckpoint(playerid);
- GetPlayerName(playerid, name, sizeof(name));
- if(FirstKartWinner == 999)
- {
- FirstKartWinner = playerid;
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
- {
- format(string, sizeof(string), "* %s finished First in the Kart Race.",name);
- SendClientMessage(i, COLOR_WHITE, string);
- }
- }
- }
- }
- else if(SecondKartWinner == 999)
- {
- SecondKartWinner = playerid;
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
- {
- format(string, sizeof(string), "* %s finished Second in the Kart Race.",name);
- SendClientMessage(i, COLOR_WHITE, string);
- }
- }
- }
- }
- else if(ThirdKartWinner == 999)
- {
- ThirdKartWinner = playerid;
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
- {
- format(string, sizeof(string), "* %s finished Third in the Kart Race.",name);
- SendClientMessage(i, COLOR_WHITE, string);
- SendClientMessage(i, COLOR_WHITE, "** Karting Race Over **");
- CP[i] = 0;
- DisablePlayerCheckpoint(i);
- }
- }
- }
- }
- }
- else if(MissionCheckpoint[playerid] > 0 && PlayMission[kToggle] == 1)//Missions + Checkpoint on toggle
- {
- RingTone[playerid] = 20;
- switch(MissionCheckpoint[playerid])
- {
- case 1:
- {
- format(string, sizeof(string), "%s", PlayMission[kGText1]);
- GameTextForPlayer(playerid, string, 8000, 3);
- format(string, sizeof(string), "%s", PlayMission[kText4]);
- SendClientMessage(playerid, COLOR_YELLOW2, string);
- format(string, sizeof(string), "%s", PlayMission[kText5]);
- SendClientMessage(playerid, COLOR_YELLOW2, string);
- format(string, sizeof(string), "%s", PlayMission[kText6]);
- SendClientMessage(playerid, COLOR_YELLOW2, string);
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpoint(playerid, PlayMission[kCP2][0], PlayMission[kCP2][1], PlayMission[kCP2][2], 8);
- MissionCheckpoint[playerid] = 2;
- }
- case 2:
- {
- format(string, sizeof(string), "%s", PlayMission[kGText2]);
- GameTextForPlayer(playerid, string, 8000, 3);
- format(string, sizeof(string), "%s", PlayMission[kText7]);
- SendClientMessage(playerid, COLOR_YELLOW2, string);
- format(string, sizeof(string), "%s", PlayMission[kText8]);
- SendClientMessage(playerid, COLOR_YELLOW2, string);
- format(string, sizeof(string), "%s", PlayMission[kText9]);
- SendClientMessage(playerid, COLOR_YELLOW2, string);
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpoint(playerid, PlayMission[kCP3][0], PlayMission[kCP3][1], PlayMission[kCP3][2], 8);
- MissionCheckpoint[playerid] = 3;
- }
- case 3:
- {
- format(string, sizeof(string), "%s", PlayMission[kGText3]);
- GameTextForPlayer(playerid, string, 8000, 3);
- format(string, sizeof(string), "%s", PlayMission[kText10]);
- SendClientMessage(playerid, COLOR_YELLOW2, string);
- format(string, sizeof(string), "%s", PlayMission[kText11]);
- SendClientMessage(playerid, COLOR_YELLOW2, string);
- format(string, sizeof(string), "%s", PlayMission[kText12]);
- SendClientMessage(playerid, COLOR_YELLOW2, string);
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpoint(playerid, PlayMission[kCP4][0], PlayMission[kCP4][1], PlayMission[kCP4][2], 8);
- MissionCheckpoint[playerid] = 4;
- }
- case 4:
- {
- format(string, sizeof(string), "%s", PlayMission[kGText4]);
- GameTextForPlayer(playerid, string, 8000, 3);
- format(string, sizeof(string), "%s", PlayMission[kText13]);
- SendClientMessage(playerid, COLOR_YELLOW2, string);
- format(string, sizeof(string), "%s", PlayMission[kText14]);
- SendClientMessage(playerid, COLOR_YELLOW2, string);
- format(string, sizeof(string), "%s", PlayMission[kText15]);
- SendClientMessage(playerid, COLOR_YELLOW2, string);
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpoint(playerid, PlayMission[kCP5][0], PlayMission[kCP5][1], PlayMission[kCP5][2], 8);
- MissionCheckpoint[playerid] = 5;
- }
- case 5:
- {
- format(string, sizeof(string), "%s", PlayMission[kGText5]);
- GameTextForPlayer(playerid, string, 8000, 3);
- format(string, sizeof(string), "%s", PlayMission[kText16]);
- SendClientMessage(playerid, COLOR_YELLOW2, string);
- format(string, sizeof(string), "%s", PlayMission[kText17]);
- SendClientMessage(playerid, COLOR_YELLOW2, string);
- format(string, sizeof(string), "%s", PlayMission[kText18]);
- SendClientMessage(playerid, COLOR_YELLOW2, string);
- DisablePlayerCheckpoint(playerid);
- SetPlayerCheckpoint(playerid, PlayMission[kCP6][0], PlayMission[kCP6][1], PlayMission[kCP6][2], 8);
- MissionCheckpoint[playerid] = 6;
- }
- case 6:
- {
- format(string, sizeof(string), "%s", PlayMission[kGText6]);
- GameTextForPlayer(playerid, string, 8000, 3);
- format(string, sizeof(string), "..:: Mission Passed : %s | Reward received: $%d ::..", PlayMission[kTitle], PlayMission[kReward]);
- SendClientMessage(playerid, COLOR_GREEN, string);
- DisablePlayerCheckpoint(playerid);
- GivePlayerMoney(playerid, PlayMission[kReward]);
- PlayerInfo[playerid][pMissionNr] = PlayerOnMission[playerid];
- MissionCheckpoint[playerid] = 0;
- PlayerOnMission[playerid] = 0;
- }
- }
- }
- else
- {
- switch (gPlayerCheckpointStatus[playerid])
- {
- case CHECKPOINT_HOME:
- {
- PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
- DisablePlayerCheckpoint(playerid);
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
- GameTextForPlayer(playerid, "~w~You are~n~~y~Home", 5000, 1);
- }
- }
- }
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public SetAllPlayerCheckpoint(Float:allx, Float:ally, Float:allz, Float:radi, num)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- SetPlayerCheckpoint(i,allx,ally,allz, radi);
- if (num != 255)
- {
- gPlayerCheckpointStatus[i] = num;
- }
- }
- }
- }
- public SetAllCopCheckpoint(Float:allx, Float:ally, Float:allz, Float:radi)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(gTeam[i] == 2)
- {
- SetPlayerCheckpoint(i,allx,ally,allz, radi);
- }
- }
- }
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- new string[256];
- if(newstate == PLAYER_STATE_ONFOOT)
- {
- if(PlayerKarting[playerid] > 0 && PlayerInKart[playerid] > 0)
- {
- PlayerInKart[playerid] = 0;
- KartingPlayers --;
- }
- if(TransportDuty[playerid] > 0)
- {
- if(TransportDuty[playerid] == 1)
- {
- TaxiDrivers -= 1;
- }
- else if(TransportDuty[playerid] == 2)
- {
- BusDrivers -= 1;
- }
- TransportDuty[playerid] = 0;
- format(string, sizeof(string), "* You are now Off Duty and earned $%d.", TransportMoney[playerid]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- GivePlayerMoney(playerid, TransportMoney[playerid]);
- ConsumingMoney[playerid] = 1; TransportValue[playerid] = 0; TransportMoney[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~The ride cost~n~~r~$%d",TransportCost[playerid]);
- GameTextForPlayer(playerid, string, 5000, 1);
- format(string, sizeof(string), "~w~Passenger left the taxi~n~~g~Earned $%d",TransportCost[playerid]);
- GameTextForPlayer(TransportDriver[playerid], string, 5000, 1);
- GivePlayerMoney(playerid, -TransportCost[playerid]);
- TransportCost[playerid] = 0;
- TransportTime[playerid] = 0;
- TransportDriver[playerid] = 999;
- }
- }
- TelePos[playerid][0] = 0.0;
- TelePos[playerid][1] = 0.0;
- }
- if(newstate == PLAYER_STATE_PASSENGER) // TAXI & BUSSES
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- new vehicleid = GetPlayerVehicleID(playerid);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == 2 && TransportDuty[i] > 0)
- {
- if(GetPlayerMoney(playerid) < TransportValue[i])
- {
- format(string, sizeof(string), "* You need $%d to enter.", TransportValue[i]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- RemovePlayerFromVehicle(playerid);
- }
- else
- {
- if(TransportDuty[i] == 1)
- {
- format(string, sizeof(string), "* You paid $%d to the Taxi Driver.", TransportValue[i]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "* Passenger %s has entered your Taxi.", name);
- SendClientMessage(i, COLOR_LIGHTBLUE, string);
- TransportTime[i] = 1;
- TransportTime[playerid] = 1;
- TransportCost[playerid] = TransportValue[i];
- TransportCost[i] = TransportValue[i];
- TransportDriver[playerid] = i;
- }
- else if(TransportDuty[i] == 2)
- {
- format(string, sizeof(string), "* You paid $%d to the Bus Driver.", TransportValue[i]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- format(string, sizeof(string), "* Passenger %s has entered your Bus.", name);
- SendClientMessage(i, COLOR_LIGHTBLUE, string);
- }
- GivePlayerMoney(playerid, - TransportValue[i]);
- TransportMoney[i] += TransportValue[i];
- }
- }
- }
- }
- }
- if(newstate == PLAYER_STATE_WASTED)
- {
- if(WantedLevel[playerid] >= 1)
- {
- new price = WantedLevel[playerid] * 4000;
- new count;
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(gTeam[i] == 2 && CrimInRange(30.0, playerid,i))
- {
- count = 1;
- format(string, sizeof(string), "~w~Running Suspect~r~Killed~n~Bonus~g~$%d", price);
- GameTextForPlayer(i, string, 5000, 1);
- ConsumingMoney[i] = 1;
- GivePlayerMoney(i, price / 2);
- PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
- }
- }
- }
- if(count == 1)
- {
- GivePlayerMoney(playerid, - price);
- PlayerInfo[playerid][pWantedDeaths] += 1;
- PlayerInfo[playerid][pJailed] = 1;
- PlayerInfo[playerid][pJailTime] = (WantedLevel[playerid])*(600);
- format(string, sizeof(string), "* You are in Jail for %d Seconds and lose $%d because of running away and getting shot by the Officer.", PlayerInfo[playerid][pJailTime], price);
- SendClientMessage(playerid, COLOR_LIGHTRED, string);
- WantedPoints[playerid] = 0;
- WantedLevel[playerid] = 0;
- }
- }
- }
- if(newstate == PLAYER_STATE_DRIVER) //buggy dont finnish
- {// 38 / 49 / 56 = SS
- new newcar = GetPlayerVehicleID(playerid);
- new oldcar = gLastCar[playerid];
- new housecar = PlayerInfo[playerid][pPhousekey]+1;
- TelePos[playerid][0] = 0.0;
- TelePos[playerid][1] = 0.0;
- if(IsABoat(newcar))
- {
- if(PlayerInfo[playerid][pBoatLic] < 1)
- {
- SendClientMessage(playerid, COLOR_GREY, " You don't know how to Sail yet, so you left the Boat !");
- RemovePlayerFromVehicle(playerid);
- }
- }
- else if(IsAPlane(newcar))
- {
- if(PlayerInfo[playerid][pFlyLic] < 1)
- {
- if(TakingLesson[playerid] == 1) { }
- else {
- SendClientMessage(playerid, COLOR_GREY, " You don't know how to Fly yet, so you left the Plane !");
- RemovePlayerFromVehicle(playerid); }
- }
- }
- else
- {
- if(PlayerInfo[playerid][pCarLic] < 1)
- {
- if(PlayerDrunk[playerid] >= 5)
- {
- WantedPoints[playerid] += 1;
- SetPlayerCriminal(playerid,255, "Drunk Driving");
- }
- if(TakingLesson[playerid] == 1) { }
- else {
- SendClientMessage(playerid, COLOR_GREY, " You don't know how to Drive yet, so you left the Car !");
- RemovePlayerFromVehicle(playerid); }
- }
- else if(PlayerDrunk[playerid] >= 5)
- {
- WantedPoints[playerid] += 1;
- SetPlayerCriminal(playerid,255, "Drunk Driving");
- }
- }//Done with car check
- if(IsACopCar(newcar))
- {
- if(IsACop(playerid)) { }
- else { RemovePlayerFromVehicle(playerid); }
- }
- else if(IsAnAmbulance(newcar))
- {
- if(PlayerInfo[playerid][pMember] == 4||PlayerInfo[playerid][pLeader] == 4) { }
- else { RemovePlayerFromVehicle(playerid); }
- }
- if(IsATruck(newcar))
- {
- format(string, sizeof(string), "Products: %d/%d", PlayerHaul[newcar][pLoad],PlayerHaul[newcar][pCapasity]);
- SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
- SendClientMessage(playerid, COLOR_WHITE, "INFO: You can deliver Products to Businesses.");
- SendClientMessage(playerid, COLOR_WHITE, "INFO: Commands are /load /buyprods /sellprods");
- }
- if(PlayerKarting[playerid] != 0)
- {
- new kart = GetPlayerVehicleID(playerid);
- if(kart==110||kart==111||kart==112||kart==113||kart==114||kart==115)
- {
- PlayerInKart[playerid] = 1;
- KartingPlayers ++;
- }
- }
- if(newcar == 39 || newcar == 40)
- {
- if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)//national guard
- {
- if(PlayerInfo[playerid][pRank] < 3)
- {
- SendClientMessage(playerid,COLOR_GREY," You need Rank 3 to Fly this baby !");
- RemovePlayerFromVehicle(playerid);
- }
- }
- else
- {
- RemovePlayerFromVehicle(playerid);
- }
- }
- if(newcar == 55 || newcar == 59)
- {
- if(PlayerInfo[playerid][pMember] != 4)
- {
- SendClientMessage(playerid,COLOR_GREY," You are not a Fireman !");
- RemovePlayerFromVehicle(playerid);
- }
- }
- if(newcar == 64 || newcar == 65)
- {
- if(PlayerInfo[playerid][pJob] != 14)
- {
- SendClientMessage(playerid,COLOR_GREY," You are not a Bus Driver !");
- RemovePlayerFromVehicle(playerid);
- }
- }
- if(newcar == 69 || newcar == 70 || newcar == 71 || newcar == 99 || newcar == 100 || newcar == 101)
- {
- if(TakingLesson[playerid] == 1) { }
- else if(!IsAnInstructor(playerid))
- {
- SendClientMessage(playerid,COLOR_GREY," You are not a School Instructor !");
- RemovePlayerFromVehicle(playerid);
- }
- }
- if(newcar == 82 || newcar == 84 || newcar == 85 || newcar == 94)
- {
- if(PlayerInfo[playerid][pMember] == 10||PlayerInfo[playerid][pLeader] == 10) { }
- else
- {
- SendClientMessage(playerid,COLOR_GREY," You are not a Taxi Driver !");
- RemovePlayerFromVehicle(playerid);
- }
- }
- if(newcar == 95)
- {
- if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
- {
- if(PlayerInfo[playerid][pRank] < 3)
- {
- SendClientMessage(playerid, COLOR_GREY, " Your Rank is to Low !");
- RemovePlayerFromVehicle(playerid);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " You are not a Hitman !");
- RemovePlayerFromVehicle(playerid);
- }
- }
- if(newcar == 96 || newcar == 97 || newcar == 98)
- {
- if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9){ }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " You are not a News Reporter !");
- RemovePlayerFromVehicle(playerid);
- }
- if(PlayerInfo[playerid][pNewsSkill] < 200 && newcar == 96)
- {
- SendClientMessage(playerid, COLOR_GREY, " Your News Reporter Skill is to low, cant fly the Chopper yet !");
- RemovePlayerFromVehicle(playerid);
- }
- }
- if(newcar==110||newcar==111||newcar==112||newcar==113||newcar==114||newcar==115)
- {
- if(PlayerKarting[playerid] != 1)
- {
- RemovePlayerFromVehicle(playerid);
- }
- }
- if(newcar >= 72 && newcar <= 74)
- {
- if (HireCar[playerid] != newcar)
- {
- format(string, sizeof(string), "~w~You can Rent this car~n~Cost:~g~$%d~n~~w~To rent type ~g~/rentcar~w~~n~to get out type ~r~/exit",SBizzInfo[0][sbEntranceCost]);
- TogglePlayerControllable(playerid, 0);
- GameTextForPlayer(playerid, string, 5000, 3);
- }
- }
- if(newcar >= 75 && newcar <= 77)
- {
- if (HireCar[playerid] != newcar)
- {
- format(string, sizeof(string), "~w~You can Rent this car~n~Cost:~g~$%d~n~~w~To rent type ~g~/rentcar~w~~n~to get out type ~r~/exit",SBizzInfo[1][sbEntranceCost]);
- TogglePlayerControllable(playerid, 0);
- GameTextForPlayer(playerid, string, 5000, 3);
- }
- }
- if(oldcar != 301)
- {
- if((housecar != oldcar && oldcar != 0) && (HireCar[playerid] != oldcar && newcar != housecar))
- {
- if(gLastDriver[oldcar] == playerid && oldcar != newcar)
- {
- gLastDriver[oldcar] = 300;
- gCarLock[oldcar] = 0;
- UnLockCar(oldcar);
- }
- }
- }
- gLastCar[playerid] = newcar;
- gLastDriver[newcar] = playerid;
- }
- if(newstate == PLAYER_STATE_SPAWNED)
- {
- new Float: lwx, Float:lwy, Float:lwz;
- GetPlayerPos(playerid, lwx, lwy, lwz);
- if((lwz > 530.0 && PlayerInfo[playerid][pInt] == 0) || PlayerToPoint(1000.0, playerid, -1041.9,-1868.4,79.1)) //the highest land point in sa = 526.8
- {
- SetPlayerSpawn(playerid);
- }
- if(WantedPoints[playerid] > 0)
- {
- new dstring[128];
- new wanted = WantedPoints[playerid];
- new diecash = 0;
- while(WantedPoints[playerid] > 0)
- {
- diecash += 500;
- WantedPoints[playerid] --;
- }
- format(dstring, sizeof(dstring), "You lost $%d for dieing with %d Wanted Points.", diecash, wanted);
- SendClientMessage(playerid, COLOR_YELLOW, dstring);
- GivePlayerMoney(playerid, - diecash);
- PlayerInfo[playerid][pWantedDeaths] += 1;
- }
- if(PlayerOnMission[playerid] > 0)
- {
- GameTextForPlayer(playerid, "~r~Mission failed", 5000, 3);
- PlayerOnMission[playerid] = 0;
- PlayerInfo[playerid][pMissionNr] = 0;
- }
- WantedPoints[playerid] = 0;
- WantedLevel[playerid] = 0;
- if(PlayerInfo[playerid][pDonateRank] > 0) { SetPlayerHealth(playerid, 100.0); }
- else { SetPlayerHealth(playerid, 50.0+PlayerInfo[playerid][pSHealth]); }
- MedicBill[playerid] = 1;
- TelePos[playerid][0] = 0.0;
- TelePos[playerid][1] = 0.0;
- gPlayerSpawned[playerid] = 1;
- SafeTime[playerid] = 60;
- }
- return 1;
- }
- public HireCost(carid)
- {
- switch (carid)
- {
- case 69:
- {
- return 90000; //bullit
- }
- case 70:
- {
- return 130000; //infurnus
- }
- case 71:
- {
- return 100000; //turismo
- }
- case 72:
- {
- return 80000;
- }
- case 73:
- {
- return 70000;
- }
- case 74:
- {
- return 60000;
- }
- }
- return 0;
- }
- public CarCheck()
- {
- new string[256];
- for(new j = 0; j<MAX_PLAYERS; j++)
- {
- if(IsPlayerConnected(j))
- {
- SetVehicleParamsForPlayer(99, j, 0, 0);
- SetVehicleParamsForPlayer(100, j, 0, 0);
- SetVehicleParamsForPlayer(101, j, 0, 0);
- SetVehicleParamsForPlayer(102, j, 0, 0);
- SetVehicleParamsForPlayer(103, j, 0, 0);
- SetVehicleParamsForPlayer(104, j, 0, 0);
- SetVehicleParamsForPlayer(105, j, 0, 0);
- SetVehicleParamsForPlayer(106, j, 0, 0);
- SetVehicleParamsForPlayer(107, j, 0, 0);
- SetVehicleParamsForPlayer(108, j, 0, 0);
- SetVehicleParamsForPlayer(109, j, 0, 0);
- new Float:health;
- GetPlayerHealth(j, health);
- SetPlayerHealth(j, health - 1.0);
- if(STDPlayer[j]==1)
- {
- GetPlayerHealth(j, health);
- SetPlayerHealth(j, health - 5.0);
- SendClientMessage(j, COLOR_LIGHTBLUE, "* Lost 4 health due to STD.");
- }
- else if(STDPlayer[j]==2)
- {
- GetPlayerHealth(j, health);
- SetPlayerHealth(j, health - 12.0);
- SendClientMessage(j, COLOR_LIGHTBLUE, "* Lost 8 health due to STD.");
- }
- else if(STDPlayer[j]==3)
- {
- GetPlayerHealth(j, health);
- SetPlayerHealth(j, health - 20.0);
- SendClientMessage(j, COLOR_LIGHTBLUE, "* Lost 12 health due to STD.");
- }
- if(GetPlayerMoney(j) < 0)
- {
- if(MoneyMessage[j]==0)
- {
- format(string, sizeof(string), "You are in debt, you have till next Time Check to get: $%d or you go to jail.", GetPlayerMoney(j));
- SendClientMessage(j, COLOR_LIGHTRED, string);
- MoneyMessage[j] = 1;
- }
- }
- else
- {
- MoneyMessage[j] = 0;
- }
- }
- }
- for(new c = 1; c < 254; c++)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if (PlayerInfo[i][pJob] == 5)
- {
- SetVehicleParamsForPlayer(c, i, 0, 0);
- }
- }
- }
- if (gLastDriver[c] == 301)
- {
- CarRespawn(c);
- }
- if (gLastDriver[c] >= 300)
- {
- gLastDriver[c]++;
- }
- //foundowner = -1;
- }
- return 1;
- }
- public CarInit()
- {
- for(new c = 1; c < 254; c++)
- {
- gLastDriver[c] = 299;
- }
- gLastDriver[301]=255;
- return 1;
- }
- public CarTow(carid)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(IsPlayerInVehicle(i, carid) || HireCar[i] == carid)
- {
- gLastDriver[carid] = 255;
- return 0;
- }
- }
- }
- SetVehiclePos(carid,HouseCarSpawns[carid-1][0], HouseCarSpawns[carid-1][1], HouseCarSpawns[carid-1][2]);
- SetVehicleZAngle(carid, HouseCarSpawns[carid-1][3]);
- return 1;
- }
- public CarRespawn(carid)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(IsPlayerInVehicle(i, carid) || HireCar[i] == carid)
- {
- gLastDriver[carid] = 255;
- return 0;
- }
- }
- }
- SetVehicleToRespawn(carid);
- gLastDriver[carid] = 299;
- return 1;
- }
- public LockCar(carid)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- SetVehicleParamsForPlayer(carid,i,0,1);
- }
- }
- }
- public UnLockCar(carid)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(!IsAPlane(carid))
- {
- SetVehicleParamsForPlayer(carid,i,0,0);
- }
- }
- }
- }
- public InitLockDoors(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- new c;
- while (c < 254)
- {
- c++;
- if (gCarLock[c] == 1)
- {
- SetVehicleParamsForPlayer(c,playerid,0,1);
- }
- }
- }
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- if (GetPlayerState(playerid) == 1)
- {
- return 1;
- }
- if(gGas[playerid] == 1)
- {
- GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Left car", 500, 3);
- }
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- new string[128];
- PlayerPlaySound(playerid, 1187, 0.0, 0.0, 0.0);
- PlayerInfo[playerid][pModel] = Peds[classid][0];
- if (classid == 1)
- {
- format(string, sizeof(string), "~y~> ~p~Police Chief ~y~< ~n~Leaders only!");
- GameTextForPlayer(playerid,string,3500,6);
- }
- else if (classid == 2)
- {
- format(string, sizeof(string), "~y~> ~p~FBI/ATF Leader ~y~< ~n~Leaders only!");
- GameTextForPlayer(playerid,string,3500,6);
- }
- else if (classid == 3)
- {
- format(string, sizeof(string), "~y~> ~p~National Guard General ~y~< ~n~Leaders only!");
- GameTextForPlayer(playerid,string,3500,6);
- }
- else if (classid == 4)
- {
- format(string, sizeof(string), "~y~> ~p~Fire/Ambulance Chief ~y~< ~n~Leaders only!");
- GameTextForPlayer(playerid,string,3500,6);
- }
- else if (classid == 5)
- {
- format(string, sizeof(string), "~y~> ~p~La Cosa Nostra Leader ~y~< ~n~Leaders only!");
- GameTextForPlayer(playerid,string,3500,6);
- }
- else if (classid == 6)
- {
- format(string, sizeof(string), "~y~> ~p~Yakuza Leader ~y~< ~n~Leaders only!");
- GameTextForPlayer(playerid,string,3500,6);
- }
- else if (classid == 7)
- {
- format(string, sizeof(string), "~y~> ~p~Mayor ~y~< ~n~Leaders only!");
- GameTextForPlayer(playerid,string,3500,6);
- }
- else if (classid == 8)
- {
- format(string, sizeof(string), "~y~> ~p~Hitman Leader ~y~< ~n~Leaders only!");
- GameTextForPlayer(playerid,string,3500,6);
- }
- else if (classid == 9)
- {
- format(string, sizeof(string), "~y~> ~p~News Leader ~y~< ~n~Leaders only!");
- GameTextForPlayer(playerid,string,3500,6);
- }
- else if (classid == 10)
- {
- format(string, sizeof(string), "~y~> ~p~Taxi Cab Company Leader ~y~< ~n~Leaders only!");
- GameTextForPlayer(playerid,string,3500,6);
- }
- else if (classid == 11)
- {
- format(string, sizeof(string), "~y~> ~p~License Faction Leader ~y~< ~n~Leaders only!");
- GameTextForPlayer(playerid,string,3500,6);
- }
- else
- {
- format(string, sizeof(string), "~y~> ~g~Civilian ~y~<");
- GameTextForPlayer(playerid,string,3500,6);
- }
- SetPlayerTeamFromClass(playerid,classid);
- SetupPlayerForClassSelection(playerid);
- return 1;
- }
- public SetupPlayerForClassSelection(playerid)
- {
- switch (gTeam[playerid])
- {
- case TEAM_BLUE:
- {
- SetPlayerInterior(playerid,5);
- SetPlayerPos(playerid,323.4,305.6,999.1);
- SetPlayerFacingAngle(playerid, 90.0);
- SetPlayerCameraPos(playerid,323.4-1.5-1.0,305.6,999.1+0.7);
- SetPlayerCameraLookAt(playerid,323.4-1.0,305.6,999.1+0.7);
- }
- case TEAM_ADMIN:
- {
- SetPlayerInterior(playerid,3);
- SetPlayerPos(playerid,-2654.4,1424.2,912.4);
- SetPlayerFacingAngle(playerid, 90.0);
- SetPlayerCameraPos(playerid,-2654.4-1.5,1424.2,912.4+0.7);
- SetPlayerCameraLookAt(playerid,-2654.4,1424.2,912.4+0.7);
- }
- default:
- {
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid,-1657.5237,1207.6644,13.6719);
- SetPlayerFacingAngle(playerid,357.6906);
- SetPlayerCameraPos(playerid, -1657.4678,1211.2292,13.6781);
- SetPlayerCameraLookAt(playerid,-1657.5237,1207.6644,13.6719);
- }
- }
- }
- //---------------------------------------------------------
- public SetPlayerTeamFromClass(playerid,classid)
- {
- if (classid >= 1 && classid <= 11)
- {
- gTeam[playerid] = 11; //admin
- PlayerInfo[playerid][pTeam] = 11;
- }
- else
- {
- gTeam[playerid] = 3;
- PlayerInfo[playerid][pTeam] = 3;
- }
- }
- //---------------------------------------------------------
- public SetPlayerCriminal(playerid,declare,reason[])
- {//example: SetPlayerCriminal(playerid,255, "Stealing A Police Vehicle");
- if(IsPlayerConnected(playerid))
- {
- PlayerInfo[playerid][pCrimes] += 1;
- new points = WantedPoints[playerid];
- new turned[MAX_PLAYER_NAME];
- new turner[MAX_PLAYER_NAME];
- new turnmes[128];
- new wantedmes[128];
- new wlevel;
- strmid(PlayerCrime[playerid][pAccusedof], reason, 0, strlen(reason), 255);
- GetPlayerName(playerid, turned, sizeof(turned));
- if (declare == 255)
- {
- format(turner, sizeof(turner), "Unknown");
- strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);
- }
- else
- {
- if(IsPlayerConnected(declare))
- {
- GetPlayerName(declare, turner, sizeof(turner));
- strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);
- strmid(PlayerCrime[declare][pBplayer], turned, 0, strlen(turned), 255);
- strmid(PlayerCrime[declare][pAccusing], reason, 0, strlen(reason), 255);
- }
- }
- format(turnmes, sizeof(turnmes), "You've commited a Crime ( %s ). Reporter: %s.",reason,turner);
- SendClientMessage(playerid, COLOR_LIGHTRED, turnmes);
- if(points > 0)
- {
- new yesno;
- if(points == 3) { if(WantedLevel[playerid] != 1) { WantedLevel[playerid] = 1; wlevel = 1; yesno = 1; } }
- else if(points >= 4 && points <= 5) { if(WantedLevel[playerid] != 2) { WantedLevel[playerid] = 2; wlevel = 2; yesno = 1; } }
- else if(points >= 6 && points <= 7) { if(WantedLevel[playerid] != 3) { WantedLevel[playerid] = 3; wlevel = 3; yesno = 1; } }
- else if(points >= 8 && points <= 9) { if(WantedLevel[playerid] != 4) { WantedLevel[playerid] = 4; wlevel = 4; yesno = 1; } }
- else if(points >= 10 && points <= 11) { if(WantedLevel[playerid] != 5) { WantedLevel[playerid] = 5; wlevel = 5; yesno = 1; } }
- else if(points >= 12 && points <= 13) { if(WantedLevel[playerid] != 6) { WantedLevel[playerid] = 6; wlevel = 6; yesno = 1; } }
- else if(points >= 14) { if(WantedLevel[playerid] != 10) { WantedLevel[playerid] = 10; wlevel = 10; yesno = 1; } }
- if(WantedLevel[playerid] >= 1) { if(gTeam[playerid] == 3) { gTeam[playerid] = 4; } }
- if(yesno)
- {
- format(wantedmes, sizeof(wantedmes), "Current Wanted Level: %d", wlevel);
- SendClientMessage(playerid, COLOR_YELLOW, wantedmes);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pMember] == 1||PlayerInfo[i][pLeader] == 1)
- {
- format(cbjstore, sizeof(turnmes), "HQ: All Units APB: Reporter: %s",turner);
- SendClientMessage(i, TEAM_BLUE_COLOR, cbjstore);
- format(cbjstore, sizeof(turnmes), "HQ: Crime: %s, Suspect: %s",reason,turned);
- SendClientMessage(i, TEAM_BLUE_COLOR, cbjstore);
- }
- }
- }
- }
- }
- }//not connected
- }
- //---------------------------------------------------------
- public SetPlayerFree(playerid,declare,reason[])
- {
- if(IsPlayerConnected(playerid))
- {
- ClearCrime(playerid);
- new turned[MAX_PLAYER_NAME];
- new turner[MAX_PLAYER_NAME];
- new turnmes[128];
- new crbjstore[128];
- if (declare == 255)
- {
- format(turner, sizeof(turner), "911");
- }
- else
- {
- if(IsPlayerConnected(declare))
- {
- GetPlayerName(declare, turner, sizeof(turner));
- }
- }
- GetPlayerName(playerid, turned, sizeof(turned));
- format(turnmes, sizeof(turnmes), "SMS: %s, Because you %s, you are no longer a Criminal, Sender: MOLE (555)",turned,reason);
- RingTone[playerid] = 20;
- SendClientMessage(playerid, COLOR_YELLOW, turnmes);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pMember] == 1||PlayerInfo[i][pLeader] == 1)
- {
- format(crbjstore, sizeof(crbjstore), "HQ: All Units Officer %s Has Completed Assignment",turner);
- SendClientMessage(i, COLOR_DBLUE, crbjstore);
- format(crbjstore, sizeof(crbjstore), "HQ: %s Has Been Processed, %s",turned,reason);
- SendClientMessage(i, COLOR_DBLUE, crbjstore);
- }
- }
- }
- }
- }
- public RingToner()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(RingTone[i] != 6 && RingTone[i] != 0 && RingTone[i] < 11)
- {
- RingTone[i] = RingTone[i] -1;
- PlayerPlaySound(i, 1138, 0.0, 0.0, 0.0);
- }
- if(RingTone[i] == 6)
- {
- RingTone[i] = RingTone[i] -1;
- }
- if(RingTone[i] == 20)
- {
- RingTone[i] = RingTone[i] -1;
- PlayerPlaySound(i, 1139, 0.0, 0.0, 0.0);
- }
- }
- }
- SetTimer("RingTonerRev", 1000, 0);
- return 1;
- }
- public RingTonerRev()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(RingTone[i] != 5 && RingTone[i] != 0 && RingTone[i] < 10)
- {
- RingTone[i] = RingTone[i] -1;
- PlayerPlaySound(i, 1137, 0.0, 0.0, 0.0);
- }
- if(RingTone[i] == 5)
- {
- RingTone[i] = RingTone[i] -1;
- }
- if(RingTone[i] == 19)
- {
- PlayerPlaySound(i, 1139, 0.0, 0.0, 0.0);
- RingTone[i] = 0;
- }
- }
- }
- SetTimer("RingToner", 1000, 0);
- return 1;
- }
- public OtherTimer()
- {
- new Float:maxspeed = 175.0;
- new plname[MAX_PLAYER_NAME];
- new string[256];
- new Float:oldposx, Float:oldposy, Float:oldposz;
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(SafeTime[i] > 0)
- {
- SafeTime[i]--;
- }
- if(SafeTime[i] == 1)
- {
- if(gPlayerAccount[i] == 1 && gPlayerLogged[i] == 0)
- {
- SendClientMessage(i, COLOR_WHITE, "HINT: You can now login by typing /login <password>");
- }
- }
- if(GetPlayerState(i) == 2)
- {
- GetPlayerPos(i, TelePos[i][3], TelePos[i][4], TelePos[i][5]);
- if(TelePos[i][5] > 550.0)
- {
- TelePos[i][0] = 0.0;
- TelePos[i][1] = 0.0;
- }
- if(TelePos[i][0] != 0.0)
- {
- new Float:xdist = TelePos[i][3]-TelePos[i][0];
- new Float:ydist = TelePos[i][4]-TelePos[i][1];
- new Float:sqxdist = xdist*xdist;
- new Float:sqydist = ydist*ydist;
- new Float:distance = (sqxdist+sqydist)/31;
- if(gSpeedo[i] == 2)
- {
- if(distance <10)
- {
- format(string, 256, "~n~~n~~n~~n~~n~~n~~n~~g~mph : ~w~%.0f",distance);
- }
- if(distance > 10 && distance < 100)
- {
- format(string, 256, "~n~~n~~n~~n~~n~~n~~n~~g~mph : ~w~%.0f",distance);
- }
- if(distance > 100)
- {
- format(string, 256, "~n~~n~~n~~n~~n~~n~~n~~g~mph : ~w~%.0f",distance);
- }
- GameTextForPlayer(i, string, 2000, 5);
- }
- if(distance > maxspeed && PlayerInfo[i][pAdmin] < 1)
- {
- new tmpcar = GetPlayerVehicleID(i);
- if(!IsAPlane(tmpcar))
- {
- GetPlayerName(i, plname, sizeof(plname));
- format(string, 256, "AdmWarning: [%d]%s %.0f mph",i,plname,distance);
- ABroadCast(COLOR_YELLOW,string,1);
- }
- }
- }
- if(TelePos[i][5] < 550.0 && TelePos[i][3] != 0.0)
- {
- TelePos[i][0] = TelePos[i][3];
- TelePos[i][1] = TelePos[i][4];
- }
- }
- if(PlayerInfo[i][pLocal] != 255 && PlayerInfo[i][pInt] != 0)
- {
- new house = PlayerInfo[i][pLocal];
- GetPlayerPos(i, oldposx, oldposy, oldposz);
- if(oldposz != 0.0)
- {
- if(oldposz < 600.0)
- {
- if(house > 10000)
- {
- new tmpcar = GetPlayerVehicleID(i);
- if (!PlayerToPoint(6, i,1040.6,-1021.0,31.7) && house == 10001 ||!PlayerToPoint(6, i,-2720.5,217.5,4.1) && house == 10002 ||!PlayerToPoint(6, i,2644.6,-2044.9,13.3) && house == 10003)
- {
- if (GetPlayerState(i) == 2)
- {
- SetVehiclePos(tmpcar, HouseCarSpawns[tmpcar-1][0], HouseCarSpawns[tmpcar-1][1], HouseCarSpawns[tmpcar-1][2]);
- SetVehicleZAngle(tmpcar, HouseCarSpawns[tmpcar-1][3]);
- }
- else
- {
- SetPlayerPos(i, HouseCarSpawns[tmpcar-1][0], HouseCarSpawns[tmpcar-1][1], HouseCarSpawns[tmpcar-1][2]);
- }
- new oldcash = gSpentCash[i];
- new Total = GetPlayerMoney(i) - oldcash;
- printf("Total %d = GetPlayerMoney(playerid) %d - oldcash %d",Total,GetPlayerMoney(i),oldcash);
- new name[MAX_PLAYER_NAME];
- GetPlayerName(i, name, sizeof(name));
- format(string,128,"<< %s has left the homemodshop with $%d >>",name,Total);
- PayLog(string);
- gSpentCash[i] = 0;
- TelePos[i][0] = 0.0;
- TelePos[i][1] = 0.0;
- PlayerInfo[i][pLocal] = 255;
- SetPlayerInterior(i,0);
- PlayerInfo[i][pInt] = 0;
- Spectate[i] = 255;
- }
- }
- if(house == 241)//City Hall
- {
- SetPlayerInterior(i,0);
- SetPlayerPos(i,-2162.2554,-2385.9541,30.6250);
- PlayerInfo[i][pInt] = 0;
- PlayerInfo[i][pLocal] = 255;
- }
- if(house == 242)
- {
- SetPlayerInterior(i,0);
- SetPlayerPos(i,1073.0619,-344.5148,73.9922);
- PlayerInfo[i][pInt] = 0;
- PlayerInfo[i][pLocal] = 255;
- }
- if(house >= 99 && house != 10000)
- {
- SetPlayerPos(i, BizzInfo[house-99][bEntranceX], BizzInfo[house-99][bEntranceY],BizzInfo[house-99][bEntranceZ]); // Warp the player
- PlayerInfo[i][pLocal] = 255;
- SetPlayerInterior(i,0);
- PlayerInfo[i][pInt] = 0;
- }
- else if(house < 99 && house != 10000)
- {
- SetPlayerPos(i, HouseInfo[house][hEntrancex], HouseInfo[house][hEntrancey],HouseInfo[house][hEntrancez]); // Warp the player
- PlayerInfo[i][pLocal] = 255;
- SetPlayerInterior(i,0);
- PlayerInfo[i][pInt] = 0;
- }
- }
- }
- }
- if(CellTime[i] > 0)
- {
- if (CellTime[i] == cchargetime)
- {
- CellTime[i] = 1;
- if(Mobile[Mobile[i]] == i)
- {
- CallCost[i] = CallCost[i]+callcost;
- }
- }
- CellTime[i] = CellTime[i] +1;
- if (Mobile[Mobile[i]] == 255 && CellTime[i] == 5)
- {
- if(IsPlayerConnected(Mobile[i]))
- {
- new called[MAX_PLAYER_NAME];
- GetPlayerName(Mobile[i], called, sizeof(called));
- format(string, sizeof(string), "* %s's phone rings.", called);
- RingTone[Mobile[i]] = 10;
- ProxDetector(30.0, Mobile[i], string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- }
- }
- }
- if(CellTime[i] == 0 && CallCost[i] > 0)
- {
- format(string, sizeof(string), "~w~The call cost~n~~r~$%d",CallCost[i]);
- GivePlayerMoney(i, -CallCost[i]);
- SBizzInfo[2][sbTill] += CallCost[i];
- ExtortionSBiz(2, CallCost[i]);
- GameTextForPlayer(i, string, 5000, 1);
- CallCost[i] = 0;
- }
- if(TransportTime[i] > 0)
- {//Taxi driver and passenger only
- if(TransportTime[i] >= 16)
- {
- TransportTime[i] = 1;
- if(TransportDriver[i] < 999)
- {
- if(IsPlayerConnected(TransportDriver[i]))
- {
- TransportCost[i] += TransportValue[TransportDriver[i]];
- TransportCost[TransportDriver[i]] = TransportCost[i];
- }
- }
- }
- TransportTime[i] += 1;
- format(string, sizeof(string), "~r~%d ~w~: ~g~$%d",TransportTime[i],TransportCost[i]);
- GameTextForPlayer(i, string, 15000, 6);
- }
- }
- }
- return 1;
- }
- public SetPlayerUnjail()
- {
- new plname[MAX_PLAYER_NAME];
- new string[256];
- if(PaintballPlayers >= 2 && PaintballRound != 1 && StartingPaintballRound != 1)
- {
- StartingPaintballRound = 1;
- SetTimer("PreparePaintball", 15000, 0);
- }
- if(KartingPlayers >= 2 && KartingRound != 1 && StartingKartRound != 1)
- {
- StartingKartRound = 1;
- SetTimer("PrepareKarting", 15000, 0);
- }
- if(KartingRound != 0 && KartingPlayers < 2)
- {
- StartingKartRound = 0;
- KartingRound = 0;
- EndingKartRound = 1;
- }
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- new newcar = GetPlayerVehicleID(i);
- new level = PlayerInfo[i][pLevel];
- if(level >= 0 && level <= 2) { PlayerInfo[i][pPayCheck] += 1; }
- else if(level >= 3 && level <= 4) { PlayerInfo[i][pPayCheck] += 2; }
- else if(level >= 5 && level <= 6) { PlayerInfo[i][pPayCheck] += 3; }
- else if(level >= 7 && level <= 8) { PlayerInfo[i][pPayCheck] += 4; }
- else if(level >= 9 && level <= 10) { PlayerInfo[i][pPayCheck] += 5; }
- else if(level >= 11 && level <= 12) { PlayerInfo[i][pPayCheck] += 6; }
- else if(level >= 13 && level <= 14) { PlayerInfo[i][pPayCheck] += 7; }
- else if(level >= 15 && level <= 16) { PlayerInfo[i][pPayCheck] += 8; }
- else if(level >= 17 && level <= 18) { PlayerInfo[i][pPayCheck] += 9; }
- else if(level >= 19 && level <= 20) { PlayerInfo[i][pPayCheck] += 10; }
- else if(level >= 21) { PlayerInfo[i][pPayCheck] += 11; }
- if(PlayerInfo[i][pJailed] > 0)
- {
- if(PlayerInfo[i][pJailTime] > 0 && WantLawyer[i] == 0)
- {
- PlayerInfo[i][pJailTime]--;
- }
- if(PlayerInfo[i][pJailTime] <= 0 && WantLawyer[i] == 0)
- {
- PlayerInfo[i][pJailTime] = 0;
- if(PlayerInfo[i][pJailed] == 1)
- {
- SetPlayerInterior(i, 6);
- SetPlayerPos(i,268.0903,77.6489,1001.0391);
- }
- else if(PlayerInfo[i][pJailed] == 2)
- {
- SetPlayerWorldBounds(i,20000.0000,-20000.0000,20000.0000,-20000.0000); //Reset world to player
- SetPlayerInterior(i, 0);
- SetPlayerPos(i, 90.2101,1920.4854,17.9422);
- }
- PlayerInfo[i][pJailed] = 0;
- SendClientMessage(i, COLOR_GRAD1," You have paid your debt to society.");
- format(string, sizeof(string), "~g~Freedom~n~~w~Try to be a better citizen");
- GameTextForPlayer(i, string, 5000, 1);
- if(gTeam[i] == 4) { gTeam[i] = 3; }
- ClearCrime(i);
- SetPlayerToTeamColor(i);
- }
- }
- if(GetPlayerMoney(i) - CurrentMoney[i] >= 50000 && PlayerInfo[i][pAdmin] < 1)
- {
- if(ConsumingMoney[i])
- {
- CurrentMoney[i] = GetPlayerMoney(i);
- ConsumingMoney[i] = 0;
- }
- else
- {
- GetPlayerName(i, plname, sizeof(plname));
- format(string, 256, "AdmWarning: [%d]%s just spawned above $50000 in one second (moneycheat), use /check on him.",i,plname);
- ABroadCast(COLOR_YELLOW,string,1);
- PayLog(string);
- CurrentMoney[i] = GetPlayerMoney(i);
- }
- }
- else
- {
- CurrentMoney[i] = GetPlayerMoney(i);
- }
- if(IsABoat(newcar))
- {
- if(PlayerInfo[i][pBoatLic] < 1 && GetPlayerState(i) == 2)
- {
- RemovePlayerFromVehicle(i);
- }
- }
- else if(IsAPlane(newcar))
- {
- if(PlayerInfo[i][pFlyLic] < 1 && GetPlayerState(i) == 2)
- {
- if(TakingLesson[i] == 1) { }
- else { RemovePlayerFromVehicle(i); }
- }
- }
- else
- {
- if(PlayerInfo[i][pCarLic] < 1 && IsPlayerInAnyVehicle(i) && GetPlayerState(i) == 2)
- {
- if(TakingLesson[i] == 1) { }
- else { RemovePlayerFromVehicle(i); }
- }
- }//Done with car check
- if(UsedFind[i] >= 1)
- {
- UsedFind[i] += 1;
- if(UsedFind[i] >= 120)
- {
- UsedFind[i] = 0;
- }
- }
- if(MedicTime[i] > 0)
- {
- if(MedicTime[i] == 3)
- {
- SetPlayerInterior(i, 5);
- new Float:X, Float:Y, Float:Z;
- GetPlayerPos(i, X,Y,Z);
- SetPlayerCameraPos(i, X + 3, Y, Z);
- SetPlayerCameraLookAt(i,X,Y,Z);
- }
- MedicTime[i] ++;
- if(MedicTime[i] >= NeedMedicTime[i])
- {
- new cut = deathcost; //PlayerInfo[playerid][pLevel]*deathcost;
- GivePlayerMoney(i, -cut);
- format(string, sizeof(string), "DOC: Your Medical Bill comes to $%d, Have a nice day.", cut);
- SendClientMessage(i, TEAM_CYAN_COLOR, string);
- TogglePlayerControllable(i, 1);
- MedicBill[i] = 0;
- MedicTime[i] = 0;
- NeedMedicTime[i] = 0;
- PlayerInfo[i][pDeaths] += 1;
- PlayerFixRadio(i);
- SpawnPlayer(i);
- }
- }
- if(WantLawyer[i] >= 1)
- {
- CallLawyer[i] = 111;
- if(WantLawyer[i] == 1)
- {
- SendClientMessage(i, COLOR_LIGHTRED, "Do you want a Lawyer? (Type yes or no)");
- }
- WantLawyer[i] ++;
- if(WantLawyer[i] == 8)
- {
- SendClientMessage(i, COLOR_LIGHTRED, "Do you want a Lawyer? (Type yes or no)");
- }
- if(WantLawyer[i] == 15)
- {
- SendClientMessage(i, COLOR_LIGHTRED, "Do you want a Lawyer? (Type yes or no)");
- }
- if(WantLawyer[i] == 20)
- {
- SendClientMessage(i, COLOR_LIGHTRED, "There is no Lawyer available to you anymore, Jail Time started.");
- WantLawyer[i] = 0;
- CallLawyer[i] = 0;
- }
- }
- if(TutTime[i] >= 1)
- {
- TutTime[i] += 1;
- if(TutTime[i] == 3)
- {
- SendClientMessage(i, COLOR_YELLOW2, "|____ Tutorial: The beginning ____|");
- SendClientMessage(i, COLOR_YELLOW2, "Hi there, i can see that you are new, so here's a quick Tutorial.");
- SendClientMessage(i, COLOR_YELLOW2, "Every new players needs to know what he / she, can and can't do.");
- SendClientMessage(i, COLOR_YELLOW2, "I will give your quiet some information, so please pay attention to avoid questions later on.");
- }
- else if(TutTime[i] == 14)
- {
- SendClientMessage(i, COLOR_YELLOW, "|____ Tutorial: Kind of server ____|");
- }
- else if(TutTime[i] == 16)
- {
- SendClientMessage(i, COLOR_YELLOW2, "This server is a RP server which stands for Role Playing.");
- SendClientMessage(i, COLOR_YELLOW2, "We are absolutely not interested in players that just come along and Deathmatch.");
- SendClientMessage(i, COLOR_YELLOW2, "The name you have also matters alot, other players are getting used to your chosen name");
- SendClientMessage(i, COLOR_YELLOW2, "so it's better to have a name like for example: Oliver_Wood.");
- SendClientMessage(i, COLOR_YELLOW2, "If you want to know more about how to RP, visit our forums and search for the topic.");
- SendClientMessage(i, COLOR_YELLOW2, "(You can find the forum on our webpage: http://www.godfather-rp.com");
- }
- else if(TutTime[i] == 30)
- {
- SendClientMessage(i, COLOR_YELLOW, "|____ Tutorial: Requesting Help ____|");
- }
- else if(TutTime[i] == 32)
- {
- SendClientMessage(i, COLOR_YELLOW2, "If you are confused and would like to know some more information when you are ingame");
- SendClientMessage(i, COLOR_YELLOW2, "simply just ask any Player or an Admin (/admins) in a common way.");
- SendClientMessage(i, COLOR_YELLOW2, "Just use common lines like: Hi, could you help me a sec please?");
- SendClientMessage(i, COLOR_YELLOW2, "Don't start to shout or curse at someone, because it will only make you look worse..");
- SendClientMessage(i, COLOR_YELLOW2, "And you might end up banned, which you want to skip of course.");
- SendClientMessage(i, COLOR_YELLOW2, "Use the commands /o (OOC) /w (Whisper) /sms (If you have the Phone Number) to talk to someone.");
- }
- else if(TutTime[i] == 52)
- {
- SendClientMessage(i, COLOR_YELLOW, "|____ Tutorial: Cheating & Abusing ____|");
- }
- else if(TutTime[i] == 54)
- {
- SendClientMessage(i, COLOR_YELLOW2, "We wish that n0beit was never made and we certainly don't allow players to use it.");
- SendClientMessage(i, COLOR_YELLOW2, "Thats why we don't want YOU to cheat, or allow other players to cheat.");
- SendClientMessage(i, COLOR_YELLOW2, "If you see someone cheating, please report it with /report right away.");
- SendClientMessage(i, COLOR_YELLOW2, "Bug abusing, or in any other way stuff abusing is just as bad as Cheating.");
- SendClientMessage(i, COLOR_YELLOW2, "So we don't want YOU to abuse aswell, simply use the /report as well if you see");
- SendClientMessage(i, COLOR_YELLOW2, "someone abusing something.");
- }
- else if(TutTime[i] == 74)
- {
- SendClientMessage(i, COLOR_YELLOW, "|____ Tutorial: Respect ____|");
- }
- else if(TutTime[i] == 76)
- {
- SendClientMessage(i, COLOR_YELLOW2, "First of all I like to start with Admins, respect Admins in any way.");
- SendClientMessage(i, COLOR_YELLOW2, "We are all trying to keep everyony satisfied and trying to help everyone in anyway possible.");
- SendClientMessage(i, COLOR_YELLOW2, "Secondly, don't curse / shout / swear at other players, this will end you up muted / banned.");
- SendClientMessage(i, COLOR_YELLOW2, "Just treat people with respect, just like you want to be respected.");
- }
- else if(TutTime[i] == 96)
- {
- SendClientMessage(i, COLOR_YELLOW, "|____ Tutorial: Drive-by ____|");
- }
- else if(TutTime[i] == 98)
- {
- SendClientMessage(i, COLOR_YELLOW2, "We don't allow Drive-by's on this server, since it's lame and simple to kill.");
- SendClientMessage(i, COLOR_YELLOW2, "And it's deathmatching, which we definately don't allow.");
- SendClientMessage(i, COLOR_YELLOW2, "Don't do this if you don't want yourself to get banned.");
- }
- else if(TutTime[i] == 108)
- {
- SendClientMessage(i, COLOR_YELLOW, "|____ Tutorial: Language & Advertising ____|");
- }
- else if(TutTime[i] == 110)
- {
- SendClientMessage(i, COLOR_YELLOW2, "We'd like you to use English in any chat.");
- SendClientMessage(i, COLOR_YELLOW2, "If you want to talk with someone in your own Language, use the /w or /sms commands");
- SendClientMessage(i, COLOR_YELLOW2, "Advertising is not allowed aswell, advertising will get you banned aswell.");
- }
- else if(TutTime[i] == 119)
- {
- SendClientMessage(i, COLOR_YELLOW, "|____ Tutorial: The End ____|");
- }
- else if(TutTime[i] == 121)
- {
- SendClientMessage(i, COLOR_YELLOW2, "So that was it, probably obvious but we still want you to remember our rules.");
- SendClientMessage(i, COLOR_YELLOW2, "Just keep reminding them and have fun!");
- SendClientMessage(i, COLOR_YELLOW2, "Greetings from: Role Play - The Godfather Admin Team.");
- }
- else if(TutTime[i] == 127)
- {
- TutTime[i] = 0; PlayerInfo[i][pTut] = 1;
- gOoc[i] = 0; gNews[i] = 0; gFam[i] = 0;
- TogglePlayerControllable(i, 1);
- MedicBill[i] = 0;
- SetPlayerSpawn(i);
- }
- }
- if(PlayerTazeTime[i] >= 1)
- {
- PlayerTazeTime[i] += 1;
- if(PlayerTazeTime[i] == 15)
- {
- PlayerTazeTime[i] = 0;
- }
- else
- {
- new Float:angle;
- GetPlayerFacingAngle(i, angle);
- SetPlayerFacingAngle(i, angle + 90);
- }
- }
- if(PlayerDrunk[i] >= 5)
- {
- PlayerDrunkTime[i] += 1;
- if(PlayerDrunkTime[i] == 8)
- {
- PlayerDrunkTime[i] = 0;
- new Float:angle;
- GetPlayerFacingAngle(i, angle);
- if(IsPlayerInAnyVehicle(i))
- {
- if(GetPlayerState(i) == 2)
- {
- SetVehicleZAngle(GetPlayerVehicleID(i), angle + 25);
- }
- }
- else
- {
- ApplyAnimation(i,"PED", "WALK_DRUNK",4.0,0,1,0,0,0);
- }
- }
- }
- if(PlayerStoned[i] >= 2)
- {
- PlayerStoned[i] += 1;
- if(PlayerStoned[i] == 10)
- {
- PlayerStoned[i] = 2;
- new Float:angle;
- GetPlayerFacingAngle(i, angle);
- if(IsPlayerInAnyVehicle(i))
- {
- if(GetPlayerState(i) == 2)
- {
- SetVehicleZAngle(GetPlayerVehicleID(i), angle + 25);
- }
- }
- else
- {
- SetPlayerFacingAngle(i, angle + 90);
- }
- }
- }
- if(PlayerInfo[i][pCarTime] > 0)
- {
- if(PlayerInfo[i][pCarTime] <= 0)
- {
- PlayerInfo[i][pCarTime] = 0;
- }
- else
- {
- PlayerInfo[i][pCarTime] -= 1;
- }
- }
- if(BoxWaitTime[i] > 0)
- {
- if(BoxWaitTime[i] >= BoxDelay)
- {
- BoxDelay = 0;
- BoxWaitTime[i] = 0;
- PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
- GameTextForPlayer(i, "~g~Match Started", 5000, 1);
- TogglePlayerControllable(i, 1);
- RoundStarted = 1;
- }
- else
- {
- format(string, sizeof(string), "%d", BoxDelay - BoxWaitTime[i]);
- GameTextForPlayer(i, string, 1500, 6);
- BoxWaitTime[i] += 1;
- }
- }
- if(RoundStarted > 0)
- {
- if(PlayerBoxing[i] > 0)
- {
- new trigger = 0;
- new Lost = 0;
- new Float:angle;
- new Float:health;
- GetPlayerHealth(i, health);
- if(health < 12)
- {
- if(i == Boxer1) { Lost = 1; trigger = 1; }
- else if(i == Boxer2) { Lost = 2; trigger = 1; }
- }
- if(health < 28) { GetPlayerFacingAngle(i, angle); SetPlayerFacingAngle(i, angle + 85); }
- if(trigger)
- {
- new winner[MAX_PLAYER_NAME];
- new loser[MAX_PLAYER_NAME];
- new titel[MAX_PLAYER_NAME];
- if(Lost == 1)
- {
- if(IsPlayerConnected(Boxer1) && IsPlayerConnected(Boxer2))
- {
- SetPlayerPos(Boxer1, 765.8433,3.2924,1000.7186); SetPlayerPos(Boxer2, 765.8433,3.2924,1000.7186);
- SetPlayerInterior(Boxer1, 5); SetPlayerInterior(Boxer2, 5);
- GetPlayerName(Boxer1, loser, sizeof(loser));
- GetPlayerName(Boxer2, winner, sizeof(winner));
- if(PlayerInfo[Boxer1][pJob] == 12) { PlayerInfo[Boxer1][pLoses] += 1; }
- if(PlayerInfo[Boxer2][pJob] == 12) { PlayerInfo[Boxer2][pWins] += 1; }
- if(TBoxer < 255)
- {
- if(IsPlayerConnected(TBoxer))
- {
- if(TBoxer != Boxer2)
- {
- if(PlayerInfo[Boxer2][pJob] == 10)
- {
- TBoxer = Boxer2;
- GetPlayerName(TBoxer, titel, sizeof(titel));
- new nstring[MAX_PLAYER_NAME];
- format(nstring, sizeof(nstring), "%s", titel);
- strmid(Titel[TitelName], nstring, 0, strlen(nstring), 255);
- Titel[TitelWins] = PlayerInfo[TBoxer][pWins];
- Titel[TitelLoses] = PlayerInfo[TBoxer][pLoses];
- SaveBoxer();
- format(string, sizeof(string), "Boxing News: %s has Won the fight against Champion %s and is now the new Boxing Champion.", titel, loser);
- OOCOff(COLOR_WHITE,string);
- }
- else
- {
- SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* You would have been the Champion if you had the Boxer Job !");
- }
- }
- else
- {
- GetPlayerName(TBoxer, titel, sizeof(titel));
- format(string, sizeof(string), "Boxing News: Boxing Champion %s has Won the fight against %s.", titel, loser);
- OOCOff(COLOR_WHITE,string);
- Titel[TitelWins] = PlayerInfo[TBoxer][pWins];
- Titel[TitelLoses] = PlayerInfo[Boxer2][pLoses];
- SaveBoxer();
- }
- }
- }//TBoxer
- format(string, sizeof(string), "* You have Lost the Fight against %s.", winner);
- SendClientMessage(Boxer1, COLOR_LIGHTBLUE, string);
- GameTextForPlayer(Boxer1, "~r~You lost", 3500, 1);
- format(string, sizeof(string), "* You have Won the Fight against %s.", loser);
- SendClientMessage(Boxer2, COLOR_LIGHTBLUE, string);
- GameTextForPlayer(Boxer2, "~r~You won", 3500, 1);
- if(GetPlayerHealth(Boxer1, health) < 20)
- {
- SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* You feel exhausted from the Fight, go eat somewhere.");
- SetPlayerHealth(Boxer1, 30.0);
- }
- else
- {
- SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* You feel perfect, even after the Fight.");
- SetPlayerHealth(Boxer1, 50.0);
- }
- if(GetPlayerHealth(Boxer2, health) < 20)
- {
- SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* You feel exhausted from the Fight, go eat somewhere.");
- SetPlayerHealth(Boxer2, 30.0);
- }
- else
- {
- SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* You feel perfect, even after the Fight.");
- SetPlayerHealth(Boxer2, 50.0);
- }
- GameTextForPlayer(Boxer1, "~g~Match Over", 5000, 1); GameTextForPlayer(Boxer2, "~g~Match Over", 5000, 1);
- if(PlayerInfo[Boxer2][pJob] == 10) { PlayerInfo[Boxer2][pBoxSkill] += 1; }
- PlayerBoxing[Boxer1] = 0;
- PlayerBoxing[Boxer2] = 0;
- }
- }
- else if(Lost == 2)
- {
- if(IsPlayerConnected(Boxer1) && IsPlayerConnected(Boxer2))
- {
- SetPlayerPos(Boxer1, 765.8433,3.2924,1000.7186); SetPlayerPos(Boxer2, 765.8433,3.2924,1000.7186);
- SetPlayerInterior(Boxer1, 5); SetPlayerInterior(Boxer2, 5);
- GetPlayerName(Boxer1, winner, sizeof(winner));
- GetPlayerName(Boxer2, loser, sizeof(loser));
- if(PlayerInfo[Boxer2][pJob] == 10) { PlayerInfo[Boxer2][pLoses] += 1; }
- if(PlayerInfo[Boxer1][pJob] == 10) { PlayerInfo[Boxer1][pWins] += 1; }
- if(TBoxer < 255)
- {
- if(IsPlayerConnected(TBoxer))
- {
- if(TBoxer != Boxer1)
- {
- if(PlayerInfo[Boxer1][pJob] == 10)
- {
- TBoxer = Boxer1;
- GetPlayerName(TBoxer, titel, sizeof(titel));
- new nstring[MAX_PLAYER_NAME];
- format(nstring, sizeof(nstring), "%s", titel);
- strmid(Titel[TitelName], nstring, 0, strlen(nstring), 255);
- Titel[TitelWins] = PlayerInfo[TBoxer][pWins];
- Titel[TitelLoses] = PlayerInfo[TBoxer][pLoses];
- SaveBoxer();
- format(string, sizeof(string), "Boxing News: %s has Won the fight against Champion %s and is now the new Boxing Champion.", titel, loser);
- OOCOff(COLOR_WHITE,string);
- }
- else
- {
- SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* You would have been the Champion if you had the Boxer Job !");
- }
- }
- else
- {
- GetPlayerName(TBoxer, titel, sizeof(titel));
- format(string, sizeof(string), "Boxing News: Boxing Champion %s has Won the fight against %s.", titel, loser);
- OOCOff(COLOR_WHITE,string);
- Titel[TitelWins] = PlayerInfo[TBoxer][pWins];
- Titel[TitelLoses] = PlayerInfo[Boxer1][pLoses];
- SaveBoxer();
- }
- }
- }//TBoxer
- format(string, sizeof(string), "* You have Lost the Fight against %s.", winner);
- SendClientMessage(Boxer2, COLOR_LIGHTBLUE, string);
- GameTextForPlayer(Boxer2, "~r~You lost", 3500, 1);
- format(string, sizeof(string), "* You have Won the Fight against %s.", loser);
- SendClientMessage(Boxer1, COLOR_LIGHTBLUE, string);
- GameTextForPlayer(Boxer1, "~g~You won", 3500, 1);
- if(GetPlayerHealth(Boxer1, health) < 20)
- {
- SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* You feel exhausted from the Fight, go eat somewhere.");
- SetPlayerHealth(Boxer1, 30.0);
- }
- else
- {
- SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* You feel perfect, even after the Fight.");
- SetPlayerHealth(Boxer1, 50.0);
- }
- if(GetPlayerHealth(Boxer2, health) < 20)
- {
- SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* You feel exhausted from the Fight, go eat somewhere.");
- SetPlayerHealth(Boxer2, 30.0);
- }
- else
- {
- SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* You feel perfect, even after the Fight.");
- SetPlayerHealth(Boxer2, 50.0);
- }
- GameTextForPlayer(Boxer1, "~g~Match Over", 5000, 1); GameTextForPlayer(Boxer2, "~g~Match Over", 5000, 1);
- if(PlayerInfo[Boxer1][pJob] == 10) { PlayerInfo[Boxer1][pBoxSkill] += 1; }
- PlayerBoxing[Boxer1] = 0;
- PlayerBoxing[Boxer2] = 0;
- }
- }
- InRing = 0;
- RoundStarted = 0;
- Boxer1 = 255;
- Boxer2 = 255;
- TBoxer = 255;
- trigger = 0;
- }
- }
- }
- if(StartingPaintballRound == 1 && AnnouncedPaintballRound == 0)
- {
- AnnouncedPaintballRound = 1;
- if(PlayerPaintballing[i] != 0)
- {
- SendClientMessage(i, COLOR_YELLOW, "Paintball Match will be announced in 15 seconds (For getting more Paintball players).");
- }
- }
- if(StartingKartRound == 1 && AnnouncedKartRound == 0)
- {
- AnnouncedKartRound = 1;
- if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
- {
- SendClientMessage(i, COLOR_YELLOW, "Karting Race will be announced in 15 seconds (For getting more Kart Racers).");
- }
- }
- if(EndingKartRound == 1)
- {
- if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
- {
- DisablePlayerCheckpoint(i);
- CP[i] = 0;
- }
- }
- if(FindTime[i] > 0)
- {
- if(FindTime[i] == FindTimePoints[i]) { FindTime[i] = 0; FindTimePoints[i] = 0; DisablePlayerCheckpoint(i); PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0); GameTextForPlayer(i, "~r~RedMarker gone", 2500, 1); }
- else
- {
- format(string, sizeof(string), "%d", FindTimePoints[i] - FindTime[i]);
- GameTextForPlayer(i, string, 1500, 6);
- FindTime[i] += 1;
- }
- }
- if(TaxiCallTime[i] > 0)
- {
- if(TaxiAccepted[i] < 999)
- {
- if(IsPlayerConnected(TaxiAccepted[i]))
- {
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(TaxiAccepted[i], X, Y, Z);
- SetPlayerCheckpoint(i, X, Y, Z, 5);
- }
- }
- }
- if(BusCallTime[i] > 0)
- {
- if(BusAccepted[i] < 999)
- {
- if(IsPlayerConnected(BusAccepted[i]))
- {
- new Float:X,Float:Y,Float:Z;
- GetPlayerPos(BusAccepted[i], X, Y, Z);
- SetPlayerCheckpoint(i, X, Y, Z, 5);
- }
- }
- }
- if(MedicCallTime[i] > 0)
- {
- if(MedicCallTime[i] == 30) { MedicCallTime[i] = 0; DisablePlayerCheckpoint(i); PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0); GameTextForPlayer(i, "~r~RedMarker gone", 2500, 1); }
- else
- {
- format(string, sizeof(string), "%d", 30 - MedicCallTime[i]);
- GameTextForPlayer(i, string, 1500, 6);
- MedicCallTime[i] += 1;
- }
- }
- if(MechanicCallTime[i] > 0)
- {
- if(MechanicCallTime[i] == 30) { MechanicCallTime[i] = 0; DisablePlayerCheckpoint(i); PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0); GameTextForPlayer(i, "~r~RedMarker gone", 2500, 1); }
- else
- {
- format(string, sizeof(string), "%d", 30 - MechanicCallTime[i]);
- GameTextForPlayer(i, string, 1500, 6);
- MechanicCallTime[i] += 1;
- }
- }
- if(Robbed[i] == 1)
- {
- if(RobbedTime[i] <= 0)
- {
- RobbedTime[i] = 0;
- Robbed[i] = 0;
- }
- else
- {
- RobbedTime[i] -= 1;
- }
- }
- if(PlayerCuffed[i] == 1)
- {
- if(PlayerCuffedTime[i] <= 0)
- {
- TogglePlayerControllable(i, 1);
- PlayerCuffed[i] = 0;
- PlayerCuffedTime[i] = 0;
- PlayerTazeTime[i] = 1;
- }
- else
- {
- PlayerCuffedTime[i] -= 1;
- }
- }
- if(PlayerCuffed[i] == 2)
- {
- if(PlayerCuffedTime[i] <= 0)
- {
- GameTextForPlayer(i, "~r~You broke the Cuffs, you are free!", 2500, 3);
- TogglePlayerControllable(i, 1);
- PlayerCuffed[i] = 0;
- PlayerCuffedTime[i] = 0;
- }
- else
- {
- PlayerCuffedTime[i] -= 1;
- }
- }
- if(PlayerToPoint(20, i,2015.4500,1017.0900,996.8750))
- {//Four Dragons
- GameTextForPlayer(i, "~r~Closed", 5000, 1);
- SetPlayerInterior(i, 0);
- SetPlayerPos(i,1022.599975,-1123.699951,23.799999);
- }
- else if(PlayerToPoint(20, i,2233.9099,1710.7300,1011.2987))
- {//Caligula
- GameTextForPlayer(i, "~r~Closed", 5000, 1);
- SetPlayerInterior(i, 0);
- SetPlayerPos(i,1022.599975,-1123.699951,23.799999);
- }
- else if(PlayerToPoint(10, i,2265.7900,1619.5800,1090.4453))
- {//Caligula Roof 1
- GameTextForPlayer(i, "~r~Closed", 5000, 1);
- SetPlayerInterior(i, 0);
- SetPlayerPos(i,1022.599975,-1123.699951,23.799999);
- }
- else if(PlayerToPoint(10, i,2265.7800,1675.9301,1090.4453))
- {//Caligula Roof 2
- GameTextForPlayer(i, "~r~Closed", 5000, 1);
- SetPlayerInterior(i, 0);
- SetPlayerPos(i,1022.599975,-1123.699951,23.799999);
- }
- else if(PlayerToPoint(20, i,1133.0699,-9.5731,1000.6797))
- {//West Casino place
- GameTextForPlayer(i, "~r~Closed", 5000, 1);
- SetPlayerInterior(i, 0);
- SetPlayerPos(i,1022.599975,-1123.699951,23.799999);
- }
- else if(PlayerToPoint(20, i,292.0274,-36.0291,1001.5156))
- {//Ammunation 1
- GameTextForPlayer(i, "~r~Jailed for going to ammunation", 5000, 1);
- SetPlayerInterior(i, 6);
- SetPlayerPos(i,264.6288,77.5742,1001.0391);
- PlayerInfo[i][pJailTime] = 300;
- PlayerInfo[i][pJailed] = 1;
- }
- else if(PlayerToPoint(20, i,308.2740,-141.2833,999.6016))
- {//Ammunation 2
- GameTextForPlayer(i, "~r~Jailed for going to ammunation", 5000, 1);
- SetPlayerInterior(i, 6);
- SetPlayerPos(i,264.6288,77.5742,1001.0391);
- PlayerInfo[i][pJailTime] = 300;
- PlayerInfo[i][pJailed] = 1;
- }
- else if(PlayerToPoint(20, i,294.3212,-108.7869,1001.5156))
- {//Ammunation 3 (small one's)
- GameTextForPlayer(i, "~r~Jailed for going to ammunation", 5000, 1);
- SetPlayerInterior(i, 6);
- SetPlayerPos(i,264.6288,77.5742,1001.0391);
- PlayerInfo[i][pJailTime] = 300;
- PlayerInfo[i][pJailed] = 1;
- }
- else if(PlayerToPoint(20, i,288.8592,-80.4535,1001.5156))
- {//Ammunation 4 (small one's)
- GameTextForPlayer(i, "~r~Jailed for going to ammunation", 5000, 1);
- SetPlayerInterior(i, 6);
- SetPlayerPos(i,264.6288,77.5742,1001.0391);
- PlayerInfo[i][pJailTime] = 300;
- PlayerInfo[i][pJailed] = 1;
- }
- else if(PlayerToPoint(20, i,316.9583,-165.4707,999.6010))
- {//Ammunation 5 (Unprotected)
- GameTextForPlayer(i, "~r~Jailed for going to ammunation", 5000, 1);
- SetPlayerInterior(i, 6);
- SetPlayerPos(i,264.6288,77.5742,1001.0391);
- PlayerInfo[i][pJailTime] = 300;
- PlayerInfo[i][pJailed] = 1;
- }
- }
- }
- }
- public CheckGas()
- {
- new string[256];
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i))
- {
- if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
- {
- new vehicle = GetPlayerVehicleID(i);
- if(Gas[vehicle] >= 1)
- {
- if(Gas[vehicle] <= 10) { PlayerPlaySound(i, 1085, 0.0, 0.0, 0.0); }
- if(gGas[i] == 1) {
- format(string, sizeof(string), "~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~Fuel:~w~ %d%",Gas[vehicle]);
- GameTextForPlayer(i,string,15500,3); }
- if(IsAPlane(vehicle) || IsABoat(vehicle)) { Gas[vehicle]++; }
- Gas[vehicle]--;
- }
- else
- {
- NoFuel[i] = 1;
- TogglePlayerControllable(i, 0);
- GameTextForPlayer(i,"~w~~n~~n~~n~~n~~n~~n~~n~~n~No fuel in Vehicle~n~Use /exit to leave the vehicle",1500,3);
- }
- }
- }
- }
- return 1;
- }
- public Fillup()
- {
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- new VID;
- new FillUp;
- new string[256];
- VID = GetPlayerVehicleID(i);
- FillUp = GasMax - Gas[VID];
- if(Refueling[i] == 1)
- {
- if(GetPlayerMoney(i) >= FillUp+4)
- {
- Gas[VID] += FillUp;
- FillUp = FillUp * SBizzInfo[3][sbEntranceCost];
- format(string,sizeof(string),"* Vehicle filled up, for: $%d.",FillUp);
- SendClientMessage(i,COLOR_LIGHTBLUE,string);
- GivePlayerMoney(i, - FillUp);
- SBizzInfo[3][sbTill] += FillUp;
- ExtortionSBiz(3, FillUp);
- Refueling[i] = 0;
- }
- else
- {
- format(string,sizeof(string),"* Not enough Money to refill, it costs $%d to fill your Vehicle.",FillUp);
- SendClientMessage(i,COLOR_LIGHTBLUE,string);
- }
- }
- }
- }
- return 1;
- }
- public StoppedVehicle()
- {
- new Float:x,Float:y,Float:z;
- new Float:distance,value;
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(IsPlayerInAnyVehicle(i))
- {
- new VID;
- VID = GetPlayerVehicleID(i);
- GetPlayerPos(i, x, y, z);
- distance = floatsqroot(floatpower(floatabs(floatsub(x,SavePlayerPos[i][LastX])),2)+floatpower(floatabs(floatsub(y,SavePlayerPos[i][LastY])),2)+floatpower(floatabs(floatsub(z,SavePlayerPos[i][LastZ])),2));
- value = floatround(distance * 3600);
- if(UpdateSeconds > 1)
- {
- value = floatround(value / UpdateSeconds);
- }
- if(SpeedMode)
- {
- }
- if(value == 0)
- {
- Gas[VID]++;
- }
- SavePlayerPos[i][LastX] = x;
- SavePlayerPos[i][LastY] = y;
- SavePlayerPos[i][LastZ] = z;
- }
- }
- }
- return 1;
- }
- public SetPlayerWeapons(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- ResetPlayerWeapons(playerid);
- if(PlayerInfo[playerid][pJailed] < 1)
- {
- if(gTeam[playerid] == 2 || IsACop(playerid))
- {
- GivePlayerWeapon(playerid, 41, 500); //spray
- if(OnDuty[playerid] == 1 || PlayerInfo[playerid][pMember] == 2)//Cops & FBI/ATF
- {
- GivePlayerWeapon(playerid, 41, 500); //spray
- GivePlayerWeapon(playerid, 24, 200);
- GivePlayerWeapon(playerid, 3, 1);
- if(PlayerInfo[playerid][pChar] == 285)//SWAT
- {
- GivePlayerWeapon(playerid, 25, 100);
- GivePlayerWeapon(playerid, 29, 450);
- }
- else if(PlayerInfo[playerid][pChar] == 287)//Army
- {
- GivePlayerWeapon(playerid, 25, 100);
- GivePlayerWeapon(playerid, 31, 500);
- }
- }
- if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)//National Guard
- {
- GivePlayerWeapon(playerid, 24, 200);
- GivePlayerWeapon(playerid, 31, 600);
- GivePlayerWeapon(playerid, 29, 600);
- }
- }
- if(gTeam[playerid] >= 3)
- {
- GivePlayerWeapon(playerid, 5, 0);
- }
- if(PlayerInfo[playerid][pDonateRank] > 0)
- {
- if (PlayerInfo[playerid][pGun1] > 0)
- {
- GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun1], PlayerInfo[playerid][pAmmo1]);
- PlayerInfo[playerid][pGun1] = 0; PlayerInfo[playerid][pAmmo1] = 0;
- }
- if (PlayerInfo[playerid][pGun2] > 0)
- {
- GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun2], PlayerInfo[playerid][pAmmo2]);
- PlayerInfo[playerid][pGun2] = 0; PlayerInfo[playerid][pAmmo2] = 0;
- }
- if (PlayerInfo[playerid][pGun3] > 0)
- {
- GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun3], PlayerInfo[playerid][pAmmo3]);
- PlayerInfo[playerid][pGun3] = 0; PlayerInfo[playerid][pAmmo3] = 0;
- }
- if (PlayerInfo[playerid][pGun4] > 0)
- {
- GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun4], PlayerInfo[playerid][pAmmo4]);
- PlayerInfo[playerid][pGun4] = 0; PlayerInfo[playerid][pAmmo4] = 0;
- }
- }
- else
- {
- if (PlayerInfo[playerid][pGun1] > 0)
- {
- GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun1], PlayerInfo[playerid][pAmmo1]);
- PlayerInfo[playerid][pGun1] = 0; PlayerInfo[playerid][pAmmo1] = 0;
- }
- if (PlayerInfo[playerid][pGun2] > 0)
- {
- GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun2], PlayerInfo[playerid][pAmmo2]);
- PlayerInfo[playerid][pGun2] = 0; PlayerInfo[playerid][pAmmo2] = 0;
- }
- }
- }
- }
- }
- public PrintSBizInfo(playerid,targetid)
- {
- if(IsPlayerConnected(playerid))
- {
- new coordsstring[256];
- SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
- format(coordsstring, sizeof(coordsstring),"*** %s ***",SBizzInfo[targetid][sbMessage]);
- SendClientMessage(playerid, COLOR_WHITE,coordsstring);
- format(coordsstring, sizeof(coordsstring), "Locked: %d EntryFee: $%d Till: $%d", SBizzInfo[targetid][sbLocked], SBizzInfo[targetid][sbEntranceCost], SBizzInfo[targetid][sbTill]);
- SendClientMessage(playerid, COLOR_GRAD1,coordsstring);
- format(coordsstring, sizeof(coordsstring), "Products: %d/%d Extortion By: %s", SBizzInfo[targetid][sbProducts],SBizzInfo[targetid][sbMaxProducts],SBizzInfo[targetid][sbExtortion]);
- SendClientMessage(playerid, COLOR_GRAD2,coordsstring);
- SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
- }
- }
- public PrintBizInfo(playerid,targetid)
- {
- if(IsPlayerConnected(playerid))
- {
- new coordsstring[256];
- SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
- format(coordsstring, sizeof(coordsstring),"*** %s ***",BizzInfo[targetid][bMessage]);
- SendClientMessage(playerid, COLOR_WHITE,coordsstring);
- format(coordsstring, sizeof(coordsstring), "Locked: %d EntryFee: $%d Till: $%d", BizzInfo[targetid][bLocked], BizzInfo[targetid][bEntranceCost], BizzInfo[targetid][bTill]);
- SendClientMessage(playerid, COLOR_GRAD1,coordsstring);
- format(coordsstring, sizeof(coordsstring), "Products: %d/%d Extortion By: %s", BizzInfo[targetid][bProducts],BizzInfo[targetid][bMaxProducts],BizzInfo[targetid][bExtortion]);
- SendClientMessage(playerid, COLOR_GRAD2,coordsstring);
- SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
- }
- }
- public ShowStats(playerid,targetid)
- {
- if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
- {
- new cash = GetPlayerMoney(targetid);
- new atext[20];
- if(PlayerInfo[targetid][pSex] == 1) { atext = "Male"; }
- else if(PlayerInfo[targetid][pSex] == 2) { atext = "Female"; }
- new otext[20];
- if(PlayerInfo[targetid][pOrigin] == 1) { otext = "USA"; }
- else if(PlayerInfo[targetid][pOrigin] == 2) { otext = "Europe"; }
- else if(PlayerInfo[targetid][pOrigin] == 3) { otext = "Asia"; }
- new ttext[20];
- if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4) { ttext = "Medic"; }
- else if(gTeam[targetid] == 3 || gTeam[targetid] == 4) { ttext = "Civilian"; }
- else if(PlayerInfo[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1) { ttext = "Officer"; }
- else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2) { ttext = "FBI Agent"; }
- else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3) { ttext = "National Guard"; }
- else if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4) { ttext = "Firemen/Paramedic"; }
- else if(PlayerInfo[targetid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5) { ttext = "LCN"; }
- else if(PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6) { ttext = "Yakuza"; }
- else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8) { ttext = "Hitmen"; }
- else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9) { ttext = "News Reporter"; }
- else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10) { ttext = "Taxi"; }
- else if(PlayerInfo[targetid][pMember] == 11 || PlayerInfo[targetid][pLeader] == 11) { ttext = "School Instructor"; }
- new dtext[20];
- if(STDPlayer[targetid] == 1) { dtext = "Chlamydia"; }
- else if(STDPlayer[targetid] == 2) { dtext = "Gonorrhea"; }
- else if(STDPlayer[targetid] == 3) { dtext = "Syphilis"; }
- else { dtext = "None"; }
- new ftext[20];
- if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4)
- { ftext = "Firemen/Paramedics"; }
- else if(PlayerInfo[targetid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5)
- { ftext = "La Cosa Nostra"; }
- else if(PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6)
- { ftext = "Yakuza"; }
- else if(PlayerInfo[targetid][pMember] == 11 || PlayerInfo[targetid][pLeader] == 11)
- { ftext = "License Faction"; }
- else
- { ftext = "None"; }
- new f2text[20];
- if(PlayerInfo[targetid][pFMember] < 255) { f2text = FamilyInfo[PlayerInfo[targetid][pFMember]][FamilyName]; }
- else { f2text = "None"; }
- new rtext[64];
- if(gTeam[targetid] == 5 || PlayerInfo[targetid][pFMember] < 255)//The 2 Organisations
- {
- if(PlayerInfo[targetid][pRank] == 1) { rtext = "Outsider"; }
- else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Associate"; }
- else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Soldier"; }
- else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Capo"; }
- else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Underboss"; }
- else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Godfather"; }
- else { rtext = "Outsider"; }
- }
- else if(PlayerInfo[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1)//PD Ranks
- {
- if(PlayerInfo[targetid][pRank] == 1) { rtext = "Cadet"; }
- else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Officer"; }
- else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Sergeant"; }
- else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Lieutenant"; }
- else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Captain"; }
- else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Chief"; }
- else { rtext = "Cadet"; }
- }
- else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2)//FBI Ranks
- {
- if(PlayerInfo[targetid][pRank] == 1) { rtext = "Professional Staff"; }
- else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Special Agent Trainee"; }
- else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Special Agent"; }
- else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Special Agent in Charge"; }
- else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Assistant Director in Charge"; }
- else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Director"; }
- else { rtext = "Intern"; }
- }
- else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3)//NG Ranks
- {
- if(PlayerInfo[targetid][pRank] == 1) { rtext = "Private"; }
- else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Sergeant"; }
- else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Major"; }
- else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Captain"; }
- else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Lieutenant"; }
- else if(PlayerInfo[targetid][pRank] == 6) { rtext = "General"; }
- else { rtext = "Private"; }
- }
- else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8)//Hitman Ranks
- {
- if(PlayerInfo[targetid][pRank] == 1) { rtext = "Freelancer"; }
- else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Marksman"; }
- else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Agent"; }
- else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Special Agent"; }
- else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Vice-Director"; }
- else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Director"; }
- else { rtext = "Freelancer"; }
- }
- else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9)//NR Ranks
- {
- if(PlayerInfo[targetid][pRank] == 1) { rtext = "Intern"; }
- else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Local Reporter"; }
- else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Local Editor"; }
- else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Network Anchor"; }
- else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Network Editor"; }
- else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Network Producer"; }
- else { rtext = "Intern"; }
- }
- else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10)//Taxi Company Ranks
- {
- if(PlayerInfo[targetid][pRank] == 1) { rtext = "Trainee"; }
- else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Taxi Rookie"; }
- else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Cabbie"; }
- else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Dispatcher"; }
- else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Shift Supervisor"; }
- else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Taxi Company Owner"; }
- else { rtext = "Trainee"; }
- }
- else if(IsAnInstructor(targetid))//Driving/Flying School Ranks
- {
- if(PlayerInfo[targetid][pRank] == 1) { rtext = "Trainee"; }
- else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Instructor"; }
- else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Senior Instructor"; }
- else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Manager"; }
- else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Under Boss"; }
- else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Boss"; }
- else { rtext = "Trainee"; }
- }
- else
- {
- rtext = "None";
- }
- new jtext[20];
- if(PlayerInfo[targetid][pJob] == 1) { jtext = "Detective"; }
- else if(PlayerInfo[targetid][pJob] == 2) { jtext = "Lawyer"; }
- else if(PlayerInfo[targetid][pJob] == 3) { jtext = "Whore"; }
- else if(PlayerInfo[targetid][pJob] == 4) { jtext = "Drugs Dealer"; }
- else if(PlayerInfo[targetid][pJob] == 5) { jtext = "Car Jacker"; }
- else if(PlayerInfo[targetid][pJob] == 6) { jtext = "News Reporter"; }
- else if(PlayerInfo[targetid][pJob] == 7) { jtext = "Car Mechanic"; }
- else if(PlayerInfo[targetid][pJob] == 8) { jtext = "Bodyguard"; }
- else if(PlayerInfo[targetid][pJob] == 9) { jtext = "Arms Dealer"; }
- else if(PlayerInfo[targetid][pJob] == 10) { jtext = "Car Dealer"; }
- else if(PlayerInfo[targetid][pJob] == 12) { jtext = "Boxer"; }
- else if(PlayerInfo[targetid][pJob] == 14) { jtext = "Bus Driver"; }
- else if(PlayerInfo[targetid][pJob] == 15) { jtext = "Paper Boy"; }
- else if(PlayerInfo[targetid][pJob] == 16) { jtext = "Trucker"; }
- else { jtext = "None"; }
- new drank[20];
- if(PlayerInfo[targetid][pDonateRank] == 1) { drank = "Power User"; }
- else if(PlayerInfo[targetid][pDonateRank] >= 2) { drank = "Donater"; }
- else { drank = "None"; }
- new married[20];
- strmid(married, PlayerInfo[targetid][pMarriedTo], 0, strlen(PlayerInfo[targetid][pMarriedTo]), 255);
- new age = PlayerInfo[targetid][pAge];
- new ptime = PlayerInfo[targetid][pConnectTime];
- new lotto = PlayerInfo[targetid][pLottoNr];
- new deaths = PlayerInfo[targetid][pDeaths];
- new fishes = PlayerInfo[targetid][pFishes];
- new bigfish = PlayerInfo[targetid][pBiggestFish];
- new crimes = PlayerInfo[targetid][pCrimes];
- new arrests = PlayerInfo[targetid][pArrested];
- new warrests = PlayerInfo[targetid][pWantedDeaths];
- new drugs = PlayerInfo[targetid][pDrugs];
- new mats = PlayerInfo[targetid][pMats];
- new wanted = WantedLevel[targetid];
- new level = PlayerInfo[targetid][pLevel];
- new exp = PlayerInfo[targetid][pExp];
- new kills = PlayerInfo[targetid][pKills];
- new pnumber = PlayerInfo[targetid][pPnumber];
- new account = PlayerInfo[targetid][pAccount];
- new nxtlevel = PlayerInfo[targetid][pLevel]+1;
- new expamount = nxtlevel*levelexp;
- new costlevel = nxtlevel*levelcost;//10k for testing purposes
- new housekey = PlayerInfo[targetid][pPhousekey];
- new bizkey = PlayerInfo[targetid][pPbiskey];
- new intir = PlayerInfo[targetid][pInt];
- new local = PlayerInfo[targetid][pLocal];
- new Float:shealth = PlayerInfo[targetid][pSHealth];
- new Float:health;
- new name[MAX_PLAYER_NAME];
- GetPlayerName(targetid, name, sizeof(name));
- GetPlayerHealth(targetid,health);
- new Float:px,Float:py,Float:pz;
- GetPlayerPos(targetid, px, py, pz);
- new coordsstring[256];
- SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
- format(coordsstring, sizeof(coordsstring),"*** %s ***",name);
- SendClientMessage(playerid, COLOR_WHITE,coordsstring);
- format(coordsstring, sizeof(coordsstring), "Level:[%d] Sex:[%s] Age:[%d] Origin:[%s] SpawnHealth:[%.1f] Cash:[$%d] Bank:[$%d] Ph:[%d]", level,atext,age,otext,shealth+50, cash, account, pnumber);
- SendClientMessage(playerid, COLOR_GRAD1,coordsstring);
- format(coordsstring, sizeof(coordsstring), "DonateRank:[%s] MarriedTo:[%s] PlayingHours:[%d] LottoNr:[%d] Job:[%s]", drank,married,ptime,lotto,jtext);
- SendClientMessage(playerid, COLOR_GRAD3,coordsstring);
- format(coordsstring, sizeof(coordsstring), "FishesCaught:[%d] BiggestFish:[%d] CrimesCommited:[%d] TimesArrested:[%d] WantedDeaths:[%d]", fishes,bigfish,crimes,arrests,warrests );
- SendClientMessage(playerid, COLOR_GRAD4,coordsstring);
- format(coordsstring, sizeof(coordsstring), "Kills:[%d] Deaths:[%d] NextLevel:[$%d] Respect:[%d/%d] WantedLevel:[%d] Family:[%s]",kills,deaths,costlevel,exp,expamount,wanted,f2text);
- SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
- format(coordsstring, sizeof(coordsstring), "Drugs:[%d] Materials:[%d] Team:[%s] Disease:[%s] Organisation:[%s] Rank:[%s]",drugs,mats,ttext,dtext,ftext,rtext);
- SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- format(coordsstring, sizeof(coordsstring), "House key [%d] Business key [%d] HireKey [%d] int:[%d] local[%d]", housekey,bizkey,HireCar[targetid],intir,local);
- SendClientMessage(playerid, COLOR_GRAD6,coordsstring);
- }
- SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
- }
- }
- //---------------------------------------------------------
- public SetPlayerToTeamColor(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- SetPlayerColor(playerid,TEAM_HIT_COLOR); // white
- }
- }
- //---------------------------------------------------------
- public GameModeInitExitFunc()
- {
- new string[128];
- format(string, sizeof(string), "Traveling...");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- DisablePlayerCheckpoint(i);
- gPlayerCheckpointStatus[i] = CHECKPOINT_NONE;
- GameTextForPlayer(i, string, 4000, 5);
- SetPlayerCameraPos(i,1460.0, -1324.0, 287.2);
- SetPlayerCameraLookAt(i,1374.5, -1291.1, 239.0);
- OnPlayerUpdate(i);
- gPlayerLogged[i] = 0;
- }
- }
- SetTimer("GameModeExitFunc", 4000, 0);
- return 1;
- }
- public GameModeExitFunc()
- {
- KillTimer(synctimer);
- KillTimer(newmistimer);
- KillTimer(unjailtimer);
- KillTimer(othtimer);
- KillTimer(cartimer);
- KillTimer(accountstimer);
- KillTimer(checkgastimer);
- KillTimer(idletimer);
- KillTimer(pickuptimer);
- KillTimer(productiontimer);
- KillTimer(spectatetimer);
- KillTimer(stoppedvehtimer);
- KillTimer(turftimer);
- GameModeExit();
- }
- //------------------------------------------------------------------------------------------------------
- public SaveMission(playerid,name[])
- {
- if(IsPlayerConnected(playerid))
- {
- new coordsstring[256];
- new missionname[64];
- new var[128];
- new makername[MAX_PLAYER_NAME];
- GetPlayerName(playerid, makername, sizeof(makername));
- new rand = random(999);
- if(rand == 0) { rand = 1; }
- new number = rand;
- if(MissionInfo[mToggle] == 0 || MissionInfo[mToggle] == 1) { }
- else { MissionInfo[mToggle] = 1; }
- format(missionname, sizeof(missionname), "%s.mis",name);
- new File: hFile = fopen(missionname, io_write);
- format(var, 128, "Title=%s\n", MissionInfo[mTitle]);fwrite(hFile, var);
- format(var, 128, "Maker=%s\n", makername);fwrite(hFile, var);
- format(var, 128, "Text1=%s\n", MissionInfo[mText1]);fwrite(hFile, var);
- format(var, 128, "Text2=%s\n", MissionInfo[mText2]);fwrite(hFile, var);
- format(var, 128, "Text3=%s\n", MissionInfo[mText3]);fwrite(hFile, var);
- format(var, 128, "Text4=%s\n", MissionInfo[mText4]);fwrite(hFile, var);
- format(var, 128, "Text5=%s\n", MissionInfo[mText5]);fwrite(hFile, var);
- format(var, 128, "Text6=%s\n", MissionInfo[mText6]);fwrite(hFile, var);
- format(var, 128, "Text7=%s\n", MissionInfo[mText7]);fwrite(hFile, var);
- format(var, 128, "Text8=%s\n", MissionInfo[mText8]);fwrite(hFile, var);
- format(var, 128, "Text9=%s\n", MissionInfo[mText9]);fwrite(hFile, var);
- format(var, 128, "Text10=%s\n", MissionInfo[mText10]);fwrite(hFile, var);
- format(var, 128, "Text11=%s\n", MissionInfo[mText11]);fwrite(hFile, var);
- format(var, 128, "Text12=%s\n", MissionInfo[mText12]);fwrite(hFile, var);
- format(var, 128, "Text13=%s\n", MissionInfo[mText13]);fwrite(hFile, var);
- format(var, 128, "Text14=%s\n", MissionInfo[mText14]);fwrite(hFile, var);
- format(var, 128, "Text15=%s\n", MissionInfo[mText15]);fwrite(hFile, var);
- format(var, 128, "Text16=%s\n", MissionInfo[mText16]);fwrite(hFile, var);
- format(var, 128, "Text17=%s\n", MissionInfo[mText17]);fwrite(hFile, var);
- format(var, 128, "Text18=%s\n", MissionInfo[mText18]);fwrite(hFile, var);
- format(var, 128, "GText1=%s\n", MissionInfo[mGText1]);fwrite(hFile, var);
- format(var, 128, "GText2=%s\n", MissionInfo[mGText2]);fwrite(hFile, var);
- format(var, 128, "GText3=%s\n", MissionInfo[mGText3]);fwrite(hFile, var);
- format(var, 128, "GText4=%s\n", MissionInfo[mGText4]);fwrite(hFile, var);
- format(var, 128, "GText5=%s\n", MissionInfo[mGText5]);fwrite(hFile, var);
- format(var, 128, "GText6=%s\n", MissionInfo[mGText6]);fwrite(hFile, var);
- format(var, 128, "CP1X=%f\n", MissionInfo[mCP1][0]);fwrite(hFile, var);
- format(var, 128, "CP1Y=%f\n", MissionInfo[mCP1][1]);fwrite(hFile, var);
- format(var, 128, "CP1Z=%f\n", MissionInfo[mCP1][2]);fwrite(hFile, var);
- format(var, 128, "CP2X=%f\n", MissionInfo[mCP2][0]);fwrite(hFile, var);
- format(var, 128, "CP2Y=%f\n", MissionInfo[mCP2][1]);fwrite(hFile, var);
- format(var, 128, "CP2Z=%f\n", MissionInfo[mCP2][2]);fwrite(hFile, var);
- format(var, 128, "CP3X=%f\n", MissionInfo[mCP3][0]);fwrite(hFile, var);
- format(var, 128, "CP3Y=%f\n", MissionInfo[mCP3][1]);fwrite(hFile, var);
- format(var, 128, "CP3Z=%f\n", MissionInfo[mCP3][2]);fwrite(hFile, var);
- format(var, 128, "CP4X=%f\n", MissionInfo[mCP4][0]);fwrite(hFile, var);
- format(var, 128, "CP4Y=%f\n", MissionInfo[mCP4][1]);fwrite(hFile, var);
- format(var, 128, "CP4Z=%f\n", MissionInfo[mCP4][2]);fwrite(hFile, var);
- format(var, 128, "CP5X=%f\n", MissionInfo[mCP5][0]);fwrite(hFile, var);
- format(var, 128, "CP5Y=%f\n", MissionInfo[mCP5][1]);fwrite(hFile, var);
- format(var, 128, "CP5Z=%f\n", MissionInfo[mCP5][2]);fwrite(hFile, var);
- format(var, 128, "CP6X=%f\n", MissionInfo[mCP6][0]);fwrite(hFile, var);
- format(var, 128, "CP6Y=%f\n", MissionInfo[mCP6][1]);fwrite(hFile, var);
- format(var, 128, "CP6Z=%f\n", MissionInfo[mCP6][2]);fwrite(hFile, var);
- format(var, 128, "Number=%d\n", number);fwrite(hFile, var);
- format(var, 128, "Reward=%d\n", MissionInfo[mReward]);fwrite(hFile, var);
- format(var, 128, "Toggle=%d\n", MissionInfo[mToggle]);fwrite(hFile, var);
- fclose(hFile);
- format(coordsstring, sizeof(coordsstring), "%s Mission Saved.",name);
- SendClientMessage(playerid, COLOR_GREEN,coordsstring);
- }
- return 1;
- }
- public LoadMission(playerid,name[])
- {
- if(IsPlayerConnected(playerid))
- {
- new strFromFile2[128];
- new missionname[64];
- format(missionname, sizeof(missionname), "%s.mis",name);
- new File: file = fopen(missionname, io_read);
- if (file)
- {
- new key[ 256 ] , val[ 256 ];
- new Data[ 256 ];
- while ( fread( file , Data , sizeof( Data ) ) )
- {
- key = ini_GetKey( Data );
- if( strcmp( key , "Title" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kTitle], val, 0, strlen(val), 255); }
- if( strcmp( key , "Maker" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kMaker], val, 0, strlen(val), 255); }
- if( strcmp( key , "Text1" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText1], val, 0, strlen(val), 255); }
- if( strcmp( key , "Text2" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText2], val, 0, strlen(val), 255); }
- if( strcmp( key , "Text3" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText3], val, 0, strlen(val), 255); }
- if( strcmp( key , "Text4" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText4], val, 0, strlen(val), 255); }
- if( strcmp( key , "Text5" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText5], val, 0, strlen(val), 255); }
- if( strcmp( key , "Text6" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText6], val, 0, strlen(val), 255); }
- if( strcmp( key , "Text7" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText7], val, 0, strlen(val), 255); }
- if( strcmp( key , "Text8" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText8], val, 0, strlen(val), 255); }
- if( strcmp( key , "Text9" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText9], val, 0, strlen(val), 255); }
- if( strcmp( key , "Text10" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText10], val, 0, strlen(val), 255); }
- if( strcmp( key , "Text11" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText11], val, 0, strlen(val), 255); }
- if( strcmp( key , "Text12" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText12], val, 0, strlen(val), 255); }
- if( strcmp( key , "Text13" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText13], val, 0, strlen(val), 255); }
- if( strcmp( key , "Text14" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText14], val, 0, strlen(val), 255); }
- if( strcmp( key , "Text15" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText15], val, 0, strlen(val), 255); }
- if( strcmp( key , "Text16" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText16], val, 0, strlen(val), 255); }
- if( strcmp( key , "Text17" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText17], val, 0, strlen(val), 255); }
- if( strcmp( key , "Text18" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText18], val, 0, strlen(val), 255); }
- if( strcmp( key , "GText1" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kGText1], val, 0, strlen(val), 255); }
- if( strcmp( key , "GText2" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kGText2], val, 0, strlen(val), 255); }
- if( strcmp( key , "GText3" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kGText3], val, 0, strlen(val), 255); }
- if( strcmp( key , "GText4" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kGText4], val, 0, strlen(val), 255); }
- if( strcmp( key , "GText5" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kGText5], val, 0, strlen(val), 255); }
- if( strcmp( key , "GText6" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kGText6], val, 0, strlen(val), 255); }
- if( strcmp( key , "CP1X" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP1][0] = floatstr( val ); }
- if( strcmp( key , "CP1Y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP1][1] = floatstr( val ); }
- if( strcmp( key , "CP1Z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP1][2] = floatstr( val ); }
- if( strcmp( key , "CP2X" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP2][0] = floatstr( val ); }
- if( strcmp( key , "CP2Y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP2][1] = floatstr( val ); }
- if( strcmp( key , "CP2Z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP2][2] = floatstr( val ); }
- if( strcmp( key , "CP3X" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP3][0] = floatstr( val ); }
- if( strcmp( key , "CP3Y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP3][1] = floatstr( val ); }
- if( strcmp( key , "CP3Z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP3][2] = floatstr( val ); }
- if( strcmp( key , "CP4X" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP4][0] = floatstr( val ); }
- if( strcmp( key , "CP4Y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP4][1] = floatstr( val ); }
- if( strcmp( key , "CP4Z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP4][2] = floatstr( val ); }
- if( strcmp( key , "CP5X" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP5][0] = floatstr( val ); }
- if( strcmp( key , "CP5Y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP5][1] = floatstr( val ); }
- if( strcmp( key , "CP5Z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP5][2] = floatstr( val ); }
- if( strcmp( key , "CP6X" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP6][0] = floatstr( val ); }
- if( strcmp( key , "CP6Y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP6][1] = floatstr( val ); }
- if( strcmp( key , "CP6Z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP6][2] = floatstr( val ); }
- if( strcmp( key , "Number" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kNumber] = strval( val ); }
- if( strcmp( key , "Reward" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kReward] = strval( val ); }
- if( strcmp( key , "Toggle" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kToggle] = strval( val ); }
- }
- fclose(file);
- format(strFromFile2, sizeof(strFromFile2), "%s Mission Loaded.",name);
- SendClientMessage(playerid, COLOR_GREEN,strFromFile2);
- format(strFromFile2, sizeof(strFromFile2), "Mission Available: %s, By : %s | Reward: $%d",PlayMission[kTitle],PlayMission[kMaker],PlayMission[kReward]);
- SendClientMessageToAll(COLOR_GREEN, strFromFile2);
- MissionPlayable = PlayMission[kNumber];
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREEN,"Mission File not found.");
- }
- }
- return 1;
- }
- public LoadBoxer()
- {
- new arrCoords[3][64];
- new strFromFile2[256];
- new File: file = fopen("boxer.ini", io_read);
- if (file)
- {
- fread(file, strFromFile2);
- split(strFromFile2, arrCoords, ',');
- Titel[TitelWins] = strval(arrCoords[0]);
- strmid(Titel[TitelName], arrCoords[1], 0, strlen(arrCoords[1]), 255);
- Titel[TitelLoses] = strval(arrCoords[2]);
- fclose(file);
- }
- return 1;
- }
- public SaveBoxer()
- {
- new coordsstring[256];
- format(coordsstring, sizeof(coordsstring), "%d,%s,%d", Titel[TitelWins],Titel[TitelName],Titel[TitelLoses]);
- new File: file2 = fopen("boxer.ini", io_write);
- fwrite(file2, coordsstring);
- fclose(file2);
- return 1;
- }
- public LoadStuff()
- {
- new arrCoords[4][64];
- new strFromFile2[256];
- new File: file = fopen("stuff.ini", io_read);
- if (file)
- {
- fread(file, strFromFile2);
- split(strFromFile2, arrCoords, ',');
- Jackpot = strval(arrCoords[0]);
- Tax = strval(arrCoords[1]);
- TaxValue = strval(arrCoords[2]);
- Security = strval(arrCoords[3]);
- fclose(file);
- if(Security == 0 || Security == 1)
- {
- }
- else
- {
- GameModeExit();
- }
- }
- else
- {
- GameModeExit();
- }
- return 1;
- }
- public SaveStuff()
- {
- new coordsstring[256];
- format(coordsstring, sizeof(coordsstring), "%d,%d,%d,%d", Jackpot,Tax,TaxValue,Security);
- new File: file2 = fopen("stuff.ini", io_write);
- fwrite(file2, coordsstring);
- fclose(file2);
- return 1;
- }
- public LoadIRC()
- {
- new arrCoords[5][64];
- new strFromFile2[256];
- new File: file = fopen("channels.cfg", io_read);
- if (file)
- {
- new idx;
- while (idx < sizeof(IRCInfo))
- {
- fread(file, strFromFile2);
- split(strFromFile2, arrCoords, '|');
- strmid(IRCInfo[idx][iAdmin], arrCoords[0], 0, strlen(arrCoords[0]), 255);
- strmid(IRCInfo[idx][iMOTD], arrCoords[1], 0, strlen(arrCoords[1]), 255);
- strmid(IRCInfo[idx][iPassword], arrCoords[2], 0, strlen(arrCoords[2]), 255);
- IRCInfo[idx][iNeedPass] = strval(arrCoords[3]);
- IRCInfo[idx][iLock] = strval(arrCoords[4]);
- printf("IRC:%d Admin:%s MOTD: %s Password: %s NeedPass: %d Lock: %d",idx,IRCInfo[idx][iAdmin],IRCInfo[idx][iMOTD],IRCInfo[idx][iPassword],IRCInfo[idx][iNeedPass],IRCInfo[idx][iLock]);
- idx++;
- }
- fclose(file);
- }
- return 1;
- }
- public SaveIRC()
- {
- new idx;
- new File: file2;
- while (idx < sizeof(IRCInfo))
- {
- new coordsstring[256];
- format(coordsstring, sizeof(coordsstring), "%s|%s|%s|%d|%d\n",
- IRCInfo[idx][iAdmin],
- IRCInfo[idx][iMOTD],
- IRCInfo[idx][iPassword],
- IRCInfo[idx][iNeedPass],
- IRCInfo[idx][iLock]);
- if(idx == 0)
- {
- file2 = fopen("channels.cfg", io_write);
- }
- else
- {
- file2 = fopen("channels.cfg", io_append);
- }
- fwrite(file2, coordsstring);
- idx++;
- fclose(file2);
- }
- return 1;
- }
- public LoadTurfs()
- {
- new arrCoords[6][64];
- new strFromFile2[256];
- new File: file = fopen("turfs.cfg", io_read);
- if (file)
- {
- new idx;
- while (idx < sizeof(TurfInfo))
- {
- fread(file, strFromFile2);
- split(strFromFile2, arrCoords, '|');
- strmid(TurfInfo[idx][zOwner], arrCoords[0], 0, strlen(arrCoords[0]), 255);
- strmid(TurfInfo[idx][zColor], arrCoords[1], 0, strlen(arrCoords[1]), 255);
- TurfInfo[idx][zMinX] = floatstr(arrCoords[2]);
- TurfInfo[idx][zMinY] = floatstr(arrCoords[3]);
- TurfInfo[idx][zMaxX] = floatstr(arrCoords[4]);
- TurfInfo[idx][zMaxY] = floatstr(arrCoords[5]);
- //printf("Turf:%d Name: %s Owner:%s MinX:%f MinY:%f MinZ:%f MaxX:%f MaxY:%f MaxZ:%f\n",
- //idx,TurfInfo[idx][zName],TurfInfo[idx][zOwner],TurfInfo[idx][zMinX],TurfInfo[idx][zMinY],TurfInfo[idx][zMinZ],TurfInfo[idx][zMaxX],TurfInfo[idx][zMaxY],TurfInfo[idx][zMaxZ]);
- idx++;
- }
- fclose(file);
- }
- return 1;
- }
- public SaveTurfs()
- {
- new idx;
- new File: file2;
- while (idx < sizeof(TurfInfo))
- {
- new coordsstring[256];
- format(coordsstring, sizeof(coordsstring), "%s|%s|%f|%f|%f|%f|%f|%f\n",
- TurfInfo[idx][zOwner],
- TurfInfo[idx][zColor],
- TurfInfo[idx][zMinX],
- TurfInfo[idx][zMinY],
- TurfInfo[idx][zMaxX],
- TurfInfo[idx][zMaxY]);
- if(idx == 0)
- {
- file2 = fopen("turfs.cfg", io_write);
- }
- else
- {
- file2 = fopen("turfs.cfg", io_append);
- }
- fwrite(file2, coordsstring);
- idx++;
- fclose(file2);
- }
- return 1;
- }
- public LoadCK()
- {
- new arrCoords[3][64];
- new strFromFile2[256];
- new File: file = fopen("ck.cfg", io_read);
- if (file)
- {
- new idx;
- while (idx < sizeof(CKInfo))
- {
- fread(file, strFromFile2);
- split(strFromFile2, arrCoords, '|');
- strmid(CKInfo[idx][cSendername], arrCoords[0], 0, strlen(arrCoords[0]), 255);
- strmid(CKInfo[idx][cGiveplayer], arrCoords[1], 0, strlen(arrCoords[1]), 255);
- CKInfo[idx][cUsed] = strval(arrCoords[2]);
- printf("CK:%d Taken: %d Sendername:%s Giveplayer: %s",
- idx,CKInfo[idx][cUsed],CKInfo[idx][cSendername],CKInfo[idx][cGiveplayer]);
- idx++;
- }
- fclose(file);
- }
- return 1;
- }
- public SaveCK()
- {
- new idx;
- new File: file2;
- while (idx < sizeof(CKInfo))
- {
- new coordsstring[256];
- format(coordsstring, sizeof(coordsstring), "%s|%s|%d\n",
- CKInfo[idx][cSendername],
- CKInfo[idx][cGiveplayer],
- CKInfo[idx][cUsed]);
- if(idx == 0)
- {
- file2 = fopen("ck.cfg", io_write);
- }
- else
- {
- file2 = fopen("ck.cfg", io_append);
- }
- fwrite(file2, coordsstring);
- idx++;
- fclose(file2);
- }
- return 1;
- }
- public LoadFamilies()
- {
- new arrCoords[11][64];
- new strFromFile2[256];
- new File: file = fopen("families.cfg", io_read);
- if (file)
- {
- new idx;
- while (idx < sizeof(FamilyInfo))
- {
- fread(file, strFromFile2);
- split(strFromFile2, arrCoords, '|');
- FamilyInfo[idx][FamilyTaken] = strval(arrCoords[0]);
- strmid(FamilyInfo[idx][FamilyName], arrCoords[1], 0, strlen(arrCoords[1]), 255);
- strmid(FamilyInfo[idx][FamilyMOTD], arrCoords[2], 0, strlen(arrCoords[2]), 255);
- strmid(FamilyInfo[idx][FamilyColor], arrCoords[3], 0, strlen(arrCoords[3]), 255);
- strmid(FamilyInfo[idx][FamilyLeader], arrCoords[4], 0, strlen(arrCoords[4]), 255);
- FamilyInfo[idx][FamilyMembers] = strval(arrCoords[5]);
- FamilyInfo[idx][FamilySpawn][0] = floatstr(arrCoords[6]);
- FamilyInfo[idx][FamilySpawn][1] = floatstr(arrCoords[7]);
- FamilyInfo[idx][FamilySpawn][2] = floatstr(arrCoords[8]);
- FamilyInfo[idx][FamilySpawn][3] = floatstr(arrCoords[9]);
- FamilyInfo[idx][FamilyInterior] = strval(arrCoords[10]);
- printf("Family:%d Taken: %d Name:%s MOTD:%s Leader:%s Members:%d SpawnX:%f SpawnY:%f SpawnZ:%f Int:%d",
- idx,FamilyInfo[idx][FamilyTaken],FamilyInfo[idx][FamilyName],FamilyInfo[idx][FamilyMOTD],FamilyInfo[idx][FamilyLeader],FamilyInfo[idx][FamilyMembers],FamilyInfo[idx][FamilySpawn][0],FamilyInfo[idx][FamilySpawn][1],FamilyInfo[idx][FamilySpawn][2],FamilyInfo[idx][FamilyInterior]);
- idx++;
- }
- fclose(file);
- }
- return 1;
- }
- public SaveFamilies()
- {
- new idx;
- new File: file2;
- while (idx < sizeof(FamilyInfo))
- {
- new coordsstring[256];
- format(coordsstring, sizeof(coordsstring), "%d|%s|%s|%s|%s|%d|%f|%f|%f|%f|%d\n",
- FamilyInfo[idx][FamilyTaken],
- FamilyInfo[idx][FamilyName],
- FamilyInfo[idx][FamilyMOTD],
- FamilyInfo[idx][FamilyColor],
- FamilyInfo[idx][FamilyLeader],
- FamilyInfo[idx][FamilyMembers],
- FamilyInfo[idx][FamilySpawn][0],
- FamilyInfo[idx][FamilySpawn][1],
- FamilyInfo[idx][FamilySpawn][2],
- FamilyInfo[idx][FamilySpawn][3],
- FamilyInfo[idx][FamilyInterior]);
- if(idx == 0)
- {
- file2 = fopen("families.cfg", io_write);
- }
- else
- {
- file2 = fopen("families.cfg", io_append);
- }
- fwrite(file2, coordsstring);
- idx++;
- fclose(file2);
- }
- return 1;
- }
- public LoadPapers()
- {
- new arrCoords[11][64];
- new strFromFile2[256];
- new File: file = fopen("papers.cfg", io_read);
- if (file)
- {
- new idx;
- while (idx < sizeof(PaperInfo))
- {
- fread(file, strFromFile2);
- split(strFromFile2, arrCoords, '|');
- PaperInfo[idx][PaperUsed] = strval(arrCoords[0]);
- strmid(PaperInfo[idx][PaperMaker], arrCoords[1], 0, strlen(arrCoords[1]), 255);
- strmid(PaperInfo[idx][PaperTitle], arrCoords[2], 0, strlen(arrCoords[2]), 255);
- strmid(PaperInfo[idx][PaperText1], arrCoords[3], 0, strlen(arrCoords[3]), 255);
- strmid(PaperInfo[idx][PaperText2], arrCoords[4], 0, strlen(arrCoords[4]), 255);
- strmid(PaperInfo[idx][PaperText3], arrCoords[5], 0, strlen(arrCoords[5]), 255);
- strmid(PaperInfo[idx][PaperText4], arrCoords[6], 0, strlen(arrCoords[6]), 255);
- strmid(PaperInfo[idx][PaperText5], arrCoords[7], 0, strlen(arrCoords[7]), 255);
- strmid(PaperInfo[idx][PaperText6], arrCoords[8], 0, strlen(arrCoords[8]), 255);
- strmid(PaperInfo[idx][PaperText7], arrCoords[9], 0, strlen(arrCoords[9]), 255);
- PaperInfo[idx][SafeSaving] = strval(arrCoords[10]);
- printf("Paper:%d Used: %d Maker:%s Title: %s Text1: %s Text2: %s Text3: %s Text4: %s Text5: %s Text6: %s Text7: %s",
- idx,PaperInfo[idx][PaperUsed],PaperInfo[idx][PaperMaker],PaperInfo[idx][PaperTitle],PaperInfo[idx][PaperText1],PaperInfo[idx][PaperText2],PaperInfo[idx][PaperText3],PaperInfo[idx][PaperText4],PaperInfo[idx][PaperText5],PaperInfo[idx][PaperText6],PaperInfo[idx][PaperText7]);
- idx++;
- }
- fclose(file);
- }
- return 1;
- }
- public SavePapers()
- {
- new idx;
- new File: file2;
- while (idx < sizeof(IRCInfo))
- {
- new coordsstring[256];
- format(coordsstring, sizeof(coordsstring), "%d|%s|%s|%s|%s|%s|%s|%s|%s|%s|%d\n",
- PaperInfo[idx][PaperUsed],
- PaperInfo[idx][PaperMaker],
- PaperInfo[idx][PaperTitle],
- PaperInfo[idx][PaperText1],
- PaperInfo[idx][PaperText2],
- PaperInfo[idx][PaperText3],
- PaperInfo[idx][PaperText4],
- PaperInfo[idx][PaperText5],
- PaperInfo[idx][PaperText6],
- PaperInfo[idx][PaperText7],
- PaperInfo[idx][SafeSaving]);
- if(idx == 0)
- {
- file2 = fopen("papers.cfg", io_write);
- }
- else
- {
- file2 = fopen("papers.cfg", io_append);
- }
- fwrite(file2, coordsstring);
- idx++;
- fclose(file2);
- }
- return 1;
- }
- public LoadProperty()
- {
- new arrCoords[29][64];
- new strFromFile2[256];
- new File: file = fopen("property.cfg", io_read);
- if (file)
- {
- new idx;
- while (idx < sizeof(HouseInfo))
- {
- fread(file, strFromFile2);
- split(strFromFile2, arrCoords, ',');
- HouseInfo[idx][hEntrancex] = floatstr(arrCoords[0]);
- HouseInfo[idx][hEntrancey] = floatstr(arrCoords[1]);
- HouseInfo[idx][hEntrancez] = floatstr(arrCoords[2]);
- HouseInfo[idx][hExitx] = floatstr(arrCoords[3]);
- HouseInfo[idx][hExity] = floatstr(arrCoords[4]);
- HouseInfo[idx][hExitz] = floatstr(arrCoords[5]);
- HouseInfo[idx][hHealthx] = strval(arrCoords[6]);
- HouseInfo[idx][hHealthy] = strval(arrCoords[7]);
- HouseInfo[idx][hHealthz] = strval(arrCoords[8]);
- HouseInfo[idx][hArmourx] = strval(arrCoords[9]);
- HouseInfo[idx][hArmoury] = strval(arrCoords[10]);
- HouseInfo[idx][hArmourz] = strval(arrCoords[11]);
- //printf("HouseInfo hEntrancez %f",HouseInfo[idx][hEntrancez]);
- strmid(HouseInfo[idx][hOwner], arrCoords[12], 0, strlen(arrCoords[12]), 255);
- strmid(HouseInfo[idx][hDiscription], arrCoords[13], 0, strlen(arrCoords[13]), 255);
- HouseInfo[idx][hValue] = strval(arrCoords[14]);
- HouseInfo[idx][hHel] = strval(arrCoords[15]);
- HouseInfo[idx][hArm] = strval(arrCoords[16]);
- HouseInfo[idx][hInt] = strval(arrCoords[17]);
- HouseInfo[idx][hLock] = strval(arrCoords[18]);
- HouseInfo[idx][hOwned] = strval(arrCoords[19]);
- HouseInfo[idx][hRooms] = strval(arrCoords[20]);
- HouseInfo[idx][hRent] = strval(arrCoords[21]);
- HouseInfo[idx][hRentabil] = strval(arrCoords[22]);
- HouseInfo[idx][hTakings] = strval(arrCoords[23]);
- HouseInfo[idx][hVec] = strval(arrCoords[24]);
- if(HouseInfo[idx][hVec] == 457)
- {
- HouseInfo[idx][hVec] = 411;
- }
- HouseInfo[idx][hVcol1] = strval(arrCoords[25]);
- HouseInfo[idx][hVcol2] = strval(arrCoords[26]);
- HouseInfo[idx][hDate] = strval(arrCoords[27]);
- HouseInfo[idx][hLevel] = strval(arrCoords[28]);
- printf("HouseInfo:%d Owner:%s hTakings %d hVec %d",idx,HouseInfo[idx][hOwner],HouseInfo[idx][hTakings],HouseInfo[idx][hVec]);
- idx++;
- }
- fclose(file);
- }
- return 1;
- }
- public LoadBizz()
- {
- new arrCoords[19][64];
- new strFromFile2[256];
- new File: file = fopen("bizz.cfg", io_read);
- if (file)
- {
- new idx;
- while (idx < sizeof(BizzInfo))
- {
- fread(file, strFromFile2);
- split(strFromFile2, arrCoords, '|');
- BizzInfo[idx][bOwned] = strval(arrCoords[0]);
- strmid(BizzInfo[idx][bOwner], arrCoords[1], 0, strlen(arrCoords[1]), 255);
- strmid(BizzInfo[idx][bMessage], arrCoords[2], 0, strlen(arrCoords[2]), 255);
- strmid(BizzInfo[idx][bExtortion], arrCoords[3], 0, strlen(arrCoords[3]), 255);
- BizzInfo[idx][bEntranceX] = floatstr(arrCoords[4]);
- BizzInfo[idx][bEntranceY] = floatstr(arrCoords[5]);
- BizzInfo[idx][bEntranceZ] = floatstr(arrCoords[6]);
- BizzInfo[idx][bExitX] = floatstr(arrCoords[7]);
- BizzInfo[idx][bExitY] = floatstr(arrCoords[8]);
- BizzInfo[idx][bExitZ] = floatstr(arrCoords[9]);
- BizzInfo[idx][bLevelNeeded] = strval(arrCoords[10]);
- BizzInfo[idx][bBuyPrice] = strval(arrCoords[11]);
- BizzInfo[idx][bEntranceCost] = strval(arrCoords[12]);
- BizzInfo[idx][bTill] = strval(arrCoords[13]);
- BizzInfo[idx][bLocked] = strval(arrCoords[14]);
- BizzInfo[idx][bInterior] = strval(arrCoords[15]);
- BizzInfo[idx][bProducts] = strval(arrCoords[16]);
- BizzInfo[idx][bMaxProducts] = strval(arrCoords[17]);
- BizzInfo[idx][bPriceProd] = strval(arrCoords[18]);
- printf("BizzInfo:%d Owner:%s Message:%s Entfee:%d Till:%d Products:%d/%d Interior:%d.\n",
- idx,
- BizzInfo[idx][bOwner],
- BizzInfo[idx][bMessage],
- BizzInfo[idx][bEntranceCost],
- BizzInfo[idx][bTill],
- BizzInfo[idx][bProducts],
- BizzInfo[idx][bMaxProducts],
- BizzInfo[idx][bInterior]);
- idx++;
- }
- fclose(file);
- }
- return 1;
- }
- public LoadSBizz()
- {
- new arrCoords[16][64];
- new strFromFile2[256];
- new File: file = fopen("sbizz.cfg", io_read);
- if (file)
- {
- new idx;
- while (idx < sizeof(SBizzInfo))
- {
- fread(file, strFromFile2);
- split(strFromFile2, arrCoords, '|');
- SBizzInfo[idx][sbOwned] = strval(arrCoords[0]);
- strmid(SBizzInfo[idx][sbOwner], arrCoords[1], 0, strlen(arrCoords[1]), 255);
- strmid(SBizzInfo[idx][sbMessage], arrCoords[2], 0, strlen(arrCoords[2]), 255);
- strmid(SBizzInfo[idx][sbExtortion], arrCoords[3], 0, strlen(arrCoords[3]), 255);
- SBizzInfo[idx][sbEntranceX] = floatstr(arrCoords[4]);
- SBizzInfo[idx][sbEntranceY] = floatstr(arrCoords[5]);
- SBizzInfo[idx][sbEntranceZ] = floatstr(arrCoords[6]);
- SBizzInfo[idx][sbLevelNeeded] = strval(arrCoords[7]);
- SBizzInfo[idx][sbBuyPrice] = strval(arrCoords[8]);
- SBizzInfo[idx][sbEntranceCost] = strval(arrCoords[9]);
- SBizzInfo[idx][sbTill] = strval(arrCoords[10]);
- SBizzInfo[idx][sbLocked] = strval(arrCoords[11]);
- SBizzInfo[idx][sbInterior] = strval(arrCoords[12]);
- SBizzInfo[idx][sbProducts] = strval(arrCoords[13]);
- SBizzInfo[idx][sbMaxProducts] = strval(arrCoords[14]);
- SBizzInfo[idx][sbPriceProd] = strval(arrCoords[15]);
- printf("SBizzInfo:%d Owner:%s Message:%s Entfee:%d Till:%d Products:%d/%d Interior:%d.\n",
- idx,
- SBizzInfo[idx][sbOwner],
- SBizzInfo[idx][sbMessage],
- SBizzInfo[idx][sbEntranceCost],
- SBizzInfo[idx][sbTill],
- SBizzInfo[idx][sbProducts],
- SBizzInfo[idx][sbMaxProducts],
- SBizzInfo[idx][sbInterior]);
- idx++;
- }
- fclose(file);
- }
- return 1;
- }
- //------------------------------------------------------------------------------------------------------
- public OnGameModeInit()
- {
- new string[MAX_PLAYER_NAME];
- new string1[MAX_PLAYER_NAME];
- for(new c=0;c<CAR_AMOUNT;c++)
- {
- Gas[c] = GasMax;
- }
- LoadProperty();
- LoadBizz();
- LoadSBizz();
- LoadBoxer();
- LoadStuff();
- LoadIRC();
- LoadFamilies();
- LoadCK();
- LoadTurfs();
- LoadPapers();
- IRCInfo[0][iPlayers] = 0; IRCInfo[1][iPlayers] = 0; IRCInfo[2][iPlayers] = 0;
- IRCInfo[3][iPlayers] = 0; IRCInfo[4][iPlayers] = 0; IRCInfo[5][iPlayers] = 0;
- IRCInfo[6][iPlayers] = 0; IRCInfo[7][iPlayers] = 0; IRCInfo[8][iPlayers] = 0;
- IRCInfo[9][iPlayers] = 0;
- News[hTaken1] = 0; News[hTaken2] = 0; News[hTaken3] = 0; News[hTaken4] = 0; News[hTaken5] = 0;
- format(string, sizeof(string), "Nothing");
- strmid(News[hAdd1], string, 0, strlen(string), 255);
- strmid(News[hAdd2], string, 0, strlen(string), 255);
- strmid(News[hAdd3], string, 0, strlen(string), 255);
- strmid(News[hAdd4], string, 0, strlen(string), 255);
- strmid(News[hAdd5], string, 0, strlen(string), 255);
- format(string1, sizeof(string1), "No-one");
- strmid(News[hContact1], string1, 0, strlen(string1), 255);
- strmid(News[hContact2], string1, 0, strlen(string1), 255);
- strmid(News[hContact3], string1, 0, strlen(string1), 255);
- strmid(News[hContact4], string1, 0, strlen(string1), 255);
- strmid(News[hContact5], string1, 0, strlen(string1), 255);
- PlayerHaul[78][pCapasity] = 100;
- PlayerHaul[79][pCapasity] = 100;
- PlayerHaul[80][pCapasity] = 50;
- PlayerHaul[81][pCapasity] = 50;
- SetGameModeText("The Godfather: LS/SF");
- format(objstore, sizeof(objstore), "MOLE: I got nothing, check back with me later.");
- format(cbjstore, sizeof(cbjstore), "HQ: There is nothing in your Vicinity, Out.");
- format(motd, sizeof(motd), "Welcome to the Role Play - The Godfather Server.");
- gettime(ghour, gminute, gsecond);
- FixHour(ghour);
- ghour = shifthour;
- if(!realtime)
- {
- SetWorldTime(wtime);
- }
- SetPDistance(10);
- EnableTirePopping(1);
- EnableZoneNames(1);
- AllowInteriorWeapons(1);
- AllowAdminTeleport(1);
- UsePlayerPedAnims();
- // CreatedCars check
- for(new i = 0; i < sizeof(CreatedCars); i++)
- {
- CreatedCars[i] = 0;
- }
- // Zones
- for(new i = 0; i < sizeof(TurfInfo); i++)
- {
- Turfs[i] = GangZoneCreate(TurfInfo[i][zMinX],TurfInfo[i][zMinY],TurfInfo[i][zMaxX],TurfInfo[i][zMaxY]);
- }
- // Player Class's
- for(new i = 0; i <= sizeof(Peds)-1; i++)
- {
- AddPlayerClass(Peds[i][0],1958.3783,1343.1572,1100.3746,269.1425,-1,-1,-1,-1,-1,-1);
- }
- // Car Spawns
- for(new h = 0; h < sizeof(HouseInfo); h++)
- {
- AddStaticVehicleEx(HouseInfo[h][hVec], HouseCarSpawns[h][0], HouseCarSpawns[h][1], HouseCarSpawns[h][2], HouseCarSpawns[h][3], HouseInfo[h][hVcol1], HouseInfo[h][hVcol2], 60000);
- gCarLock[h+1] = 1;
- }//34
- AddStaticVehicleEx(596,-1381.9910,457.0832,6.9837,0.1452, 44, 86, 60000);/*Patriot cruiser*/
- AddStaticVehicleEx(596,1558.392000,-1710.859000,5.466783,1.0, -1, -1, 60000);/*CopCruiser*/
- AddStaticVehicleEx(596,1569.639000,-1710.859000,5.466783,1.0, -1, -1, 60000);/*CopCruiser*/
- AddStaticVehicleEx(596,-2139.1995,-2393.7671,30.3452,140.7012, 0, 0, 60000);/*CopCruiser*/
- AddStaticVehicleEx(425,-1279.8262,493.3734,18.0309,219.1345, -1, -1, 60000);/*Hunter*/
- AddStaticVehicleEx(425,-1291.0063,492.3819,18.0305,223.8306, -1, -1, 60000);/*Hunter*/
- AddStaticVehicleEx(596,1601.308000,-1621.916000,13.056540,90.0, -1, -1, 60000);/*CopCruiser*/
- AddStaticVehicleEx(596,1535.8275,-1678.0283,13.1680,359.9876, -1, -1, 60000);/*CopCruiser*/
- AddStaticVehicleEx(596,1561.860000,-1694.905000,6.139762,222.0,-1, -1, 60000);/*CopCruiser*/
- AddStaticVehicleEx(470,-1375.1555,457.5534,6.9837,359.8331,-1, -1, 60000);/*Patriot*/
- AddStaticVehicleEx(467,1067.1295,-295.5681,73.7826,179.6040, 90, -1, 60000);/*Hitman Oceanic*/
- AddStaticVehicleEx(467,1077.3829,-295.1148,73.7812,180.2754, 90, -1, 60000);/*Hitman Oceanic*/
- AddStaticVehicleEx(596,614.8,-588.5,17.4,240.0, -1, -1, 60000);/*CopCruiser*/
- AddStaticVehicleEx(596,635.1,-561.5,16.5,180.0, -1, -1, 60000);/*CopCruiser*/
- AddStaticVehicleEx(596,-2177.5759,-2362.5042,30.4296,141.0939, 0, 0, 60000);/*CopCruiser*/
- AddStaticVehicleEx(490,1539.392000,-1646.262000,6.274928,180.0, -1, -1, 60000);/*FBI Rancher*/
- AddStaticVehicleEx(490,1531.254000,-1647.431000,6.274976,200.0, -1, -1, 60000);/*FBI Rancher*/
- AddStaticVehicleEx(470,-1363.1493,457.1042,6.9836,359.6740, -1, -1, 60000);/*Patriot*/
- AddStaticVehicleEx(470,-1355.5931,456.7297,6.9836,0.0286, -1, -1, 60000);/*Patriot*/
- AddStaticVehicleEx(596,1535.8459,-1668.7560,13.2653,359.7447,-1, -1, 60000);/*CopCruiser*/
- AddStaticVehicleEx(407,-2550.1443,610.7148,14.3281,90.6597, -1, -1, 60000);/*FireTruck*/
- AddStaticVehicleEx(596,-2181.2766,-2375.6953,30.3405,231.7148, 0, 0, 60000);/*CopCruiser*/
- AddStaticVehicleEx(596,1545.7845,-1684.4004,5.6342,271.1593, 89, 1, 60000);/*General Car*/
- AddStaticVehicleEx(596,1530.1611,-1676.0326,5.4563,231.7766, 89, 1, 60000);/*General Car*/
- AddStaticVehicleEx(407,-2551.8792,587.1581,14.3281,90.4374,-1, -1, 60000);/*FireTruck*/
- AddStaticVehicleEx(497, 1517.8,-1656.1,13.7,0.0, -1, -1, 60000);/*Police Maveric*/
- AddStaticVehicleEx(416,-2637.0630,617.3499,14.3281,90.1464, -1, -1, 60000);/*Ambulance*/
- AddStaticVehicleEx(416,-2661.4282,617.3460,14.3288,89.2072, -1, -1, 60000);/*Ambulance*/
- AddStaticVehicleEx(416,-2662.4568,595.3354,14.3281,273.2716, -1, -1, 60000);/*Ambulance*/
- AddStaticVehicleEx(431,1172.5,-1795.5,13.1,0.0, -1, -1, 60000);//64/*Bus*/
- AddStaticVehicleEx(431,1182.1,-1795.9,13.1,0.0, -1, -1, 60000);//65/*Bus*/
- AddStaticVehicleEx(430,-1443.4342,427.0862,-0.6994,268.8489,-1, -1, 60000);/*NG BOAT*/
- AddStaticVehicleEx(430,-1442.0721,390.6206,-0.4339,270.1023,-1, -1, 60000);/*NG BOAT*/
- AddStaticVehicleEx(467,1071.9189,-294.9166,73.7250,178.9444,90, -1, 60000);//68/*Hitman Oceanic*/
- AddStaticVehicleEx(405,-2082.3562,-117.3896,34.9299,177.0056,17, 17, 60000);//69 Driving School /*Sentinel*/
- AddStaticVehicleEx(405,-2072.5933,-117.4564,34.9383,178.0982,17, 17, 60000);//Driving School/*Sentinel*/
- AddStaticVehicleEx(405,-2062.4253,-117.6652,34.9347,180.8394,17, 17, 60000);//Driving School/*Sentinel*/
- AddStaticVehicleEx(434,551.7929,-1285.5260,16.9303,0.4147,-1, -1, 60000);//Rent car/*Hotknife*/
- AddStaticVehicleEx(568,536.9888,-1286.5275,16.9993,359.1704,-1, -1, 60000); //Rent car/*Bandito*/
- AddStaticVehicleEx(434,544.1793,-1286.1422,16.9492,7.3116,-1, -1, 60000);//Rent car/*Hotknife*/
- AddStaticVehicleEx(434,-1949.9493,258.1949,35.1922,70.7581,-1, -1, 60000); //Rent car/*Hotknife*/
- AddStaticVehicleEx(568,-1948.1650,264.8094,35.1930,72.6982,-1, -1, 60000); //Rent car/*Bandito*/
- AddStaticVehicleEx(434,-1947.0601,270.3815,35.1954,66.0783,-1, -1, 60000); //Rent car/*Hotknife*/
- AddStaticVehicleEx(456,2795.2,-2417.8,13.4,90.8,-1,-1,60000);//Component Truck/*Yankee*/
- AddStaticVehicleEx(456,2783.9,-2417.9,13.4,90.8,-1,-1,60000);//Component Truck/*Yankee*/
- AddStaticVehicleEx(440,2794.1,-2455.9,13.4,90.8,-1,-1,60000);//Component Truck/*Rumpo*/
- AddStaticVehicleEx(440,2782.9,-2455.6,13.4,90.8,-1,-1,60000);//Component Truck/*Rumpo*/
- AddStaticVehicleEx(420,-1986.4958,115.9394,27.3324,0.1277,-1, -1, 60000);//Taxi/*Taxi*/
- AddStaticVehicleEx(487,-2703.3201,624.0250,14.1766,180.2649, 1, 3, 60000);//Medic Chopper/*Maverick*/
- AddStaticVehicleEx(420,-1986.5049,129.1749,27.3299,359.6938,-1, -1, 60000);//Taxi/*Taxi*/
- AddStaticVehicleEx(420,-1986.4310,150.1195,27.3299,0.0329,-1, -1, 60000);//Taxi //CAR ID 85/*Taxi*/
- AddStaticVehicleEx(452,720.1,-1694.0,-0.4,179.4,-1,-1,60000);//Fishboat/*Speeder*/
- AddStaticVehicleEx(452,721.2,-1629.4,-0.4,180.9,-1,-1,60000);//Fishboat/*Speeder*/
- AddStaticVehicleEx(452,739.5,-1670.5,-0.6,177.5,-1,-1,60000);//Fishboat/*Speeder*/
- AddStaticVehicleEx(452,-1474.4949,693.0169,0.1996,0.0751,-1,-1,60000);//Fishboat SF/*Speeder*/
- AddStaticVehicleEx(452,-1720.0717,1439.6177,-0.4913,357.6789,-1,-1,60000);//Fishboat SF/*Speeder*/
- AddStaticVehicleEx(520,-1430.4078,508.1596,18.9400,269.6329,44,86,60000);//NG Plane id 91
- AddStaticVehicleEx(520,-1419.9038,493.5340,18.9350,269.6848,44,86,60000);//NG Plane id 92
- AddStaticVehicleEx(520,-1398.6207,507.7513,18.9328,269.8143,44,86,60000); //NG Plane id 93
- AddStaticVehicleEx(420,-1986.6089,163.8508,27.4837,359.5881,-1,-1,60000);//Taxi
- AddStaticVehicleEx(487,1088.1736,-294.8004,73.7886,134.9237, 0, 1, 60000); //Hitman Chopper
- AddStaticVehicleEx(488,-2044.1797,479.9963,35.1399,180.0648,-1,-1,60000); // newschopper
- AddStaticVehicleEx(582,-2022.6146,458.6767,35.1414,0.7133,-1,-1,60000); // newsvan
- AddStaticVehicleEx(582,-2031.3779,459.0133,35.1362,359.7429,-1,-1,60000); // newsvan
- AddStaticVehicleEx(593,382.5172,2536.9561,16.5338,179.7261,-1,-1,60000);//Flyschool
- AddStaticVehicleEx(513,348.3660,2536.9792,16.7418,178.8195,-1,-1,60000);//Flyschool
- AddStaticVehicleEx(487,365.4068,2537.0327,16.6645,181.9959,-1,-1,60000);//Flyschool
- AddStaticVehicleEx(593,-1429.2843,-505.8203,13.7824,205.7709,-1,-1,60000);//Airport SF
- AddStaticVehicleEx(593,-1462.4779,-524.2803,13.7832,204.8137,-1,-1,60000);//Airport SF
- AddStaticVehicleEx(593,1907.7614,-2624.4097,13.5416,53.1810,-1,-1,60000);//Airport LS
- AddStaticVehicleEx(593,1887.0736,-2627.6543,13.5394,52.6116,-1,-1,60000);//Airport LS
- AddStaticVehicleEx(513,-1354.3270,-466.5467,13.7827,162.0134,-1,-1,60000);//Airport SF
- AddStaticVehicleEx(513,-1390.3510,-482.7985,13.7883,250.3124,-1,-1,60000);//Airport SF
- AddStaticVehicleEx(513,1835.3215,-2624.1938,13.5405,56.0569,-1,-1,60000);//Airport LS
- AddStaticVehicleEx(513,1813.2893,-2625.6296,13.5394,53.2858,-1,-1,60000);//Airport LS
- AddStaticVehicleEx(571,2286.2141,-2354.5000,12.8306,225.8705,-1,-1,60000); // kart
- AddStaticVehicleEx(571,2279.9412,-2348.4141,12.8312,225.8585,-1,-1,60000); // kart
- AddStaticVehicleEx(571,2291.7932,-2345.5356,12.8305,227.3060,-1,-1,60000); // kart
- AddStaticVehicleEx(571,2287.5615,-2341.6433,12.8306,226.5350,-1,-1,60000); // kart
- AddStaticVehicleEx(571,2299.6785,-2338.3186,12.8307,224.3563,-1,-1,60000); // kart
- AddStaticVehicleEx(571,2295.3887,-2334.9448,12.8307,227.9102,-1,-1,60000); // kart
- CreateVehicle(494,-1401.0436,-210.0052,1042.9913,1.6623,1,0,60000); //hotring 116
- CreateVehicle(494,-1400.4019,-219.9365,1043.0348,5.3554,1,3,60000); //hotring
- CreateVehicle(494,-1394.4932,-207.7917,1042.9963,3.6872,0,6,60000); //hotring
- CreateVehicle(494,-1393.7854,-217.9354,1043.0325,2.9556,1,2,60000); //hotring
- CreateVehicle(468,-1445.6392,-592.3033,1055.7831,90.2133,-1,-1,60000); //bike 120
- CreateVehicle(468,-1433.1708,-592.4930,1055.6533,92.4067,-1,-1,60000); //bike
- CreateVehicle(468,-1448.5325,-584.4943,1055.4949,95.5400,-1,-1,60000); //bike
- CreateVehicle(468,-1434.8973,-585.1266,1055.2488,91.1533,-1,-1,60000); //bike
- CreateVehicle(468,-1449.2814,1610.7823,1052.5313,272.9406,-1,-1,60000); // bike 124
- CreateVehicle(468,-1453.8767,1611.2418,1052.5313,89.0355,-1,-1,60000); // bike
- CreateVehicle(468,-1454.4746,1614.3342,1052.5313,86.8422,-1,-1,60000); // bike
- CreateVehicle(468,-1449.5795,1614.0684,1052.5313,269.2039,-1,-1,60000); // bike
- CreateVehicle(514,-77.5039,-1108.1729,1.6683,161.8915,-1,-1,60000); // truck
- CreateVehicle(514,-72.3507,-1109.7822,1.6670,161.7769,-1,-1,60000); // truck
- CreateVehicle(514,-67.0126,-1111.7156,1.6688,160.4800,-1,-1,60000); // truck
- CreateVehicle(435,-51.0638,-1135.2831,1.0781,68.3320,-1,-1,60000); // trailer
- CreateVehicle(435,-53.6230,-1139.7546,1.0781,67.5604,-1,-1,60000); // trailer
- CreateVehicle(435,-55.0517,-1144.3676,0.8018,68.1347,-1,-1,60000); // trailer
- LinkVehicleToInterior(116, 7);
- LinkVehicleToInterior(117, 7);
- LinkVehicleToInterior(118, 7);
- LinkVehicleToInterior(119, 7);
- LinkVehicleToInterior(120, 4);
- LinkVehicleToInterior(121, 4);
- LinkVehicleToInterior(122, 4);
- LinkVehicleToInterior(123, 4);
- LinkVehicleToInterior(124, 14);
- LinkVehicleToInterior(125, 14);
- LinkVehicleToInterior(126, 14);
- LinkVehicleToInterior(127, 14);
- for(new h = 0; h < sizeof(HouseInfo); h++)
- {
- if(HouseInfo[h][hOwned] == 0)
- {
- AddStaticPickup(1273, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
- pickups++;
- }
- if(HouseInfo[h][hOwned] == 1)
- {
- AddStaticPickup(1239, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
- pickups++;
- }
- }
- for(new h = 0; h < sizeof(BizzInfo); h++)
- {
- if(BizzInfo[h][bOwned] == 0)
- {
- AddStaticPickup(1272, 2, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]);
- pickups++;
- }
- if(BizzInfo[h][bOwned] == 1)
- {
- AddStaticPickup(1239, 2, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]);
- pickups++;
- }
- }
- for(new h = 0; h < sizeof(SBizzInfo); h++)
- {
- if(SBizzInfo[h][sbOwned] == 0)
- {
- AddStaticPickup(1272, 2, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]);
- pickups++;
- }
- if(SBizzInfo[h][sbOwned] == 1)
- {
- AddStaticPickup(1239, 2, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]);
- pickups++;
- }
- }
- AddStaticPickup(1239, 2, 1173.2563,-1323.3102,15.3943); //Hospital 1 near Ammu
- AddStaticPickup(1239, 2, 2029.5945,-1404.6426,17.2512); //Hospital 2 near speedway
- AddStaticPickup(1239, 2, 253.9280,69.6094,1003.6406); //Clear icon in Police Station
- AddStaticPickup(1239, 2, -2162.2554,-2385.9541,30.6250); //City Hall
- AddStaticPickup(1239, 2, 359.5408,206.7693,1008.3828); //Detective Registration
- AddStaticPickup(1239, 2, 347.7374,193.7241,1014.1875); //Lawyer Registration
- AddStaticPickup(1239, 2, 1215.1304,-11.8431,1000.9219); //Whore Registration
- AddStaticPickup(1239, 2, 2166.3772,-1675.3829,15.0859); //DrugDealer Registration
- AddStaticPickup(1239, 2, 1109.3318,-1796.3042,16.5938); //CarJacker Registration
- AddStaticPickup(1239, 2, -2050.8962,460.0262,35.1719); //NewsReporter Registration & /paper
- AddStaticPickup(1239, 2, -2040.9436,456.2395,35.1719); //PaperBoy Registration
- AddStaticPickup(1239, 2, -1932.3859,276.2117,41.0391); //CarMechanic Registration
- AddStaticPickup(1239, 2, 2226.1716,-1718.1792,13.5165); //BodyGuard Registration
- AddStaticPickup(1239, 2, 1366.4325,-1275.2096,13.5469); //ArmsDealer Registration
- AddStaticPickup(1239, 2, 531.7930,-1292.4044,17.2422); //CarDealer Registration
- AddStaticPickup(1239, 2, 766.0804,14.5133,1000.7004); //Boxer Registration
- AddStaticPickup(1239, 2, 1154.2208,-1770.8203,16.5992); //BusDriver Registration
- AddStaticPickup(1239, 2, -77.7288,-1136.3896,1.0781); //Trucker Registration
- AddStaticPickup(1239, 2, 323.0342,1118.5804,1083.8828); //Getting Drugs for DrugDealers
- AddStaticPickup(1239, 2, 1381.0413,-1088.8511,27.3906); //Bill Board (old Job Department)
- AddStaticPickup(1239, 2, 597.1277,-1248.6479,18.2734); //Materials Package building
- AddStaticPickup(1239, 2, -2119.5469,-178.5679,35.3203); //Factory
- AddStaticPickup(1239, 2, 1073.0619,-344.5148,73.9922); //Hitman Agency entrance
- AddStaticPickup(371, 2, 1544.2,-1353.4,329.4); //LS towertop
- AddStaticPickup(371, 2, 1536.0, -1360.0, 1150.0); //LS towertop
- AddStaticPickup(1242, 2, 1527.5,-12.1,1002.0); //binco armor
- AddStaticPickup(1240, 2, 279.3000,1853.5619,8.7649); //area51 health
- pickups=pickups+29;
- printf("Pickups Max = 100, Current Pickups = %d",pickups);
- new randa = random(sizeof(RandCars));
- randa = random(sizeof(RandCars));carselect[0] = RandCars[randa][0];
- randa = random(sizeof(RandCars));carselect[1] = RandCars[randa][0];
- randa = random(sizeof(RandCars));carselect[2] = RandCars[randa][0];
- randa = random(sizeof(RandCars));carselect[3] = RandCars[randa][0];
- randa = random(sizeof(RandCars));carselect[4] = RandCars[randa][0];
- randa = random(sizeof(RandCars));carselect[5] = RandCars[randa][0];
- randa = random(sizeof(RandCars));carselect[6] = RandCars[randa][0];
- randa = random(sizeof(RandCars));carselect[7] = RandCars[randa][0];
- randa = random(sizeof(RandCars));carselect[8] = RandCars[randa][0];
- randa = random(sizeof(RandCars));carselect[9] = RandCars[randa][0];
- randa = random(sizeof(RandCars));carselect[10] = RandCars[randa][0];
- randa = random(sizeof(RandCars));carselect[11] = RandCars[randa][0];
- randa = random(sizeof(RandCars));carselect[12] = RandCars[randa][0];
- randa = random(sizeof(RandCars));carselect[13] = RandCars[randa][0];
- randa = random(sizeof(RandLCars));carselect[14] = RandLCars[randa][0];
- AddStaticVehicleEx(carselect[14], 1279.4,-1337.0,13.5,1.0,-1, -1, -1);//long
- AddStaticVehicleEx(409,1248.6779,-2045.4602,59.6498,268.3867,0,0,60000); // limo LaCosaNostra
- AddStaticVehicleEx(507,1242.7739,-2031.1902,59.7773,178.8082,0,0,60000); // Elegant LaCosaNostra
- AddStaticVehicleEx(507,1242.9808,-2015.0297,59.7788,180.6815,0,0,60000); // Elegant LaCosaNostra
- AddStaticVehicleEx(507,1275.1589,-2046.2448,58.9736,87.6114,0,0,60000); // Elegant LaCosaNostra
- AddStaticVehicleEx(409,-2274.3672,646.6611,49.1778,179.9364,50,50,60000); // limo Yakuza
- AddStaticVehicleEx(421,-2176.6760,636.7382,49.2387,37.7510,50,50,60000); // Washington Yakuza
- AddStaticVehicleEx(421,-2247.8093,649.9500,49.1645,0.0748,50,50,60000); // Washington Yakuza
- AddStaticVehicleEx(421,-2247.4382,667.7339,49.1645,359.8687,50,50,60000); // Washington Yakuza
- AddStaticVehicleEx(409,-2159.6860,-2393.2295,30.5070,52.5176,1,1,60000); // limo mayor
- if (realtime)
- {
- new tmphour;
- new tmpminute;
- new tmpsecond;
- gettime(tmphour, tmpminute, tmpsecond);
- FixHour(tmphour);
- tmphour = shifthour;
- SetWorldTime(tmphour);
- }
- synctimer = SetTimer("SyncUp", 60000, 1);
- unjailtimer = SetTimer("SetPlayerUnjail", 1000, 1);
- othtimer = SetTimer("OtherTimer", 1000, 1);
- cartimer = SetTimer("CarCheck", 30000, 1);
- pickuptimer = SetTimer("CustomPickups", 1000, 1);
- spectatetimer = SetTimer("Spectator", 2000, 1);
- idletimer = SetTimer("IdleKick", idletime, 1);
- productiontimer = SetTimer("Production", 300000, 1); //5 mins (300000)
- accountstimer = SetTimer("SaveAccounts", 1800000, 1); //30 mins every account saved
- checkgastimer = SetTimer("CheckGas", RunOutTime, 1);
- stoppedvehtimer = SetTimer("StoppedVehicle", RunOutTime, 1);
- //for(new i = 0; i < sizeof(CarSpawns); i++)
- for(new i = 0; i < 165; i++)
- {
- AddCar(i);
- }
- CarInit();
- return 1;
- }
- public SyncUp()
- {
- SyncTime();
- DollahScoreUpdate();
- }
- public SyncTime()
- {
- new string[64];
- new tmphour;
- new tmpminute;
- new tmpsecond;
- gettime(tmphour, tmpminute, tmpsecond);
- FixHour(tmphour);
- tmphour = shifthour;
- if ((tmphour > ghour) || (tmphour == 0 && ghour == 23))
- {
- format(string, sizeof(string), "SERVER: The time is now %d:00 hours",tmphour);
- BroadCast(COLOR_WHITE,string);
- ghour = tmphour;
- PayDay();
- if (realtime)
- {
- SetWorldTime(tmphour);
- }
- }
- }
- public SaveAccounts()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- OnPlayerUpdate(i);
- if(PlayerInfo[i][pJob] > 0)
- {
- if(PlayerInfo[i][pContractTime] < 25)
- {
- PlayerInfo[i][pContractTime] ++;
- }
- }
- }
- }
- }
- public IsPlayerInTurf(playerid, turfid)
- {
- if(IsPlayerConnected(playerid))
- {
- if(turfid == -1)
- {
- return 0;
- }
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid,x,y,z);
- if(x >= TurfInfo[turfid][zMinX] && x < TurfInfo[turfid][zMaxX] && y >= TurfInfo[turfid][zMinY] && y < TurfInfo[turfid][zMaxY])
- {
- return 1;
- }
- }
- return 0;
- }
- public GetClosestPlayer(p1)
- {
- new x,Float:dis,Float:dis2,player;
- player = -1;
- dis = 99999.99;
- for (x=0;x<MAX_PLAYERS;x++)
- {
- if(IsPlayerConnected(x))
- {
- if(x != p1)
- {
- dis2 = GetDistanceBetweenPlayers(x,p1);
- if(dis2 < dis && dis2 != -1.00)
- {
- dis = dis2;
- player = x;
- }
- }
- }
- }
- return player;
- }
- public Production()
- {
- new string[256];
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pFishes] >= 5) { if(FishCount[i] >= 3) { PlayerInfo[i][pFishes] = 0; } else { FishCount[i] += 1; } }
- if(PlayerDrunk[i] > 0) { PlayerDrunk[i] = 0; PlayerDrunkTime[i] = 0; GameTextForPlayer(i, "~p~Drunk effect~n~~w~Gone", 3500, 1); }
- if(PlayerInfo[i][pPayDay] < 6) { PlayerInfo[i][pPayDay] += 1; } //+ 5 min to PayDay anti-abuse
- for(new k = 0; k < MAX_PLAYERS; k++)
- {
- if(IsPlayerConnected(k))
- {
- if(gTeam[k] == 2 && CrimInRange(80.0, i,k))
- {
- }
- else
- {
- WantedPoints[i] -= 3;
- if(WantedPoints[i] < 0) { WantedPoints[i] = 0; }
- new points = WantedPoints[i];
- new wlevel;
- if(points > 0)
- {
- new yesno;
- if(points == 3) { if(WantedLevel[i] != 1) { WantedLevel[i] = 1; wlevel = 1; yesno = 1; } }
- else if(points >= 4 && points <= 5) { if(WantedLevel[i] != 2) { WantedLevel[i] = 2; wlevel = 2; yesno = 1; } }
- else if(points >= 6 && points <= 7) { if(WantedLevel[i] != 3) { WantedLevel[i] = 3; wlevel = 3; yesno = 1; } }
- else if(points >= 8 && points <= 9) { if(WantedLevel[i] != 4) { WantedLevel[i] = 4; wlevel = 4; yesno = 1; } }
- else if(points >= 10 && points <= 11) { if(WantedLevel[i] != 5) { WantedLevel[i] = 5; wlevel = 5; yesno = 1; } }
- else if(points >= 12 && points <= 13) { if(WantedLevel[i] != 6) { WantedLevel[i] = 6; wlevel = 6; yesno = 1; } }
- else if(points >= 14) { if(WantedLevel[i] != 10) { WantedLevel[i] = 10; wlevel = 10; yesno = 1; } }
- else if(points <= 0) { if(WantedLevel[i] != 0) { ClearCrime(i); WantedLevel[i] = 0; wlevel = 0; yesno = 1;} }
- if(yesno)
- {
- format(string, sizeof(string), "Current Wanted Level: %d", wlevel);
- SendClientMessage(i, COLOR_YELLOW, string);
- }
- }
- }
- }
- }
- }
- }
- }
- public DateProp(playerid)
- {
- new playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid, playername, sizeof(playername));
- new curdate = getdate();
- for(new h = 0; h < sizeof(HouseInfo); h++)
- {
- if (strcmp(playername, HouseInfo[h][hOwner], true) == 0)
- {
- HouseInfo[h][hDate] = curdate;
- OnPropUpdate();
- }
- }
- return 1;
- }
- public Checkprop()
- {
- new olddate;
- new string[256];
- new curdate = getdate();
- for(new h = 0; h < sizeof(HouseInfo); h++)
- {
- if(HouseInfo[h][hOwned] == 1 && HouseInfo[h][hDate] > 9)
- {
- olddate = HouseInfo[h][hDate];
- if(curdate-olddate >= 5)
- {
- HouseInfo[h][hHel] = 0;
- HouseInfo[h][hArm] = 0;
- HouseInfo[h][hHealthx] = 0;
- HouseInfo[h][hHealthy] = 0;
- HouseInfo[h][hHealthz] = 0;
- HouseInfo[h][hArmourx] = 0;
- HouseInfo[h][hArmoury] = 0;
- HouseInfo[h][hArmourz] = 0;
- HouseInfo[h][hLock] = 1;
- HouseInfo[h][hOwned] = 0;
- HouseInfo[h][hVec] = 418;
- HouseInfo[h][hVcol1] = -1;
- HouseInfo[h][hVcol2] = -1;
- strmid(HouseInfo[h][hOwner], "The State", 0, strlen("The State"), 255);
- format(string, sizeof(string), "REAL ESTATE: A House is available at a value of $%d",HouseInfo[h][hValue]);
- SendClientMessageToAll(TEAM_BALLAS_COLOR, string);
- OnPropUpdate();
- }
- }
- }
- return 1;
- }
- public PayDay()
- {
- new string[128];
- new account,interest;
- new rent = 0;
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pLevel] > 0)
- {
- if(MoneyMessage[i]==1)
- {
- SendClientMessage(i, COLOR_LIGHTRED, "You failed to pay your debt, Jail time.");
- GameTextForPlayer(i, "~r~Busted!", 2000, 1);
- SetPlayerInterior(i, 6);
- SetPlayerPos(i, 264.6288,77.5742,1001.0391);
- PlayerInfo[i][pJailed] = 1;
- ResetPlayerWeapons(i);
- WantedPoints[i] = 0;
- PlayerInfo[i][pJailTime] = 240;
- format(string, sizeof(string), "You are jailed for %d seconds. Bail: Unable", PlayerInfo[i][pJailTime]);
- SendClientMessage(i, COLOR_LIGHTBLUE, string);
- }
- new playername2[MAX_PLAYER_NAME];
- GetPlayerName(i, playername2, sizeof(playername2));
- account = PlayerInfo[i][pAccount];
- new key = PlayerInfo[i][pPhousekey];
- if(key != 255)
- {
- rent = HouseInfo[key][hRent];
- if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
- {
- rent = 0;
- }
- else if(rent > GetPlayerMoney(i))
- {
- PlayerInfo[i][pPhousekey] = 255;
- SendClientMessage(i, COLOR_WHITE, "You have been evicted.");
- rent = 0;
- }
- HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
- }
- new tmpintrate;
- if (key != 255 && strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
- {
- if(PlayerInfo[i][pDonateRank] > 0) { tmpintrate = intrate+4; }
- else { tmpintrate = intrate+2; }//HouseInfo[key][hLevel]
- }
- else
- {
- if(PlayerInfo[i][pDonateRank] > 0) { tmpintrate = 3; }
- else { tmpintrate = 1; }
- }
- if(PlayerInfo[i][pPayDay] >= 5)
- {
- Tax += TaxValue;//Should work for every player online
- PlayerInfo[i][pAccount] -= TaxValue;
- if(PlayerInfo[i][pDonateRank] > 0)
- {
- new bonus = PlayerInfo[i][pPayCheck] / 2;
- PlayerInfo[i][pPayCheck] += bonus;
- }
- new checks = PlayerInfo[i][pPayCheck];
- new ebill = (PlayerInfo[i][pAccount]/10000)*(PlayerInfo[i][pLevel]);
- ConsumingMoney[i] = 1;
- GivePlayerMoney(i, checks);
- if(PlayerInfo[i][pAccount] > 0)
- {
- PlayerInfo[i][pAccount] -= ebill;
- SBizzInfo[4][sbTill] += ebill;
- }
- else
- {
- ebill = 0;
- }
- interest = (PlayerInfo[i][pAccount]/1000)*(tmpintrate);
- PlayerInfo[i][pExp]++;
- PlayerPlayMusic(i);
- PlayerInfo[i][pAccount] = account+interest;
- SendClientMessage(i, COLOR_WHITE, "|___ BANK STATMENT ___|");
- format(string, sizeof(string), " Paycheck: $%d Tax Money: -$%d", checks, TaxValue);
- SendClientMessage(i, COLOR_GRAD1, string);
- if(PlayerInfo[i][pPhousekey] != 255 || PlayerInfo[i][pPbiskey] != 255)
- {
- format(string, sizeof(string), " Electricity Bill: -$%d", ebill);
- SendClientMessage(i, COLOR_GRAD1, string);
- }
- format(string, sizeof(string), " Balance: $%d", account);
- SendClientMessage(i, COLOR_GRAD1, string);
- format(string, sizeof(string), " Interest Rate: 0.%d percent",tmpintrate);
- SendClientMessage(i, COLOR_GRAD2, string);
- format(string, sizeof(string), " Interest Gained $%d", interest);
- SendClientMessage(i, COLOR_GRAD3, string);
- SendClientMessage(i, COLOR_GRAD4, "|--------------------------------------|");
- format(string, sizeof(string), " New Balance: $%d", PlayerInfo[i][pAccount]);
- SendClientMessage(i, COLOR_GRAD5, string);
- format(string, sizeof(string), " Rent: -$%d", rent);
- SendClientMessage(i, COLOR_GRAD5, string);
- format(string, sizeof(string), "~y~PayDay~n~~w~Paycheck");
- GameTextForPlayer(i, string, 5000, 1);
- rent = 0;
- PlayerInfo[i][pPayDay] = 0;
- PlayerInfo[i][pPayCheck] = 0;
- PlayerInfo[i][pConnectTime] += 1;
- if(PlayerInfo[i][pDonateRank] > 0)
- {
- PlayerInfo[i][pPayDayHad] += 1;
- if(PlayerInfo[i][pPayDayHad] >= 5)
- {
- PlayerInfo[i][pExp]++;
- PlayerInfo[i][pPayDayHad] = 0;
- }
- }
- }
- else
- {
- SendClientMessage(i, COLOR_LIGHTRED, "* You haven't played long enough to obtain a PayDay.");
- }
- }
- }
- }
- Checkprop();
- return 1;
- }
- strtok(const string[], &index)
- {
- new length = strlen(string);
- while ((index < length) && (string[index] <= ' '))
- {
- index++;
- }
- new offset = index;
- new result[20];
- while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = string[index];
- index++;
- }
- result[index - offset] = EOS;
- return result;
- }
- public split(const strsrc[], strdest[][], delimiter)
- {
- new i, li;
- new aNum;
- new len;
- while(i <= strlen(strsrc)){
- if(strsrc[i]==delimiter || i==strlen(strsrc)){
- len = strmid(strdest[aNum], strsrc, li, i, 128);
- strdest[aNum][len] = 0;
- li = i+1;
- aNum++;
- }
- i++;
- }
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- if(gPlayerLogged[playerid])
- {
- new string3[32];
- new playername3[MAX_PLAYER_NAME];
- GetPlayerName(playerid, playername3, sizeof(playername3));
- format(string3, sizeof(string3), "%s.ini", playername3);
- new File: hFile = fopen(string3, io_write);
- if (hFile)
- {
- new var[32];
- format(var, 32, "Key=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);
- PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
- 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, "DonateRank=%d\n",PlayerInfo[playerid][pDonateRank]);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, "CK=%d\n",PlayerInfo[playerid][pCK]);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",PlayerInfo[playerid][pCash]);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, "Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var);
- format(var, 32, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var);
- format(var, 32, "Arrested=%d\n",PlayerInfo[playerid][pArrested]);fwrite(hFile, var);
- format(var, 32, "WantedDeaths=%d\n",PlayerInfo[playerid][pWantedDeaths]);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, "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, "Materials=%d\n",PlayerInfo[playerid][pMats]);fwrite(hFile, var);
- format(var, 32, "Drugs=%d\n",PlayerInfo[playerid][pDrugs]);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, "FMember=%d\n",PlayerInfo[playerid][pFMember]);fwrite(hFile, var);
- format(var, 32, "Rank=%d\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var);
- format(var, 32, "Char=%d\n",PlayerInfo[playerid][pChar]);fwrite(hFile, var);
- format(var, 32, "ContractTime=%d\n",PlayerInfo[playerid][pContractTime]);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, "NewsSkill=%d\n",PlayerInfo[playerid][pNewsSkill]);fwrite(hFile, var);
- format(var, 32, "DrugsSkill=%d\n",PlayerInfo[playerid][pDrugsSkill]);fwrite(hFile, var);
- format(var, 32, "CookSkill=%d\n",PlayerInfo[playerid][pCookSkill]);fwrite(hFile, var);
- format(var, 32, "FishSkill=%d\n",PlayerInfo[playerid][pFishSkill]);fwrite(hFile, var);
- format(var, 32, "pSHealth=%.1f\n",PlayerInfo[playerid][pSHealth]);fwrite(hFile, var);
- GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
- format(var, 32, "pHealth=%.1f\n",PlayerInfo[playerid][pHealth]);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, "Team=%d\n",PlayerInfo[playerid][pTeam]);fwrite(hFile, var);
- format(var, 32, "Model=%d\n",PlayerInfo[playerid][pModel]);fwrite(hFile, var);
- format(var, 32, "PhoneNr=%d\n",PlayerInfo[playerid][pPnumber]);fwrite(hFile, var);
- format(var, 32, "House=%d\n",PlayerInfo[playerid][pPhousekey]);fwrite(hFile, var);
- format(var, 32, "Bizz=%d\n",PlayerInfo[playerid][pPbiskey]);fwrite(hFile, var);
- if ((PlayerInfo[playerid][pPos_x]==0.0 && PlayerInfo[playerid][pPos_y]==0.0 && PlayerInfo[playerid][pPos_z]==0.0))
- {
- PlayerInfo[playerid][pPos_x] = 1684.9;
- PlayerInfo[playerid][pPos_y] = -2244.5;
- PlayerInfo[playerid][pPos_z] = 13.5;
- }
- if(Spectate[playerid] != 255)
- {
- PlayerInfo[playerid][pPos_x] = Unspec[playerid][sPx];
- PlayerInfo[playerid][pPos_y] = Unspec[playerid][sPy];
- PlayerInfo[playerid][pPos_z] = Unspec[playerid][sPz];
- PlayerInfo[playerid][pInt] = Unspec[playerid][sPint];
- PlayerInfo[playerid][pLocal] = Unspec[playerid][sLocal];
- }
- format(var, 32, "Pos_x=%.1f\n",PlayerInfo[playerid][pPos_x]);fwrite(hFile, var);
- format(var, 32, "Pos_y=%.1f\n",PlayerInfo[playerid][pPos_y]);fwrite(hFile, var);
- format(var, 32, "Pos_z=%.1f\n",PlayerInfo[playerid][pPos_z]);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, "GunLic=%d\n",PlayerInfo[playerid][pGunLic]);fwrite(hFile, var);
- format(var, 32, "Gun1=%d\n",PlayerInfo[playerid][pGun1]);fwrite(hFile, var);
- format(var, 32, "Gun2=%d\n",PlayerInfo[playerid][pGun2]);fwrite(hFile, var);
- format(var, 32, "Gun3=%d\n",PlayerInfo[playerid][pGun3]);fwrite(hFile, var);
- format(var, 32, "Gun4=%d\n",PlayerInfo[playerid][pGun4]);fwrite(hFile, var);
- format(var, 32, "Ammo1=%d\n",PlayerInfo[playerid][pAmmo1]);fwrite(hFile, var);
- format(var, 32, "Ammo2=%d\n",PlayerInfo[playerid][pAmmo2]);fwrite(hFile, var);
- format(var, 32, "Ammo3=%d\n",PlayerInfo[playerid][pAmmo3]);fwrite(hFile, var);
- format(var, 32, "Ammo4=%d\n",PlayerInfo[playerid][pAmmo4]);fwrite(hFile, var);
- format(var, 32, "CarTime=%d\n",PlayerInfo[playerid][pCarTime]);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, "Wins=%d\n",PlayerInfo[playerid][pWins]);fwrite(hFile, var);
- format(var, 32, "Loses=%d\n",PlayerInfo[playerid][pLoses]);fwrite(hFile, var);
- format(var, 32, "AlcoholPerk=%d\n",PlayerInfo[playerid][pAlcoholPerk]);fwrite(hFile, var);
- format(var, 32, "DrugPerk=%d\n",PlayerInfo[playerid][pDrugPerk]);fwrite(hFile, var);
- format(var, 32, "MiserPerk=%d\n",PlayerInfo[playerid][pMiserPerk]);fwrite(hFile, var);
- format(var, 32, "PainPerk=%d\n",PlayerInfo[playerid][pPainPerk]);fwrite(hFile, var);
- format(var, 32, "TraderPerk=%d\n",PlayerInfo[playerid][pTraderPerk]);fwrite(hFile, var);
- format(var, 32, "Tutorial=%d\n",PlayerInfo[playerid][pTut]);fwrite(hFile, var);
- format(var, 32, "Mission=%d\n",PlayerInfo[playerid][pMissionNr]);fwrite(hFile, var);
- format(var, 32, "Warnings=%d\n",PlayerInfo[playerid][pWarns]);fwrite(hFile, var);
- format(var, 32, "Adjustable=%d\n",PlayerInfo[playerid][pAdjustable]);fwrite(hFile, var);
- if(PlayerInfo[playerid][pDonateRank] < 1) { PlayerInfo[playerid][pFuel] = 0; }
- format(var, 32, "Fuel=%d\n",PlayerInfo[playerid][pFuel]);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);
- fclose(hFile);
- }
- }
- }
- return 1;
- }
- public OnPlayerLogin(playerid,password[])
- {
- new tmp2[256];
- new string2[64];
- new playername2[MAX_PLAYER_NAME];
- GetPlayerName(playerid, playername2, sizeof(playername2));
- format(string2, sizeof(string2), "%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(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 , "DonateRank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDonateRank] = 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 , "CK" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCK] = 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 ); PlayerInfo[playerid][pCash] = 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 , "Kills" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKills] = strval( val ); }
- if( strcmp( key , "Deaths" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDeaths] = strval( val ); }
- if( strcmp( key , "Arrested" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pArrested] = strval( val ); }
- if( strcmp( key , "WantedDeaths" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWantedDeaths] = 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][pBiggestFish] = strval( val ); }
- if( strcmp( key , "Job" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJob] = 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 , "Materials" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMats] = strval( val ); }
- if( strcmp( key , "Drugs" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDrugs] = 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 , "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 , "Char" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pChar] = strval( val ); }
- if( strcmp( key , "ContractTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pContractTime] = 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 , "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 , "CookSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCookSkill] = strval( val ); }
- if( strcmp( key , "FishSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFishSkill] = strval( val ); }
- if( strcmp( key , "pSHealth" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSHealth] = floatstr( val ); }
- if( strcmp( key , "pHealth" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHealth] = 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 , "Team" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTeam] = strval( val ); }
- if( strcmp( key , "Model" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pModel] = strval( val ); }
- if( strcmp( key , "PhoneNr" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPnumber] = strval( val ); }
- if( strcmp( key , "House" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPhousekey] = strval( val ); }
- if( strcmp( key , "Bizz" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPbiskey] = strval( val ); }
- if( strcmp( key , "Pos_x" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_x] = floatstr( val ); }
- if( strcmp( key , "Pos_y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_y] = floatstr( val ); }
- if( strcmp( key , "Pos_z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_z] = floatstr( val ); }
- if( strcmp( key , "CarLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarLic] = 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 , "FishLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFishLic] = strval( val ); }
- if( strcmp( key , "GunLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGunLic] = strval( val ); }
- if( strcmp( key , "Gun1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun1] = strval( val ); }
- if( strcmp( key , "Gun2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun2] = strval( val ); }
- if( strcmp( key , "Gun3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun3] = strval( val ); }
- if( strcmp( key , "Gun4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun4] = strval( val ); }
- if( strcmp( key , "Ammo1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo1] = strval( val ); }
- if( strcmp( key , "Ammo2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo2] = strval( val ); }
- if( strcmp( key , "Ammo3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo3] = strval( val ); }
- if( strcmp( key , "Ammo4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo4] = strval( val ); }
- if( strcmp( key , "CarTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarTime] = 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 , "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 , "AlcoholPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAlcoholPerk] = strval( val ); }
- if( strcmp( key , "DrugPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDrugPerk] = strval( val ); }
- if( strcmp( key , "MiserPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMiserPerk] = strval( val ); }
- if( strcmp( key , "PainPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPainPerk] = strval( val ); }
- if( strcmp( key , "TraderPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTraderPerk] = strval( val ); }
- if( strcmp( key , "Tutorial" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTut] = strval( val ); }
- if( strcmp( key , "Mission" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMissionNr] = strval( val ); }
- if( strcmp( key , "Warnings" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWarns] = strval( val ); }
- if( strcmp( key , "Adjustable" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdjustable] = strval( val ); }
- if( strcmp( key , "Fuel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFuel] = 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); }
- }//end while
- fclose(UserFile);//close the file after everything has been read in the while
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "SERVER: Password does not match your name.");
- fclose(UserFile);
- gPlayerLogTries[playerid] += 1;
- if(gPlayerLogTries[playerid] == 4) { Ban(playerid); }
- return 1;
- }
- PlayerInfo[playerid][pAdjustable] = 0;
- ResetPlayerMoney(playerid);
- ConsumingMoney[playerid] = 1;
- GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
- CurrentMoney[playerid] = PlayerInfo[playerid][pCash];
- if(PlayerInfo[playerid][pReg] == 0)
- {
- PlayerInfo[playerid][pLevel] = 1;
- PlayerInfo[playerid][pSHealth] = 0.0;
- PlayerInfo[playerid][pHealth] = 50.0;
- PlayerInfo[playerid][pPos_x] = 2246.6;
- PlayerInfo[playerid][pPos_y] = -1161.9;
- PlayerInfo[playerid][pPos_z] = 1029.7;
- PlayerInfo[playerid][pInt] = 15;
- PlayerInfo[playerid][pLocal] = 255;
- PlayerInfo[playerid][pTeam] = 3;
- PlayerInfo[playerid][pModel] = 264;
- new randphone = 1000 + random(8999);//minimum 1000 max 9999 //giving one at the start
- PlayerInfo[playerid][pPnumber] = randphone;
- PlayerInfo[playerid][pPhousekey] = 255;
- PlayerInfo[playerid][pPbiskey] = 255;
- PlayerInfo[playerid][pAccount] = 50000;
- PlayerInfo[playerid][pReg] = 1;
- GivePlayerMoney(playerid, 5000);
- }
- if(PlayerInfo[playerid][pLevel] == -999) //autoban
- {
- Ban(playerid);
- }
- else if(PlayerInfo[playerid][pCK] > 0)
- {
- Kick(playerid);
- }
- format(string2, sizeof(string2), "SERVER: Welcome %s",playername2);
- SendClientMessage(playerid, COLOR_WHITE,string2);
- printf("%s has logged in.",playername2);
- if (PlayerInfo[playerid][pDonateRank] > 0)
- {
- SendClientMessage(playerid, COLOR_WHITE,"SERVER: You are a Premium Account user.");
- }
- if (PlayerInfo[playerid][pAdmin] > 0)
- {
- format(string2, sizeof(string2), "SERVER: You are logged in as a Level %d Admin.",PlayerInfo[playerid][pAdmin]);
- SendClientMessage(playerid, COLOR_WHITE,string2);
- }
- 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);
- if(gTeam[playerid] == 0)
- {
- gTeam[playerid] = 3;
- }
- else
- {
- gTeam[playerid] = PlayerInfo[playerid][pTeam];
- }
- gPlayerLogged[playerid] = 1;
- SpawnPlayer(playerid);
- format(tmp2, sizeof(tmp2), "~w~Welcome ~n~~y~ %s", playername2);
- DateProp(playerid);
- GameTextForPlayer(playerid, tmp2, 5000, 1);
- SendClientMessage(playerid, COLOR_YELLOW, motd);
- if(PlayerInfo[playerid][pFMember] < 255)
- {
- format(tmp2, sizeof(tmp2), "Family MOTD: %s.", FamilyInfo[PlayerInfo[playerid][pFMember]][FamilyMOTD]);
- SendClientMessage(playerid, COLOR_YELLOW, tmp2);
- }
- }
- return 1;
- }
- stock ini_GetKey( line[] )
- {
- new keyRes[256];
- keyRes[0] = 0;
- if ( strfind( line , "=" , true ) == -1 ) return keyRes;
- strmid( keyRes , line , 0 , strfind( line , "=" , true ) , sizeof( keyRes) );
- return keyRes;
- }
- stock ini_GetValue( line[] )
- {
- new valRes[256];
- valRes[0]=0;
- if ( strfind( line , "=" , true ) == -1 ) return valRes;
- strmid( valRes , line , strfind( line , "=" , true )+1 , strlen( line ) , sizeof( valRes ) );
- return valRes;
- }
- public OnPropUpdate()
- {
- new idx;
- new File: file2;
- while (idx < sizeof(HouseInfo))
- {
- new coordsstring[256];
- format(coordsstring, sizeof(coordsstring), "%f,%f,%f,%f,%f,%f,%d,%d,%d,%d,%d,%d,%s,%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n",
- HouseInfo[idx][hEntrancex],
- HouseInfo[idx][hEntrancey],
- HouseInfo[idx][hEntrancez],
- HouseInfo[idx][hExitx],
- HouseInfo[idx][hExity],
- HouseInfo[idx][hExitz],
- HouseInfo[idx][hHealthx],
- HouseInfo[idx][hHealthy],
- HouseInfo[idx][hHealthz],
- HouseInfo[idx][hArmourx],
- HouseInfo[idx][hArmoury],
- HouseInfo[idx][hArmourz],
- HouseInfo[idx][hOwner],
- HouseInfo[idx][hDiscription],
- HouseInfo[idx][hValue],
- HouseInfo[idx][hHel],
- HouseInfo[idx][hArm],
- HouseInfo[idx][hInt],
- HouseInfo[idx][hLock],
- HouseInfo[idx][hOwned],
- HouseInfo[idx][hRooms],
- HouseInfo[idx][hRent],
- HouseInfo[idx][hRentabil],
- HouseInfo[idx][hTakings],
- HouseInfo[idx][hVec],
- HouseInfo[idx][hVcol1],
- HouseInfo[idx][hVcol2],
- HouseInfo[idx][hDate],
- HouseInfo[idx][hLevel]);
- if(idx == 0)
- {
- file2 = fopen("property.cfg", io_write);
- }
- else
- {
- file2 = fopen("property.cfg", io_append);
- }
- fwrite(file2, coordsstring);
- idx++;
- fclose(file2);
- }
- idx = 0;
- while (idx < sizeof(BizzInfo))
- {
- new coordsstring[256];
- format(coordsstring, sizeof(coordsstring), "%d|%s|%s|%s|%f|%f|%f|%f|%f|%f|%d|%d|%d|%d|%d|%d|%d|%d|%d\n",
- BizzInfo[idx][bOwned],
- BizzInfo[idx][bOwner],
- BizzInfo[idx][bMessage],
- BizzInfo[idx][bExtortion],
- BizzInfo[idx][bEntranceX],
- BizzInfo[idx][bEntranceY],
- BizzInfo[idx][bEntranceZ],
- BizzInfo[idx][bExitX],
- BizzInfo[idx][bExitY],
- BizzInfo[idx][bExitZ],
- BizzInfo[idx][bLevelNeeded],
- BizzInfo[idx][bBuyPrice],
- BizzInfo[idx][bEntranceCost],
- BizzInfo[idx][bTill],
- BizzInfo[idx][bLocked],
- BizzInfo[idx][bInterior],
- BizzInfo[idx][bProducts],
- BizzInfo[idx][bMaxProducts],
- BizzInfo[idx][bPriceProd]);
- if(idx == 0)
- {
- file2 = fopen("bizz.cfg", io_write);
- }
- else
- {
- file2 = fopen("bizz.cfg", io_append);
- }
- fwrite(file2, coordsstring);
- idx++;
- fclose(file2);
- }
- idx = 0;
- while (idx < sizeof(SBizzInfo))
- {
- new coordsstring[256];
- format(coordsstring, sizeof(coordsstring), "%d|%s|%s|%s|%f|%f|%f|%d|%d|%d|%d|%d|%d|%d|%d|%d\n",
- SBizzInfo[idx][sbOwned],
- SBizzInfo[idx][sbOwner],
- SBizzInfo[idx][sbMessage],
- SBizzInfo[idx][sbExtortion],
- SBizzInfo[idx][sbEntranceX],
- SBizzInfo[idx][sbEntranceY],
- SBizzInfo[idx][sbEntranceZ],
- SBizzInfo[idx][sbLevelNeeded],
- SBizzInfo[idx][sbBuyPrice],
- SBizzInfo[idx][sbEntranceCost],
- SBizzInfo[idx][sbTill],
- SBizzInfo[idx][sbLocked],
- SBizzInfo[idx][sbInterior],
- SBizzInfo[idx][sbProducts],
- SBizzInfo[idx][sbMaxProducts],
- SBizzInfo[idx][sbPriceProd]);
- if(idx == 0)
- {
- file2 = fopen("sbizz.cfg", io_write);
- }
- else
- {
- file2 = fopen("sbizz.cfg", io_append);
- }
- fwrite(file2, coordsstring);
- idx++;
- fclose(file2);
- }
- return 1;
- }
- public BroadCast(color,const string[])
- {
- SendClientMessageToAll(color, string);
- return 1;
- }
- public ABroadCast(color,const string[],level)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if (PlayerInfo[i][pAdmin] >= level)
- {
- SendClientMessage(i, color, string);
- printf("%s", string);
- }
- }
- }
- return 1;
- }
- public OOCOff(color,const string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(!gOoc[i])
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- }
- public OOCNews(color,const string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(!gNews[i])
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- }
- public SendTeamMessage(team, color, string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(gTeam[i] == team)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- }
- public SendRadioMessage(member, color, string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pMember] == member || PlayerInfo[i][pLeader] == member)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- }
- public SendJobMessage(job, color, string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pJob] == job)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- }
- public SendNewFamilyMessage(family, color, string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pFMember] == family)
- {
- if(!gFam[i])
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- }
- }
- public SendFamilyMessage(family, color, string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pMember] == family || PlayerInfo[i][pLeader] == family)
- {
- if(!gFam[i])
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- }
- }
- public SendIRCMessage(channel, color, string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayersChannel[i] == channel)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- }
- public SendTeamBeepMessage(team, color, string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(gTeam[i] == team)
- {
- SendClientMessage(i, color, string);
- RingTone[i] = 20;
- }
- }
- }
- }
- public SendEnemyMessage(color, string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(gTeam[i] >= 3)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- }
- public SendAdminMessage(color, string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pAdmin] >= 1)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- }
- public AddCar(carcoords)
- {
- new randcol = random(126);
- new randcol2 = 1;
- if (rccounter == 14)
- {
- rccounter = 0;
- }
- AddStaticVehicleEx(carselect[rccounter], CarSpawns[carcoords][pos_x], CarSpawns[carcoords][pos_y], CarSpawns[carcoords][pos_z], CarSpawns[carcoords][z_angle], randcol, randcol2, 60000);
- rccounter++;
- return 1;
- }
- public PlayerPlayMusic(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- SetTimer("StopMusic", 5000, 0);
- PlayerPlaySound(playerid, 1068, 0.0, 0.0, 0.0);
- }
- }
- public StopMusic()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- PlayerPlaySound(i, 1069, 0.0, 0.0, 0.0);
- }
- }
- }
- public PlayerFixRadio(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- SetTimer("PlayerFixRadio2", 1000, 0);
- PlayerPlaySound(playerid, 1068, 0.0, 0.0, 0.0);
- Fixr[playerid] = 1;
- }
- }
- public PlayerFixRadio2()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(Fixr[i])
- {
- PlayerPlaySound(i, 1069, 0.0, 0.0, 0.0);
- Fixr[i] = 0;
- }
- }
- }
- }
- //---------------------------<[ OnPlayerCommandText ]>--------------------------------------------------------
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new string[256];
- new playermoney;
- new sendername[MAX_PLAYER_NAME];
- new giveplayer[MAX_PLAYER_NAME];
- new playername[MAX_PLAYER_NAME];
- new cmd[256];
- new tmp[256];
- new giveplayerid, moneys, idx;
- cmd = strtok(cmdtext, idx);
- //-------------------------------[Pay]--------------------------------------------------------------------------
- if(strcmp(cmd, "/pay", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /pay [playerid/PartOfName] [amount]");
- return 1;
- }
- //giveplayerid = strval(tmp);
- giveplayerid = ReturnUser(tmp);
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /pay [playerid/PartOfName] [amount]");
- return 1;
- }
- moneys = strval(tmp);
- if(moneys > 1000 && PlayerInfo[playerid][pLevel] < 3)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "You must be level 3 to pay over 1000");
- return 1;
- }
- if(moneys < 1 || moneys > 99999)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Dont go below 1, or above 99999 at once.");
- return 1;
- }
- if (IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if(PlayerInfo[giveplayerid][pLocal] == 106)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Command not allowed in this location");
- return 1;
- }
- if (ProxDetectorS(5.0, playerid, giveplayerid))
- {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- playermoney = GetPlayerMoney(playerid);
- if (moneys > 0 && playermoney >= moneys)
- {
- ConsumingMoney[giveplayerid] = 1;
- GivePlayerMoney(playerid, (0 - moneys));
- GivePlayerMoney(giveplayerid, moneys);
- format(string, sizeof(string), " You have sent %s(player: %d), $%d.", giveplayer,giveplayerid, moneys);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- SendClientMessage(playerid, COLOR_GRAD1, string);
- format(string, sizeof(string), " You have recieved $%d from %s(player: %d).", moneys, sendername, playerid);
- SendClientMessage(giveplayerid, COLOR_GRAD1, string);
- format(string, sizeof(string), "%s has paid $%d to %s", sendername, moneys, giveplayer);
- PayLog(string);
- if(moneys >= 1000000)
- {
- ABroadCast(COLOR_YELLOW,string,1);
- }
- PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "* %s takes out some cash, and hands it to %s.", sendername ,giveplayer);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Invalid transaction amount.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Your too far away.");
- }
- }//invalid id
- }
- else
- {
- format(string, sizeof(string), " %d is not an active player.", giveplayerid);
- SendClientMessage(playerid, COLOR_GRAD1, string);
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/charity", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /charity [amount]");
- return 1;
- }
- if(PlayerInfo[playerid][pLocal] == 106)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Command not allowed in this location");
- return 1;
- }
- moneys = strval(tmp);
- if(moneys < 0)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "That is not enough.");
- return 1;
- }
- if(GetPlayerMoney(playerid) < moneys)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "You don't have that much money.");
- return 1;
- }
- GivePlayerMoney(playerid, -moneys);
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "%s Thank you for you donation of, $%d.",sendername, moneys);
- printf("%s", string);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- SendClientMessage(playerid, COLOR_GRAD1, string);
- PayLog(string);
- }
- return 1;
- }
- //-------------------------------[Stats]--------------------------------------------------------------------------
- if (strcmp(cmd, "/stats", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if (gPlayerLogged[playerid] != 0)
- {
- ShowStats(playerid,playerid);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " You are not Logged in !");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/dn", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- new Float:slx, Float:sly, Float:slz;
- GetPlayerPos(playerid, slx, sly, slz);
- SetPlayerPos(playerid, slx, sly, slz-2);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " You are not an Admin !");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/up", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- new Float:slx, Float:sly, Float:slz;
- GetPlayerPos(playerid, slx, sly, slz);
- SetPlayerPos(playerid, slx, sly, slz+2);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " You are not an Admin !");
- }
- }
- return 1;
- }
- if (strcmp(cmd, "/fly", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- new Float:px, Float:py, Float:pz, Float:pa;
- GetPlayerFacingAngle(playerid,pa);
- if(pa >= 0.0 && pa <= 22.5) //n1
- {
- GetPlayerPos(playerid, px, py, pz);
- SetPlayerPos(playerid, px, py+30, pz+5);
- }
- if(pa >= 332.5 && pa < 0.0) //n2
- {
- GetPlayerPos(playerid, px, py, pz);
- SetPlayerPos(playerid, px, py+30, pz+5);
- }
- if(pa >= 22.5 && pa <= 67.5) //nw
- {
- GetPlayerPos(playerid, px, py, pz);
- SetPlayerPos(playerid, px-15, py+15, pz+5);
- }
- if(pa >= 67.5 && pa <= 112.5) //w
- {
- GetPlayerPos(playerid, px, py, pz);
- SetPlayerPos(playerid, px-30, py, pz+5);
- }
- if(pa >= 112.5 && pa <= 157.5) //sw
- {
- GetPlayerPos(playerid, px, py, pz);
- SetPlayerPos(playerid, px-15, py-15, pz+5);
- }
- if(pa >= 157.5 && pa <= 202.5) //s
- {
- GetPlayerPos(playerid, px, py, pz);
- SetPlayerPos(playerid, px, py-30, pz+5);
- }
- if(pa >= 202.5 && pa <= 247.5)//se
- {
- GetPlayerPos(playerid, px, py, pz);
- SetPlayerPos(playerid, px+15, py-15, pz+5);
- }
- if(pa >= 247.5 && pa <= 292.5)//e
- {
- GetPlayerPos(playerid, px, py, pz);
- SetPlayerPos(playerid, px+30, py, pz+5);
- }
- if(pa >= 292.5 && pa <= 332.5)//e
- {
- GetPlayerPos(playerid, px, py, pz);
- SetPlayerPos(playerid, px+15, py+15, pz+5);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " You are not an Admin !");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/lt", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- new Float:slx, Float:sly, Float:slz;
- GetPlayerPos(playerid, slx, sly, slz);
- SetPlayerPos(playerid, slx, sly+2, slz);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " You are not an Admin !");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/rt", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- new Float:slx, Float:sly, Float:slz;
- GetPlayerPos(playerid, slx, sly, slz);
- SetPlayerPos(playerid, slx, sly-2, slz-2);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " You are not an Admin !");
- }
- }
- return 1;
- }
- //-------------------------------[Check]--------------------------------------------------------------------------
- if (strcmp(cmd, "/check", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /check [playerid/PartOfName]");
- return 1;
- }
- //giveplayerid = strval(tmp);
- giveplayerid = ReturnUser(tmp);
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- ShowStats(playerid,giveplayerid);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " No Such Player");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " You are not an admin");
- }
- }
- return 1;
- }
- if (strcmp(cmd, "/number", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if (PlayerInfo[playerid][pPhoneBook] == 1)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /number [playerid/PartOfName]");
- return 1;
- }
- //giveplayerid = strval(tmp);
- giveplayerid = ReturnUser(tmp);
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- GetPlayerName(giveplayerid, sendername, sizeof(sendername));
- format(string, 256, "Name: %s, Ph: %d",sendername,PlayerInfo[giveplayerid][pPnumber]);
- SendClientMessage(playerid, COLOR_GRAD1, string);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " No Such Player !");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " You do not have a PhoneBook !");
- }
- }
- return 1;
- }
- //-------------------------------[BuyLevel]--------------------------------------------------------------------------
- if (strcmp(cmd, "/buylevel", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if (gPlayerLogged[playerid] != 0)
- {
- PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
- if(PlayerInfo[playerid][pLevel] >= 0)
- {
- new nxtlevel = PlayerInfo[playerid][pLevel]+1;
- new costlevel = nxtlevel*levelcost;//10k for testing purposes
- new expamount = nxtlevel*levelexp;
- new infostring[256];
- if(GetPlayerMoney(playerid) < costlevel)
- {
- format(infostring, 256, " You do not have enough Cash ($%d) !",costlevel);
- SendClientMessage(playerid, COLOR_GRAD1, infostring);
- return 1;
- }
- else if (PlayerInfo[playerid][pExp] < expamount)
- {
- format(infostring, 256, " You need %d Respect Points, you curently have [%d] !",expamount,PlayerInfo[playerid][pExp]);
- SendClientMessage(playerid, COLOR_GRAD1, infostring);
- return 1;
- }
- else
- {
- format(string, sizeof(string), "~g~LEVEL UP~n~~w~You Are Now Level %d", nxtlevel);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- PlayerPlayMusic(playerid);
- GivePlayerMoney(playerid, (-costlevel));
- PlayerInfo[playerid][pLevel]++;
- if(PlayerInfo[playerid][pDonateRank] > 0)
- {
- PlayerInfo[playerid][pExp] -= expamount;
- new total = PlayerInfo[playerid][pExp];
- if(total > 0)
- {
- PlayerInfo[playerid][pExp] = total;
- }
- else
- {
- PlayerInfo[playerid][pExp] = 0;
- }
- }
- else
- {
- PlayerInfo[playerid][pExp] = 0;
- }
- PlayerInfo[playerid][gPupgrade] = PlayerInfo[playerid][gPupgrade]+2;
- GameTextForPlayer(playerid, string, 5000, 1);
- format(infostring, 256, " You bought Level %d for ($%d) Type /upgrade", nxtlevel, costlevel);
- SendClientMessage(playerid, COLOR_GRAD1, infostring);
- format(infostring, 256, " You gave %d unspent Upgrade Points",PlayerInfo[playerid][gPupgrade]);
- SendClientMessage(playerid, COLOR_GRAD2, infostring);
- }
- }
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " You are not Logged in !");
- }
- }
- return 1;
- }
- //-------------------------------[UPGRADE]--------------------------------------------------------------------------
- if (strcmp(cmd, "/carcolor", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- new house = PlayerInfo[playerid][pPhousekey];
- GetPlayerName(playerid, playername, sizeof(playername));
- if (house != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD3,"($5000) USAGE: /carcolor [color 1 - 2] [color number]");
- return 1;
- }
- new colornum = strval(tmp);
- if(colornum > 2 || colornum < 1)
- {
- SendClientMessage(playerid, COLOR_GRAD3,"Choices are 1 or 2");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD3,"($5000) USAGE: /carcolor [color 1 - 2] [color number]");
- }
- new color = strval(tmp);
- if(color > 126)
- {
- SendClientMessage(playerid, COLOR_GRAD3,"Maximum is 126");
- return 1;
- }
- if (GetPlayerMoney(playerid) < 5000)
- {
- SendClientMessage(playerid, COLOR_GRAD3,"You can't afford that ($5000)");
- }
- if(colornum == 1)
- {
- HouseInfo[house][hVcol1] = color;
- format(string, sizeof(string), "Car color 1 set to %d -$5000",color);
- SendClientMessage(playerid, COLOR_GRAD3,string);
- }
- else
- {
- HouseInfo[house][hVcol2] = color;
- format(string, sizeof(string), "Car color 2 set to %d -$5000",color);
- SendClientMessage(playerid, COLOR_GRAD3,string);
- }
- SendClientMessage(playerid, COLOR_GRAD6, "Your new paintjob will be complete within 24 hours");
- GivePlayerMoney(playerid,-5000);
- SBizzInfo[5][sbTill] += 5000;
- ExtortionSBiz(5, 5000);
- PlayerPlaySound(giveplayerid, 1134, 0.0, 0.0, 0.0);
- OnPropUpdate();
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You don't own a house");
- return 1;
- }
- }
- return 1;
- }
- if (strcmp(cmd, "/carupgrade", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- new house = PlayerInfo[playerid][pPhousekey];
- GetPlayerName(playerid, playername, sizeof(playername));
- if (house != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
- {
- new gunid[16];
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- format(string, sizeof(string), "USAGE: /carupgrade [carname]");
- SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
- SendClientMessage(playerid, COLOR_WHITE,"*** CAR UPGRADES Cost $100000 ***");
- SendClientMessage(playerid, COLOR_GRAD2,string);
- if(PlayerInfo[playerid][pLevel] >= 3)
- {
- SendClientMessage(playerid, COLOR_GRAD3, "Cars: blistacompact clover elegant emperor glendale greenwood");
- SendClientMessage(playerid, COLOR_GRAD3, "Cars: huntley jester landstalker merit nebula sabre stratum");
- SendClientMessage(playerid, COLOR_GRAD3, "Cars: sunrise tahoma uranus");
- SendClientMessage(playerid, COLOR_GRAD3, "Donation cars: stretch elegy phoenix hotknife bandito sultan");
- }
- SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
- return 1;
- }
- if(SBizzInfo[5][sbProducts] == 0)
- {
- GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
- return 1;
- }
- strmid(gunid, tmp, 0, strlen(cmdtext), 255);
- if (GetPlayerMoney(playerid) > 100000)
- {
- if(strcmp(gunid, "stretch", true, strlen(gunid)) == 0)
- {
- if(PlayerInfo[playerid][pDonateRank] < 1)
- {
- SendClientMessage(playerid, COLOR_GREY, " You don't have a Premium Account !");
- return 1;
- }
- SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Stretch");
- HouseInfo[house][hVec] = 409;
- }
- else if(strcmp(gunid, "hotknife", true, strlen(gunid)) == 0)
- {
- if(PlayerInfo[playerid][pDonateRank] < 1)
- {
- SendClientMessage(playerid, COLOR_GREY, " You don't have a Premium Account !");
- return 1;
- }
- SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Hotknife");
- HouseInfo[house][hVec] = 434;
- }
- else if(strcmp(gunid, "bandito", true, strlen(gunid)) == 0)
- {
- if(PlayerInfo[playerid][pDonateRank] < 1)
- {
- SendClientMessage(playerid, COLOR_GREY, " You don't have a Premium Account !");
- return 1;
- }
- SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Bandito");
- HouseInfo[house][hVec] = 568;
- }
- else if(strcmp(gunid, "sultan", true, strlen(gunid)) == 0)
- {
- if(PlayerInfo[playerid][pDonateRank] < 1)
- {
- SendClientMessage(playerid, COLOR_GREY, " You don't have a Premium Account !");
- return 1;
- }
- SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Sultan");
- HouseInfo[house][hVec] = 560;
- }
- else if(strcmp(gunid, "elegy", true, strlen(gunid)) == 0)
- {
- if(PlayerInfo[playerid][pDonateRank] < 1)
- {
- SendClientMessage(playerid, COLOR_GREY, " You don't have a Premium Account !");
- return 1;
- }
- SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Elegy");
- HouseInfo[house][hVec] = 562;
- }
- else if(strcmp(gunid, "phoenix", true, strlen(gunid)) == 0)
- {
- if(PlayerInfo[playerid][pDonateRank] < 1)
- {
- SendClientMessage(playerid, COLOR_GREY, " You don't have a Premium Account !");
- return 1;
- }
- SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Phoenix");
- HouseInfo[house][hVec] = 603;
- }
- else if(strcmp(gunid, "blistacompact", true, strlen(gunid)) == 0)
- {
- SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Blista Compact");
- HouseInfo[house][hVec] = 496;
- }
- else if(strcmp(gunid, "clover", true, strlen(gunid)) == 0)
- {
- SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Clover");
- HouseInfo[house][hVec] = 542;
- }
- else if(strcmp(gunid, "elegant", true, strlen(gunid)) == 0)
- {
- SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Elegant");
- HouseInfo[house][hVec] = 507;
- }
- else if(strcmp(gunid, "emperor", true, strlen(gunid)) == 0)
- {
- SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Emperor");
- HouseInfo[house][hVec] = 585;
- }
- else if(strcmp(gunid, "glendale", true, strlen(gunid)) == 0)
- {
- SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Glendale");
- HouseInfo[house][hVec] = 466;
- }
- else if(strcmp(gunid, "greenwood", true, strlen(gunid)) == 0)
- {
- SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Greenwood");
- HouseInfo[house][hVec] = 492;
- }
- else if(strcmp(gunid, "huntley", true, strlen(gunid)) == 0)
- {
- SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Huntley");
- HouseInfo[house][hVec] = 579;
- }
- else if(strcmp(gunid, "jester", true, strlen(gunid)) == 0)
- {
- SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Jester");
- HouseInfo[house][hVec] = 559;
- }
- else if(strcmp(gunid, "landstalker", true, strlen(gunid)) == 0)
- {
- SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Landstalker");
- HouseInfo[house][hVec] = 400;
- }
- else if(strcmp(gunid, "merit", true, strlen(gunid)) == 0)
- {
- SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Merit");
- HouseInfo[house][hVec] = 551;
- }
- else if(strcmp(gunid, "nebula", true, strlen(gunid)) == 0)
- {
- SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Nebula");
- HouseInfo[house][hVec] = 516;
- }
- else if(strcmp(gunid, "sabre", true, strlen(gunid)) == 0)
- {
- SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Sabre");
- HouseInfo[house][hVec] = 475;
- }
- else if(strcmp(gunid, "stratum", true, strlen(gunid)) == 0)
- {
- SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Stratum");
- HouseInfo[house][hVec] = 561;
- }
- else if(strcmp(gunid, "sunrise", true, strlen(gunid)) == 0)
- {
- SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Sunrise");
- HouseInfo[house][hVec] = 550;
- }
- else if(strcmp(gunid, "tahoma", true, strlen(gunid)) == 0)
- {
- SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Tahoma");
- HouseInfo[house][hVec] = 566;
- }
- else if(strcmp(gunid, "uranus", true, strlen(gunid)) == 0)
- {
- SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Uranus");
- HouseInfo[house][hVec] = 558;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD6, " Unrecognized Car or Donate Rank not High enough.");
- return 1;
- }
- SendClientMessage(playerid, COLOR_GRAD6, "Your new car will be delivered within 24 hours -$100000");
- OnPropUpdate();
- GivePlayerMoney(playerid,-100000);
- SBizzInfo[5][sbTill] += 100000;
- ExtortionSBiz(5, 100000);
- SBizzInfo[5][sbProducts]--;
- PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You can't afford that ($100000)");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You don't own a house");
- return 1;
- }
- }
- return 1;
- }
- if (strcmp(cmd, "/resetupgrades", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if (gPlayerLogged[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GRAD1, " You are not Logged in !");
- return 1;
- }
- if (GetPlayerMoney(playerid) < 100000)
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Cost is $100000 !");
- return 1;
- }
- if (PlayerInfo[playerid][pLevel] < 2)
- {
- SendClientMessage(playerid, COLOR_GRAD1, " You need to be at least level 2 !");
- return 1;
- }
- PlayerInfo[playerid][gPupgrade] = (PlayerInfo[playerid][pLevel]-1)*2;
- PlayerInfo[playerid][pSHealth] = 0.0;
- PlayerInfo[playerid][pAlcoholPerk] = 0;
- PlayerInfo[playerid][pDrugPerk] = 0;
- PlayerInfo[playerid][pMiserPerk] = 0;
- PlayerInfo[playerid][pPainPerk] = 0;
- PlayerInfo[playerid][pTraderPerk] = 0;
- GivePlayerMoney(playerid,-100000);
- PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
- format(string, 256, " You have %d unspent Upgrade Points !",PlayerInfo[playerid][gPupgrade]);
- SendClientMessage(playerid, COLOR_GRAD2, string);
- }
- return 1;
- }
- if (strcmp(cmd, "/buygun", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(GetPlayerMoney(playerid) < 1)
- {
- SendClientMessage(playerid, COLOR_GREY, " You dont have enough money with you !");
- return 1;
- }
- new gun;
- new gunid[16];
- new gunstring1[256];
- new gunstring2[256];
- new gunstring3[256];
- new gunstring4[256];
- new gunstring5[256];
- new infostring[256];
- new guncharge;
- new ammocharge;
- new location = PlayerInfo[playerid][pLocal];
- if(location == 99 || location == 100 || location == 102)
- {
- if(BizzInfo[location-99][bProducts] <= 0)
- {
- GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
- return 1;
- }
- new mod = 100;
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- format(string, sizeof(string), "USAGE: /buygun [gunname] [ammoamount]");
- SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
- SendClientMessage(playerid, COLOR_WHITE,"*** Guns & Ammo ***");
- SendClientMessage(playerid, COLOR_GRAD2,string);
- format(gunstring1, 256, "Weapons: parachute ($%d) golfclub ($%d) nightstick ($%d) baseballbat ($%d) shovel ($%d) poolcue ($%d)",
- GunPrice[0][0]/100*mod,GunPrice[1][0]/100*mod,GunPrice[2][0]/100*mod,GunPrice[3][0]/100*mod,GunPrice[4][0]/100*mod,GunPrice[5][0]/100*mod,GunPrice[6][0]/100*mod);
- SendClientMessage(playerid, COLOR_GRAD3, gunstring1);
- format(gunstring2, 256, "Weapons: purpledildo ($%d) whitedildo ($%d) longwhitedildo ($%d) whitedildo2 ($%d) flowers ($%d) cane",
- GunPrice[7][0]/100*mod,GunPrice[8][0]/100*mod,GunPrice[9][0]/100*mod,GunPrice[10][0]/100*mod,GunPrice[11][0]/100*mod,GunPrice[12][0]/100*mod);
- SendClientMessage(playerid, COLOR_GRAD3, gunstring2);
- format(gunstring3, 256, "Weapons: sdpistol ($%d) deagle ($%d) mp5 ($%d)",
- GunPrice[13][0]/100*mod,GunPrice[14][0]/100*mod,GunPrice[15][0]/100*mod,GunPrice[16][0]/100*mod,GunPrice[17][0]/100*mod,GunPrice[18][0]/100*mod);
- SendClientMessage(playerid, COLOR_GRAD3, gunstring3);
- format(gunstring4, 256, "Weapons: shotgun ($%d) ak47 ($%d) m4 ($%d) rifle ($%d)",
- GunPrice[19][0]/100*mod,GunPrice[20][0]/100*mod,GunPrice[21][0]/100*mod,GunPrice[22][0]/100*mod,GunPrice[23][0]/100*mod,GunPrice[24][0]/100*mod);
- SendClientMessage(playerid, COLOR_GRAD3, gunstring4);
- format(gunstring5, 256, "Weapons: pistolammo ($%d) shotgunammo ($%d) smgammo ($%d) assaultammo ($%d) rifleammo ($%d)",
- GunPrice[25][0],GunPrice[26][0],GunPrice[27][0],GunPrice[28][0],GunPrice[29][0]);
- SendClientMessage(playerid, COLOR_GRAD3, gunstring5);
- SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
- return 1;
- }
- strmid(gunid, tmp, 0, strlen(cmdtext), 255);
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- format(string, sizeof(string), "USAGE: /buygun [gunname] [ammoamount]");
- return 1;
- }
- new ammo = strval(tmp);
- if(ammo < 1 || ammo > 999) { SendClientMessage(playerid, COLOR_GREY, " Ammo ammount not lower then 1 or higher then 999 !"); return 1; }
- if (strcmp(gunid, "parachute", true, strlen(gunid)) == 0)
- {
- gun = 46;
- guncharge = GunPrice[0][0]/100*mod;
- ammocharge = 0;
- }
- else if (strcmp(gunid, "golfclub", true, strlen(gunid)) == 0)
- {
- gun = 2; guncharge = GunPrice[1][0]/100*mod; ammocharge = 0;
- PlayerInfo[playerid][pGun1] = 2; PlayerInfo[playerid][pAmmo1] = 1;
- }
- else if (strcmp(gunid, "nightstick", true, strlen(gunid)) == 0)
- {
- gun = 3; guncharge = GunPrice[2][0]/100*mod; ammocharge = 0;
- PlayerInfo[playerid][pGun1] = 3; PlayerInfo[playerid][pAmmo1] = 1;
- }
- else if (strcmp(gunid, "baseballbat", true, strlen(gunid)) == 0)
- {
- gun = 5; guncharge = GunPrice[4][0]/100*mod; ammocharge = 0;
- PlayerInfo[playerid][pGun1] = 5; PlayerInfo[playerid][pAmmo1] = 1;
- }
- else if (strcmp(gunid, "shovel", true, strlen(gunid)) == 0)
- {
- gun = 6; guncharge = GunPrice[5][0]/100*mod; ammocharge = 0;
- PlayerInfo[playerid][pGun1] = 6; PlayerInfo[playerid][pAmmo1] = 1;
- }
- else if (strcmp(gunid, "poolcue", true, strlen(gunid)) == 0)
- {
- gun = 7; guncharge = GunPrice[6][0]/100*mod; ammocharge = 0;
- PlayerInfo[playerid][pGun1] = 7; PlayerInfo[playerid][pAmmo1] = 1;
- }
- else if (strcmp(gunid, "purpledildo", true, strlen(gunid)) == 0)
- {
- gun = 10; guncharge = GunPrice[7][0]/100*mod; ammocharge = 0;
- PlayerInfo[playerid][pGun1] = 10; PlayerInfo[playerid][pAmmo1] = 1;
- }
- else if (strcmp(gunid, "whitedildo", true, strlen(gunid)) == 0)
- {
- gun = 11; guncharge = GunPrice[8][0]/100*mod; ammocharge = 0;
- PlayerInfo[playerid][pGun1] = 11; PlayerInfo[playerid][pAmmo1] = 1;
- }
- else if (strcmp(gunid, "longwhitedildo", true, strlen(gunid)) == 0)
- {
- gun = 12; guncharge = GunPrice[9][0]/100*mod; ammocharge = 0;
- PlayerInfo[playerid][pGun1] = 12; PlayerInfo[playerid][pAmmo1] = 1;
- }
- else if (strcmp(gunid, "whitedildo2", true, strlen(gunid)) == 0)
- {
- gun = 13; guncharge = GunPrice[10][0]/100*mod; ammocharge = 0;
- PlayerInfo[playerid][pGun1] = 13; PlayerInfo[playerid][pAmmo1] = 1;
- }
- else if (strcmp(gunid, "flowers", true, strlen(gunid)) == 0)
- {
- gun = 14; guncharge = GunPrice[11][0]/100*mod; ammocharge = 0;
- PlayerInfo[playerid][pGun1] = 14; PlayerInfo[playerid][pAmmo1] = 1;
- }
- else if (strcmp(gunid, "cane", true, strlen(gunid)) == 0)
- {
- gun = 15; guncharge = GunPrice[12][0]/100*mod; ammocharge = 0;
- PlayerInfo[playerid][pGun1] = 15; PlayerInfo[playerid][pAmmo1] = 1;
- }
- else if (strcmp(gunid, "sdpistol", true, strlen(gunid)) == 0)
- {
- gun = 23; guncharge = GunPrice[13][0]/100*mod; ammocharge = GunPrice[25][0]*ammo;
- PlayerInfo[playerid][pGun2] = 23; PlayerInfo[playerid][pAmmo2] = ammo;
- }
- else if (strcmp(gunid, "deagle", true, strlen(gunid)) == 0)
- {
- gun = 24; guncharge = GunPrice[15][0]/100*mod; ammocharge = GunPrice[25][0]*ammo;
- PlayerInfo[playerid][pGun2] = 24; PlayerInfo[playerid][pAmmo2] = ammo;
- }
- else if (strcmp(gunid, "mp5", true, strlen(gunid)) == 0)
- {
- gun = 29; guncharge = GunPrice[18][0]/100*mod; ammocharge = GunPrice[27][0]*ammo;
- PlayerInfo[playerid][pGun3] = 29; PlayerInfo[playerid][pAmmo3] = ammo;
- }
- else if (strcmp(gunid, "shotgun", true, strlen(gunid)) == 0)
- {
- gun = 25; guncharge = GunPrice[19][0]/100*mod; ammocharge = GunPrice[26][0]*ammo;
- PlayerInfo[playerid][pGun3] = 25; PlayerInfo[playerid][pAmmo3] = ammo;
- }
- else if (strcmp(gunid, "ak47", true, strlen(gunid)) == 0)
- {
- gun = 30; guncharge = GunPrice[22][0]/100*mod; ammocharge = GunPrice[28][0]*ammo;
- PlayerInfo[playerid][pGun4] = 30; PlayerInfo[playerid][pAmmo4] = ammo;
- }
- else if (strcmp(gunid, "m4", true, strlen(gunid)) == 0)
- {
- gun = 31; guncharge = GunPrice[23][0]/100*mod; ammocharge = GunPrice[28][0]*ammo;
- PlayerInfo[playerid][pGun4] = 31; PlayerInfo[playerid][pAmmo4] = ammo;
- }
- else if (strcmp(gunid, "rifle", true, strlen(gunid)) == 0)
- {
- gun = 33; guncharge = GunPrice[24][0]/100*mod; ammocharge = GunPrice[29][0]*ammo;
- PlayerInfo[playerid][pGun4] = 33; PlayerInfo[playerid][pAmmo4] = ammo;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD6, "ShopKeeper says: I have never heard of that weapon.");
- return 1;
- }
- if((guncharge+ammocharge) > GetPlayerMoney(playerid))
- {
- format(infostring, 256, " You don't have $%d !",guncharge+ammocharge);
- SendClientMessage(playerid, COLOR_GRAD3, infostring);
- return 1;
- }
- if(GetPlayerMoney(playerid) < (guncharge+ammocharge))
- {
- SendClientMessage(playerid, COLOR_GREY, " Can't afford that !");
- return 1;
- }
- new payout = guncharge + ammocharge;
- format(infostring, 256, "You have purchased %s with %d ammo for $%d",gunid,ammo,payout);
- SendClientMessage(playerid, COLOR_GRAD3, infostring);
- if(location == 102 && IsACop(playerid)) { }
- else { GivePlayerMoney(playerid, - payout); }
- BizzInfo[location-99][bTill] += payout;
- ExtortionBiz(location-99, payout);
- BizzInfo[location-99][bProducts]--;
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- GivePlayerWeapon(playerid, gun, ammo);
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "%s bought weapons for $%d at biz %d", sendername, payout, location-99);
- printf("%s", string);
- PayLog(string);
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE,"You are not in a store.");
- return 1;
- }
- }
- return 1;
- }
- if (strcmp(cmd, "/upgrade", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- new gunid[16];
- new infostring[256];
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- format(string, sizeof(string), "USAGE: /upgrade [upgradename] (You have %d Upgrade points)",PlayerInfo[playerid][gPupgrade]);
- SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
- SendClientMessage(playerid, COLOR_WHITE,"*** UPGRADES ***");
- SendClientMessage(playerid, COLOR_GRAD2,string);
- if(PlayerInfo[playerid][pLevel] == 2)
- {
- SendClientMessage(playerid, COLOR_GRAD3, "Level 2 Perks: Alcoholic, DrugAddict");
- }
- else if(PlayerInfo[playerid][pLevel] == 3)
- {
- SendClientMessage(playerid, COLOR_GRAD3, "Level 3 Perks: Alcoholic, DrugAddict, Miser");
- }
- else if(PlayerInfo[playerid][pLevel] == 3)
- {
- SendClientMessage(playerid, COLOR_GRAD3, "Level 4 Perks: Alcoholic, DrugAddict, Miser, Trader");
- }
- else if(PlayerInfo[playerid][pLevel] >= 5)
- {
- SendClientMessage(playerid, COLOR_GRAD3, "Level 5 Perks: Alcoholic, DrugAddict, Miser, Trader, PainKillers");
- }
- SendClientMessage(playerid, COLOR_GRAD5, "Extra Health: health");
- SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
- return 1;
- }
- strmid(gunid, tmp, 0, strlen(cmdtext), 255);
- if (PlayerInfo[playerid][gPupgrade] > 1)
- {
- if (PlayerInfo[playerid][pLevel] >= 1 && (strcmp(gunid, "health", true, strlen(gunid)) == 0))
- {
- if (PlayerInfo[playerid][pSHealth] < 50)
- {
- PlayerInfo[playerid][pSHealth] = PlayerInfo[playerid][pSHealth]+5.0;
- format(infostring, 256, "New Upgrade: You Will Now Spawn With %.2f Health (+5)",PlayerInfo[playerid][pSHealth]+50);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD6, " You Have Maximum Spawn Health");
- return 1;
- }
- }
- else if (PlayerInfo[playerid][pLevel] >= 2 && (strcmp(gunid, "alcoholic", true, strlen(gunid)) == 0))
- {
- if (PlayerInfo[playerid][pAlcoholPerk] < 3)
- {
- PlayerInfo[playerid][pAlcoholPerk] += 1;
- format(infostring, 256, "New Perk Upgrade: Your Alcoholic Perk is now Level %d.",PlayerInfo[playerid][pAlcoholPerk]);
- PlayerInfo[playerid][gPupgrade]--;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD6, " Your Alcoholic Perk is maxed out !");
- return 1;
- }
- }
- else if (PlayerInfo[playerid][pLevel] >= 2 && (strcmp(gunid, "drugaddict", true, strlen(gunid)) == 0))
- {
- if (PlayerInfo[playerid][pDrugPerk] < 3)
- {
- PlayerInfo[playerid][pDrugPerk] += 1;
- format(infostring, 256, "New Perk Upgrade: Your Drug Addict Perk is now Level %d.",PlayerInfo[playerid][pDrugPerk]);
- PlayerInfo[playerid][gPupgrade]--;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD6, " Your Drug Addict Perk is maxed out !");
- return 1;
- }
- }
- else if (PlayerInfo[playerid][pLevel] >= 3 && (strcmp(gunid, "miser", true, strlen(gunid)) == 0))
- {
- if (PlayerInfo[playerid][pMiserPerk] < 3)
- {
- PlayerInfo[playerid][pMiserPerk] += 1;
- format(infostring, 256, "New Perk Upgrade: Your Miser Perk is now Level %d.",PlayerInfo[playerid][pMiserPerk]);
- PlayerInfo[playerid][gPupgrade]--;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD6, " Your Miser Perk is maxed out !");
- return 1;
- }
- }
- else if (PlayerInfo[playerid][pLevel] >= 4 && (strcmp(gunid, "trader", true, strlen(gunid)) == 0))
- {
- if (PlayerInfo[playerid][pTraderPerk] < 3)
- {
- PlayerInfo[playerid][pTraderPerk] += 1;
- format(infostring, 256, "New Perk Upgrade: Your Trader Perk is now Level %d.",PlayerInfo[playerid][pTraderPerk]);
- PlayerInfo[playerid][gPupgrade]--;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD6, " Your Trader Perk is maxed out !");
- return 1;
- }
- }
- else if (PlayerInfo[playerid][pLevel] >= 5 && (strcmp(gunid, "painkillers", true, strlen(gunid)) == 0))
- {
- if (PlayerInfo[playerid][pPainPerk] < 3)
- {
- PlayerInfo[playerid][pPainPerk] += 1;
- format(infostring, 256, "New Perk Upgrade: Your Pain Killers Perk is now Level %d.",PlayerInfo[playerid][pPainPerk]);
- PlayerInfo[playerid][gPupgrade]--;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD6, " Your Pain Killers Perk is maxed out !");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD6, " Unrecognized Upgrade");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD6, " You Have 0 Upgrade Points");
- return 1;
- }
- SendClientMessage(playerid, COLOR_GRAD6, infostring);
- PlayerInfo[playerid][gPupgrade]--;
- }
- return 1;
- }
- //-------------------------------[Login]--------------------------------------------------------------------------
- if (strcmp(cmd, "/login", true) ==0 )
- {
- if(IsPlayerConnected(playerid))
- {
- new tmppass[64];
- if(gPlayerLogged[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are already logged in.");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /login [password]");
- return 1;
- }
- strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
- Encrypt(tmppass);
- OnPlayerLogin(playerid,tmppass);
- }
- return 1;
- }
- //----------------------------------[ooc]-----------------------------------------------
- if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(gPlayerLogged[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
- return 1;
- }
- if ((noooc) && PlayerInfo[playerid][pAdmin] < 1)
- {
- SendClientMessage(playerid, COLOR_GRAD2, " The OOC channel has been disabled by an Admin !");
- return 1;
- }
- if(PlayerInfo[playerid][pMuted] == 1)
- {
- SendClientMessage(playerid, TEAM_CYAN_COLOR, " You can't speak, you have been silenced !");
- return 1;
- }
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/o)oc [ooc chat]");
- return 1;
- }
- format(string, sizeof(string), "(( %s: %s ))", sendername, result);
- OOCOff(COLOR_OOC,string);
- printf("%s", string);
- }
- return 1;
- }
- if(strcmp(cmd, "/noooc", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if (PlayerInfo[playerid][pAdmin] >= 3 && (!noooc))
- {
- noooc = 1;
- BroadCast(COLOR_GRAD2, " OOC chat channel disabled by an Admin !");
- }
- else if (PlayerInfo[playerid][pAdmin] >= 3 && (noooc))
- {
- noooc = 0;
- BroadCast(COLOR_GRAD2, " OOC chat channel enabled by an Admin !");
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/speedo", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if (gSpeedo[playerid] == 1)
- {
- gSpeedo[playerid] = 2;
- GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~g~on", 5000, 5);
- PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
- }
- else if (gSpeedo[playerid] == 2)
- {
- gSpeedo[playerid] = 1;
- GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~r~off", 5000, 5);
- PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "you dont have a speedometer");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/fuel", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if (gGas[playerid] == 0)
- {
- gGas[playerid] = 1;
- GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~g~Fuel Info on", 5000, 5);
- PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
- }
- else if (gGas[playerid] == 1)
- {
- gGas[playerid] = 0;
- GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~r~Fuel Info off", 5000, 5);
- PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
- }
- }
- return 1;
- }
- //----------------------------------[advertise]-----------------------------------------------
- if(strcmp(cmd, "/advertise", true) == 0 || strcmp(cmd, "/ad", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(gPlayerLogged[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
- return 1;
- }
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/ad)vertise [advert text]");
- return 1;
- }
- if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1))
- {
- format(string, sizeof(string), " Please try again later %d seconds between Advertisements !", (addtimer/1000));
- SendClientMessage(playerid, COLOR_GRAD2, string);
- return 1;
- }
- new payout = idx * 25;
- if(GetPlayerMoney(playerid) < payout)
- {
- format(string, sizeof(string), "* You used %d characters which cost $%d, you don't have enough.", offset, payout);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- return 1;
- }
- GivePlayerMoney(playerid, - payout);
- SBizzInfo[7][sbTill] += payout;
- ExtortionSBiz(7, payout);
- format(string, sizeof(string), "Advertisement: %s, Contact: %s Ph: %d", result, sendername,PlayerInfo[playerid][pPnumber]);
- OOCNews(TEAM_GROVE_COLOR,string);
- format(string, sizeof(string), "~r~Paid $%d~n~~w~Message contained: %d Characters", payout, idx);
- GameTextForPlayer(playerid, string, 5000, 5);
- if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;}
- }
- return 1;
- }
- //----------------------------------[government]-----------------------------------------------
- if(strcmp(cmd, "/government", true) == 0 || strcmp(cmd, "/gov", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(gTeam[playerid] != 2)
- {
- SendClientMessage(playerid, COLOR_GREY, " You are not a Cop !");
- return 1;
- }
- if(PlayerInfo[playerid][pRank] < 5)
- {
- SendClientMessage(playerid, COLOR_GREY, " You need to be Rank 5 to be able to use this !");
- return 1;
- }
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/gov)ernment [text]");
- return 1;
- }
- SendClientMessageToAll(COLOR_WHITE, "|___________ Government News Announcement ___________|");
- format(string, sizeof(string), "Officer %s: %s", sendername, result);
- SendClientMessageToAll(COLOR_DBLUE, string);
- }
- return 1;
- }
- //----------------------------------[togooc]-----------------------------------------------
- if(strcmp(cmd, "/togooc", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if (!gOoc[playerid])
- {
- gOoc[playerid] = 1;
- SendClientMessage(playerid, COLOR_GRAD2, " OOC chat channel Disabled !");
- }
- else if (gOoc[playerid])
- {
- gOoc[playerid] = 0;
- SendClientMessage(playerid, COLOR_GRAD2, " OOC chat channel Enabled !");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/tognews", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if (!gNews[playerid])
- {
- gNews[playerid] = 1;
- SendClientMessage(playerid, COLOR_GRAD2, " News chat channel Disabled !");
- }
- else if (gNews[playerid])
- {
- gNews[playerid] = 0;
- SendClientMessage(playerid, COLOR_GRAD2, " News chat channel Enabled !");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/togfam", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if (!gFam[playerid])
- {
- gFam[playerid] = 1;
- SendClientMessage(playerid, COLOR_GRAD2, " Family chat channel Disabled !");
- }
- else if (gFam[playerid])
- {
- gFam[playerid] = 0;
- SendClientMessage(playerid, COLOR_GRAD2, " Family chat channel Enabled !");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/togwhisper", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pDonateRank] > 0 || PlayerInfo[playerid][pAdmin] > 1)
- {
- if (!HidePM[playerid])
- {
- HidePM[playerid] = 1;
- SendClientMessage(playerid, COLOR_GRAD2, " Whisper chat channel Disabled !");
- }
- else if (HidePM[playerid])
- {
- HidePM[playerid] = 0;
- SendClientMessage(playerid, COLOR_GRAD2, " Whisper chat channel Enabled !");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Not an Admin / Premium Account User !");
- return 1;
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/togphone", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pDonateRank] > 0 || PlayerInfo[playerid][pAdmin] > 1)
- {
- if (!PhoneOnline[playerid])
- {
- PhoneOnline[playerid] = 1;
- SendClientMessage(playerid, COLOR_GRAD2, " Your Phone is Offline !");
- }
- else if (PhoneOnline[playerid])
- {
- PhoneOnline[playerid] = 0;
- SendClientMessage(playerid, COLOR_GRAD2, " Your Phone is Online !");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " Not an Admin / Premium Account User !");
- return 1;
- }
- }
- return 1;
- }
- //----------------------------------[Emote]-----------------------------------------------
- if(strcmp(cmd, "/me", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(gPlayerLogged[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
- return 1;
- }
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /me [action]");
- return 1;
- }
- format(string, sizeof(string), "* %s %s", sendername, result);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- printf("%s", string);
- }
- return 1;
- }
- //----------------------------------[Local]-----------------------------------------------
- if(strcmp(cmd, "/local", true) == 0 || strcmp(cmd, "/l", true) == 0 || strcmp(cmd, "/say", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(gPlayerLogged[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
- return 1;
- }
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/l)ocal [local chat]");
- return 1;
- }
- format(string, sizeof(string), "%s Says: %s", sendername, result);
- ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- printf("%s", string);
- }
- return 1;
- }
- if(strcmp(cmd, "/b", true) == 0)//local ooc
- {
- if(IsPlayerConnected(playerid))
- {
- if(gPlayerLogged[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
- return 1;
- }
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /b [local ooc chat]");
- return 1;
- }
- format(string, sizeof(string), "%s Says: (( %s ))", sendername, result);
- ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- printf("%s", string);
- }
- return 1;
- }
- if(strcmp(cmd, "/close", true) == 0 || strcmp(cmd, "/c", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(gPlayerLogged[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
- return 1;
- }
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /(c)lose [close chat text]");
- return 1;
- }
- format(string, sizeof(string), "%s Says: %s", sendername, result);
- ProxDetector(3.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- printf("%s", string);
- }
- return 1;
- }
- //----------------------------------[Shout]-----------------------------------------------
- if(strcmp(cmd, "/shout", true) == 0 || strcmp(cmd, "/s", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(gPlayerLogged[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
- return 1;
- }
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/s)hout [local chat]");
- return 1;
- }
- format(string, sizeof(string), "%s Shouts: %s!!", sendername, result);
- ProxDetector(30.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_FADE1,COLOR_FADE2);
- printf("%s", string);
- }
- return 1;
- }
- //----------------------------------[Shout]-----------------------------------------------
- if(strcmp(cmd, "/megaphone", true) == 0 || strcmp(cmd, "/m", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- new tmpcar = GetPlayerVehicleID(playerid);
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/m)egaphone [megaphone chat]");
- return 1;
- }
- if(gTeam[playerid] == 2 || IsACop(playerid))
- {
- if(!IsACopCar(tmpcar))
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You are not in a Police Vehicle !");
- return 1;
- }
- if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1)
- {
- format(string, sizeof(string), "[Officer %s:o< %s]", sendername, result);
- ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 2)
- {
- format(string, sizeof(string), "[Agent %s:o< %s]", sendername, result);
- ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(PlayerInfo[playerid][pMember] == 3||PlayerInfo[playerid][pLeader] == 3)
- {
- format(string, sizeof(string), "[Soldier %s:o< %s]", sendername, result);
- ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- printf("%s", string);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You are not part of a Team !");
- return 1;
- }
- }
- return 1;
- }
- //----------------------------------[Team]-----------------------------------------------
- if(strcmp(cmd, "/radio", true) == 0 || strcmp(cmd, "/r", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/r)adio [radio chat]");
- return 1;
- }
- if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
- {
- if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Chief %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Captain %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Lieutenant %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Sergeant %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Officer %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Cadet %s: %s, over. **", sendername, result); }
- else
- {
- format(string, sizeof(string), "** Cadet %s: %s, over. **", sendername, result);
- }
- SendRadioMessage(1, TEAM_BLUE_COLOR, string);
- printf("%s", string);
- return 1;
- }
- else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
- {
- if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Director %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Assistant Director in Charge %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Special Agent in Charge %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Special Agent %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Special Agent Trainee %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Professional Staff %s: %s, over. **", sendername, result); }
- else
- {
- format(string, sizeof(string), "** Intern %s: %s, over. **", sendername, result);
- }
- SendRadioMessage(2, TEAM_BLUE_COLOR, string);
- printf("%s", string);
- return 1;
- }
- else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
- {
- if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** General %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Lieutenant %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Captain %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Major %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Sergeant %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Private %s: %s, over. **", sendername, result); }
- else
- {
- format(string, sizeof(string), "** Private %s: %s, over. **", sendername, result);
- }
- SendRadioMessage(3, TEAM_BLUE_COLOR, string);
- printf("%s", string);
- return 1;
- }
- else if(gTeam[playerid] == 1||PlayerInfo[playerid][pMember]==4||PlayerInfo[playerid][pLeader]==4)
- {
- format(string, sizeof(string), "** Paramedic %s: %s, over. **", sendername, result);
- SendRadioMessage(4, TEAM_CYAN_COLOR, string);
- printf("%s", string);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You are not part of a Team !");
- return 1;
- }
- }
- return 1;
- }
- //----------------------------------[offduty]-----------------------------------------------
- if(strcmp(cmd, "/duty", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- if(PlayerInfo[playerid][pMember] == 1)
- {
- if (PlayerToPoint(3, playerid,255.3,77.4,1003.6) || PlayerToPoint(3,playerid,-1616.1294,681.1594,7.1875) || PlayerInfo[playerid][pLocal] != 255)
- {
- if(OnDuty[playerid]==0)
- {
- format(string, sizeof(string), "* Officer %s took a Badge and a Gun from his locker.", sendername);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- GivePlayerWeapon(playerid, 24, 70);
- GivePlayerWeapon(playerid, 3, 0);
- OnDuty[playerid] = 1;
- }
- else if(OnDuty[playerid]==1)
- {
- format(string, sizeof(string), "* Officer %s places his Badge and Gun in his locker.", sendername);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- GivePlayerWeapon(playerid, 23, 150);
- GivePlayerWeapon(playerid, 5, 0);
- OnDuty[playerid] = 0;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You are not in a locker room !");
- return 1;
- }
- }
- else if(PlayerInfo[playerid][pMember] == 4||PlayerInfo[playerid][pLeader] == 4)
- {
- if(JobDuty[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now Off Duty from your Medic Job and will not receive calls anymore.");
- JobDuty[playerid] = 0;
- Medics -= 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now On Duty with your Medic Job and will receive calls from people in need.");
- JobDuty[playerid] = 1;
- Medics += 1;
- }
- }
- else if(PlayerInfo[playerid][pJob] == 7)
- {
- if(JobDuty[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now Off Duty from your Car Mechanic Job and will not receive calls anymore.");
- JobDuty[playerid] = 0;
- Mechanics -= 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now On Duty with your Car Mechanic Job and will receive calls from people in need.");
- JobDuty[playerid] = 1;
- Mechanics += 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " You are not a Cop !");
- }
- }
- return 1;
- }
- //----------------------------------[departments]-----------------------------------------------
- if(strcmp(cmd, "/departments", true) == 0 || strcmp(cmd, "/d", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/d)epartments [department chat]");
- return 1;
- }
- if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
- {
- if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Chief %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Captain %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Lieutenant %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Sergeant %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Officer %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Cadet %s: %s, over. **", sendername, result); }
- else
- {
- format(string, sizeof(string), "** Officer %s: %s, over. **", sendername, result);
- }
- SendTeamMessage(2, COLOR_ALLDEPT, string);
- SendTeamMessage(1, COLOR_ALLDEPT, string);
- printf("%s", string);
- return 1;
- }
- else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
- {
- if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Director %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Assistant Director in Charge %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Special Agent in Charge %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Special Agent %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Special Agent Trainee %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Professional Staff %s: %s, over. **", sendername, result); }
- else
- {
- format(string, sizeof(string), "** Intern %s: %s, over. **", sendername, result);
- }
- SendTeamMessage(2, COLOR_ALLDEPT, string);
- SendTeamMessage(1, COLOR_ALLDEPT, string);
- printf("%s", string);
- return 1;
- }
- else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
- {
- if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** General %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Lieutenant %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Captain %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Major %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Sergeant %s: %s, over. **", sendername, result); }
- else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Private %s: %s, over. **", sendername, result); }
- else
- {
- format(string, sizeof(string), "** Private %s: %s, over. **", sendername, result);
- }
- SendTeamMessage(2, COLOR_ALLDEPT, string);
- SendTeamMessage(1, COLOR_ALLDEPT, string);
- printf("%s", string);
- return 1;
- }
- else if(gTeam[playerid] == 1||PlayerInfo[playerid][pMember]==4||PlayerInfo[playerid][pLeader]==4)
- {
- format(string, sizeof(string), "** Paramedic %s: %s, over. **", sendername, result);
- SendTeamMessage(2, COLOR_ALLDEPT, string);
- SendTeamMessage(1, COLOR_ALLDEPT, string);
- printf("%s", string);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You are not part of a Team !");
- return 1;
- }
- }
- return 1;
- }
- //----------------------------------[mdc]-----------------------------------------------
- if(strcmp(cmd, "/mdc", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(!IsACop(playerid))
- {
- SendClientMessage(playerid, COLOR_GREY, " You are not a Cop !");
- return 1;
- }
- new tmpcar = GetPlayerVehicleID(playerid);
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /mdc [playerid/PartOfName]");
- return 1;
- }
- //giveplayerid = strval(tmp);
- giveplayerid = ReturnUser(tmp);
- if(IsACopCar(tmpcar)||PlayerToPoint(5.0, playerid, 253.9280,69.6094,1003.6406))
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- GetPlayerName(giveplayerid, sendername, sizeof(sendername));
- SendClientMessage(playerid, TEAM_BLUE_COLOR,"______-=MOBILE DATA COMPUTER=-_______");
- format(string, sizeof(string), "Name : %s", sendername);
- SendClientMessage(playerid, COLOR_WHITE,string);
- format(string, sizeof(string), "Crime : %s", PlayerCrime[giveplayerid][pAccusedof]);
- SendClientMessage(playerid, COLOR_GRAD2,string);
- format(string, sizeof(string), "Claimant : %s", PlayerCrime[giveplayerid][pVictim]);
- SendClientMessage(playerid, COLOR_GRAD3,string);
- format(string, sizeof(string), "Reported : %s", PlayerCrime[giveplayerid][pAccusing]);
- SendClientMessage(playerid, COLOR_GRAD4,string);
- format(string, sizeof(string), "Accused : %s", PlayerCrime[giveplayerid][pBplayer]);
- SendClientMessage(playerid, COLOR_GRAD5,string);
- SendClientMessage(playerid, TEAM_BLUE_COLOR,"_______________________________________");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, " That player is Offline !");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You are not in a Police Vehicle or in the Police Department.");
- return 1;
- }
- }
- return 1;
- }
- //----------------------------------[SetCrim]-----------------------------------------------
- if(strcmp(cmd, "/suspect", true) == 0 || strcmp(cmd, "/su", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(OnDuty[playerid] != 1 && PlayerInfo[playerid][pMember] == 1)
- {
- SendClientMessage(playerid, COLOR_GREY, " You are not on Duty!");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/su)spect [playerid/PartOfName] [crime discription]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- if (gTeam[playerid] == 2 || IsACop(playerid))
- {
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if (gTeam[giveplayerid] != 2)
- {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/su)spect [playerid/PartOfName] [crime text]");
- return 1;
- }
- if(WantedPoints[giveplayerid] == 0) { WantedPoints[giveplayerid] = 3; }
- else { WantedPoints[giveplayerid]+= 2; }
- SetPlayerCriminal(giveplayerid,playerid, result);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You can't suspect a Cop !");
- }
- }
- }
- else
- {
- format(string, sizeof(string), " %d is not an active player.", giveplayerid);
- SendClientMessage(playerid, COLOR_GRAD1, string);
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You are not a Cop / FBI / National Guard !");
- }
- }
- return 1;
- }
- //----------------------------------[LOCK]-----------------------------------------------
- if(strcmp(cmd, "/lock", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- new carid;
- if (gTeam[playerid] == 2 || gTeam[playerid] == 1)
- {
- if(gLastCar[playerid] == 0 && PlayerInfo[playerid][pPhousekey] == 255)
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You dont have a Vehicle.");
- return 1;
- }
- else if(gLastCar[playerid] != 0 && gLastCar[playerid] != PlayerInfo[playerid][pPhousekey]+1)
- {
- if (HireCar[playerid] != gLastCar[playerid] && HireCar[playerid] != 299)
- {
- gLastDriver[HireCar[playerid]] = 300;
- gCarLock[HireCar[playerid]] = 0;
- UnLockCar(HireCar[playerid]);
- }
- HireCar[playerid] = gLastCar[playerid];
- }
- }
- if (PlayerInfo[playerid][pPhousekey] == 255)
- {
- if(HireCar[playerid] == 299)
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You dont have a Vehicle.");
- return 1;
- }
- }
- carid = PlayerInfo[playerid][pPhousekey]+1;
- if(HireCar[playerid] != 299 && !SwitchKey[playerid])
- {
- carid = HireCar[playerid];
- }
- //new driver = gLastDriver[carid];
- new lockstatus = gCarLock[carid];
- new Float:cx,Float:cy,Float:cz;
- GetVehiclePos(carid, cx, cy, cz);
- switch (lockstatus)
- {
- case 0:
- {
- if(HireCar[playerid] == 299 && PlayerInfo[playerid][pPhousekey] == 255)
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You dont have a Vehicle");
- return 1;
- }
- if(HireCar[playerid] == carid && !SwitchKey[playerid])
- {
- GameTextForPlayer(playerid, "~w~Hire Vehicle ~r~Locked", 5000, 6);
- PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
- gCarLock[carid] = 1;
- LockCar(carid);
- }
- else if (PlayerInfo[playerid][pPhousekey] == carid-1)
- {
- GameTextForPlayer(playerid, "~w~House Vehicle ~r~Locked", 5000, 6);
- PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
- gCarLock[carid] = 1;
- LockCar(carid);
- return 1;
- }
- }
- case 1:
- {
- if(HireCar[playerid] == 299 && PlayerInfo[playerid][pPhousekey] == 255)
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You dont have a Vehicle");
- return 1;
- }
- if(HireCar[playerid] == carid && !SwitchKey[playerid])
- {
- GameTextForPlayer(playerid, "~w~Hire Vehicle ~g~Unlocked", 5000, 6);
- PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
- gCarLock[carid] = 0;
- UnLockCar(carid);
- }
- if (PlayerInfo[playerid][pPhousekey] == carid-1)
- {
- GameTextForPlayer(playerid, "~w~House Vehicle ~g~Unlocked", 5000, 6);
- PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
- gCarLock[carid] = 0;
- UnLockCar(carid);
- return 1;
- }
- }
- default:
- {
- SendClientMessage(playerid, COLOR_GRAD2, " Error");
- }
- }
- if(carid == 256)
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You dont have a Vehicle !");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/open", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- for(new i = 0; i < sizeof(HouseInfo); i++)
- {
- if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]) || PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
- {
- if(PlayerInfo[playerid][pPhousekey] == i)
- {
- if(HouseInfo[i][hLock] == 1)
- {
- HouseInfo[i][hLock] = 0;
- GameTextForPlayer(playerid, "~w~Door ~g~Unlocked", 5000, 6);
- PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
- return 1;
- }
- if(HouseInfo[i][hLock] == 0)
- {
- HouseInfo[i][hLock] = 1;
- GameTextForPlayer(playerid, "~w~Door ~r~Locked", 5000, 6);
- PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
- return 1;
- }
- }
- else
- {
- GameTextForPlayer(playerid, "~r~You Dont Have A Key", 5000, 6);
- return 1;
- }
- }
- }
- for(new i = 0; i < sizeof(BizzInfo); i++)
- {
- if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]) || PlayerToPoint(3, playerid,BizzInfo[i][bExitX], BizzInfo[i][bExitY], BizzInfo[i][bExitZ]))
- {
- if(PlayerInfo[playerid][pPbiskey] == i)
- {
- if(BizzInfo[i][bLocked] == 1)
- {
- BizzInfo[i][bLocked] = 0;
- GameTextForPlayer(playerid, "~w~Bussiness ~g~Open", 5000, 6);
- PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
- return 1;
- }
- if(BizzInfo[i][bLocked] == 0)
- {
- BizzInfo[i][bLocked] = 1;
- GameTextForPlayer(playerid, "~w~Bussiness ~r~Closed", 5000, 6);
- PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
- return 1;
- }
- }
- else
- {
- GameTextForPlayer(playerid, "~r~You Dont Have A Key", 5000, 6);
- return 1;
- }
- }
- }
- for(new i = 0; i < sizeof(SBizzInfo); i++)
- {
- if (PlayerToPoint(3, playerid,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
- {
- if(PlayerInfo[playerid][pPbiskey] == i+100)
- {
- if(SBizzInfo[i][sbLocked] == 1)
- {
- SBizzInfo[i][sbLocked] = 0;
- GameTextForPlayer(playerid, "~w~Bussiness ~g~Open", 5000, 6);
- PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
- return 1;
- }
- if(SBizzInfo[i][sbLocked] == 0)
- {
- SBizzInfo[i][sbLocked] = 1;
- GameTextForPlayer(playerid, "~w~Bussiness ~r~Closed", 5000, 6);
- PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
- return 1;
- }
- }
- else
- {
- GameTextForPlayer(playerid, "~r~You Dont Have A Key", 5000, 6);
- return 1;
- }
- }
- }
- }
- return 1;
- }
- //----------------------------------[Wisper]-----------------------------------------------
- if(strcmp(cmd, "/wisper", true) == 0 || strcmp(cmd, "/w", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(gPlayerLogged[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/w)isper [playerid/PartOfName] [whisper text]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- if (IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if(HidePM[giveplayerid] > 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " That player is blocking Whispers !");
- return 1;
- }
- GetPlayerName(playerid, sendername, sizeof(sendername));
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- if(giveplayerid == playerid)
- {
- format(string, sizeof(string), "* %s mutters somthing.", sendername);
- ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- }
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/w)isper [playerid/PartOfName] [whisper text]");
- return 1;
- }
- format(string, sizeof(string), "%s(ID: %d) whispers: %s", sendername, playerid, (result));
- SendClientMessage(giveplayerid, COLOR_YELLOW, string);
- format(string, sizeof(string), "Wisper sent to %s(ID: %d).", giveplayer, giveplayerid);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- SBizzInfo[2][sbTill] += txtcost / 2;
- ExtortionSBiz(2, txtcost / 2);
- return 1;
- }
- }
- else
- {
- format(string, sizeof(string), " %d is not an active player.", giveplayerid);
- SendClientMessage(playerid, COLOR_GRAD1, string);
- }
- }
- return 1;
- }
- //----------------------------------[Bank System]-----------------------------------------------
- if(strcmp(cmd, "/withdraw", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pLocal] != 103)
- {
- SendClientMessage(playerid, COLOR_GREY, " You are not at the Bank !");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /withdraw [amount]");
- format(string, sizeof(string), " You Have $%d in your account.", PlayerInfo[playerid][pAccount]);
- SendClientMessage(playerid, COLOR_GRAD3, string);
- return 1;
- }
- new cashdeposit = strval(tmp);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /withdraw [amount]");
- format(string, sizeof(string), " You Have $%d in your account.", PlayerInfo[playerid][pAccount]);
- SendClientMessage(playerid, COLOR_GRAD3, string);
- return 1;
- }
- if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much !");
- return 1;
- }
- ConsumingMoney[playerid] = 1;
- GivePlayerMoney(playerid,cashdeposit);
- PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
- format(string, sizeof(string), " You Have Withdrawn $%d from your account Total: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- return 1;
- }
- return 1;
- }
- if(strcmp(cmd, "/bank", true) == 0 || strcmp(cmd, "/deposit", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pLocal] != 103)
- {
- SendClientMessage(playerid, COLOR_GREY, " You are not at the Bank !");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /bank [amount]");
- format(string, sizeof(string), " You Have $%d in your account.", PlayerInfo[playerid][pAccount]);
- SendClientMessage(playerid, COLOR_GRAD3, string);
- return 1;
- }
- new cashdeposit = strval(tmp);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /bank [amount]");
- format(string, sizeof(string), " You Have $%d in your account.", PlayerInfo[playerid][pAccount]);
- SendClientMessage(playerid, COLOR_GRAD3, string);
- return 1;
- }
- if (cashdeposit > GetPlayerMoney(playerid) || cashdeposit < 1)
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much");
- return 1;
- }
- GivePlayerMoney(playerid,-cashdeposit);
- new curfunds = PlayerInfo[playerid][pAccount];
- PlayerInfo[playerid][pAccount]=cashdeposit+PlayerInfo[playerid][pAccount];
- SendClientMessage(playerid, COLOR_WHITE, "|___ BANK STATMENT ___|");
- format(string, sizeof(string), " Old Balance: $%d", curfunds);
- SendClientMessage(playerid, COLOR_GRAD2, string);
- format(string, sizeof(string), " Deposit: $%d",cashdeposit);
- SendClientMessage(playerid, COLOR_GRAD4, string);
- SendClientMessage(playerid, COLOR_GRAD6, "|-----------------------------------------|");
- format(string, sizeof(string), " New Balance: $%d", PlayerInfo[playerid][pAccount]);
- SendClientMessage(playerid, COLOR_WHITE, string);
- return 1;
- }
- return 1;
- }
- if(strcmp(cmd, "/balance", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pLocal] != 103)
- {
- SendClientMessage(playerid, COLOR_GREY, " You are not at the Bank !");
- return 1;
- }
- format(string, sizeof(string), " You Have $%d in your account.",PlayerInfo[playerid][pAccount]);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- }
- return 1;
- }
- if(strcmp(cmd, "/dice", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- new dice = random(6)+1;
- if (gDice[playerid] == 1)
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "* %s Throws a Dice that lands on %d", sendername,dice);
- ProxDetector(5.0, playerid, string, TEAM_GREEN_COLOR,TEAM_GREEN_COLOR,TEAM_GREEN_COLOR,TEAM_GREEN_COLOR,TEAM_GREEN_COLOR);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You Don't Have A Dice");
- return 1;
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/transfer", true) == 0 || strcmp(cmd, "/wiretransfer", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pLevel] < 3)
- {
- SendClientMessage(playerid, COLOR_GRAD1, " You must be level 3 !");
- return 1;
- }
- if(PlayerInfo[playerid][pLocal] != 103)
- {
- SendClientMessage(playerid, COLOR_GREY, " You are not at the Bank !");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /transfer [playerid/PartOfName] [amount]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /transfer [playerid/PartOfName] [amount]");
- return 1;
- }
- moneys = strval(tmp);
- if (IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- playermoney = PlayerInfo[playerid][pAccount] ;
- if (moneys > 0 && playermoney >= moneys)
- {
- PlayerInfo[playerid][pAccount] -= moneys;
- PlayerInfo[giveplayerid][pAccount] += moneys;
- format(string, sizeof(string), " You have transferd $%d to %s's account", moneys, giveplayer,giveplayerid);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- SendClientMessage(playerid, COLOR_GRAD1, string);
- format(string, sizeof(string), " You have recieved $%d to into your account from %s", moneys, sendername, playerid);
- SendClientMessage(giveplayerid, COLOR_GRAD1, string);
- format(string, sizeof(string), "%s transferd $%d to %s", sendername, moneys, giveplayer);
- if(moneys >= 500000)
- {
- ABroadCast(COLOR_YELLOW,string,1);
- }
- printf("%s", string);
- PayLog(string);
- PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Invalid transaction amount.");
- }
- }
- }
- else
- {
- format(string, sizeof(string), " %d is not an active player.", giveplayerid);
- SendClientMessage(playerid, COLOR_GRAD1, string);
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/buy", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if (!PlayerToPoint(100, playerid,-30.875, -88.9609, 1004.53))//centerpoint 24-7
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You are not in a 24-7 !");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_WHITE, "USAGE: /buy [item number]");
- SendClientMessage(playerid, COLOR_GREEN, "|_______ 24-7 _______|");
- SendClientMessage(playerid, COLOR_GRAD1, "| 1: Cell Phone $500 2: Scratch Card $7500");
- SendClientMessage(playerid, COLOR_GRAD2, "| 3: Phone Book $5000 4: Dice $500");
- SendClientMessage(playerid, COLOR_GRAD3, "| 5: Vehicle Key $5000 6: Vehicle Lock $10000");
- SendClientMessage(playerid, COLOR_GRAD4, "| 7: Speedometer $5000 8: Condom $50");
- SendClientMessage(playerid, COLOR_GRAD5, "| 9: CD-Player $2500 10: Chicken $10 ");
- SendClientMessage(playerid, COLOR_GRAD5, "| 11: Hamburger $10 12: Frozen Pizza $10");
- return 1;
- }
- new item = strval(tmp);
- if(SBizzInfo[9][sbProducts] == 0)
- {
- GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
- return 1;
- }
- if (item == 1 && GetPlayerMoney(playerid) > 500)
- {
- if(PlayerInfo[playerid][pTraderPerk] > 0)
- {
- new skill = 500 / 100;
- new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
- new payout = 500 - price;
- format(string, sizeof(string), "~r~-$%d", payout);
- GameTextForPlayer(playerid, string, 5000, 1);
- GivePlayerMoney(playerid,- payout);
- SBizzInfo[9][sbTill] += payout;
- ExtortionSBiz(9, payout);
- }
- else
- {
- format(string, sizeof(string), "~r~-$%d", 500);
- GameTextForPlayer(playerid, string, 5000, 1);
- GivePlayerMoney(playerid,-500);
- SBizzInfo[9][sbTill] += 500;
- ExtortionSBiz(9, 500);
- }
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- new randphone = 1000 + random(8999);//minimum 1000 max 9999
- PlayerInfo[playerid][pPnumber] = randphone;
- format(string, sizeof(string), " Mobile Phone Purchased your new Number is %d", randphone);
- SendClientMessage(playerid, COLOR_GRAD4, string);
- SendClientMessage(playerid, COLOR_GRAD5, "You can check this anytime by Typing /stats");
- SendClientMessage(playerid, COLOR_WHITE, "HINT: You can now type /help to see your cell phone commands.");
- return 1;
- }
- else if (item == 2 && GetPlayerMoney(playerid) > 7500)
- {
- if(PlayerInfo[playerid][pTraderPerk] > 0)
- {
- new skill = 7500 / 100;
- new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
- new payout = 7500 - price;
- GivePlayerMoney(playerid,- payout);
- SBizzInfo[9][sbTill] += payout;
- ExtortionSBiz(9, payout);
- format(string, sizeof(string), "~r~-$%d", payout);
- GameTextForPlayer(playerid, string, 5000, 1);
- }
- else
- {
- GivePlayerMoney(playerid,-7500);
- SBizzInfo[9][sbTill] += 7500;
- ExtortionSBiz(9, 7500);
- format(string, sizeof(string), "~r~-$%d", 1000);
- GameTextForPlayer(playerid, string, 5000, 1);
- }
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- new prize;
- new symb1[32]; new symb2[32]; new symb3[32];
- new randcard1 = random(10);//minimum 1000 max 9999
- new randcard2 = random(10);//minimum 1000 max 9999
- new randcard3 = random(10);//minimum 1000 max 9999
- if(randcard1 >= 5)
- {
- format(symb1, sizeof(symb1), "~b~]");
- randcard1 = 1;
- }
- else if(randcard1 <= 4 && randcard1 >= 2)
- {
- format(symb1, sizeof(symb1), "~g~]");
- randcard1 = 2;
- }
- else if(randcard1 < 2)
- {
- format(symb1, sizeof(symb1), "~y~]");
- randcard1 = 3;
- }
- if(randcard2 >= 5)
- {
- format(symb2, sizeof(symb2), "~b~]");
- randcard2 = 1;
- }
- else if(randcard2 <= 4 && randcard2 >= 2)
- {
- format(symb2, sizeof(symb2), "~g~]");
- randcard2 = 2;
- }
- else if(randcard2 < 2)
- {
- format(symb2, sizeof(symb2), "~y~]");
- randcard2 = 3;
- }
- if(randcard3 >= 5)
- {
- format(symb3, sizeof(symb3), "~b~]");
- randcard3 = 1;
- }
- else if(randcard3 <= 4 && randcard3 >= 2)
- {
- format(symb3, sizeof(symb3), "~g~]");
- randcard3 = 2;
- }
- else if(randcard3 < 2)
- {
- format(symb3, sizeof(symb3), "~y~]");
- randcard3 = 3;
- }
- if(randcard1 == randcard2 && randcard1 == randcard3)
- {
- if(randcard1 > 5)
- {
- prize = 2500;
- }
- if(randcard1 <= 4 && randcard1 >= 2)
- {
- prize = 1500;
- }
- if(randcard1 < 2)
- {
- prize = 500;
- }
- GivePlayerMoney(playerid,prize);
- SBizzInfo[9][sbTill] -= prize;
- ExtortionSBiz(9, prize);
- format(string, sizeof(string), "%s %s %s ~n~~n~~w~~g~$%d",symb1,symb2,symb3, prize);
- }
- else
- {
- format(string, sizeof(string), "%s %s %s ~n~~n~~w~~r~$0",symb1,symb2,symb3);
- }
- GameTextForPlayer(playerid, string, 3000, 3);
- return 1;
- }
- else if (item == 3 && GetPlayerMoney(playerid) > 5000)
- {
- if(PlayerInfo[playerid][pTraderPerk] > 0)
- {
- new skill = 5000 / 100;
- new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
- new payout = 5000 - price;
- GivePlayerMoney(playerid,- payout);
- SBizzInfo[9][sbTill] += payout;
- ExtortionSBiz(9, payout);
- format(string, sizeof(string), "~r~-$%d", payout);
- GameTextForPlayer(playerid, string, 5000, 1);
- }
- else
- {
- GivePlayerMoney(playerid,-5000);
- SBizzInfo[9][sbTill] += 5000;
- ExtortionSBiz(9, 5000);
- format(string, sizeof(string), "~r~-$%d", 5000);
- GameTextForPlayer(playerid, string, 5000, 1);
- }
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- PlayerInfo[playerid][pPhoneBook] = 1;
- format(string, sizeof(string), " Phone Book Purchased you can look up any Players Number !");
- SendClientMessage(playerid, COLOR_GRAD4, string);
- SendClientMessage(playerid, COLOR_WHITE, "HINT: Type /number <id/name>.");
- return 1;
- }
- else if (item == 4 && GetPlayerMoney(playerid) > 500)
- {
- if(PlayerInfo[playerid][pTraderPerk] > 0)
- {
- new skill = 500 / 100;
- new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
- new payout = 500 - price;
- GivePlayerMoney(playerid,- payout);
- SBizzInfo[9][sbTill] += payout;
- ExtortionSBiz(9, payout);
- format(string, sizeof(string), "~r~-$%d", payout);
- GameTextForPlayer(playerid, string, 5000, 1);
- }
- else
- {
- GivePlayerMoney(playerid,-500);
- SBizzInfo[9][sbTill] += 500;
- ExtortionSBiz(9, 500);
- format(string, sizeof(string), "~r~-$%d", 500);
- GameTextForPlayer(playerid, string, 5000, 1);
- }
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- gDice[playerid] = 1;
- format(string, sizeof(string), " Dice Purchased you can throw your Dice.");
- SendClientMessage(playerid, COLOR_GRAD4, string);
- SendClientMessage(playerid, COLOR_WHITE, "HINT: Type /dice ");
- return 1;
- }
- else if(item == 5 && GetPlayerMoney(playerid) > 5000)
- {
- if (gLastCar[playerid] != 0)
- {
- if(HireCar[playerid] != 299)
- {
- gCarLock[HireCar[playerid]] = 0;
- UnLockCar(HireCar[playerid]);
- HireCar[playerid] = 299;
- }
- if(PlayerInfo[playerid][pTraderPerk] > 0)
- {
- new skill = 5000 / 100;
- new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
- new payout = 5000 - price;
- GivePlayerMoney(playerid,- payout);
- SBizzInfo[9][sbTill] += payout;
- ExtortionSBiz(9, payout);
- format(string, sizeof(string), "~r~-$%d", payout);
- GameTextForPlayer(playerid, string, 5000, 1);
- }
- else
- {
- GivePlayerMoney(playerid,-5000);
- SBizzInfo[9][sbTill] += 5000;
- ExtortionSBiz(9, 5000);
- format(string, sizeof(string), "~r~-$%d", 5000);
- GameTextForPlayer(playerid, string, 5000, 1);
- }
- SBizzInfo[9][sbProducts]--;
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- HireCar[playerid] = gLastCar[playerid];
- format(string, sizeof(string), "Key Purchased You Can Lock Your Last Vehicle.");
- SendClientMessage(playerid, COLOR_GRAD4, string);
- SendClientMessage(playerid, COLOR_WHITE, "HINT: Type /lock ");
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, " You don't have a Vehicle to fit it to !");
- }
- return 1;
- }
- else if (item == 6 && GetPlayerMoney(playerid) > 10000)
- {
- if(PlayerInfo[playerid][pPhousekey] != 255)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1 && HireCar[PlayerInfo[playerid][pPhousekey]+1])
- {
- HireCar[i] = 299;
- }
- }
- if(PlayerInfo[playerid][pTraderPerk] > 0)
- {
- new skill = 10000 / 100;
- new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
- new payout = 10000 - price;
- GivePlayerMoney(playerid,- payout);
- SBizzInfo[9][sbTill] += payout;
- ExtortionSBiz(9, payout);
- format(string, sizeof(string), "~r~-$%d", payout);
- GameTextForPlayer(playerid, string, 5000, 1);
- }
- else
- {
- GivePlayerMoney(playerid,-10000);
- SBizzInfo[9][sbTill] += 10000;
- ExtortionSBiz(9, 10000);
- format(string, sizeof(string), "~r~-$%d", 10000);
- GameTextForPlayer(playerid, string, 5000, 1);
- }
- SBizzInfo[9][sbProducts]--;
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "New Locks Purchased.");
- SendClientMessage(playerid, COLOR_GRAD4, string);
- SendClientMessage(playerid, COLOR_WHITE, "HINT: Type /lock ");
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, " You don't have a Vehicle to fit it to !");
- }
- return 1;
- }
- else if (item == 7 && GetPlayerMoney(playerid) > 5000)
- {
- gSpeedo[playerid] = 1;
- if(PlayerInfo[playerid][pTraderPerk] > 0)
- {
- new skill = 5000 / 100;
- new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
- new payout = 5000 - price;
- GivePlayerMoney(playerid,- payout);
- SBizzInfo[9][sbTill] += payout;
- ExtortionSBiz(9, payout);
- format(string, sizeof(string), "~r~-$%d", payout);
- GameTextForPlayer(playerid, string, 5000, 1);
- }
- else
- {
- GivePlayerMoney(playerid,-5000);
- SBizzInfo[9][sbTill] += 5000;
- ExtortionSBiz(9, 5000);
- format(string, sizeof(string), "~r~-$%d", 5000);
- GameTextForPlayer(playerid, string, 5000, 1);
- }
- SBizzInfo[9][sbProducts]--;
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "Speedometer Purchased.");
- SendClientMessage(playerid, COLOR_GRAD4, string);
- SendClientMessage(playerid, COLOR_WHITE, "HINT: Type /speedo ");
- return 1;
- }
- else if (item == 8 && GetPlayerMoney(playerid) > 49)
- {
- if(PlayerInfo[playerid][pTraderPerk] > 0)
- {
- new skill = 50 / 100;
- new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
- new payout = 50 - price;
- GivePlayerMoney(playerid,- payout);
- format(string, sizeof(string), "~r~-$%d", payout);
- GameTextForPlayer(playerid, string, 5000, 1);
- }
- else
- {
- GivePlayerMoney(playerid,-50);
- format(string, sizeof(string), "~r~-$%d", 50);
- GameTextForPlayer(playerid, string, 5000, 1);
- }
- Condom[playerid] ++;
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "Condom Purchased.");
- SendClientMessage(playerid, COLOR_GRAD4, string);
- return 1;
- }
- else if (item == 9 && GetPlayerMoney(playerid) > 2500)
- {
- if(PlayerInfo[playerid][pTraderPerk] > 0)
- {
- new skill = 2500 / 100;
- new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
- new payout = 2500 - price;
- GivePlayerMoney(playerid, - payout);
- format(string, sizeof(string), "~r~-$%d", payout);
- GameTextForPlayer(playerid, string, 5000, 1);
- }
- else
- {
- GivePlayerMoney(playerid, - 2500);
- format(string, sizeof(string), "~r~-$%d", 2500);
- GameTextForPlayer(playerid, string, 5000, 1);
- }
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "CD-Player Purchased.");
- SendClientMessage(playerid, COLOR_GRAD4, string);
- SendClientMessage(playerid, COLOR_WHITE, "HINT: Type /music");
- PlayerInfo[playerid][pCDPlayer] = 1;
- return 1;
- }
- else if (item == 10 && GetPlayerMoney(playerid) > 10)
- {
- if(Groceries[playerid][pChickens] >= 3)
- {
- SendClientMessage(playerid, COLOR_GREY, " You have to many Chickens, Cook some first !");
- return 1;
- }
- if(PlayerInfo[playerid][pTraderPerk] > 0)
- {
- new skill = 10 / 100;
- new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
- new payout = 10 - price;
- GivePlayerMoney(playerid, - payout);
- format(string, sizeof(string), "~r~-$%d", payout);
- GameTextForPlayer(playerid, string, 5000, 1);
- }
- else
- {
- GivePlayerMoney(playerid, - 10);
- format(string, sizeof(string), "~r~-$%d", 10);
- GameTextForPlayer(playerid, string, 5000, 1);
- }
- GivePlayerMoney(playerid, - 10);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "Chicken Purchased.");
- SendClientMessage(playerid, COLOR_GRAD4, string);
- format(string, sizeof(string), "~r~-$%d", 10);
- GameTextForPlayer(playerid, string, 5000, 1);
- new rand = random(15);
- Groceries[playerid][pChickens] += 1;
- Groceries[playerid][pChicken] += rand;
- return 1;
- }
- else if (item == 11 && GetPlayerMoney(playerid) > 10)
- {
- if(Groceries[playerid][pHamburgers] >= 3)
- {
- SendClientMessage(playerid, COLOR_GREY, " You have to many Hamburgers, Cook some first !");
- return 1;
- }
- if(PlayerInfo[playerid][pTraderPerk] > 0)
- {
- new skill = 10 / 100;
- new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
- new payout = 10 - price;
- GivePlayerMoney(playerid, - payout);
- format(string, sizeof(string), "~r~-$%d", payout);
- GameTextForPlayer(playerid, string, 5000, 1);
- }
- else
- {
- GivePlayerMoney(playerid, - 10);
- format(string, sizeof(string), "~r~-$%d", 10);
- GameTextForPlayer(playerid, string, 5000, 1);
- }
- GivePlayerMoney(playerid, - 10);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "Hamburger Purchased.");
- SendClientMessage(playerid, COLOR_GRAD4, string);
- format(string, sizeof(string), "~r~-$%d", 10);
- GameTextForPlayer(playerid, string, 5000, 1);
- new rand = random(15);
- Groceries[playerid][pHamburgers] += 1;
- Groceries[playerid][pHamburger] += rand;
- return 1;
- }
- else if (item == 12 && GetPlayerMoney(playerid) > 10)
- {
- if(Groceries[playerid][pPizzas] >= 3)
- {
- SendClientMessage(playerid, COLOR_GREY, " You have to many Pizzas, Cook some first !");
- return 1;
- }
- if(PlayerInfo[playerid][pTraderPerk] > 0)
- {
- new skill = 10 / 100;
- new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
- new payout = 10 - price;
- GivePlayerMoney(playerid, - payout);
- format(string, sizeof(string), "~r~-$%d", payout);
- GameTextForPlayer(playerid, string, 5000, 1);
- }
- else
- {
- GivePlayerMoney(playerid, - 10);
- format(string, sizeof(string), "~r~-$%d", 10);
- GameTextForPlayer(playerid, string, 5000, 1);
- }
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "Frozen Pizza Purchased.");
- SendClientMessage(playerid, COLOR_GRAD4, string);
- new rand = random(15);
- Groceries[playerid][pPizzas] += 1;
- Groceries[playerid][pPizza] += rand;
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, " You don't have the cash for that !");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/buyhouse", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:oldposx, Float:oldposy, Float:oldposz;
- GetPlayerName(playerid, playername, sizeof(playername));
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- for(new h = 0; h < sizeof(HouseInfo); h++)
- {
- if(PlayerToPoint(2.0, playerid, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == 0)
- {
- if(PlayerInfo[playerid][pLevel] < HouseInfo[h][hLevel])
- {
- format(string, sizeof(string), " You must be Level %d to purchase this !", HouseInfo[h][hLevel]);
- SendClientMessage(playerid, COLOR_GRAD5, string);
- return 1;
- }
- if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
- {
- SendClientMessage(playerid, COLOR_WHITE, " You already own a house, type /sellhouse if you want to buy this one !");
- return 1;
- }
- if(GetPlayerMoney(playerid) > HouseInfo[h][hValue])
- {
- PlayerInfo[playerid][pPhousekey] = h;
- HouseInfo[h][hOwned] = 1;
- GetPlayerName(playerid, sendername, sizeof(sendername));
- strmid(HouseInfo[h][hOwner], sendername, 0, strlen(sendername), 255);
- GivePlayerMoney(playerid,-HouseInfo[h][hValue]);
- PlayerPlayMusic(playerid);
- SetPlayerInterior(playerid,HouseInfo[h][hInt]);
- SetPlayerPos(playerid,HouseInfo[h][hExitx],HouseInfo[h][hExity],HouseInfo[h][hExitz]);
- GameTextForPlayer(playerid, "~w~Welcome Home~n~You can exit at any time by moving to this door and typing /exit", 5000, 3);
- PlayerInfo[playerid][pInt] = HouseInfo[h][hInt];
- PlayerInfo[playerid][pLocal] = h;
- SendClientMessage(playerid, COLOR_WHITE, "Congratulations, on your new Purchase !");
- SendClientMessage(playerid, COLOR_WHITE, "Type /help to review the new property help section !");
- DateProp(playerid);
- OnPropUpdate();
- OnPlayerUpdate(playerid);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, " You don't have the cash for that !");
- return 1;
- }
- }
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/rentroom", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:oldposx, Float:oldposy, Float:oldposz;
- GetPlayerName(playerid, playername, sizeof(playername));
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- for(new h = 0; h < sizeof(HouseInfo); h++)
- {
- if(PlayerToPoint(2.0, playerid, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == 1 && HouseInfo[h][hRentabil] == 1)
- {
- if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
- {
- SendClientMessage(playerid, COLOR_WHITE, " You already own a house, type /sellhouse if you want to rent this one.");
- return 1;
- }
- if(GetPlayerMoney(playerid) > HouseInfo[h][hRent])
- {
- PlayerInfo[playerid][pPhousekey] = h;
- GivePlayerMoney(playerid,-HouseInfo[h][hRent]);
- HouseInfo[h][hTakings] = HouseInfo[h][hTakings]+HouseInfo[h][hRent];
- PlayerPlayMusic(playerid);
- SetPlayerInterior(playerid,HouseInfo[h][hInt]);
- SetPlayerPos(playerid,HouseInfo[h][hExitx],HouseInfo[h][hExity],HouseInfo[h][hExitz]);
- GameTextForPlayer(playerid, "~w~Welcome Home~n~You can exit at any time by moving to this door and typing /exit", 5000, 3);
- PlayerInfo[playerid][pInt] = HouseInfo[h][hInt];
- PlayerInfo[playerid][pLocal] = h;
- SendClientMessage(playerid, COLOR_WHITE, "Congratulations, You can enter and exit here anytime.");
- SendClientMessage(playerid, COLOR_WHITE, "Type /help to review the new property help section.");
- OnPlayerUpdate(playerid);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "You don't have the cash for that");
- return 1;
- }
- }
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/rentcar", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(GetPlayerVehicleID(playerid) >= 72 && GetPlayerVehicleID(playerid) <= 77)
- {
- new hirefee = HireCost(GetPlayerVehicleID(playerid));
- if(GetPlayerVehicleID(playerid) >= 72 && GetPlayerVehicleID(playerid) <= 74)
- {
- if(SBizzInfo[0][sbProducts] == 0)
- {
- GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
- return 1;
- }
- if(PlayerInfo[playerid][pPbiskey] == 0)
- {
- GameTextForPlayer(playerid, "~w~No charge for the boss", 5000, 3);
- TogglePlayerControllable(playerid, 1);
- return 1;
- }
- if (GetPlayerMoney(playerid) < SBizzInfo[0][sbEntranceCost])
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much cash !");
- return 1;
- }
- GivePlayerMoney(playerid,-SBizzInfo[0][sbEntranceCost]);
- SBizzInfo[0][sbTill] += SBizzInfo[0][sbEntranceCost];
- ExtortionSBiz(0, SBizzInfo[0][sbEntranceCost]);
- SBizzInfo[0][sbProducts]--;
- }
- if(GetPlayerVehicleID(playerid) >= 75 && GetPlayerVehicleID(playerid) <= 77)
- {
- if(SBizzInfo[1][sbProducts] == 0)
- {
- GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
- return 1;
- }
- if(PlayerInfo[playerid][pPbiskey] == 1)
- {
- GameTextForPlayer(playerid, "~w~No charge for the boss", 5000, 3);
- TogglePlayerControllable(playerid, 1);
- return 1;
- }
- if (GetPlayerMoney(playerid) < SBizzInfo[1][sbEntranceCost])
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much cash !");
- return 1;
- }
- GivePlayerMoney(playerid,-SBizzInfo[1][sbEntranceCost]);
- SBizzInfo[1][sbTill] += SBizzInfo[1][sbEntranceCost];
- ExtortionSBiz(1, SBizzInfo[1][sbEntranceCost]);
- SBizzInfo[1][sbProducts]--;
- }
- if(HireCar[playerid] != 299)
- {
- gCarLock[HireCar[playerid]] = 0;
- UnLockCar(HireCar[playerid]);
- }
- HireCar[playerid] = GetPlayerVehicleID(playerid);
- OnPropUpdate();
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "~w~We hope you enjoy ~n~the use of this car~n~To lock or unlock your car~n~type ~g~/lock~n~~w~please drive safely",hirefee);
- TogglePlayerControllable(playerid, 1);
- GameTextForPlayer(playerid, string, 5000, 3);
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/hirecar", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if (PlayerInfo[playerid][pAdmin] >= 1337)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /hirecar [key id]");
- return 1;
- }
- new car = strval(tmp);
- HireCar[playerid] = car;
- format(string, sizeof(string), "Key Fashioned You Can Lock Car %d.",car);
- SendClientMessage(playerid, COLOR_GRAD4, string);
- SendClientMessage(playerid, COLOR_WHITE, "HINT: Type /lock ");
- return 1;
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/switchkey", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(!SwitchKey[playerid])
- {
- if(HireCar[playerid] != 299)
- {
- SwitchKey[playerid] = 1;
- GameTextForPlayer(playerid, "~w~You control now your house car", 5000, 6);
- }
- else
- {
- GameTextForPlayer(playerid, "~w~You do not hire a car", 5000, 6);
- }
- return 1;
- }
- else
- {
- SwitchKey[playerid] = 0;
- GameTextForPlayer(playerid, "~w~You control now your hire car", 5000, 6);
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/givekey", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- new car;
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /givekey [playerid/PartOfName]");
- return 1;
- }
- giveplayerid = ReturnUser(tmp);
- if(HireCar[playerid] == 299 && PlayerInfo[playerid][pPhousekey] == 255)
- {
- SendClientMessage(playerid, COLOR_GRAD1, " You dont have a key to give");
- return 1;
- }
- else
- {
- if(HireCar[playerid] != 299 && SwitchKey[playerid] == 0)
- {
- car = HireCar[playerid];
- gCarLock[car] = 0;
- UnLockCar(car);
- HireCar[playerid] = 299;
- }
- else
- {
- car = PlayerInfo[playerid][pPhousekey]+1;
- }
- }
- if (IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if(ProxDetectorS(5.0, playerid, giveplayerid))
- {
- if(HireCar[giveplayerid] != 299)
- {
- gCarLock[HireCar[giveplayerid]] = 0;
- UnLockCar(HireCar[giveplayerid]);
- }
- HireCar[giveplayerid] = car;
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), " You have given %s the key to your vehicle", giveplayer);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- SendClientMessage(playerid, COLOR_GRAD1, string);
- format(string, sizeof(string), " You have recieved the key to a vehicle from %s", sendername);
- SendClientMessage(giveplayerid, COLOR_GRAD1, string);
- format(string, sizeof(string), "* %s takes out a set of keys, and tosses them to %s.", sendername ,giveplayer);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- }
- }
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/unrentcar", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(HireCar[playerid] != 299)
- {
- gCarLock[HireCar[playerid]] = 0;
- UnLockCar(HireCar[playerid]);
- HireCar[playerid] = 299;
- GameTextForPlayer(playerid, "~w~You no longer rent a car", 5000, 3);
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/unrent", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- GetPlayerName(playerid, playername, sizeof(playername));
- if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
- {
- SendClientMessage(playerid, COLOR_WHITE, " You own this house !");
- return 1;
- }
- PlayerInfo[playerid][pPhousekey] = 255;
- SendClientMessage(playerid, COLOR_WHITE, "You are now homeless.");
- }
- return 1;
- }
- if(strcmp(cmd, "/housewithdraw", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- GetPlayerName(playerid, playername, sizeof(playername));
- new bouse = PlayerInfo[playerid][pPhousekey];
- if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /housewithdraw [amount]");
- format(string, sizeof(string), " You Have $%d in your cashbox.", HouseInfo[bouse][hTakings]);
- SendClientMessage(playerid, COLOR_GRAD3, string);
- return 1;
- }
- new cashdeposit = strval(tmp);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /housewithdraw [amount]");
- format(string, sizeof(string), " You Have $%d in your cashbox.", HouseInfo[bouse][hTakings]);
- SendClientMessage(playerid, COLOR_GRAD3, string);
- return 1;
- }
- if (cashdeposit > HouseInfo[bouse][hTakings] || cashdeposit < 1)
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much !");
- return 1;
- }
- if (!PlayerToPoint(100, playerid,HouseInfo[bouse][hExitx],HouseInfo[bouse][hExity],HouseInfo[bouse][hExitz]))
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You are to far from your house !");
- return 1;
- }
- else
- {
- ConsumingMoney[playerid] = 1;
- GivePlayerMoney(playerid,cashdeposit);
- HouseInfo[bouse][hTakings]=HouseInfo[bouse][hTakings]-cashdeposit;
- format(string, sizeof(string), " You Have Withdrawn $%d from your cashbox Total: $%d ", cashdeposit,HouseInfo[bouse][hTakings]);
- OnPropUpdate();
- SendClientMessage(playerid, COLOR_YELLOW, string);
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "You don't own a house.");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/asellbiz", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- GetPlayerName(playerid, playername, sizeof(playername));
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /asellbiz [bizid]");
- return 1;
- }
- new biz = strval(tmp);
- if (PlayerInfo[playerid][pAdmin] >= 4)
- {
- BizzInfo[biz][bLocked] = 1;
- BizzInfo[biz][bOwned] = 0;
- strmid(BizzInfo[biz][bOwner], "The State", 0, strlen("The State"), 255);
- strmid(BizzInfo[biz][bExtortion], "No-one", 0, strlen("No-one"), 255);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "~w~You have sold the Business");
- GameTextForPlayer(playerid, string, 10000, 3);
- OnPropUpdate();
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "You are not an admin.");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/asellsbiz", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- GetPlayerName(playerid, playername, sizeof(playername));
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /asellsbiz [sbizid]");
- return 1;
- }
- new sbiz = strval(tmp);
- if (PlayerInfo[playerid][pAdmin] >= 4)
- {
- SBizzInfo[sbiz][sbLocked] = 1;
- SBizzInfo[sbiz][sbOwned] = 0;
- strmid(SBizzInfo[sbiz][sbOwner], "The State", 0, strlen("The State"), 255);
- strmid(SBizzInfo[sbiz][sbExtortion], "No-one", 0, strlen("No-one"), 255);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "~w~You have sold the Business");
- GameTextForPlayer(playerid, string, 10000, 3);
- OnPropUpdate();
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "You are not an admin.");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/asellhouse", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- GetPlayerName(playerid, playername, sizeof(playername));
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /asellhouse [houseid]");
- return 1;
- }
- new house = strval(tmp);
- if (PlayerInfo[playerid][pAdmin] >= 4)
- {
- HouseInfo[house][hHel] = 0;
- HouseInfo[house][hArm] = 0;
- HouseInfo[house][hHealthx] = 0;
- HouseInfo[house][hHealthy] = 0;
- HouseInfo[house][hHealthz] = 0;
- HouseInfo[house][hArmourx] = 0;
- HouseInfo[house][hArmoury] = 0;
- HouseInfo[house][hArmourz] = 0;
- HouseInfo[house][hLock] = 1;
- HouseInfo[house][hOwned] = 0;
- HouseInfo[house][hVec] = 418;
- HouseInfo[house][hVcol1] = -1;
- HouseInfo[house][hVcol2] = -1;
- strmid(HouseInfo[house][hOwner], "The State", 0, strlen("The State"), 255);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "~w~You have sold this property", HouseInfo[house][hValue]);
- GameTextForPlayer(playerid, string, 10000, 3);
- OnPropUpdate();
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "You are not an admin.");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/sellhouse", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- GetPlayerName(playerid, playername, sizeof(playername));
- if(PlayerInfo[playerid][pPhousekey] == 255)
- {
- SendClientMessage(playerid, COLOR_WHITE, "You don't own a house.");
- return 1;
- }
- if(PlayerInfo[playerid][pMarried] > 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " You are Married, can't sell the House !");
- return 1;
- }
- if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
- {
- new house = PlayerInfo[playerid][pPhousekey];
- HouseInfo[house][hHel] = 0;
- HouseInfo[house][hArm] = 0;
- HouseInfo[house][hHealthx] = 0;
- HouseInfo[house][hHealthy] = 0;
- HouseInfo[house][hHealthz] = 0;
- HouseInfo[house][hArmourx] = 0;
- HouseInfo[house][hArmoury] = 0;
- HouseInfo[house][hArmourz] = 0;
- HouseInfo[house][hLock] = 1;
- HouseInfo[house][hOwned] = 0;
- HouseInfo[house][hVec] = 418;
- HouseInfo[house][hVcol1] = -1;
- HouseInfo[house][hVcol2] = -1;
- GetPlayerName(playerid, sendername, sizeof(sendername));
- strmid(HouseInfo[house][hOwner], "The State", 0, strlen("The State"), 255);
- ConsumingMoney[playerid] = 1;
- GivePlayerMoney(playerid,HouseInfo[house][hValue]);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "~w~Congratulations~n~ You have sold your property for ~n~~g~$%d", HouseInfo[house][hValue]);
- GameTextForPlayer(playerid, string, 10000, 3);
- PlayerInfo[playerid][pPhousekey] = 255;
- if(PlayerInfo[playerid][pLocal] == house)
- {
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid,HouseInfo[house][hEntrancex],HouseInfo[house][hEntrancey],HouseInfo[house][hEntrancez]);
- PlayerInfo[playerid][pInt] = 0;
- }
- OnPropUpdate();
- OnPlayerUpdate(playerid);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "You don't own a house.");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/houseupgrade", true) == 0 || strcmp(cmd, "/hu", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- new house = PlayerInfo[playerid][pPhousekey];
- GetPlayerName(playerid, playername, sizeof(playername));
- if (house != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_WHITE, "USAGE: /houseupgrade [item number]");
- SendClientMessage(playerid, COLOR_GRAD1, "|_______ Home Supplys _______|");
- SendClientMessage(playerid, COLOR_GRAD2, "| 1: Health Upgrade $50000");
- SendClientMessage(playerid, COLOR_GRAD3, "| 2: Armour Upgrade $100000");
- SendClientMessage(playerid, COLOR_GRAD5, "| 3: TV $500");
- return 1;
- }
- new item = strval(tmp);
- switch (item)
- {
- case 1:
- {
- if(SBizzInfo[6][sbProducts] == 0)
- {
- GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
- return 1;
- }
- if(PlayerInfo[playerid][pLevel] < 5)
- {
- SendClientMessage(playerid, COLOR_GRAD5, "You Must Be Level 5 To Purchase This");
- return 1;
- }
- if(GetPlayerMoney(playerid) < 50000)
- {
- SendClientMessage(playerid, COLOR_GRAD5, "You Don't Have The Cash To Purchase This");
- return 1;
- }
- HouseInfo[house][hHel] = 1;
- GivePlayerMoney(playerid,-50000);
- SBizzInfo[6][sbTill] += 50000;//heal buisness
- ExtortionSBiz(6, 50000);
- SBizzInfo[6][sbProducts]--;
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- SendClientMessage(playerid, COLOR_GRAD5, "You Can Now Heal Yourself At Home, Type /heal.");
- }
- case 2:
- {
- if(!IsACop(playerid))
- {
- SendClientMessage(playerid, COLOR_GREY, " You can't buy this, you are not a Cop !");
- return 1;
- }
- if(SBizzInfo[6][sbProducts] == 0)
- {
- GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
- return 1;
- }
- if (PlayerInfo[playerid][pLevel] < 7)
- {
- SendClientMessage(playerid, COLOR_GRAD5, "You Must Be Level 7 To Purchase This");
- return 1;
- }
- if(GetPlayerMoney(playerid) < 100000)
- {
- SendClientMessage(playerid, COLOR_GRAD5, "You Don't Have The Cash To Purchase This");
- return 1;
- }
- HouseInfo[house][hArm] = 1;
- GivePlayerMoney(playerid,-100000);
- SBizzInfo[6][sbTill] += 100000;//heal buisness
- ExtortionSBiz(6, 100000);
- SBizzInfo[6][sbProducts]--;
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- SendClientMessage(playerid, COLOR_GRAD5, "You Can Now Get Armour At Home, Type /heal.");
- }
- case 3:
- {
- if(SBizzInfo[6][sbProducts] == 0)
- {
- GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
- return 1;
- }
- if (PlayerInfo[playerid][pLevel] < 3)
- {
- SendClientMessage(playerid, COLOR_GRAD5, "You Must Be Level 3 To Purchase This");
- return 1;
- }
- if(GetPlayerMoney(playerid) < 500)
- {
- SendClientMessage(playerid, COLOR_GRAD5, "You Don't Have The Cash To Purchase This");
- return 1;
- }
- HouseInfo[house][hHealthx] = 1;
- GivePlayerMoney(playerid,-500);
- SBizzInfo[6][sbTill] += 500;
- ExtortionSBiz(6, 500);
- SBizzInfo[6][sbProducts]--;
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- SendClientMessage(playerid, COLOR_GRAD5, "You can now use your TV set, type /tv.");
- }
- }
- OnPropUpdate();
- OnPlayerUpdate(playerid);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You don't own a house");
- return 1;
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/setrent", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- new bouse = PlayerInfo[playerid][pPhousekey];
- GetPlayerName(playerid, playername, sizeof(playername));
- if (bouse != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setrent [RentFee]");
- return 1;
- }
- if(strval(tmp) < 1 || strval(tmp) > 99999)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Minimum rent is $1, Maximum rent is $99999.");
- return 1;
- }
- HouseInfo[bouse][hRent] = strval(tmp);
- OnPropUpdate();
- format(string, sizeof(string), "House rent set to $%d", HouseInfo[bouse][hRent]);
- SendClientMessage(playerid, COLOR_WHITE, string);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You don't own a house");
- return 1;
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/evictall", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- new bouse = PlayerInfo[playerid][pPhousekey];
- if (bouse != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(i != playerid)
- {
- if (PlayerInfo[i][pPhousekey] == PlayerInfo[playerid][pPhousekey] )
- {
- SendClientMessage(i, COLOR_WHITE, "You have been evicted from your house.");
- SendClientMessage(playerid, COLOR_WHITE, "Everyone have been evicted.");
- PlayerInfo[i][pPhousekey] = 255;
- return 1;
- }
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You don't own a house !");
- return 1;
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/evict", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- new bouse = PlayerInfo[playerid][pPhousekey];
- GetPlayerName(playerid, playername, sizeof(playername));
- if (bouse != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_WHITE, "USAGE: /evict [playerid/PartOfName]");
- }
- new target;
- //target = strval(tmp);
- target = ReturnUser(tmp);
- if (target == playerid)
- {
- SendClientMessage(target, COLOR_WHITE, "You cant evict yourself.");
- return 1;
- }
- if(IsPlayerConnected(target))
- {
- if(target != INVALID_PLAYER_ID)
- {
- if(PlayerInfo[target][pPhousekey] == PlayerInfo[playerid][pPhousekey])
- {
- SendClientMessage(target, COLOR_WHITE, "You have been evicted");
- SendClientMessage(playerid, COLOR_WHITE, "Player has been evicted");
- PlayerInfo[target][pPhousekey] = 255;
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "Player doesn't rent at your House !");
- return 1;
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You don't own a house !");
- return 1;
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/setrentable", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- new bouse = PlayerInfo[playerid][pPhousekey];
- GetPlayerName(playerid, playername, sizeof(playername));
- if (bouse != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setrentable [0/1]");
- }
- HouseInfo[bouse][hRentabil] = strval(tmp);
- OnPropUpdate();
- format(string, sizeof(string), "House rentable set to %d.", HouseInfo[bouse][hRentabil]);
- SendClientMessage(playerid, COLOR_WHITE, string);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You don't own a house !");
- return 1;
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/call", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /call [phonenumber]");
- return 1;
- }
- if(PlayerInfo[playerid][pPnumber] == 0)
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You dont't have a cell phone !");
- return 1;
- }
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "* %s takes out a cellphone.", sendername);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- new phonenumb = strval(tmp);
- if(phonenumb == 911)
- {
- SendClientMessage(playerid, COLOR_WHITE, "HINT: You now use T to talk on your cellphone, type /hangup to hang up");
- SendClientMessage(playerid, COLOR_ALLDEPT, "EMERGENCY: Which Service Do You Require, Police or Paramedic?");
- Mobile[playerid] = 911;
- return 1;
- }
- if(phonenumb == PlayerInfo[playerid][pPnumber])
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You just get a busy tone...");
- return 1;
- }
- if(Mobile[playerid] != 255)
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You are already on a call...");
- return 1;
- }
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pPnumber] == phonenumb && phonenumb != 0)
- {
- giveplayerid = i;
- Mobile[playerid] = giveplayerid; //caller connecting
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if(PhoneOnline[giveplayerid] > 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " That players Phone is Offline !");
- return 1;
- }
- if (Mobile[giveplayerid] == 255)
- {
- format(string, sizeof(string), "Your Mobile is Ringing Type (/Pickup) CallerID: %s", sendername);
- SendClientMessage(giveplayerid, COLOR_YELLOW, string);
- GetPlayerName(giveplayerid, sendername, sizeof(sendername));
- RingTone[giveplayerid] = 10;
- format(string, sizeof(string), "* %s's phone begins to ring.", sendername);
- SendClientMessage(playerid, COLOR_WHITE, "HINT: You now use T to talk on your cellphone, type /hangup to hang up");
- ProxDetector(30.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- CellTime[playerid] = 1;
- return 1;
- }
- }
- }
- }
- }
- }
- SendClientMessage(playerid, COLOR_GRAD2, " You just get a Busy tone...");
- }
- return 1;
- }
- if(strcmp(cmd, "/txt", true) == 0 || strcmp(cmd, "/t", true) == 0 || strcmp(cmd, "/sms", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(gPlayerLogged[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/t)ext [phonenumber] [text chat]");
- return 1;
- }
- if(PlayerInfo[playerid][pPnumber] == 0)
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You dont't have a cell phone...");
- return 1;
- }
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "* %s takes out a cellphone.", sendername);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- new phonenumb = strval(tmp);
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/t)ext [phonenumber] [text chat]");
- return 1;
- }
- if(phonenumb == 555)
- {
- if ((strcmp("yes", result, true, strlen(result)) == 0) && (strlen(result) == strlen("yes")))
- {
- SendClientMessage(playerid, COLOR_WHITE, "Text Message Delivered.");
- if (gTeam[playerid] == 2 || gTeam[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "SMS: I have no idea what you're talking about, Sender: MOLE (555)");
- RingTone[playerid] = 20;
- return 1;
- }
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_YELLOW, "SMS: A simple Yes will do, Sender: MOLE (555)");
- RingTone[playerid] = 20;
- return 1;
- }
- }
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pPnumber] == phonenumb && phonenumb != 0)
- {
- giveplayerid = i;
- Mobile[playerid] = giveplayerid; //caller connecting
- if(IsPlayerConnected(giveplayerid))
- {
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if(PhoneOnline[giveplayerid] > 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " That players Phone is Offline !");
- return 1;
- }
- format(string, sizeof(string), "SMS: %s, Sender: %s (%d)", result,sendername,PlayerInfo[playerid][pPnumber]);
- GetPlayerName(giveplayerid, sendername, sizeof(sendername));
- //format(string, sizeof(string), "* %s's phone beeps.", sendername);
- RingTone[giveplayerid] =20;
- SendClientMessage(playerid, COLOR_WHITE, "Text Message Delivered");
- SendClientMessage(giveplayerid, COLOR_YELLOW, string);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- format(string, sizeof(string), "~r~$-%d", txtcost);
- GameTextForPlayer(playerid, string, 5000, 1);
- GivePlayerMoney(playerid,-txtcost);
- SBizzInfo[2][sbTill] += txtcost;
- ExtortionSBiz(2, txtcost);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- Mobile[playerid] = 255;
- return 1;
- }
- }
- }
- }
- }
- SendClientMessage(playerid, COLOR_GRAD2, " Message Delivery Failed...");
- }
- return 1;
- }
- //----------------------------------[pickup]-----------------------------------------------
- if(strcmp(cmd, "/pickup", true) == 0 || strcmp(cmd, "/p", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(Mobile[playerid] != 255)
- {
- SendClientMessage(playerid, COLOR_GRAD2, " You are already on a call...");
- return 1;
- }
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(Mobile[i] == playerid)
- {
- Mobile[playerid] = i; //caller connecting
- SendClientMessage(i, COLOR_GRAD2, " They Picked up the call.");
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "* %s answers his cellphone.", sendername);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- RingTone[playerid] = 0;
- }
- }
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/hangup", true) == 0 || strcmp(cmd, "/h", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- new caller = Mobile[playerid];
- if(IsPlayerConnected(caller))
- {
- if(caller != INVALID_PLAYER_ID)
- {
- if(caller != 255)
- {
- if(caller < 255)
- {
- SendClientMessage(caller, COLOR_GRAD2, " They hung up.");
- CellTime[caller] = 0;
- CellTime[playerid] = 0;
- SendClientMessage(playerid, COLOR_GRAD2, " You hung up.");
- Mobile[caller] = 255;
- }
- Mobile[playerid] = 255;
- CellTime[playerid] = 0;
- RingTone[playerid] = 0;
- return 1;
- }
- }
- }
- SendClientMessage(playerid, COLOR_GRAD2, " Your phone is in your pocket.");
- }
- return 1;
- }
- //----------------------------------[TIME]-----------------------------------------------
- if(strcmp(cmd, "/fixr", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- PlayerFixRadio(playerid);
- }
- return 1;
- }
- if(strcmp(cmd, "/time", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- new mtext[20];
- new year, month,day;
- getdate(year, month, day);
- if(month == 1) { mtext = "January"; }
- else if(month == 2) { mtext = "February"; }
- else if(month == 3) { mtext = "March"; }
- else if(month == 4) { mtext = "April"; }
- else if(month == 5) { mtext = "May"; }
- else if(month == 6) { mtext = "June"; }
- else if(month == 7) { mtext = "Juli"; }
- else if(month == 8) { mtext = "August"; }
- else if(month == 9) { mtext = "September"; }
- else if(month == 10) { mtext = "October"; }
- else if(month == 11) { mtext = "November"; }
- else if(month == 12) { mtext = "December"; }
- new hour,minuite,second;
- gettime(hour,minuite,second);
- FixHour(hour);
- hour = shifthour;
- if (minuite < 10)
- {
- if (PlayerInfo[playerid][pJailTime] > 0)
- {
- format(string, sizeof(string), "~y~%d %s~n~~g~|~w~%d:0%d~g~|~n~~w~Jail Time Left: %d sec", day, mtext, hour, minuite, PlayerInfo[playerid][pJailTime]-10);
- }
- else
- {
- format(string, sizeof(string), "~y~%d %s~n~~g~|~w~%d:0%d~g~|", day, mtext, hour, minuite);
- }
- }
- else
- {
- if (PlayerInfo[playerid][pJailTime] > 0)
- {
- format(string, sizeof(string), "~y~%d %s~n~~g~|~w~%d:%d~g~|~n~~w~Jail Time Left: %d sec", day, mtext, hour, minuite, PlayerInfo[playerid][pJailTime]-10);
- }
- else
- {
- format(string, sizeof(string), "~y~%d %s~n~~g~|~w~%d:%d~g~|", day, mtext, hour, minuite);
- }
- }
- GameTextForPlayer(playerid, string, 5000, 1);
- }
- return 1;
- }
- //----------------------{HOUSES}-------------------
- if(strcmp(cmd, "/house", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /house [housenumber]");
- return 1;
- }
- new housenum = strval(tmp);
- SetPlayerInterior(playerid,HouseInfo[housenum][hInt]);
- SetPlayerPos(playerid,HouseInfo[housenum][hExitx],HouseInfo[housenum][hExity],HouseInfo[housenum][hExitz]);
- GameTextForPlayer(playerid, "~w~Teleporting", 5000, 1);
- PlayerInfo[playerid][pInt] = HouseInfo[housenum][hInt];
- PlayerInfo[playerid][pLocal] = housenum;
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/houseo", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /houseo [housenumber]");
- return 1;
- }
- new housenum = strval(tmp);
- SetPlayerPos(playerid,HouseInfo[housenum][hEntrancex],HouseInfo[housenum][hEntrancey],HouseInfo[housenum][hEntrancez]);
- GameTextForPlayer(playerid, "~w~Teleporting", 5000, 1);
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/biz", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pAdmin] >= 1337)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /biz [biznumber]");
- return 1;
- }
- new housenum = strval(tmp);
- SetPlayerInterior(playerid,BizzInfo[housenum][bInterior]);
- SetPlayerPos(playerid,BizzInfo[housenum][bExitX],BizzInfo[housenum][bExitY],BizzInfo[housenum][bExitZ]);
- GameTextForPlayer(playerid, "~w~Teleporting", 5000, 1);
- PlayerInfo[playerid][pInt] = BizzInfo[housenum][bInterior];
- PlayerInfo[playerid][pLocal] = housenum+99;
- }
- }
- return 1;
Add Comment
Please, Sign In to add comment