Guest User

Untitled

a guest
Feb 10th, 2013
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 416.29 KB | None | 0 0
  1. /*
  2. Just to begin with, i've never taken any credit of parts that were created by Astro (Denver) aka
  3. Denver the creator of PEN1.
  4. Valhalla Gaming Comunity has indeed paid me for this very script you are about to read, where they
  5. only paid for the systems and parts that were created by me.
  6. They received this script a few months ago, and their server owner is trying to rip me off.
  7. Due to this fact + i'm not scripting anymore, i release this script so that everyone can use it.
  8.  
  9. Credits to Astro.
  10. Credits to Tratulla for his 2 .ini Functions.
  11. Credits to the Fuel System creator on SA-MP forums.
  12. Credits to Morph for the Name Showing timer.
  13. */
  14. #include <a_samp>
  15. #include <core>
  16. #include <float>
  17. #include <time>
  18. #include <file>
  19. #include <dprop>
  20. #include <utils>
  21. #include <morphinc>
  22. static gTeam[MAX_PLAYERS];
  23.  
  24. #define MAX_STRING 255
  25. #define CHECKPOINT_NONE 0
  26. #define CHECKPOINT_HOME 12
  27. #define COLOR_GRAD1 0xB4B5B7FF
  28. #define COLOR_GRAD2 0xBFC0C2FF
  29. #define COLOR_GRAD3 0xCBCCCEFF
  30. #define COLOR_GRAD4 0xD8D8D8FF
  31. #define COLOR_GRAD5 0xE3E3E3FF
  32. #define COLOR_GRAD6 0xF0F0F0FF
  33. #define COLOR_GREY 0xAFAFAFAA
  34. #define COLOR_GREEN 0x33AA33AA
  35. #define COLOR_RED 0xAA3333AA
  36. #define COLOR_LIGHTRED 0xFF6347AA
  37. #define COLOR_LIGHTBLUE 0x33CCFFAA
  38. #define COLOR_LIGHTGREEN 0x9ACD32AA
  39. #define COLOR_YELLOW 0xFFFF00AA
  40. #define COLOR_YELLOW2 0xF5DEB3AA
  41. #define COLOR_WHITE 0xFFFFFFAA
  42. #define COLOR_FADE1 0xE6E6E6E6
  43. #define COLOR_FADE2 0xC8C8C8C8
  44. #define COLOR_FADE3 0xAAAAAAAA
  45. #define COLOR_FADE4 0x8C8C8C8C
  46. #define COLOR_FADE5 0x6E6E6E6E
  47. #define COLOR_PURPLE 0xC2A2DAAA
  48. #define COLOR_DBLUE 0x2641FEAA
  49. #define COLOR_ALLDEPT 0xFF8282AA
  50. #define COLOR_NEWS 0xFFA500AA
  51. #define COLOR_OOC 0xE0FFFFAA
  52. #define TEAM_CYAN 1
  53. #define TEAM_BLUE 2
  54. #define TEAM_GREEN 3
  55. #define TEAM_ORANGE 4
  56. #define TEAM_COR 5
  57. #define TEAM_BAR 6
  58. #define TEAM_TAT 7
  59. #define TEAM_CUN 8
  60. #define TEAM_STR 9
  61. #define TEAM_HIT 10
  62. #define TEAM_ADMIN 11
  63. #define OBJECTIVE_COLOR 0x64000064
  64. #define TEAM_GREEN_COLOR 0xFFFFFFAA
  65. #define TEAM_JOB_COLOR 0xFFB6C1AA
  66. #define TEAM_HIT_COLOR 0xFFFFFF00
  67. #define TEAM_BLUE_COLOR 0x8D8DFF00
  68. #define COLOR_ADD 0x63FF60AA
  69. #define TEAM_GROVE_COLOR 0x00D900C8
  70. #define TEAM_VAGOS_COLOR 0xFFC801C8
  71. #define TEAM_BALLAS_COLOR 0xD900D3C8
  72. #define TEAM_AZTECAS_COLOR 0x01FCFFC8
  73. #define TEAM_CYAN_COLOR 0xFF8282AA
  74. #define TEAM_ORANGE_COLOR 0xFF830000
  75. #define TEAM_COR_COLOR 0x39393900
  76. #define TEAM_BAR_COLOR 0x00D90000
  77. #define TEAM_TAT_COLOR 0xBDCB9200
  78. #define TEAM_CUN_COLOR 0xD900D300
  79. #define TEAM_STR_COLOR 0x01FCFF00
  80. #define TEAM_ADMIN_COLOR 0x00808000
  81. #define COLOR_INVIS 0xAFAFAF00
  82. #define COLOR_SPEC 0xBFC0C200
  83.  
  84. forward LoadProperty();
  85. forward LoadBizz();
  86. forward LoadSBizz();
  87. forward LoadStuff();
  88. forward SaveStuff();
  89. forward LoadCK();
  90. forward SaveCK();
  91. forward LoadFamilies();
  92. forward SaveFamilies();
  93. forward LoadTurfs();
  94. forward SaveTurfs();
  95. forward LoadIRC();
  96. forward SaveIRC();
  97. forward LoadPapers();
  98. forward SavePapers();
  99. forward LoadBoxer();
  100. forward SaveBoxer();
  101. forward OnPropUpdate();
  102. forward ExtortionBiz(bizid, money);
  103. forward ExtortionSBiz(bizid, money);
  104. forward JoinChannel(playerid, number, line[]);
  105. forward JoinChannelNr(playerid, number);
  106. forward IsAtClothShop(playerid);
  107. forward IsAtGasStation(playerid);
  108. forward IsAtFishPlace(playerid);
  109. forward IsAtCookPlace(playerid);
  110. forward IsAtBar(playerid);
  111. forward SearchingHit(playerid);
  112. forward DollahScoreUpdate();
  113. forward SetPlayerSpawn(playerid);
  114. forward SetupPlayerForClassSelection(playerid);
  115. forward SetPlayerTeamFromClass(playerid,classid);
  116. forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
  117. forward CrimInRange(Float:radi, playerid,copid);
  118. forward SendEnemyMessage(color, string[]);
  119. forward SendTeamBeepMessage(team, color, string[]);
  120. forward ABroadCast(color,const string[],level);
  121. forward DateProp(playerid);
  122. forward GetClosestPlayer(p1);
  123. forward IsPlayerInTurf(playerid, turfid);
  124. forward LoadMission(playerid,name[]);
  125. forward SaveMission(playerid,name[]);
  126. forward PrintBizInfo(playerid,targetid);
  127. forward PrintSBizInfo(playerid,targetid);
  128. forward SetPlayerUnjail();
  129. forward OtherTimer();
  130. forward RingTonerRev();
  131. forward RingToner();
  132. forward HireCost(carid);
  133. forward BanLog(string[]);
  134. forward KickLog(string[]);
  135. forward PayLog(string[]);
  136. forward CKLog(string[]);
  137. forward IsATruck(carid);
  138. forward IsAnAmbulance(carid);
  139. forward IsACopCar(carid);
  140. forward IsAPlane(carid);
  141. forward IsABoat(carid);
  142. forward IsACop(playerid);
  143. forward IsAMember(playerid);
  144. forward IsAnInstructor(playerid);
  145. forward Spectator();
  146. forward ConvertTicks(ticks);
  147. forward Encrypt(string[]);
  148. forward KartingEnded();
  149. forward StartKarting();
  150. forward PrepareKarting();
  151. forward PaintballEnded();
  152. forward StartPaintball();
  153. forward PreparePaintball();
  154. forward Float:GetDistanceBetweenPlayers(p1,p2);
  155. forward GameModeExitFunc();
  156. forward SetAllPlayerCheckpoint(Float:allx, Float:ally, Float:allz, Float:radi, num);
  157. forward SetAllCopCheckpoint(Float:allx, Float:ally, Float:allz, Float:radi);
  158. forward SetPlayerCriminal(playerid,declare,reason[]);
  159. forward SetPlayerFree(playerid,declare,reason[]);
  160. forward SetPlayerWeapons(playerid);
  161. forward ShowStats(playerid,targetid);
  162. forward SetPlayerToTeamColor(playerid);
  163. forward GameModeInitExitFunc();
  164. forward split(const strsrc[], strdest[][], delimiter);
  165. forward OnPlayerLogin(playerid,password[]);
  166. forward OnPlayerUpdate(playerid);
  167. forward BroadCast(color,const string[]);
  168. forward OOCOff(color,const string[]);
  169. forward OOCNews(color,const string[]);
  170. forward SendJobMessage(job, color, string[]);
  171. forward SendFamilyMessage(family, color, string[]);
  172. forward SendNewFamilyMessage(family, color, string[]);
  173. forward SendIRCMessage(channel, color, string[]);
  174. forward SendTeamMessage(team, color, string[]);
  175. forward SendRadioMessage(member, color, string[]);
  176. forward SendAdminMessage(color, string[]);
  177. forward AddCar(carcoords);
  178. forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
  179. forward ProxDetectorS(Float:radi, playerid, targetid);
  180. forward ClearCK(ck);
  181. forward ClearFamily(family);
  182. forward ClearMarriage(playerid);
  183. forward ClearPaper(paper);
  184. forward ClearCrime(playerid);
  185. forward FishCost(playerid, fish);
  186. forward ClearFishes(playerid);
  187. forward ClearFishID(playerid, fish);
  188. forward ClearCooking(playerid);
  189. forward ClearCookingID(playerid, cook);
  190. forward ClearGroceries(playerid);
  191. forward Lotto(number);
  192. forward CarCheck();
  193. forward CarInit();
  194. forward CarTow(carid);
  195. forward CarRespawn(carid);
  196. forward LockCar(carid);
  197. forward UnLockCar(carid);
  198. forward InitLockDoors(playerid);
  199. forward CheckGas();
  200. forward Fillup();
  201. forward StoppedVehicle();
  202. forward SyncTime();
  203. forward SyncUp();
  204. forward SaveAccounts();
  205. forward IsPlayerInZone(playerid, zoneid);
  206. forward Production();
  207. forward Checkprop();
  208. forward PayDay();
  209. forward ini_GetKey( line[] );
  210. forward ini_GetValue( line[] );
  211. forward PlayerPlayMusic(playerid);
  212. forward StopMusic();
  213. forward PlayerFixRadio(playerid);
  214. forward PlayerFixRadio2();
  215. forward HouseLevel(playerid);
  216. forward CHouseLevel(houseid);
  217. forward CustomPickups();
  218. forward IdleKick();
  219. forward SetCamBack(playerid);
  220. forward FixHour(hour);
  221. forward AddsOn();
  222. //------------------------------------------------------------------------------------------------------
  223. new Security = 0;
  224. new CreatedCars[100];
  225. new CreatedCar = 0;
  226. new Tax = 0;
  227. new TaxValue = 0;
  228. new Jackpot = 0;
  229. new StartingPaintballRound = 0;
  230. new AnnouncedPaintballRound = 0;
  231. new PaintballPlayers = 0;
  232. new PaintballRound = 0;
  233. new PaintballWinner = 999;
  234. new PaintballWinnerKills = 0;
  235. new StartingKartRound = 0;
  236. new EndingKartRound = 0;
  237. new AnnouncedKartRound = 0;
  238. new KartingPlayers = 0;
  239. new KartingRound = 0;
  240. new FirstKartWinner = 999;
  241. new SecondKartWinner = 999;
  242. new ThirdKartWinner = 999;
  243. new InRing = 0;
  244. new RoundStarted = 0;
  245. new BoxDelay = 0;
  246. new Boxer1 = 255;
  247. new Boxer2 = 255;
  248. new TBoxer = 255;
  249. new PlayerBoxing[MAX_PLAYERS];
  250. new hitfound = 0;
  251. new hitid = 999;
  252. new Medics = 0;
  253. new MedicCall = 999;
  254. new MedicCallTime[MAX_PLAYERS];
  255. new Mechanics = 0;
  256. new MechanicCall = 999;
  257. new MechanicCallTime[MAX_PLAYERS];
  258. new TaxiDrivers = 0;
  259. new TaxiCall = 999;
  260. new TaxiCallTime[MAX_PLAYERS];
  261. new TaxiAccepted[MAX_PLAYERS];
  262. new BusDrivers = 0;
  263. new BusCall = 999;
  264. new BusCallTime[MAX_PLAYERS];
  265. new BusAccepted[MAX_PLAYERS];
  266. new TransportDuty[MAX_PLAYERS];
  267. new TransportValue[MAX_PLAYERS];
  268. new TransportMoney[MAX_PLAYERS];
  269. new TransportTime[MAX_PLAYERS];
  270. new TransportCost[MAX_PLAYERS];
  271. new TransportDriver[MAX_PLAYERS];
  272. new JobDuty[MAX_PLAYERS];
  273. new RegistrationStep[MAX_PLAYERS];
  274. new MapIconsShown[MAX_PLAYERS];
  275. new OnCK[MAX_PLAYERS];
  276. new GettingCK[MAX_PLAYERS];
  277. new PlayerPaintballing[MAX_PLAYERS];
  278. new PlayerPaintballKills[MAX_PLAYERS];
  279. new PlayerKarting[MAX_PLAYERS];
  280. new PlayerInKart[MAX_PLAYERS];
  281. new SchoolSpawn[MAX_PLAYERS];
  282. new TakingLesson[MAX_PLAYERS];
  283. new UsedFind[MAX_PLAYERS];
  284. new PlayersChannel[MAX_PLAYERS];
  285. new PlayerOnMission[MAX_PLAYERS];
  286. new MissionCheckpoint[MAX_PLAYERS];
  287. new WatchingTV[MAX_PLAYERS];
  288. new NoFuel[MAX_PLAYERS];
  289. new MatsHolding[MAX_PLAYERS];
  290. new DivorceOffer[MAX_PLAYERS];
  291. new MarriageCeremoney[MAX_PLAYERS];
  292. new ProposeOffer[MAX_PLAYERS];
  293. new ProposedTo[MAX_PLAYERS];
  294. new GotProposedBy[MAX_PLAYERS];
  295. new MarryWitness[MAX_PLAYERS];
  296. new MarryWitnessOffer[MAX_PLAYERS];
  297. new TicketOffer[MAX_PLAYERS];
  298. new TicketMoney[MAX_PLAYERS];
  299. new PlayerStoned[MAX_PLAYERS];
  300. new ConsumingMoney[MAX_PLAYERS];
  301. new BringingPaper[MAX_PLAYERS]; //Paper Boys must pick up a Paper first, then use /deliver
  302. new GotPaper[MAX_PLAYERS]; //The player has a paper so he can use /read
  303. new WritingPaper[MAX_PLAYERS]; //Used for onplayertext so he can type in lines
  304. new WritingPaperNumber[MAX_PLAYERS]; //To which Paper in PaperInfo will it be written
  305. new WritingLine[MAX_PLAYERS]; //Used for onplayertext to see which line he's at
  306. new FishCount[MAX_PLAYERS];
  307. new SpawnChange[MAX_PLAYERS];
  308. new TutTime[MAX_PLAYERS];
  309. new PlayerDrunk[MAX_PLAYERS];
  310. new PlayerDrunkTime[MAX_PLAYERS];
  311. new PlayerTazeTime[MAX_PLAYERS];
  312. new FindTimePoints[MAX_PLAYERS];
  313. new FindTime[MAX_PLAYERS];
  314. new BoxWaitTime[MAX_PLAYERS];
  315. new TestFishes[MAX_PLAYERS];
  316. new PaperOffer[MAX_PLAYERS];
  317. new BoxOffer[MAX_PLAYERS];
  318. new CarOffer[MAX_PLAYERS];
  319. new CarPrice[MAX_PLAYERS];
  320. new CarID[MAX_PLAYERS];
  321. new CarCalls[MAX_PLAYERS];
  322. new GotHit[MAX_PLAYERS];
  323. new GoChase[MAX_PLAYERS];
  324. new GetChased[MAX_PLAYERS];
  325. new OrderReady[MAX_PLAYERS];
  326. new ConnectedToPC[MAX_PLAYERS];
  327. new MedicTime[MAX_PLAYERS];
  328. new NeedMedicTime[MAX_PLAYERS];
  329. new MedicBill[MAX_PLAYERS];
  330. new PlayerTied[MAX_PLAYERS];
  331. new PlayerCuffed[MAX_PLAYERS];
  332. new PlayerCuffedTime[MAX_PLAYERS];
  333. new LiveOffer[MAX_PLAYERS];
  334. new TalkingLive[MAX_PLAYERS];
  335. new PlacedNews[MAX_PLAYERS];
  336. new SelectChar[MAX_PLAYERS];
  337. new SelectCharID[MAX_PLAYERS];
  338. new SelectCharPlace[MAX_PLAYERS];
  339. new ChosenSkin[MAX_PLAYERS];
  340. new GettingJob[MAX_PLAYERS];
  341. new GuardOffer[MAX_PLAYERS];
  342. new GuardPrice[MAX_PLAYERS];
  343. new ApprovedLawyer[MAX_PLAYERS];
  344. new CallLawyer[MAX_PLAYERS];
  345. new WantLawyer[MAX_PLAYERS];
  346. new CurrentMoney[MAX_PLAYERS];
  347. new KickPlayer[MAX_PLAYERS];
  348. new Robbed[MAX_PLAYERS];
  349. new RobbedTime[MAX_PLAYERS];
  350. new CP[MAX_PLAYERS];
  351. new MoneyMessage[MAX_PLAYERS];
  352. new Condom[MAX_PLAYERS];
  353. new STDPlayer[MAX_PLAYERS];
  354. new SexOffer[MAX_PLAYERS];
  355. new SexPrice[MAX_PLAYERS];
  356. new RepairOffer[MAX_PLAYERS];
  357. new RepairPrice[MAX_PLAYERS];
  358. new RefillOffer[MAX_PLAYERS];
  359. new RefillPrice[MAX_PLAYERS];
  360. new RepairCar[MAX_PLAYERS];
  361. new DrugOffer[MAX_PLAYERS];
  362. new DrugPrice[MAX_PLAYERS];
  363. new DrugGram[MAX_PLAYERS];
  364. new JailPrice[MAX_PLAYERS];
  365. new WantedPoints[MAX_PLAYERS];
  366. new WantedLevel[MAX_PLAYERS];
  367. new OnDuty[MAX_PLAYERS];
  368. new gPlayerCheckpointStatus[MAX_PLAYERS];
  369. new gPlayerLogged[MAX_PLAYERS];
  370. new gPlayerLogTries[MAX_PLAYERS];
  371. new gPlayerSpawned[MAX_PLAYERS];
  372. new gActivePlayers[MAX_PLAYERS];
  373. new gLastCar[301];
  374. new gOoc[MAX_PLAYERS];
  375. new gNews[MAX_PLAYERS];
  376. new gFam[MAX_PLAYERS];
  377. new BigEar[MAX_PLAYERS];
  378. new Spectate[MAX_PLAYERS];
  379. new CellTime[MAX_PLAYERS];
  380. new StartTime[MAX_PLAYERS];
  381. new HireCar[MAX_PLAYERS];
  382. new SafeTime[MAX_PLAYERS];
  383. new HidePM[MAX_PLAYERS];
  384. new PhoneOnline[MAX_PLAYERS];
  385. new gDice[MAX_PLAYERS];
  386. new gGas[MAX_PLAYERS];
  387. new gSpeedo[MAX_PLAYERS];
  388. new gSpentCash[MAX_PLAYERS];
  389. new FirstSpawn[MAX_PLAYERS];
  390. new SwitchKey[MAX_PLAYERS];
  391. new Fixr[MAX_PLAYERS];
  392. new Locator[MAX_PLAYERS];
  393. new Mobile[MAX_PLAYERS];
  394. new RingTone[MAX_PLAYERS];
  395. new CallCost[MAX_PLAYERS];
  396. new gPlayerAccount[MAX_PLAYERS];
  397. new gPlayerMission[MAX_PLAYERS];
  398. new gLastDriver[302];
  399. new gCarLock[265];
  400. new MissionPlayable = 0;
  401. new noooc = 0;
  402. new adds = 1;
  403. new addtimer = 60000;
  404. new Float:rx, Float:ry, Float:rz;
  405. new carselect[15];
  406. new objstore[128];
  407. new cbjstore[128];
  408. new motd[256];
  409. new rccounter = 0;
  410. //new RStart;
  411. new ghour = 0;
  412. new gminute = 0;
  413. new gsecond = 0;
  414. new numplayers = 0;
  415. new dollah = 1000; // Amount player recieves on spawn.
  416. new realtime = 1;
  417. new wtime = 15;
  418. new levelcost = 25000;
  419. new deathcost = 500;
  420. new callcost = 10; //20 seconds
  421. new realchat = 1;
  422. new timeshift = -1;
  423. new shifthour;
  424. new othtimer;
  425. new synctimer;
  426. new newmistimer;
  427. new unjailtimer;
  428. new turftimer;
  429. new pickuptimer;
  430. new spectatetimer;
  431. new idletimer;
  432. new productiontimer;
  433. new accountstimer;
  434. new checkgastimer;
  435. new stoppedvehtimer;
  436. new cartimer;
  437. new intrate = 1;
  438. new levelexp = 4;
  439. new idletime = 600000; //10 mins
  440. new civnokill = 0;
  441. new suecost = 2000;
  442. new cchargetime = 60;
  443. new txtcost = 25;
  444. new pickups;
  445. new CIV[] = {7,19,20,23,73,101,122};
  446. new STD1[] = {0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3};
  447. new STD2[] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3};
  448. new STD3[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3};
  449. new STD4[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 3};
  450. new SELLCAR1[] = { 1000, 1124, 1245, 1349, 1475, 1574, 1636, 1762, 1895, 1946, 2000 };
  451. new SELLCAR2[] = { 2099, 2135, 2255, 2378, 2457, 2563, 2614, 2721, 2878, 2988, 3000 };
  452. new SELLCAR3[] = { 3058, 3175, 3212, 3377, 3454, 3555, 3678, 3751, 3865, 3964, 4000 };
  453. new SELLCAR4[] = { 4077, 4123, 4275, 4378, 4422, 4565, 4613, 4752, 4897, 4911, 5000 };
  454. new Float:ChangePos[MAX_PLAYERS][3];
  455. new ChangePos2[MAX_PLAYERS][2];
  456. new Float:PlayerPos[MAX_PLAYERS][6];
  457. new Float:TeleportDest[MAX_PLAYERS][3];
  458. new Float:TelePos[MAX_PLAYERS][6];
  459.  
  460. #define GasMax 100
  461. #define RunOutTime 15000
  462. #define RefuelWait 5000
  463.  
  464. #define CAR_AMOUNT 700 //Change to Your Vehicle Amount
  465. new Gas[CAR_AMOUNT];
  466.  
  467. new Refueling[MAX_PLAYERS];
  468.  
  469. enum SavePlayerPosEnum
  470. {
  471. Float:LastX,
  472. Float:LastY,
  473. Float:LastZ
  474. }
  475. new SavePlayerPos[MAX_PLAYERS][SavePlayerPosEnum];
  476. new SpeedMode = 1;
  477. new UpdateSeconds = 1;
  478.  
  479. public Float:GetDistanceBetweenPlayers(p1,p2)
  480. {
  481. new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
  482. if(!IsPlayerConnected(p1) || !IsPlayerConnected(p2))
  483. {
  484. return -1.00;
  485. }
  486. GetPlayerPos(p1,x1,y1,z1);
  487. GetPlayerPos(p2,x2,y2,z2);
  488. return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
  489. }
  490.  
  491. new Music[MAX_PLAYERS];
  492. new Songs[7][1] = {
  493. {1187},
  494. {1185},
  495. {1183},
  496. {1097},
  497. {1076},
  498. {1068},
  499. {1062}
  500. };
  501.  
  502. new FishNamesNumber = 22;
  503. new FishNames[22][20] = {
  504. {"Jacket"},
  505. {"Amberjack"},
  506. {"Grouper"},
  507. {"Red Snapper"},
  508. {"Pants"},
  509. {"Trout"},
  510. {"Blue Marlin"},
  511. {"Can"},
  512. {"Mackeral"},
  513. {"Sea Bass"},
  514. {"Shoes"},
  515. {"Pike"},
  516. {"Sail Fish"},
  517. {"Garbage"},
  518. {"Tuna"},
  519. {"Eel"},
  520. {"Dolphin"},
  521. {"Shark"},
  522. {"Turtle"},
  523. {"Catfish"},
  524. {"Money Bag"},
  525. {"Swordfish"}
  526. };
  527.  
  528. new Float:PaintballSpawns[7][3] = {
  529. {-394.8027,2232.2317,42.4297},
  530. {-430.8412,2240.5371,42.9834},
  531. {-369.2361,2248.3127,42.4844},
  532. {-350.8910,2218.0215,42.4912},
  533. {-384.0544,2206.2908,42.4235},
  534. {-395.7100,2214.9480,42.4297},
  535. {-445.3718,2222.5481,42.4297}
  536. };
  537.  
  538. new Float:gRandomPlayerSpawns[1][3] = {
  539. {2223.8,-1147.1,1025.7} // sp1
  540. };
  541.  
  542. new Float:gInviteSpawns[10][4] = {
  543. {-1976.5912,166.1818,36.9623,272.6393},
  544. {-1975.8610,162.1945,36.9623,272.0126},
  545. {-1975.7461,157.5404,36.9623,276.1093},
  546. {-1975.2136,151.4920,36.9623,268.2993},
  547. {-1974.9963,145.3430,36.9623,269.2628},
  548. {-1975.5842,140.8170,36.9623,269.8895},
  549. {-1975.7874,134.0368,36.9623,271.7696},
  550. {-1975.1681,129.0926,36.9623,270.8531},
  551. {-1975.9069,121.4700,36.9623,270.5631},
  552. {-1975.3311,112.7078,36.9623,267.7665}
  553. };
  554.  
  555. new Float:gMedicSpawns[2][3] = {
  556. {317.9066,315.6765,999.1484},
  557. {317.6252,311.8465,999.1484}
  558. };
  559.  
  560. new Float:gCopPlayerSpawns[2][3] = {
  561. {1530.8369,-1664.8872,6.2188},
  562. {1530.6913,-1669.4760,6.2188}
  563. //{614.8,-608.2,17.2},
  564. //{611.5,-607.8,17.2}
  565. };
  566.  
  567. new Float:gMedPlayerSpawns[2][3] = {
  568. {1178.1,-1321.0,14.1},
  569. {1177.7,-1325.0,14.0}
  570. };
  571.  
  572. enum pBoxingStats
  573. {
  574. TitelName[128],
  575. TitelWins,
  576. TitelLoses,
  577. };
  578. new Titel[pBoxingStats];
  579.  
  580. enum cCKInfo
  581. {
  582. cSendername[20],
  583. cGiveplayer[20],
  584. cUsed,
  585. };
  586. new CKInfo[10][cCKInfo];
  587.  
  588. enum pPaperInfo
  589. {
  590. PaperUsed,
  591. PaperMaker[20],
  592. PaperTitle[64],
  593. PaperText1[128],
  594. PaperText2[128],
  595. PaperText3[128],
  596. PaperText4[128],
  597. PaperText5[128],
  598. PaperText6[128],
  599. PaperText7[128],
  600. SafeSaving,
  601. };
  602. new PaperInfo[10][pPaperInfo];
  603.  
  604. enum pPaper
  605. {
  606. pMaker[20],
  607. pTitle[64],
  608. pLine1[128],
  609. pLine2[128],
  610. pLine3[128],
  611. pLine4[128],
  612. pLine5[128],
  613. pLine6[128],
  614. pLine7[128],
  615. };
  616. new Paper[MAX_PLAYERS][pPaper];
  617.  
  618. enum fInfo
  619. {
  620. FamilyTaken,
  621. FamilyName[20],
  622. FamilyMOTD[128],
  623. FamilyColor[20],
  624. FamilyLeader[MAX_PLAYER_NAME],
  625. FamilyMembers,
  626. Float:FamilySpawn[4],
  627. FamilyInterior,
  628. };
  629. new FamilyInfo[10][fInfo];
  630.  
  631. enum zInfo
  632. {
  633. zOwner[64],
  634. zColor[20],
  635. Float:zMinX,
  636. Float:zMinY,
  637. Float:zMaxX,
  638. Float:zMaxY,
  639. };
  640. new TurfInfo[6][zInfo];
  641. new Turfs[6];
  642.  
  643. enum pFishing
  644. {
  645. pFish1[20],
  646. pFish2[20],
  647. pFish3[20],
  648. pFish4[20],
  649. pFish5[20],
  650. pWeight1,
  651. pWeight2,
  652. pWeight3,
  653. pWeight4,
  654. pWeight5,
  655. pFid1,
  656. pFid2,
  657. pFid3,
  658. pFid4,
  659. pFid5,
  660. pLastFish,
  661. pFishID,
  662. pLastWeight,
  663. };
  664. new Fishes[MAX_PLAYERS][pFishing];
  665.  
  666. enum pCooking
  667. {
  668. pCook1[20],
  669. pCook2[20],
  670. pCook3[20],
  671. pCook4[20],
  672. pCook5[20],
  673. pCWeight1,
  674. pCWeight2,
  675. pCWeight3,
  676. pCWeight4,
  677. pCWeight5,
  678. pCookID1,
  679. pCookID2,
  680. pCookID3,
  681. pCookID4,
  682. pCookID5,
  683. };
  684. new Cooking[MAX_PLAYERS][pCooking];
  685.  
  686. enum pGroceries
  687. {
  688. pChickens,
  689. pChicken,
  690. pHamburgers,
  691. pHamburger,
  692. pPizzas,
  693. pPizza,
  694. };
  695. new Groceries[MAX_PLAYERS][pGroceries];
  696.  
  697. enum pSpec
  698. {
  699. Float:Coords[3],
  700. Float:sPx,
  701. Float:sPy,
  702. Float:sPz,
  703. sPint,
  704. sLocal,
  705. sCam,
  706. };
  707.  
  708. new Unspec[MAX_PLAYERS][pSpec];
  709.  
  710. enum eCars
  711. {
  712. model_id,
  713. Float:pos_x,
  714. Float:pos_y,
  715. Float:pos_z,
  716. Float:z_angle,
  717. };
  718.  
  719. enum hNews
  720. {
  721. hTaken1,
  722. hTaken2,
  723. hTaken3,
  724. hTaken4,
  725. hTaken5,
  726. hAdd1[128],
  727. hAdd2[128],
  728. hAdd3[128],
  729. hAdd4[128],
  730. hAdd5[128],
  731. hContact1[128],
  732. hContact2[128],
  733. hContact3[128],
  734. hContact4[128],
  735. hContact5[128],
  736. };
  737. new News[hNews];
  738.  
  739. enum pInfo
  740. {
  741. pKey[128],
  742. pLevel,
  743. pAdmin,
  744. pDonateRank,
  745. gPupgrade,
  746. pConnectTime,
  747. pReg,
  748. pSex,
  749. pAge,
  750. pOrigin,
  751. pCK,
  752. pMuted,
  753. pExp,
  754. pCash,
  755. pAccount,
  756. pCrimes,
  757. pKills,
  758. pDeaths,
  759. pArrested,
  760. pWantedDeaths,
  761. pPhoneBook,
  762. pLottoNr,
  763. pFishes,
  764. pBiggestFish,
  765. pJob,
  766. pPayCheck,
  767. pHeadValue,
  768. pJailed,
  769. pJailTime,
  770. pMats,
  771. pDrugs,
  772. pLeader,
  773. pMember,
  774. pFMember,
  775. pRank,
  776. pChar,
  777. pContractTime,
  778. pDetSkill,
  779. pSexSkill,
  780. pBoxSkill,
  781. pLawSkill,
  782. pMechSkill,
  783. pJackSkill,
  784. pCarSkill,
  785. pNewsSkill,
  786. pDrugsSkill,
  787. pCookSkill,
  788. pFishSkill,
  789. Float:pHealth,
  790. Float:pSHealth,
  791. pInt,
  792. pLocal,
  793. pTeam,
  794. pModel,
  795. pPnumber,
  796. pPhousekey,
  797. pPbiskey,
  798. Float:pPos_x,
  799. Float:pPos_y,
  800. Float:pPos_z,
  801. pCarLic,
  802. pFlyLic,
  803. pBoatLic,
  804. pFishLic,
  805. pGunLic,
  806. pGun1,
  807. pGun2,
  808. pGun3,
  809. pGun4,
  810. pAmmo1,
  811. pAmmo2,
  812. pAmmo3,
  813. pAmmo4,
  814. pCarTime,
  815. pPayDay,
  816. pPayDayHad,
  817. pCDPlayer,
  818. pWins,
  819. pLoses,
  820. pAlcoholPerk,
  821. pDrugPerk,
  822. pMiserPerk,
  823. pPainPerk,
  824. pTraderPerk,
  825. pTut,
  826. pMissionNr,
  827. pWarns,
  828. pAdjustable,
  829. pFuel,
  830. pMarried,
  831. pMarriedTo[128],
  832. };
  833. new PlayerInfo[MAX_PLAYERS][pInfo];
  834.  
  835. enum hInfo
  836. {
  837. Float:hEntrancex,
  838. Float:hEntrancey,
  839. Float:hEntrancez,
  840. Float:hExitx,
  841. Float:hExity,
  842. Float:hExitz,
  843. hHealthx,
  844. hHealthy,
  845. hHealthz,
  846. hArmourx,
  847. hArmoury,
  848. hArmourz,
  849. hOwner[MAX_PLAYER_NAME],
  850. hDiscription[MAX_PLAYER_NAME],
  851. hValue,
  852. hHel,
  853. hArm,
  854. hInt,
  855. hLock,
  856. hOwned,
  857. hRooms,
  858. hRent,
  859. hRentabil,
  860. hTakings,
  861. hVec,
  862. hVcol1,
  863. hVcol2,
  864. hDate,
  865. hLevel,
  866. };
  867.  
  868. new HouseInfo[34][hInfo];
  869.  
  870. enum bInfo
  871. {
  872. bOwned,
  873. bOwner[64],
  874. bMessage[128],
  875. bExtortion[MAX_PLAYER_NAME],
  876. Float:bEntranceX,
  877. Float:bEntranceY,
  878. Float:bEntranceZ,
  879. Float:bExitX,
  880. Float:bExitY,
  881. Float:bExitZ,
  882. bLevelNeeded,
  883. bBuyPrice,
  884. bEntranceCost,
  885. bTill,
  886. bLocked,
  887. bInterior,
  888. bProducts,
  889. bMaxProducts,
  890. bPriceProd,
  891. };
  892. new BizzInfo[5][bInfo];
  893.  
  894. enum sbInfo
  895. {
  896. sbOwned,
  897. sbOwner[64],
  898. sbMessage[128],
  899. sbExtortion[MAX_PLAYER_NAME],
  900. Float:sbEntranceX,
  901. Float:sbEntranceY,
  902. Float:sbEntranceZ,
  903. sbLevelNeeded,
  904. sbBuyPrice,
  905. sbEntranceCost,
  906. sbTill,
  907. sbLocked,
  908. sbInterior,
  909. sbProducts,
  910. sbMaxProducts,
  911. sbPriceProd,
  912. };
  913. new SBizzInfo[12][sbInfo];
  914.  
  915. enum pHaul
  916. {
  917. pCapasity,
  918. pLoad,
  919. };
  920.  
  921. new PlayerHaul[100][pHaul];
  922.  
  923. enum pCrime
  924. {
  925. pBplayer[32],
  926. pAccusing[32],
  927. pAccusedof[32],
  928. pVictim[32],
  929. };
  930. new PlayerCrime[MAX_PLAYERS][pCrime];
  931.  
  932. enum mInfo
  933. {
  934. mTitle[128],
  935. mText1[128],
  936. mText2[128],
  937. mText3[128],
  938. mText4[128],
  939. mText5[128],
  940. mText6[128],
  941. mText7[128],
  942. mText8[128],
  943. mText9[128],
  944. mText10[128],
  945. mText11[128],
  946. mText12[128],
  947. mText13[128],
  948. mText14[128],
  949. mText15[128],
  950. mText16[128],
  951. mText17[128],
  952. mText18[128],
  953. mGText1[128],
  954. mGText2[128],
  955. mGText3[128],
  956. mGText4[128],
  957. mGText5[128],
  958. mGText6[128],
  959. Float:mCP1[3],
  960. Float:mCP2[3],
  961. Float:mCP3[3],
  962. Float:mCP4[3],
  963. Float:mCP5[3],
  964. Float:mCP6[3],
  965. mReward,
  966. mToggle,
  967. };
  968. new MissionInfo[mInfo];
  969.  
  970. enum kInfo
  971. {
  972. kTitle[128],
  973. kMaker[MAX_PLAYER_NAME],
  974. kText1[128],
  975. kText2[128],
  976. kText3[128],
  977. kText4[128],
  978. kText5[128],
  979. kText6[128],
  980. kText7[128],
  981. kText8[128],
  982. kText9[128],
  983. kText10[128],
  984. kText11[128],
  985. kText12[128],
  986. kText13[128],
  987. kText14[128],
  988. kText15[128],
  989. kText16[128],
  990. kText17[128],
  991. kText18[128],
  992. kGText1[128],
  993. kGText2[128],
  994. kGText3[128],
  995. kGText4[128],
  996. kGText5[128],
  997. kGText6[128],
  998. Float:kCP1[3],
  999. Float:kCP2[3],
  1000. Float:kCP3[3],
  1001. Float:kCP4[3],
  1002. Float:kCP5[3],
  1003. Float:kCP6[3],
  1004. kNumber,
  1005. kReward,
  1006. kToggle,
  1007. };
  1008. new PlayMission[kInfo];
  1009.  
  1010. enum iInfo
  1011. {
  1012. iAdmin[128],
  1013. iMOTD[128],
  1014. iPassword[128],
  1015. iNeedPass,
  1016. iLock,
  1017. iPlayers,
  1018. };
  1019. new IRCInfo[10][iInfo];
  1020.  
  1021. new RandCars[20][1] = {
  1022. {496},{542},{507},{585},
  1023. {466},{492},{579},{559},
  1024. {400},{551},{516},{475},
  1025. {561},{550},{566},{558},
  1026. {562},{562},{603},{560}
  1027. };
  1028.  
  1029.  
  1030. new RandLCars[1][1] = {
  1031. {431}// coach
  1032. };
  1033.  
  1034.  
  1035. new GunPrice[30][1] = {
  1036. {500}, //parachute
  1037. {400}, //golfclub
  1038. {300}, //nightstick
  1039. {200}, //knife
  1040. {700}, //baseballbat
  1041. {300}, //shovel
  1042. {100}, //poolcue
  1043. {400}, //purpledildo
  1044. {780}, //whitedildo
  1045. {560}, //longwhitedildo
  1046. {530}, //whitedildo2
  1047. {200}, //flowers
  1048. {600}, //cane
  1049. {500}, //sdpistol
  1050. {1000}, //colt45
  1051. {3000}, //deagle
  1052. {2000}, //Tec9
  1053. {3000}, //uzi
  1054. {2500}, //mp5
  1055. {3000}, //shotgun
  1056. {6000}, //spas12
  1057. {4000}, //sawnoff
  1058. {5000}, //ak47
  1059. {5000}, //m4
  1060. {1000}, //rifle
  1061. {25}, //pistolammo
  1062. {40}, //shotgunammo
  1063. {25}, //smgammo
  1064. {40}, //assaultammo
  1065. {50} //rifle
  1066. };
  1067.  
  1068. new JoinPed[52][1] = {
  1069. {280},//POLICE_FORCE
  1070. {281},
  1071. {282},
  1072. {283},
  1073. {284},
  1074. {285},
  1075. {288},
  1076. {71},
  1077. {166},
  1078. {295},
  1079. {148},
  1080. {286},//FBI/ATF
  1081. {164},
  1082. {163},
  1083. {287},//NATIONAL_GUARD
  1084. {285},
  1085. {70},//FIRE/AMBULANCE
  1086. {274},
  1087. {275},
  1088. {276},
  1089. {277},
  1090. {278},
  1091. {279},
  1092. {258},//LA_COSA_NOSTRA
  1093. {127},
  1094. {126},
  1095. {125},
  1096. {124},
  1097. {113},
  1098. {111},
  1099. {98},
  1100. {120},//YAKUZA
  1101. {121},
  1102. {122},
  1103. {123},
  1104. {169},
  1105. {186},
  1106. {228},
  1107. {127},//HITMANS
  1108. {165},
  1109. {186},
  1110. {93},
  1111. {141},
  1112. {148},//NEWS_REPORTERS
  1113. {188},
  1114. {187},
  1115. {255},//TAXI_CAB_COMPANY
  1116. {253},
  1117. {59},//DRIVING/FLYING_SCHOOL
  1118. {60},//DRIVING/FLYING_SCHOOL
  1119. {76},//DRIVING/FLYING_SCHOOL
  1120. {150}//DRIVING/FLYING_SCHOOL
  1121. };
  1122.  
  1123. new Peds[217][1] = {
  1124. {264},
  1125. {288},//TEAM_ADMIN
  1126. {286},{287},{228},{113},{120},{147},{294},{227},{61},{171},
  1127. {247},//CIVILIANS DOWN HERE
  1128. {248},{100},{256},{263},{262},{261},{260},{259},{258},{257},{256},{255},
  1129. {253},{252},{251},{249},{246},{245},{244},{243},{242},{241},{240},{239},
  1130. {238},{237},{236},{235},{234},{233},{232},{231},{230},{229},
  1131. {226},{225},{173},{174},{175},{224},{223},{222},{221},{220},{219},{218},
  1132. {217},{216},{215},{214},{213},{212},{211},{210},{209},
  1133. {207},{206},{205},{204},{203},{202},{201},{200},{199},{198},{197},{196},
  1134. {195},{194},{193},{192},{191},{190},{189},{185},{184},{183},
  1135. {182},{181},{180},{179},{178},{176},{172},{170},{168},{167},{162},
  1136. {161},{160},{159},{158},{157},{156},{155},{154},{153},{152},{151},
  1137. {146},{145},{144},{143},{142},{141},{140},{139},{138},{137},{136},{135},
  1138. {134},{133},{132},{131},{130},{129},{128},{254},{99},{97},{96},{95},{94},
  1139. {92},{90},{89},{88},{87},{85},{84},{83},{82},{81},{80},{79},{78},{77},{76},
  1140. {75},{73},{72},{69},{68},{67},{66},{64},{63},{62},{58},{57},{56},{55},
  1141. {54},{53},{52},{51},{50},{49},{45},{44},{43},{41},{39},{38},{37},{36},{35},
  1142. {34},{33},{32},{31},{30},{29},{28},{27},{26},{25},{24},{23},{22},{21},{20},
  1143. {19},{18},{17},{16},{15},{14},{13},{12},{11},{10},{1},{2},
  1144. {290},//ROSE
  1145. {291},//PAUL
  1146. {292},//CESAR
  1147. {293},//OGLOC
  1148. {187},
  1149. {296},//JIZZY
  1150. {297},//MADDOGG
  1151. {298},//CAT
  1152. {299}//ZERO
  1153. };
  1154.  
  1155. new Float:HouseCarSpawns[34][4] = {
  1156. {-2637.2544,165.0454,4.2919,179.9976},//House 2
  1157. {2064.4,-1694.4,13.1,271.1561},//House 1
  1158. {-2712.7625,870.3005,70.5348,89.1608},//House 2
  1159. {1109.8,-968.0,42.7,0.0},//house 3
  1160. {2497.6274,-2025.6306,13.2521,355.4281}, // House 4
  1161. {2645.0,-1990.8,13.1,180.0},//House - 5
  1162. {-2724.8965,914.8384,67.4253,110.1072},//house 6
  1163. {1910.5149,-1120.5304,25.4493,177.8350},//house 7
  1164. {828.8,-887.0,68.5,230.7095},//House 8
  1165. {2149.6,-1610.9,14.0,90.7904},//House 9
  1166. {760.1,-1687.8,4.3,180.6},//House 10
  1167. {645.5,-1616.1,14.9,0.0},//House 11
  1168. {-2635.2371,931.1931,71.5643,215.3709},//House 12
  1169. {-2665.9224,989.9724,64.6955,1.7814},//House 13
  1170. {959.5864,-901.0845,45.8584,177.3087},//House 14
  1171. {2445.8,-1326.8,23.6,18.4},//House 15
  1172. {2845.9,-1286.8,18.9,90.0},//house 16
  1173. {2159.8,-1803.9,13.3,271.4}, //House 17
  1174. {-2693.7847,132.3186,4.1676,89.5330},//House 18
  1175. {-2723.0105,977.7357,54.2926,359.9068},//House 19
  1176. {1514.0,-694.6,94.5,90.0},//House 20
  1177. {1246.7,-1107.6,25.5,266.4},//House 21
  1178. {831.7,-857.5,69.9,180.0},//House 22
  1179. {1007.9,-659.4,121.1,130.6194},//House 23
  1180. {1110.0,-726.4,100.1,90.0},//House 24
  1181. {259.7,-1221.0,74.7,202.0011},//House 25
  1182. {1463.7,-901.7,55.8,359.0},//house 26
  1183. {1440.1,-890.6,51.2,0.0},//house 27
  1184. {-2528.8298,2250.2998,4.8112,334.9590},//house 28
  1185. {-2554.7874,2270.5356,4.9064,333.9774}, //House 29
  1186. {-2371.1323,2438.4104,9.0698,159.2582},//House 30
  1187. {-2237.9492,893.7390,66.4872,89.7571},//House 31
  1188. {-2529.4817,-142.6608,19.7107,4.2929}, //House 32
  1189. {-2616.1897,-108.4479,4.1693,269.8246}//House 33
  1190. };
  1191.  
  1192.  
  1193. new CarSpawns[182][eCars] = {
  1194. {405,-2125.7424,658.0462,52.2988,93.9612},//carid 90
  1195. {426,-2158.0222,657.3932,52.2775,272.8372},
  1196. {445,-1926.3204,585.6179,34.9963,359.8303},
  1197. {492,2229.2,-1170.2,25.7,86.9},
  1198. {507,-2214.8047,-82.7890,35.0474,0.6476},
  1199. {545,2217.0,-1157.2,25.7,269.8},
  1200. {547,405.9748,-1264.3921,50.1237,24.2110},
  1201. {550,-1497.4576,845.8479,6.9382,88.5201},
  1202. {551,-1741.0051,811.0620,24.5782,270.6681},
  1203. {560,2106.4695,-1248.7920,24.0461,0.1524},
  1204. {566,2196.2891,-1277.7905,24.2147,180.4522},
  1205. {402,-1704.3132,999.7747,17.3646,90.0725},
  1206. {405,216.5521,-1431.4004,13.0853,132.5749},
  1207. {554,334.2231,-1343.7405,14.3828,209.9581},
  1208. {507,697.4343,-1230.9486,16.5063,298.7916},
  1209. {545,723.9850,-1121.5535,18.1450,333.9010},
  1210. {536,666.8468,-467.6579,16.0734,90.8623},
  1211. {560,668.1161,-546.2436,16.0413,89.4239},
  1212. {540,912.2176,-996.2035,38.1402,7.5764},
  1213. {482,-1758.3512,910.7219,24.5923,269.8633},
  1214. {547,981.8715,-917.3546,41.5443,88.0589},
  1215. {550,1188.4082,-925.1859,42.8590,277.5563},
  1216. {400,-1699.4597,1035.9624,45.0934,91.6588},
  1217. {405,1450.2,-937.1,36.2,269.6909}, //116
  1218. {492,2148.3257,-1175.2518,24.1959,269.6909},
  1219. {507,-1786.7155,1205.1598,24.7812,178.8758},
  1220. {545,-1716.5907,1350.4829,6.8346,44.2506},
  1221. {540,2348.2910,-1167.9983,27.3637,323.1586},
  1222. {482,2502.0388,-1134.9507,39.1953,150.9506},
  1223. {547,-2166.4534,1251.1536,27.2650,1.0352},
  1224. {550,2853.1858,-1326.8011,11.1511,278.9301},
  1225. {551,-2040.4761,1107.7072,53.4166,89.8473},
  1226. {533,2796.9031,-1567.2024,10.6386,272.4041},
  1227. {482,2813.2175,-1673.0276,9.6638,2.3369},
  1228. {547,2827.6736,-1703.9755,9.7308,77.2896},
  1229. {550,2809.3872,-1837.2391,9.7398,268.9880},
  1230. {551,-2438.0784,1341.1190,7.6988,84.5107},
  1231. {566,2411.5386,-2134.7576,13.9352,0.7795},
  1232. {554,1389.7467,-2695.9370,13.4164,121.1818},
  1233. {405,783.1359,-1601.8208,13.2577,270.9069},
  1234. {554,782.7205,-1619.3584,13.2653,93.0550},
  1235. {426,923.0841,-1361.7990,13.0324,181.1371},
  1236. {445,-2644.6819,1342.3251,6.8981,270.7903},
  1237. {492,1174.6599,-922.1939,43.1189,276.8927},
  1238. {507,1363.0210,-1288.3124,13.2839,180.1453},
  1239. {545,1363.2723,-1260.8229,13.0954,179.5841},
  1240. {540,2383.5627,-1927.9207,13.2436,359.6281},
  1241. {482,-2635.0933,1377.1693,6.8692,180.6415},
  1242. {547,-2513.1277,1209.6135,37.1506,270.2610},
  1243. {550,2396.6899,-1966.8123,13.2793,271.6838},
  1244. {551,2391.1135,-1500.6554,23.6355,269.7709},
  1245. {560,-2273.8679,921.3550,66.3095,0.6336},
  1246. {405,-2153.0779,953.6602,79.7271,180.3209},
  1247. {554,334.3586,-1789.3143,4.6717,178.7722},
  1248. {426,343.8039,-1808.9827,4.3090,181.8368},
  1249. {445,-2129.2915,787.6183,69.3346,87.1812},
  1250. {492,646.4998,-1771.6411,13.2905,348.7706},
  1251. {507,-2151.9524,395.9857,34.9395,180.7696},//150
  1252. {545,-2078.8027,265.4074,35.1672,268.0607},
  1253. {540,-2034.8334,178.8471,28.5682,269.9615},
  1254. {482,438.9431,-1625.4088,25.7951,0.1850},
  1255. {547,453.3896,-1494.3240,30.7917,7.7513},
  1256. {550,487.6469,-1516.2312,20.0235,185.5384},
  1257. {551,300.5775,-1490.8882,24.3748,235.1359},
  1258. {560,-2180.1323,41.8542,35.1717,269.9866},
  1259. {566,524.0590,-1375.0093,15.8231,193.3626},
  1260. {405,598.9131,-1519.1414,14.8214,180.4083},
  1261. {554,-2488.1333,-133.0336,25.3507,90.1064},
  1262. {426,-2499.5225,45.0666,25.2641,89.9251},
  1263. {445,-2636.7976,-55.4094,4.0630,359.9826},
  1264. {492,-2718.5115,-124.4794,4.3505,269.1428},
  1265. {507,736.8572,-1337.1550,13.3140,271.3832},
  1266. {545,856.7003,-1363.1852,13.4093,179.8542},//165
  1267. {482,888.1506,-1659.2727,13.3296,1.2414},
  1268. {547,879.1024,-1669.2560,13.3305,180.5853},
  1269. {550,-2134.1443,-453.9576,35.1479,95.0877},
  1270. {551,920.4441,-1823.0966,12.3452,84.1821},
  1271. {560,-1639.3900,-567.5057,13.9530,80.1994},
  1272. {566,1062.6744,-1757.9412,13.1956,89.0572},
  1273. {405,-2265.1501,148.9554,34.8837,269.3405},
  1274. {554,1081.8948,-1629.9564,13.4064,90.0880},
  1275. {426,981.7941,-1523.5115,13.3379,267.2751},
  1276. {445,1014.7464,-1434.4586,13.3292,266.3129},
  1277. {492,492.6386,-1555.3513,17.1462,213.1128},//DERBY
  1278. {507,2684.6,-2019.0,13.3 ,0.8777},
  1279. {545,1096.1,-1379.9,13.3,270.1909},//178
  1280. {540,-2743.6772,-303.1675,7.1422,49.0919},//179 DERBY
  1281. {482,1182.2568,-1219.2407,18.4163,0.5578},
  1282. {547,1260.9978,-1187.1921,23.3559,183.3606},
  1283. {550,1331.9304,-1081.3899,24.9941,90.4092},
  1284. {551,1284.8755,-1525.5013,13.3451,269.4388},//near taxi
  1285. {560,1279.1887,-1539.2032,13.3201,94.8070},//near taxi
  1286. {566,1275.9120,-1646.7448,13.3273,267.2669},
  1287. {405,-2200.5999,-2503.3606,30.4213,321.7648},
  1288. {554,1253.9153,-1833.3832,13.1734,175.3692},
  1289. {426,1279.2875,-1814.4156,13.1657,93.6385},
  1290. {445,-2205.5234,-2439.3523,30.4224,51.1660},
  1291. {492,1479.9131,-1737.8813,13.2418,269.5805},
  1292. {507,1508.1047,-1737.7089,13.2418,270.0250},
  1293. {545,1618.0411,-1891.1044,13.3278,0.3364},
  1294. {540,1623.7291,-1892.7234,13.3307,180.0126},
  1295. {482,-2079.6389,-2303.7983,30.3466,322.7155},
  1296. {547,1743.5837,-1844.6041,13.3557,180.3384},
  1297. {550,1838.1904,-1871.3842,13.1703,358.5452},
  1298. {551,-1557.8568,-2741.5632,48.3481,144.5150},
  1299. {560,1777.1376,-1910.0310,13.1681,91.0725},
  1300. {566,-16.7753,-2503.6228,36.4593,121.7103},
  1301. {566,1981.0780,-1986.3513,13.3275,2.1479},
  1302. {405,218.4485,-173.3024,1.3809,90.0117},
  1303. {554,199.5586,-155.4912,1.3827,0.3471},
  1304. {426,1984.7471,-2066.7776,13.1625,359.7226},
  1305. {445,1938.0565,-2086.8459,13.3429,268.3414},
  1306. {492,318.4840,-86.0588,2.0804,90.9324},
  1307. {507,-113.9556,-39.4382,2.9209,164.0464},
  1308. {545,115.3321,-217.1147,1.3028,89.7911},
  1309. {540,1748.0751,-2084.2090,13.3324,0.4337},
  1310. {482,1560.5026,-2260.5457,13.3258,268.7398},
  1311. {547,1461.6943,-1505.1688,13.2541,356.9007},
  1312. {550,1426.4930,-1402.3170,13.1800,181.0290},
  1313. {551,1435.0645,-1325.6835,13.2580,270.9400},
  1314. {560,1513.9486,-1272.5691,14.2685,181.0697},
  1315. {566,1583.7561,-1338.7435,16.1896,359.8619},
  1316. {405,-2760.5156,-312.1838,7.1557,3.8747},//DERBY
  1317. {554,-2766.6875,-281.2887,7.1613,180.1256},//DERBY
  1318. {426,1430.2316,-1054.8555,22.8693,359.3625},
  1319. {445,1574.1168,-1036.7643,23.6151,145.6786},
  1320. //{492,1617.6676,-1009.8663,23.6052,356.8697},
  1321. {507,1645.3188,-1036.5238,23.6027,0.7258},
  1322. {545,485.9422,-1467.4543,18.3154,157.6833},//DERBY
  1323. {540,1770.4874,-1060.9886,23.6658,179.2750},
  1324. {482,-2781.4741,-281.6054,7.1515,181.0279},//DERBY
  1325. {547,1653.1766,-1134.8994,23.6110,178.6835},
  1326. {550,1617.3746,-1132.8293,23.6117,91.7300},
  1327. {551,1790.0190,-1292.9065,13.2653,267.2964},
  1328. {560,1754.3009,-1476.8170,13.2402,269.6320},
  1329. {554,2003.3417,-1121.4993,26.3879,357.4926},
  1330. {426,2084.2334,-1170.0986,24.2042,91.8975},
  1331. {492,2229.2278,-1345.4033,23.6892,93.3009},
  1332. {507,2332.5684,-1362.4845,23.7297,358.1198},
  1333. {545,2384.1567,-1275.6326,23.9198,101.6528},
  1334. {540,2432.3149,-1226.0785,24.9941,17.9805},
  1335. {482,2426.9612,-1224.4158,25.0000,202.7159},
  1336. {547,2438.4309,-1321.6925,24.1225,269.7535},
  1337. {551,2612.9702,-1262.6970,48.2461,269.4752},
  1338. {560,2659.4529,-1428.4343,30.1790,266.5051},
  1339. {566,2659.7053,-1422.6743,30.1714,89.8159},
  1340. {405,2485.5313,-1556.1823,23.7478,178.8338},
  1341. {554,2478.7664,-1555.7006,23.7226,183.6043},
  1342. {426,2605.3967,-1365.8829,34.6461,359.9891},
  1343. {445,2754.7136,-1373.0253,40.1154,91.4169},
  1344. {492,2717.3662,-1468.0308,30.0894,1.0298},
  1345. {507,2816.7195,-1449.4285,15.9549,268.9106},
  1346. {545,2816.9937,-1441.5880,15.9544,90.7779},
  1347. {540,2681.9016,-1673.3879,9.1290,0.5605},
  1348. {482,2442.5845,-1642.7507,13.1644,180.3454},
  1349. {547,2361.3120,-1674.6146,13.2505,357.4959},
  1350. {550,2298.3535,-1633.7542,14.3849,80.8107},
  1351. {551,2297.9077,-1639.9464,14.4352,94.4292},
  1352. {560,2255.4045,-1664.5736,15.1304,74.6898},
  1353. {566,2234.1057,-1726.9386,13.1665,271.7536},
  1354. {405,2319.3833,-1716.6823,13.2518,359.8540},
  1355. {554,2474.5105,-1755.9194,13.2522,270.5967},
  1356. {426,2501.8213,-1754.2794,13.1208,176.4916}, //= 255
  1357. {445,2489.1560,-1952.6886,13.1366,178.1629},
  1358. {492,2495.4326,-1953.2922,13.1299,356.5514},
  1359. {507,2306.7168,-1989.6796,13.2639,184.8385},
  1360. {482,2056.1807,-1904.7751,13.2502,2.2910},
  1361. {550,2064.9871,-1919.1674,13.2504,180.8575},
  1362. {551,1886.4812,-2022.9338,13.0964,179.4265},
  1363. {560,1824.8976,-2019.8374,13.0875,272.5273},
  1364. {566,1942.1669,-1862.6425,13.2679,264.5590},
  1365. {405,1923.9409,-1795.5616,13.0877,90.0886},
  1366. {554,1807.0905,-1571.7120,13.1659,125.1048},
  1367. {426,1809.9016,-1676.0603,13.2422,180.7589},
  1368. {445,1809.6266,-1653.3402,13.2365,180.6530},
  1369. {492,1809.7056,-1660.3019,13.2380,180.6262},
  1370. {507,1978.4003,-1675.0157,15.6741,269.7336},
  1371. {545,1974.8230,-1693.5488,15.6741,92.1162},
  1372. {540,1929.2253,-1584.6954,13.2700,185.5542},
  1373. {482,1731.9725,-1590.8959,13.1630,77.7249},
  1374. {547,1721.5776,-1589.2834,13.1526,80.9057},
  1375. {550,1695.1428,-1519.2667,13.1671,0.7121},
  1376. {551,1694.7080,-1501.7454,13.1675,357.8150}
  1377. };
  1378.  
  1379. //------------------------------------------------------------------------------------------------------
  1380.  
  1381. main()
  1382. {
  1383. print(" ");
  1384. print(" ");
  1385. print(" The Godfather: LS/SF");
  1386. print("_____________________");
  1387. print(" By: Fear & parts of Astro");
  1388. print(" ");
  1389. }
  1390.  
  1391. //------------------------------------------------------------------------------------------------------
  1392.  
  1393. public SearchingHit(playerid)
  1394. {
  1395. new string[256];
  1396. new giveplayer[MAX_PLAYER_NAME];
  1397. new searchhit = 0;
  1398. for(new i=0; i<MAX_PLAYERS; i++)
  1399. {
  1400. if(IsPlayerConnected(i))
  1401. {
  1402. if(searchhit == 0)
  1403. {
  1404. if(PlayerInfo[i][pHeadValue] > 0 && GotHit[i] == 0 && PlayerInfo[i][pMember] != 8)
  1405. {
  1406. GetPlayerName(i, giveplayer, sizeof(giveplayer));
  1407. searchhit = 1;
  1408. hitfound = 1;
  1409. hitid = i;
  1410. for(new k=0; k<MAX_PLAYERS; k++)
  1411. {
  1412. if(IsPlayerConnected(k))
  1413. {
  1414. if(PlayerInfo[k][pMember] == 8 || PlayerInfo[k][pLeader] == 8)
  1415. {
  1416. SendClientMessage(k, COLOR_WHITE, "|__________________ Hitman Agency News __________________|");
  1417. SendClientMessage(k, COLOR_DBLUE, "*** Incoming Message: A Hit has become available. ***");
  1418. format(string, sizeof(string), "Person: %s ID: %d Value: $%d", giveplayer, i, PlayerInfo[i][pHeadValue]);
  1419. SendClientMessage(k, COLOR_DBLUE, string);
  1420. SendClientMessage(k, COLOR_YELLOW, "Use Givehit hitmanid, to assign the Contract to one of the Hitmans.");
  1421. SendClientMessage(k, COLOR_WHITE, "|________________________________________________________|");
  1422. }
  1423. }
  1424. }
  1425. return 0;
  1426. }
  1427. }
  1428. }
  1429. }
  1430. if(searchhit == 0)
  1431. {
  1432. SendClientMessage(playerid, COLOR_GREY, " No Contracts available !");
  1433. }
  1434. return 0;
  1435. }
  1436.  
  1437. public ExtortionBiz(bizid, money)
  1438. {
  1439. new string[256];
  1440. format(string, sizeof(string), "No-one");
  1441. if(strcmp(BizzInfo[bizid][bExtortion],string, true ) == 0 )
  1442. {
  1443. return 0;
  1444. }
  1445. for(new i = 0; i < MAX_PLAYERS; i++)
  1446. {
  1447. if(IsPlayerConnected(i))
  1448. {
  1449. new name[MAX_PLAYER_NAME];
  1450. new wstring[MAX_PLAYER_NAME];
  1451. GetPlayerName(i, name, sizeof(name));
  1452. format(string, sizeof(string), "%s", name);
  1453. strmid(wstring, string, 0, strlen(string), 255);
  1454. if(strcmp(BizzInfo[bizid][bExtortion] ,wstring, true ) == 0 )
  1455. {
  1456. new value = money / 100;
  1457. value = value * 10;
  1458. GivePlayerMoney(i, value);
  1459. BizzInfo[bizid][bTill] -= value;
  1460. }
  1461. }
  1462. }
  1463. return 1;
  1464. }
  1465.  
  1466. public ExtortionSBiz(bizid, money)
  1467. {
  1468. new string[256];
  1469. format(string, sizeof(string), "No-one");
  1470. if(strcmp(SBizzInfo[bizid][sbExtortion],string, true ) == 0 )
  1471. {
  1472. return 0;
  1473. }
  1474. for(new i = 0; i < MAX_PLAYERS; i++)
  1475. {
  1476. if(IsPlayerConnected(i))
  1477. {
  1478. new name[MAX_PLAYER_NAME];
  1479. new wstring[MAX_PLAYER_NAME];
  1480. GetPlayerName(i, name, sizeof(name));
  1481. format(string, sizeof(string), "%s", name);
  1482. strmid(wstring, string, 0, strlen(string), 255);
  1483. if(strcmp(SBizzInfo[bizid][sbExtortion] ,wstring, true ) == 0 )
  1484. {
  1485. new value = money / 100;
  1486. value = value * 10;
  1487. GivePlayerMoney(i, value);
  1488. SBizzInfo[bizid][sbTill] -= value;
  1489. }
  1490. }
  1491. }
  1492. return 1;
  1493. }
  1494.  
  1495. public PreparePaintball()
  1496. {
  1497. for(new i = 0; i < MAX_PLAYERS; i++)
  1498. {
  1499. if(IsPlayerConnected(i))
  1500. {
  1501. if(PlayerPaintballing[i] != 0)
  1502. {
  1503. SendClientMessage(i, COLOR_YELLOW, "Paintball Match will start in 20 seconds.");
  1504. }
  1505. }
  1506. }
  1507. SetTimer("StartPaintball", 20000, 0);
  1508. return 1;
  1509. }
  1510.  
  1511. public StartPaintball()
  1512. {
  1513. PaintballRound = 1;
  1514. StartingPaintballRound = 0;
  1515. PaintballWinner = 999;
  1516. PaintballWinnerKills = 0;
  1517. for(new i = 0; i < MAX_PLAYERS; i++)
  1518. {
  1519. if(IsPlayerConnected(i))
  1520. {
  1521. if(PlayerPaintballing[i] != 0)
  1522. {
  1523. ResetPlayerWeapons(i);
  1524. GivePlayerWeapon(i, 29, 999);
  1525. TogglePlayerControllable(i, 1);
  1526. SendClientMessage(i, COLOR_YELLOW, "Paintball Match started, 4 minutes left.");
  1527. PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
  1528. }
  1529. }
  1530. }
  1531. SetTimer("PaintballEnded", 240000, 0);
  1532. return 1;
  1533. }
  1534.  
  1535. public PaintballEnded()
  1536. {
  1537. new string[256];
  1538. new name[MAX_PLAYER_NAME];
  1539. for(new i = 0; i < MAX_PLAYERS; i++)
  1540. {
  1541. if(IsPlayerConnected(i))
  1542. {
  1543. if(PlayerPaintballing[i] != 0)
  1544. {
  1545. if(IsPlayerConnected(PaintballWinner))
  1546. {
  1547. GetPlayerName(PaintballWinner, name, sizeof(name));
  1548. format(string,sizeof(string), "** %s won the Paintball Match with %d kills **",name,PaintballWinnerKills);
  1549. SendClientMessage(i, COLOR_WHITE, string);
  1550. }
  1551. ResetPlayerWeapons(i);
  1552. PlayerPaintballing[i] = 0;
  1553. SetPlayerPos(i, SBizzInfo[10][sbEntranceX],SBizzInfo[10][sbEntranceY],SBizzInfo[10][sbEntranceZ]);
  1554. }
  1555. }
  1556. }
  1557. AnnouncedPaintballRound = 0;
  1558. PaintballRound = 0;
  1559. return 1;
  1560. }
  1561.  
  1562. public PrepareKarting()
  1563. {
  1564. for(new i = 0; i < MAX_PLAYERS; i++)
  1565. {
  1566. if(IsPlayerConnected(i))
  1567. {
  1568. if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
  1569. {
  1570. CP[i] = 9;
  1571. SetPlayerCheckpoint(i,2308.3540,-2354.0039,12.6842,8.0);
  1572. SendClientMessage(i, COLOR_YELLOW, "Kart Race will start in 20 seconds, go to the starting line.");
  1573. }
  1574. }
  1575. }
  1576. SetTimer("StartKarting", 20000, 0);
  1577. return 1;
  1578. }
  1579.  
  1580. public StartKarting()
  1581. {
  1582. KartingRound = 1;
  1583. StartingKartRound = 0;
  1584. EndingKartRound = 0;
  1585. FirstKartWinner = 999;
  1586. SecondKartWinner = 999;
  1587. ThirdKartWinner = 999;
  1588. for(new i = 0; i < MAX_PLAYERS; i++)
  1589. {
  1590. if(IsPlayerConnected(i))
  1591. {
  1592. if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
  1593. {
  1594. CP[i] = 10;
  1595. SendClientMessage(i, COLOR_YELLOW, "Green light, go go go !");
  1596. PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
  1597. SetPlayerCheckpoint(i,2308.3540,-2354.0039,12.6842,8.0);
  1598. }
  1599. }
  1600. }
  1601. SetTimer("KartingEnded", 240000, 0);
  1602. return 1;
  1603. }
  1604.  
  1605. public KartingEnded()
  1606. {
  1607. for(new i = 0; i < MAX_PLAYERS; i++)
  1608. {
  1609. if(IsPlayerConnected(i))
  1610. {
  1611. if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
  1612. {
  1613. CP[i] = 0;
  1614. DisablePlayerCheckpoint(i);
  1615. }
  1616. }
  1617. }
  1618. AnnouncedKartRound = 0;
  1619. KartingRound = 0;
  1620. return 1;
  1621. }
  1622.  
  1623. public DollahScoreUpdate()
  1624. {
  1625. new LevScore;
  1626. for(new i=0; i<MAX_PLAYERS; i++)
  1627. {
  1628. if(IsPlayerConnected(i))
  1629. {
  1630. LevScore = PlayerInfo[i][pLevel];
  1631. SetPlayerScore(i, LevScore);
  1632. }
  1633. }
  1634. return 1;
  1635. }
  1636.  
  1637. public Encrypt(string[])
  1638. {
  1639. for(new x=0; x < strlen(string); x++)
  1640. {
  1641. string[x] += (3^x) * (x % 15);
  1642. if(string[x] > (0xff))
  1643. {
  1644. string[x] -= 256;
  1645. }
  1646. }
  1647. return 1;
  1648. }
  1649.  
  1650. stock right(source[], len)
  1651. {
  1652. new retval[MAX_STRING], srclen;
  1653. srclen = strlen(source);
  1654. strmid(retval, source, srclen - len, srclen, MAX_STRING);
  1655. return retval;
  1656. }
  1657.  
  1658. public Spectator()
  1659. {
  1660. new string[256];
  1661. for(new i = 0; i < MAX_PLAYERS; i++)
  1662. {
  1663. if(IsPlayerConnected(i))
  1664. {
  1665. if(KickPlayer[i]==1) { Kick(i); }
  1666. else if(KickPlayer[i]==2) { Ban(i); }
  1667. //if(GetPlayerPing(i) >= 500 && PlayerInfo[i][pAdmin] < 1) { Kick(i); }
  1668. if(Spectate[i] < 253 && Spectate[i] != 255)
  1669. {
  1670. SetPlayerColor(i,COLOR_SPEC);
  1671. TogglePlayerControllable(i, 0);
  1672. new targetid = Spectate[i];
  1673. if(IsPlayerConnected(targetid))
  1674. {
  1675. TogglePlayerSpectating(i, 1);
  1676. if(PlayerInfo[i][pAdmin] >= 1)
  1677. {
  1678. new Float:health;
  1679. new name[MAX_PLAYER_NAME];
  1680. GetPlayerName(targetid, name, sizeof(name));
  1681. GetPlayerHealth(targetid, health);
  1682. format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~~y~%s(ID:%d)~n~~y~health:%.1f",name,targetid,health);
  1683. GameTextForPlayer(i, string, 2500, 3);
  1684. }
  1685. if(IsPlayerInAnyVehicle(targetid))
  1686. {
  1687. new carid = GetPlayerVehicleID(targetid);
  1688. PlayerSpectateVehicle(i, carid);
  1689. }
  1690. else
  1691. {
  1692. PlayerSpectatePlayer(i, targetid);
  1693. }
  1694. if(GetPlayerInterior(targetid) == 0)
  1695. {
  1696. SetPlayerInterior(i,0);
  1697. }
  1698. else if(GetPlayerInterior(targetid) > 0)
  1699. {
  1700. SetPlayerInterior(i,GetPlayerInterior(targetid));
  1701. }
  1702. }//Targetid connected
  1703. }
  1704. if(Spectate[i] == 253)
  1705. {
  1706. TogglePlayerControllable(i, 1);
  1707. TogglePlayerSpectating(i, 0);
  1708. SetPlayerInterior(i,Unspec[i][sPint]);
  1709. PlayerInfo[i][pInt] = Unspec[i][sPint];
  1710. PlayerInfo[i][pLocal] = Unspec[i][sLocal];
  1711. Unspec[i][sLocal] = 255;
  1712. 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);
  1713. gTeam[i] = PlayerInfo[i][pTeam];
  1714. SetPlayerToTeamColor(i);
  1715. MedicBill[i] = 0;
  1716. if(PlayerInfo[i][pDonateRank] > 0)
  1717. {
  1718. 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);
  1719. SpawnPlayer(i);
  1720. SetCameraBehindPlayer(i);
  1721. }
  1722. else
  1723. {
  1724. SpawnPlayer(i);
  1725. }
  1726. Spectate[i] = 255;
  1727. }
  1728. if(Spectate[i] == 254)
  1729. {
  1730. TogglePlayerControllable(i, 1);
  1731. SetPlayerInterior(i,Unspec[i][sPint]);
  1732. PlayerInfo[i][pInt] = Unspec[i][sPint];
  1733. PlayerInfo[i][pLocal] = Unspec[i][sLocal];
  1734. SetPlayerPos(i, Unspec[i][sPx], Unspec[i][sPy], Unspec[i][sPz]);
  1735. Spectate[i] = 255;
  1736. }
  1737. if(Spectate[i] == 256)
  1738. {
  1739. SetPlayerToTeamColor(i);
  1740. Spectate[i] = 255;
  1741. }
  1742. if(Spectate[i] == 257)
  1743. {
  1744. Spectate[i] = 254;
  1745. }
  1746. }
  1747. }
  1748. }
  1749.  
  1750. //------------------------------------------------------------------------------------------------------
  1751.  
  1752. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  1753. {
  1754. if(gTeam[playerid] >= 3)
  1755. {
  1756. if (IsACopCar(vehicleid) && !ispassenger)
  1757. {
  1758. if(PlayerInfo[playerid][pLeader]==1||PlayerInfo[playerid][pLeader]==2||PlayerInfo[playerid][pLeader]==3) {}
  1759. else { WantedPoints[playerid]+=2; SetPlayerCriminal(playerid,255, "Stealing A Police Vehicle"); }
  1760. }
  1761. if (IsAnAmbulance(vehicleid) && !ispassenger)
  1762. {
  1763. if(PlayerInfo[playerid][pMember]==4||PlayerInfo[playerid][pLeader]==4) { }
  1764. else { WantedPoints[playerid]+=2; SetPlayerCriminal(playerid,255, "Stealing An Ambulance"); }
  1765. }
  1766. }
  1767. return 1;
  1768. }
  1769.  
  1770. public IsAnInstructor(playerid)
  1771. {
  1772. if(IsPlayerConnected(playerid))
  1773. {
  1774. new leader = PlayerInfo[playerid][pLeader];
  1775. new member = PlayerInfo[playerid][pMember];
  1776. if(member==11)
  1777. {
  1778. return 1;
  1779. }
  1780. if(leader==11)
  1781. {
  1782. return 1;
  1783. }
  1784. }
  1785. return 0;
  1786. }
  1787.  
  1788. public IsAMember(playerid)
  1789. {
  1790. if(IsPlayerConnected(playerid))
  1791. {
  1792. new leader = PlayerInfo[playerid][pLeader];
  1793. new member = PlayerInfo[playerid][pMember];
  1794. if(member==5 || member==6 || member==8)
  1795. {
  1796. return 1;
  1797. }
  1798. if(leader==5 || leader==6 || leader==8)
  1799. {
  1800. return 1;
  1801. }
  1802. }
  1803. return 0;
  1804. }
  1805.  
  1806. public IsACop(playerid)
  1807. {
  1808. if(IsPlayerConnected(playerid))
  1809. {
  1810. new leader = PlayerInfo[playerid][pLeader];
  1811. new member = PlayerInfo[playerid][pMember];
  1812. if(member==1 || member==2 || member==3)
  1813. {
  1814. return 1;
  1815. }
  1816. else if(leader==1 || leader==2 || leader==3)
  1817. {
  1818. return 1;
  1819. }
  1820. }
  1821. return 0;
  1822. }
  1823.  
  1824. public IsAtClothShop(playerid)
  1825. {
  1826. if(IsPlayerConnected(playerid))
  1827. {
  1828. if(PlayerToPoint(25.0,playerid,207.5627,-103.7291,1005.2578) || PlayerToPoint(25.0,playerid,203.9068,-41.0728,1001.8047))
  1829. {//Binco & Suburban
  1830. return 1;
  1831. }
  1832. else if(PlayerToPoint(30.0,playerid,214.4470,-7.6471,1001.2109) || PlayerToPoint(50.0,playerid,161.3765,-83.8416,1001.8047))
  1833. {//Zip & Victim
  1834. return 1;
  1835. }
  1836. }
  1837. return 0;
  1838. }
  1839.  
  1840. public IsAtGasStation(playerid)
  1841. {
  1842. if(IsPlayerConnected(playerid))
  1843. {
  1844. if(PlayerToPoint(6.0,playerid,1004.0070,-939.3102,42.1797) || PlayerToPoint(6.0,playerid,1944.3260,-1772.9254,13.3906))
  1845. {//LS
  1846. return 1;
  1847. }
  1848. else if(PlayerToPoint(6.0,playerid,-90.5515,-1169.4578,2.4079) || PlayerToPoint(6.0,playerid,-1609.7958,-2718.2048,48.5391))
  1849. {//LS
  1850. return 1;
  1851. }
  1852. else if(PlayerToPoint(6.0,playerid,-2029.4968,156.4366,28.9498) || PlayerToPoint(8.0,playerid,-2408.7590,976.0934,45.4175))
  1853. {//SF
  1854. return 1;
  1855. }
  1856. else if(PlayerToPoint(5.0,playerid,-2243.9629,-2560.6477,31.8841) || PlayerToPoint(8.0,playerid,-1676.6323,414.0262,6.9484))
  1857. {//Between LS and SF
  1858. return 1;
  1859. }
  1860. else if(PlayerToPoint(6.0,playerid,2202.2349,2474.3494,10.5258) || PlayerToPoint(10.0,playerid,614.9333,1689.7418,6.6968))
  1861. {//LV
  1862. return 1;
  1863. }
  1864. else if(PlayerToPoint(8.0,playerid,-1328.8250,2677.2173,49.7665) || PlayerToPoint(6.0,playerid,70.3882,1218.6783,18.5165))
  1865. {//LV
  1866. return 1;
  1867. }
  1868. else if(PlayerToPoint(8.0,playerid,2113.7390,920.1079,10.5255) || PlayerToPoint(6.0,playerid,-1327.7218,2678.8723,50.0625))
  1869. {//LV
  1870. return 1;
  1871. }
  1872. }
  1873. return 0;
  1874. }
  1875.  
  1876. public IsAtFishPlace(playerid)
  1877. {
  1878. if(IsPlayerConnected(playerid))
  1879. {
  1880. if(PlayerToPoint(1.0,playerid,403.8266,-2088.7598,7.8359) || PlayerToPoint(1.0,playerid,398.7553,-2088.7490,7.8359))
  1881. {//Fishplace at the bigwheel
  1882. return 1;
  1883. }
  1884. else if(PlayerToPoint(1.0,playerid,396.2197,-2088.6692,7.8359) || PlayerToPoint(1.0,playerid,391.1094,-2088.7976,7.8359))
  1885. {//Fishplace at the bigwheel
  1886. return 1;
  1887. }
  1888. else if(PlayerToPoint(1.0,playerid,383.4157,-2088.7849,7.8359) || PlayerToPoint(1.0,playerid,374.9598,-2088.7979,7.8359))
  1889. {//Fishplace at the bigwheel
  1890. return 1;
  1891. }
  1892. else if(PlayerToPoint(1.0,playerid,369.8107,-2088.7927,7.8359) || PlayerToPoint(1.0,playerid,367.3637,-2088.7925,7.8359))
  1893. {//Fishplace at the bigwheel
  1894. return 1;
  1895. }
  1896. else if(PlayerToPoint(1.0,playerid,362.2244,-2088.7981,7.8359) || PlayerToPoint(1.0,playerid,354.5382,-2088.7979,7.8359))
  1897. {//Fishplace at the bigwheel
  1898. return 1;
  1899. }
  1900. }
  1901. return 0;
  1902. }
  1903.  
  1904. public IsAtCookPlace(playerid)
  1905. {
  1906. if(IsPlayerConnected(playerid))
  1907. {
  1908. if(PlayerToPoint(3.0,playerid,369.9786,-4.0798,1001.8589))
  1909. {//Cluckin Bell
  1910. return 1;
  1911. }
  1912. else if(PlayerToPoint(3.0,playerid,376.4466,-60.9574,1001.5078) || PlayerToPoint(3.0,playerid,378.1215,-57.4928,1001.5078))
  1913. {//Burgershot
  1914. return 1;
  1915. }
  1916. else if(PlayerToPoint(3.0,playerid,374.1185,-113.6361,1001.4922) || PlayerToPoint(3.0,playerid,377.7971,-113.7668,1001.4922))
  1917. {//Well Stacked Pizza
  1918. return 1;
  1919. }
  1920. }
  1921. return 0;
  1922. }
  1923.  
  1924. public IsAtBar(playerid)
  1925. {
  1926. if(IsPlayerConnected(playerid))
  1927. {
  1928. if(PlayerToPoint(4.0,playerid,495.7801,-76.0305,998.7578) || PlayerToPoint(4.0,playerid,499.9654,-20.2515,1000.6797))
  1929. {//In grove street bar (with girlfriend), and in Havanna
  1930. return 1;
  1931. }
  1932. else if(PlayerToPoint(4.0,playerid,1215.9480,-13.3519,1000.9219) || PlayerToPoint(10.0,playerid,-2658.9749,1407.4136,906.2734))
  1933. {//PIG Pen
  1934. return 1;
  1935. }
  1936. }
  1937. return 0;
  1938. }
  1939.  
  1940. public IsABoat(carid)
  1941. {
  1942. if(carid >= 86 && carid <=90)
  1943. {
  1944. return 1;
  1945. }
  1946. return 0;
  1947. }
  1948.  
  1949. public IsAPlane(carid)
  1950. {
  1951. 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)
  1952. {
  1953. return 1;
  1954. }
  1955. return 0;
  1956. }
  1957.  
  1958. public IsACopCar(carid)
  1959. {
  1960. if((carid >= 35) && (carid <= 60) || carid == 66 || carid == 67 || carid == 91 || carid == 92 || carid == 93 || carid == 36)
  1961. {
  1962. if(carid == 45 || carid == 46 || carid == 55 || carid == 59) { return 0; }
  1963. return 1;
  1964. }
  1965. return 0;
  1966. }
  1967.  
  1968. public IsAnAmbulance(carid)
  1969. {
  1970. if((carid >= 61) && (carid <= 63)|| carid == 83)
  1971. {
  1972. return 1;
  1973. }
  1974. return 0;
  1975. }
  1976.  
  1977. public IsATruck(carid)
  1978. {
  1979. if(carid >= 78 && carid <= 81)
  1980. {
  1981. return 1;
  1982. }
  1983. return 0;
  1984. }
  1985.  
  1986. //------------------------------------------------------------------------------------------------------
  1987.  
  1988. public OnPlayerConnect(playerid)
  1989. {
  1990. if(Security != 0)
  1991. {
  1992. SendClientMessage(playerid, COLOR_YELLOW, "Host has broken one of the Agreement rules, action has been taken.");
  1993. Kick(playerid);
  1994. return 1;
  1995. }
  1996. gActivePlayers[playerid]++;
  1997. numplayers++;
  1998. new plname[MAX_PLAYER_NAME];
  1999. new string[MAX_PLAYER_NAME];
  2000. SelectChar[playerid] = 0; HidePM[playerid] = 0; PhoneOnline[playerid] = 0;
  2001. SelectCharID[playerid] = 0; SelectCharPlace[playerid] = 0; ChosenSkin[playerid] = 0;
  2002. GettingJob[playerid] = 0; GuardOffer[playerid] = 999; GuardPrice[playerid] = 0;
  2003. ApprovedLawyer[playerid] = 0; CallLawyer[playerid] = 0; WantLawyer[playerid] = 0;
  2004. KickPlayer[playerid] = 0; CurrentMoney[playerid] = 0; UsedFind[playerid] = 0;
  2005. CP[playerid] = 0; Robbed[playerid] = 0; SpawnChange[playerid] = 1;
  2006. CarOffer[playerid] = 999; CarPrice[playerid] = 0; CarID[playerid] = 0; CarCalls[playerid] = 0;
  2007. RobbedTime[playerid] = 0; MoneyMessage[playerid] = 0; Condom[playerid] = 0;
  2008. STDPlayer[playerid] = 0; SexOffer[playerid] = 999; SexPrice[playerid] = 0;
  2009. RepairOffer[playerid] = 999; RepairPrice[playerid] = 0; RepairCar[playerid] = 0;
  2010. TalkingLive[playerid] = 255; LiveOffer[playerid] = 999; TakingLesson[playerid] = 0;
  2011. RefillOffer[playerid] = 999; RefillPrice[playerid] = 0; MapIconsShown[playerid] = 0;
  2012. DrugOffer[playerid] = 999; PlayerCuffed[playerid] = 0; PlayerCuffedTime[playerid] = 0;
  2013. DrugPrice[playerid] = 0; RegistrationStep[playerid] = 0; OnCK[playerid] = 999; GettingCK[playerid] = 999;
  2014. DrugGram[playerid] = 0; ConnectedToPC[playerid] = 0; OrderReady[playerid] = 0;
  2015. JailPrice[playerid] = 0; MedicTime[playerid] = 0; NeedMedicTime[playerid] = 0; MedicBill[playerid] = 0; GotHit[playerid] = 0;
  2016. WantedPoints[playerid] = 0; GoChase[playerid] = 999; GetChased[playerid] = 999; PlacedNews[playerid] = 0;
  2017. OnDuty[playerid] = 0; WantedLevel[playerid] = 0; TestFishes[playerid] = 0;
  2018. BoxWaitTime[playerid] = 0; SchoolSpawn[playerid] = 0; ChangePos2[playerid][1] = 0;
  2019. SafeTime[playerid] = 60; TransportDuty[playerid] = 0; PlayerTied[playerid] = 0;
  2020. BusCallTime[playerid] = 0; TaxiCallTime[playerid] = 0; MedicCallTime[playerid] = 0; MechanicCallTime[playerid] = 0;
  2021. FindTimePoints[playerid] = 0; FindTime[playerid] = 0; JobDuty[playerid] = 0;
  2022. Mobile[playerid] = 255; Music[playerid] = 0; BoxOffer[playerid] = 999; PlayerBoxing[playerid] = 0;
  2023. Spectate[playerid] = 255; PlayerDrunk[playerid] = 0; PlayerDrunkTime[playerid] = 0;
  2024. Unspec[playerid][sLocal] = 255; FishCount[playerid] = 0;
  2025. WritingPaper[playerid] = 0; WritingPaperNumber[playerid] = 999; WritingLine[playerid] = 0; BringingPaper[playerid] = 0; GotPaper[playerid] = 0;
  2026. PaperOffer[playerid] = 999; ConsumingMoney[playerid] = 0;
  2027. gLastCar[playerid] = 0; FirstSpawn[playerid] = 0;
  2028. gOoc[playerid] = 0; gNews[playerid] = 0; BigEar[playerid] = 0; gDice[playerid] = 0; gFam[playerid] = 0;
  2029. gSpeedo[playerid] = 0; gGas[playerid] = 0;
  2030. gPlayerLogged[playerid] = 0; gPlayerLogTries[playerid] = 0; gPlayerAccount[playerid] = 0;
  2031. gPlayerSpawned[playerid] = 0; PlayerKarting[playerid] = 0; PlayerInKart[playerid] = 0;
  2032. PlayerTazeTime[playerid] = 0; PlayerStoned[playerid] = 0;
  2033. StartTime[playerid] = 0; TicketOffer[playerid] = 999; TicketMoney[playerid] = 0;
  2034. MatsHolding[playerid] = 0; TutTime[playerid] = 0;
  2035. gPlayerMission[playerid] = 0; TaxiAccepted[playerid] = 999; BusAccepted[playerid] = 999;
  2036. PlayerInfo[playerid][pCash] = dollah; NoFuel[playerid] = 0;
  2037. HireCar[playerid] = 299; PlayersChannel[playerid] = 999;
  2038. TransportValue[playerid] = 0; TransportMoney[playerid] = 0; TransportTime[playerid] = 0; TransportCost[playerid] = 0; TransportDriver[playerid] = 999;
  2039. Locator[playerid] = 0; PlayerOnMission[playerid] = 0; MissionCheckpoint[playerid] = 0;
  2040. WatchingTV[playerid] = 0; PlayerPaintballing[playerid] = 0; PlayerPaintballKills[playerid] = 0;
  2041. Fishes[playerid][pLastFish] = 0; Fishes[playerid][pFishID] = 0;
  2042. ProposeOffer[playerid] = 999; MarryWitness[playerid] = 999; MarryWitnessOffer[playerid] = 999; MarriageCeremoney[playerid] = 0; ProposedTo[playerid] = 999; GotProposedBy[playerid] = 999; DivorceOffer[playerid] = 999;
  2043. GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
  2044. PlayerInfo[playerid][pLevel] = 0;
  2045. PlayerInfo[playerid][pAdmin] = 0;
  2046. PlayerInfo[playerid][pDonateRank] = 0;
  2047. PlayerInfo[playerid][gPupgrade] = 0;
  2048. PlayerInfo[playerid][pConnectTime] = 0;
  2049. PlayerInfo[playerid][pReg] = 0;
  2050. PlayerInfo[playerid][pSex] = 0;
  2051. PlayerInfo[playerid][pAge] = 0;
  2052. PlayerInfo[playerid][pOrigin] = 0;
  2053. PlayerInfo[playerid][pExp] = 0;
  2054. PlayerInfo[playerid][pAccount] = 0;
  2055. PlayerInfo[playerid][pCrimes] = 0;
  2056. PlayerInfo[playerid][pDeaths] = 0;
  2057. PlayerInfo[playerid][pArrested] = 0;
  2058. PlayerInfo[playerid][pWantedDeaths] = 0;
  2059. PlayerInfo[playerid][pPhoneBook] = 0;
  2060. PlayerInfo[playerid][pLottoNr] = 0;
  2061. PlayerInfo[playerid][pFishes] = 0;
  2062. PlayerInfo[playerid][pBiggestFish] = 0;
  2063. PlayerInfo[playerid][pJob] = 0;
  2064. PlayerInfo[playerid][pPayCheck] = 0;
  2065. PlayerInfo[playerid][pHeadValue] = 0;
  2066. PlayerInfo[playerid][pJailed] = 0;
  2067. PlayerInfo[playerid][pJailTime] = 0;
  2068. PlayerInfo[playerid][pMats] = 0;
  2069. PlayerInfo[playerid][pDrugs] = 0;
  2070. PlayerInfo[playerid][pLeader] = 0;
  2071. PlayerInfo[playerid][pMember] = 0;
  2072. PlayerInfo[playerid][pFMember] = 255;
  2073. PlayerInfo[playerid][pRank] = 0;
  2074. PlayerInfo[playerid][pChar] = 0;
  2075. PlayerInfo[playerid][pContractTime] = 0;
  2076. PlayerInfo[playerid][pDetSkill] = 0;
  2077. PlayerInfo[playerid][pSexSkill] = 0;
  2078. PlayerInfo[playerid][pBoxSkill] = 0;
  2079. PlayerInfo[playerid][pLawSkill] = 0;
  2080. PlayerInfo[playerid][pMechSkill] = 0;
  2081. PlayerInfo[playerid][pJackSkill] = 0;
  2082. PlayerInfo[playerid][pCarSkill] = 0;
  2083. PlayerInfo[playerid][pNewsSkill] = 0;
  2084. PlayerInfo[playerid][pDrugsSkill] = 0;
  2085. PlayerInfo[playerid][pCookSkill] = 0;
  2086. PlayerInfo[playerid][pFishSkill] = 0;
  2087. PlayerInfo[playerid][pSHealth] = 0.0;
  2088. PlayerInfo[playerid][pHealth] = 50.0;
  2089. PlayerInfo[playerid][pPos_x] = 2246.6;
  2090. PlayerInfo[playerid][pPos_y] = -1161.9;
  2091. PlayerInfo[playerid][pPos_z] = 1029.7;
  2092. PlayerInfo[playerid][pInt] = 15;
  2093. PlayerInfo[playerid][pLocal] = 255;
  2094. PlayerInfo[playerid][pTeam] = 3;
  2095. PlayerInfo[playerid][pModel] = 264;
  2096. new randphone = 1000 + random(8999);//minimum 1000 max 9999 //giving one at the start
  2097. PlayerInfo[playerid][pPnumber] = randphone;
  2098. PlayerInfo[playerid][pPhousekey] = 255;
  2099. PlayerInfo[playerid][pPbiskey] = 255;
  2100. PlayerInfo[playerid][pCarLic] = 0;
  2101. PlayerInfo[playerid][pFlyLic] = 0;
  2102. PlayerInfo[playerid][pBoatLic] = 0;
  2103. PlayerInfo[playerid][pFishLic] = 0;
  2104. PlayerInfo[playerid][pGunLic] = 0;
  2105. PlayerInfo[playerid][pGun1] = 0;
  2106. PlayerInfo[playerid][pGun2] = 0;
  2107. PlayerInfo[playerid][pGun3] = 0;
  2108. PlayerInfo[playerid][pGun4] = 0;
  2109. PlayerInfo[playerid][pAmmo1] = 0;
  2110. PlayerInfo[playerid][pAmmo2] = 0;
  2111. PlayerInfo[playerid][pAmmo3] = 0;
  2112. PlayerInfo[playerid][pAmmo4] = 0;
  2113. PlayerInfo[playerid][pCarTime] = 0;
  2114. PlayerInfo[playerid][pPayDay] = 0;
  2115. PlayerInfo[playerid][pPayDayHad] = 0;
  2116. PlayerInfo[playerid][pCDPlayer] = 0;
  2117. PlayerInfo[playerid][pWins] = 0;
  2118. PlayerInfo[playerid][pLoses] = 0;
  2119. PlayerInfo[playerid][pAlcoholPerk] = 0;
  2120. PlayerInfo[playerid][pDrugPerk] = 0;
  2121. PlayerInfo[playerid][pMiserPerk] = 0;
  2122. PlayerInfo[playerid][pPainPerk] = 0;
  2123. PlayerInfo[playerid][pTraderPerk] = 0;
  2124. PlayerInfo[playerid][pTut] = 0;
  2125. PlayerInfo[playerid][pMissionNr] = 0;
  2126. PlayerInfo[playerid][pWarns] = 0;
  2127. PlayerInfo[playerid][pFuel] = 0;
  2128. PlayerInfo[playerid][pAdjustable] = 0;
  2129. ClearCrime(playerid);
  2130. ClearFishes(playerid);
  2131. ClearCooking(playerid);
  2132. ClearGroceries(playerid);
  2133. ClearMarriage(playerid);
  2134. SetPlayerColor(playerid,COLOR_GRAD2);
  2135. GetPlayerName(playerid, plname, sizeof(plname));
  2136. format(string, sizeof(string), "%s.ini", plname);
  2137. if(fexist(string))
  2138. {
  2139. gPlayerAccount[playerid] = 1;
  2140. SendClientMessage(playerid, COLOR_YELLOW, "SERVER: That nick is registered, please login");
  2141. SendClientMessage(playerid, COLOR_WHITE, "HINT: You can now login by typing /login <password>");
  2142. return 1;
  2143. }
  2144. else
  2145. {
  2146. gPlayerAccount[playerid] = 0;
  2147. SendClientMessage(playerid,COLOR_YELLOW,"You dont have an account. Register at our site: www.godfather-rp.com");
  2148. KickPlayer[playerid] = 1;
  2149. return 1;
  2150. }
  2151. }
  2152.  
  2153. public JoinChannel(playerid, number, line[])
  2154. {
  2155. if(IsPlayerConnected(playerid))
  2156. {
  2157. if(strcmp(IRCInfo[number][iPassword],line, true ) == 0 )
  2158. {
  2159. JoinChannelNr(playerid, number);
  2160. }
  2161. else
  2162. {
  2163. SendClientMessage(playerid, COLOR_GREY, " Wrong Channel Password !");
  2164. }
  2165. }
  2166. return 1;
  2167. }
  2168.  
  2169. public JoinChannelNr(playerid, number)
  2170. {
  2171. if(IsPlayerConnected(playerid))
  2172. {
  2173. new string[256];
  2174. new sendername[MAX_PLAYER_NAME];
  2175. GetPlayerName(playerid, sendername, sizeof(sendername));
  2176. if(PlayersChannel[playerid] < 999)
  2177. {
  2178. format(string, sizeof(string), "* %s has left the Channel.", sendername);
  2179. SendIRCMessage(PlayersChannel[playerid], COLOR_GREEN, string);
  2180. IRCInfo[PlayersChannel[playerid]][iPlayers] -= 1;
  2181. }
  2182. new channel; channel = number; channel += 1;
  2183. PlayersChannel[playerid] = number;
  2184. IRCInfo[PlayersChannel[playerid]][iPlayers] += 1;
  2185. new wstring[128];
  2186. format(string, sizeof(string), "%s", sendername);
  2187. strmid(wstring, string, 0, strlen(string), 255);
  2188. if(strcmp(IRCInfo[number][iAdmin],wstring, true ) == 0 )
  2189. {
  2190. format(string, sizeof(string), "* You have joined IRC Channel %d as the Administrator.", channel);
  2191. SendClientMessage(playerid, COLOR_YELLOW, string);
  2192. }
  2193. else
  2194. {
  2195. format(string, sizeof(string), "* You have joined IRC Channel %d, Admin: %s.", channel, IRCInfo[number][iAdmin]);
  2196. SendClientMessage(playerid, COLOR_YELLOW, string);
  2197. }
  2198. format(string, sizeof(string), "MOTD: %s.", IRCInfo[number][iMOTD]);
  2199. SendClientMessage(playerid, COLOR_YELLOW, string);
  2200. format(string, sizeof(string), "* %s has joined the Channel.", sendername);
  2201. SendIRCMessage(number, COLOR_GREEN, string);
  2202. }
  2203. return 1;
  2204. }
  2205.  
  2206. public ClearCK(ck)
  2207. {
  2208. new string[MAX_PLAYER_NAME];
  2209. format(string, sizeof(string), "No-one");
  2210. strmid(CKInfo[ck][cSendername], string, 0, strlen(string), 255);
  2211. strmid(CKInfo[ck][cGiveplayer], string, 0, strlen(string), 255);
  2212. CKInfo[ck][cUsed] = 0;
  2213. SaveCK();
  2214. return 1;
  2215. }
  2216.  
  2217. public ClearMarriage(playerid)
  2218. {
  2219. if(IsPlayerConnected(playerid))
  2220. {
  2221. new string[MAX_PLAYER_NAME];
  2222. format(string, sizeof(string), "No-one");
  2223. strmid(PlayerInfo[playerid][pMarriedTo], string, 0, strlen(string), 255);
  2224. PlayerInfo[playerid][pMarried] = 0;
  2225. }
  2226. return 1;
  2227. }
  2228.  
  2229. public ClearPaper(paper)
  2230. {
  2231. new string[MAX_PLAYER_NAME];
  2232. format(string, sizeof(string), "None");
  2233. PaperInfo[paper][PaperUsed] = 0;
  2234. strmid(PaperInfo[paper][PaperMaker], string, 0, strlen(string), 255);
  2235. strmid(PaperInfo[paper][PaperTitle], string, 0, strlen(string), 255);
  2236. strmid(PaperInfo[paper][PaperText1], string, 0, strlen(string), 255);
  2237. strmid(PaperInfo[paper][PaperText2], string, 0, strlen(string), 255);
  2238. strmid(PaperInfo[paper][PaperText3], string, 0, strlen(string), 255);
  2239. strmid(PaperInfo[paper][PaperText4], string, 0, strlen(string), 255);
  2240. strmid(PaperInfo[paper][PaperText5], string, 0, strlen(string), 255);
  2241. strmid(PaperInfo[paper][PaperText6], string, 0, strlen(string), 255);
  2242. strmid(PaperInfo[paper][PaperText7], string, 0, strlen(string), 255);
  2243. SavePapers();
  2244. return 1;
  2245. }
  2246.  
  2247. public ClearFamily(family)
  2248. {
  2249. for(new i = 0; i < MAX_PLAYERS; i++)
  2250. {
  2251. if(IsPlayerConnected(i))
  2252. {
  2253. if(PlayerInfo[i][pFMember] == family)
  2254. {
  2255. SendClientMessage(i, COLOR_LIGHTBLUE, "* The Family you are in got Deleted by the Organisation Leader, you got kicked out automaticly.");
  2256. PlayerInfo[i][pFMember] = 255;
  2257. }
  2258. }
  2259. }
  2260. new string[MAX_PLAYER_NAME];
  2261. format(string, sizeof(string), "None");
  2262. FamilyInfo[family][FamilyTaken] = 0;
  2263. strmid(FamilyInfo[family][FamilyName], string, 0, strlen(string), 255);
  2264. strmid(FamilyInfo[family][FamilyMOTD], string, 0, strlen(string), 255);
  2265. strmid(FamilyInfo[family][FamilyLeader], string, 0, strlen(string), 255);
  2266. format(string, sizeof(string), "0xFF000069");
  2267. strmid(FamilyInfo[family][FamilyColor], string, 0, strlen(string), 255);
  2268. FamilyInfo[family][FamilyMembers] = 0;
  2269. FamilyInfo[family][FamilySpawn][0] = 0.0;
  2270. FamilyInfo[family][FamilySpawn][1] = 0.0;
  2271. FamilyInfo[family][FamilySpawn][2] = 0.0;
  2272. FamilyInfo[family][FamilySpawn][3] = 0.0;
  2273. FamilyInfo[family][FamilyInterior] = 0;
  2274. SaveFamilies();
  2275. return 1;
  2276. }
  2277.  
  2278. public ClearCrime(playerid)
  2279. {
  2280. if(IsPlayerConnected(playerid))
  2281. {
  2282. new string[MAX_PLAYER_NAME];
  2283. format(string, sizeof(string), "********");
  2284. strmid(PlayerCrime[playerid][pBplayer], string, 0, strlen(string), 255);
  2285. strmid(PlayerCrime[playerid][pVictim], string, 0, strlen(string), 255);
  2286. strmid(PlayerCrime[playerid][pAccusing], string, 0, strlen(string), 255);
  2287. strmid(PlayerCrime[playerid][pAccusedof], string, 0, strlen(string), 255);
  2288. }
  2289. return 1;
  2290. }
  2291.  
  2292. public FishCost(playerid, fish)
  2293. {
  2294. if(IsPlayerConnected(playerid))
  2295. {
  2296. new cost = 0;
  2297. switch (fish)
  2298. {
  2299. case 1:
  2300. {
  2301. cost = 1;
  2302. }
  2303. case 2:
  2304. {
  2305. cost = 3;
  2306. }
  2307. case 3:
  2308. {
  2309. cost = 3;
  2310. }
  2311. case 5:
  2312. {
  2313. cost = 5;
  2314. }
  2315. case 6:
  2316. {
  2317. cost = 2;
  2318. }
  2319. case 8:
  2320. {
  2321. cost = 8;
  2322. }
  2323. case 9:
  2324. {
  2325. cost = 12;
  2326. }
  2327. case 11:
  2328. {
  2329. cost = 9;
  2330. }
  2331. case 12:
  2332. {
  2333. cost = 7;
  2334. }
  2335. case 14:
  2336. {
  2337. cost = 12;
  2338. }
  2339. case 15:
  2340. {
  2341. cost = 9;
  2342. }
  2343. case 16:
  2344. {
  2345. cost = 7;
  2346. }
  2347. case 17:
  2348. {
  2349. cost = 7;
  2350. }
  2351. case 18:
  2352. {
  2353. cost = 10;
  2354. }
  2355. case 19:
  2356. {
  2357. cost = 4;
  2358. }
  2359. case 21:
  2360. {
  2361. cost = 3;
  2362. }
  2363. }
  2364. return cost;
  2365. }
  2366. return 0;
  2367. }
  2368.  
  2369. public ClearFishes(playerid)
  2370. {
  2371. if(IsPlayerConnected(playerid))
  2372. {
  2373. Fishes[playerid][pFid1] = 0; Fishes[playerid][pFid2] = 0; Fishes[playerid][pFid3] = 0;
  2374. Fishes[playerid][pFid4] = 0; Fishes[playerid][pFid5] = 0;
  2375. Fishes[playerid][pWeight1] = 0; Fishes[playerid][pWeight2] = 0; Fishes[playerid][pWeight3] = 0;
  2376. Fishes[playerid][pWeight4] = 0; Fishes[playerid][pWeight5] = 0;
  2377. new string[MAX_PLAYER_NAME];
  2378. format(string, sizeof(string), "None");
  2379. strmid(Fishes[playerid][pFish1], string, 0, strlen(string), 255);
  2380. strmid(Fishes[playerid][pFish2], string, 0, strlen(string), 255);
  2381. strmid(Fishes[playerid][pFish3], string, 0, strlen(string), 255);
  2382. strmid(Fishes[playerid][pFish4], string, 0, strlen(string), 255);
  2383. strmid(Fishes[playerid][pFish5], string, 0, strlen(string), 255);
  2384. }
  2385. return 1;
  2386. }
  2387.  
  2388. public ClearFishID(playerid, fish)
  2389. {
  2390. if(IsPlayerConnected(playerid))
  2391. {
  2392. new string[MAX_PLAYER_NAME];
  2393. format(string, sizeof(string), "None");
  2394. switch (fish)
  2395. {
  2396. case 1:
  2397. {
  2398. strmid(Fishes[playerid][pFish1], string, 0, strlen(string), 255);
  2399. Fishes[playerid][pWeight1] = 0;
  2400. Fishes[playerid][pFid1] = 0;
  2401. }
  2402. case 2:
  2403. {
  2404. strmid(Fishes[playerid][pFish2], string, 0, strlen(string), 255);
  2405. Fishes[playerid][pWeight2] = 0;
  2406. Fishes[playerid][pFid2] = 0;
  2407. }
  2408. case 3:
  2409. {
  2410. strmid(Fishes[playerid][pFish3], string, 0, strlen(string), 255);
  2411. Fishes[playerid][pWeight3] = 0;
  2412. Fishes[playerid][pFid3] = 0;
  2413. }
  2414. case 4:
  2415. {
  2416. strmid(Fishes[playerid][pFish4], string, 0, strlen(string), 255);
  2417. Fishes[playerid][pWeight4] = 0;
  2418. Fishes[playerid][pFid4] = 0;
  2419. }
  2420. case 5:
  2421. {
  2422. strmid(Fishes[playerid][pFish5], string, 0, strlen(string), 255);
  2423. Fishes[playerid][pWeight5] = 0;
  2424. Fishes[playerid][pFid5] = 0;
  2425. }
  2426. }
  2427. }
  2428. return 1;
  2429. }
  2430.  
  2431. public ClearCooking(playerid)
  2432. {
  2433. if(IsPlayerConnected(playerid))
  2434. {
  2435. Cooking[playerid][pCookID1] = 0; Cooking[playerid][pCookID2] = 0; Cooking[playerid][pCookID3] = 0;
  2436. Cooking[playerid][pCookID4] = 0; Cooking[playerid][pCookID5] = 0;
  2437. Cooking[playerid][pCWeight1] = 0; Cooking[playerid][pCWeight2] = 0; Cooking[playerid][pCWeight3] = 0;
  2438. Cooking[playerid][pCWeight4] = 0; Cooking[playerid][pCWeight5] = 0;
  2439. new string[MAX_PLAYER_NAME];
  2440. format(string, sizeof(string), "Nothing");
  2441. strmid(Cooking[playerid][pCook1], string, 0, strlen(string), 255);
  2442. strmid(Cooking[playerid][pCook2], string, 0, strlen(string), 255);
  2443. strmid(Cooking[playerid][pCook3], string, 0, strlen(string), 255);
  2444. strmid(Cooking[playerid][pCook4], string, 0, strlen(string), 255);
  2445. strmid(Cooking[playerid][pCook5], string, 0, strlen(string), 255);
  2446. }
  2447. return 1;
  2448. }
  2449.  
  2450. public ClearCookingID(playerid, cook)
  2451. {
  2452. if(IsPlayerConnected(playerid))
  2453. {
  2454. new string[MAX_PLAYER_NAME];
  2455. format(string, sizeof(string), "Nothing");
  2456. switch (cook)
  2457. {
  2458. case 1:
  2459. {
  2460. strmid(Cooking[playerid][pCook1], string, 0, strlen(string), 255);
  2461. Cooking[playerid][pCWeight1] = 0;
  2462. Cooking[playerid][pCookID1] = 0;
  2463. }
  2464. case 2:
  2465. {
  2466. strmid(Cooking[playerid][pCook2], string, 0, strlen(string), 255);
  2467. Cooking[playerid][pCWeight2] = 0;
  2468. Cooking[playerid][pCookID2] = 0;
  2469. }
  2470. case 3:
  2471. {
  2472. strmid(Cooking[playerid][pCook3], string, 0, strlen(string), 255);
  2473. Cooking[playerid][pCWeight3] = 0;
  2474. Cooking[playerid][pCookID3] = 0;
  2475. }
  2476. case 4:
  2477. {
  2478. strmid(Cooking[playerid][pCook4], string, 0, strlen(string), 255);
  2479. Cooking[playerid][pCWeight4] = 0;
  2480. Cooking[playerid][pCookID4] = 0;
  2481. }
  2482. case 5:
  2483. {
  2484. strmid(Cooking[playerid][pCook5], string, 0, strlen(string), 255);
  2485. Cooking[playerid][pCWeight5] = 0;
  2486. Cooking[playerid][pCookID5] = 0;
  2487. }
  2488. }
  2489. }
  2490. return 1;
  2491. }
  2492.  
  2493. public ClearGroceries(playerid)
  2494. {
  2495. if(IsPlayerConnected(playerid))
  2496. {
  2497. Groceries[playerid][pChickens] = 0; Groceries[playerid][pChicken] = 0;
  2498. Groceries[playerid][pHamburgers] = 0; Groceries[playerid][pHamburger] = 0;
  2499. Groceries[playerid][pPizzas] = 0; Groceries[playerid][pPizza] = 0;
  2500. }
  2501. return 1;
  2502. }
  2503.  
  2504. public Lotto(number)
  2505. {
  2506. new JackpotFallen = 0;
  2507. new string[256];
  2508. new winner[MAX_PLAYER_NAME];
  2509. format(string, sizeof(string), "Lottery News: Today the Winning Number has fallen on: %d.", number);
  2510. OOCOff(COLOR_WHITE, string);
  2511. for(new i = 0; i < MAX_PLAYERS; i++)
  2512. {
  2513. if(IsPlayerConnected(i))
  2514. {
  2515. if(PlayerInfo[i][pLottoNr] > 0)
  2516. {
  2517. if(PlayerInfo[i][pLottoNr] == number)
  2518. {
  2519. JackpotFallen = 1;
  2520. GetPlayerName(i, winner, sizeof(winner));
  2521. format(string, sizeof(string), "Lottery News: %s has won the Jackpot of $%d with his Lottery Ticket.", winner, Jackpot);
  2522. OOCOff(COLOR_WHITE, string);
  2523. format(string, sizeof(string), "* You have Won $%d with your Lottery Ticket.", Jackpot);
  2524. SendClientMessage(i, COLOR_YELLOW, string);
  2525. ConsumingMoney[i] = 1;
  2526. GivePlayerMoney(i, Jackpot);
  2527. }
  2528. else
  2529. {
  2530. SendClientMessage(i, COLOR_LIGHTBLUE, "* You haven't won with your Lottery Ticket this time.");
  2531. }
  2532. }
  2533. PlayerInfo[i][pLottoNr] = 0;
  2534. }
  2535. }
  2536. if(JackpotFallen)
  2537. {
  2538. new rand = random(125000); rand += 15789;
  2539. Jackpot = rand;
  2540. SaveStuff();
  2541. format(string, sizeof(string), "Lottery News: The new Jackpot has been started with $%d.", Jackpot);
  2542. OOCOff(COLOR_WHITE, string);
  2543. }
  2544. else
  2545. {
  2546. new rand = random(15000); rand += 2158;
  2547. Jackpot += rand;
  2548. SaveStuff();
  2549. format(string, sizeof(string), "Lottery News: The Jackpot has been raised to $%d.", Jackpot);
  2550. OOCOff(COLOR_WHITE, string);
  2551. }
  2552. return 1;
  2553. }
  2554.  
  2555. //------------------------------------------------------------------------------------------------------
  2556. public OnPlayerDisconnect(playerid)
  2557. {
  2558. gActivePlayers[playerid]--;
  2559. numplayers--;
  2560. PlayerInfo[playerid][pAdjustable] = 1;
  2561. OnPlayerUpdate(playerid);
  2562. for(new i = 0; i < MAX_PLAYERS; i++)
  2563. {
  2564. if(IsPlayerConnected(i))
  2565. {
  2566. if(TaxiAccepted[i] < 999)
  2567. {
  2568. if(TaxiAccepted[i] == playerid)
  2569. {
  2570. TaxiAccepted[i] = 999;
  2571. GameTextForPlayer(i, "~w~Taxi Caller~n~~r~Left the game", 5000, 1);
  2572. TaxiCallTime[i] = 0;
  2573. DisablePlayerCheckpoint(i);
  2574. }
  2575. }
  2576. else if(BusAccepted[i] < 999)
  2577. {
  2578. if(BusAccepted[i] == playerid)
  2579. {
  2580. BusAccepted[i] = 999;
  2581. GameTextForPlayer(i, "~w~Bus Caller~n~~r~Left the game", 5000, 1);
  2582. BusCallTime[i] = 0;
  2583. DisablePlayerCheckpoint(i);
  2584. }
  2585. }
  2586. }
  2587. }
  2588. if(GettingCK[playerid] < 999)
  2589. {
  2590. if(IsPlayerConnected(GettingCK[playerid]))
  2591. {
  2592. SendClientMessage(GettingCK[playerid], COLOR_YELLOW, "Your Character Kill has left the server, try again later.");
  2593. OnCK[GettingCK[playerid]] = 999;
  2594. }
  2595. }
  2596. if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999)
  2597. {
  2598. if(IsPlayerConnected(TransportDriver[playerid]))
  2599. {
  2600. new string[64];
  2601. TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
  2602. TransportTime[TransportDriver[playerid]] = 0;
  2603. TransportCost[TransportDriver[playerid]] = 0;
  2604. format(string, sizeof(string), "~w~Passenger left~n~~g~Earned $%d",TransportCost[playerid]);
  2605. GameTextForPlayer(TransportDriver[playerid], string, 5000, 1);
  2606. }
  2607. }
  2608. if(GotHit[playerid] > 0)
  2609. {
  2610. if(GetChased[playerid] < 999)
  2611. {
  2612. if(IsPlayerConnected(GetChased[playerid]))
  2613. {
  2614. SendClientMessage(GetChased[playerid], COLOR_YELLOW, "Your Hit has left the server.");
  2615. GoChase[GetChased[playerid]] = 999;
  2616. }
  2617. }
  2618. }
  2619. if(PlayerPaintballing[playerid] != 0)
  2620. {
  2621. PaintballPlayers --;
  2622. }
  2623. if(PlayerKarting[playerid] > 0 && PlayerInKart[playerid] > 0)
  2624. {
  2625. KartingPlayers --;
  2626. }
  2627. if(PlayersChannel[playerid] < 999)
  2628. {
  2629. IRCInfo[PlayersChannel[playerid]][iPlayers] -= 1;
  2630. }
  2631. if(HireCar[playerid] != 299)
  2632. {
  2633. gLastDriver[HireCar[playerid]] = 300;
  2634. gCarLock[HireCar[playerid]] = 0;
  2635. UnLockCar(HireCar[playerid]);
  2636. }
  2637. if (gLastCar[playerid] > 0)
  2638. {
  2639. gLastDriver[gLastCar[playerid]] = 300;
  2640. if(PlayerInfo[playerid][pPhousekey] != gLastCar[playerid]-1)
  2641. {
  2642. gCarLock[gLastCar[playerid]] = 0;
  2643. UnLockCar(gLastCar[playerid]);
  2644. }
  2645. }
  2646. if(PlayerBoxing[playerid] > 0)
  2647. {
  2648. if(Boxer1 == playerid)
  2649. {
  2650. if(IsPlayerConnected(Boxer2))
  2651. {
  2652. PlayerBoxing[Boxer2] = 0;
  2653. SetPlayerPos(Boxer2, 765.8433,3.2924,1000.7186);
  2654. SetPlayerInterior(Boxer2, 5);
  2655. GameTextForPlayer(Boxer2, "~r~Match interupted", 5000, 1);
  2656. }
  2657. }
  2658. else if(Boxer2 == playerid)
  2659. {
  2660. if(IsPlayerConnected(Boxer1))
  2661. {
  2662. PlayerBoxing[Boxer1] = 0;
  2663. SetPlayerPos(Boxer1, 765.8433,3.2924,1000.7186);
  2664. SetPlayerInterior(Boxer1, 5);
  2665. GameTextForPlayer(Boxer1, "~r~Match interupted", 5000, 1);
  2666. }
  2667. }
  2668. InRing = 0;
  2669. RoundStarted = 0;
  2670. Boxer1 = 255;
  2671. Boxer2 = 255;
  2672. TBoxer = 255;
  2673. }
  2674. if(TransportDuty[playerid] == 1)
  2675. {
  2676. TaxiDrivers -= 1;
  2677. }
  2678. else if(TransportDuty[playerid] == 2)
  2679. {
  2680. BusDrivers -= 1;
  2681. }
  2682. if(PlayerInfo[playerid][pJob] == 11)
  2683. {
  2684. if(JobDuty[playerid] == 1) { Medics -= 1; }
  2685. }
  2686. else if(PlayerInfo[playerid][pJob] == 7)
  2687. {
  2688. if(JobDuty[playerid] == 1) { Mechanics -= 1; }
  2689. }
  2690. }
  2691.  
  2692. public SetPlayerSpawn(playerid)
  2693. {
  2694. if(IsPlayerConnected(playerid))
  2695. {
  2696. if(PlayerInfo[playerid][pTut] == 0)
  2697. {
  2698. gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
  2699. TogglePlayerControllable(playerid, 0);
  2700. RegistrationStep[playerid] = 1;
  2701. SendClientMessage(playerid, COLOR_YELLOW, "Welcome to Role Play - The Godfather server, please fill in some information to proceed.");
  2702. SendClientMessage(playerid, COLOR_LIGHTRED, "Are you a Male or Female? (Type in what you are).");
  2703. }
  2704. new rand;
  2705. new house = PlayerInfo[playerid][pPhousekey];
  2706. if(PlayerPaintballing[playerid] != 0)
  2707. {
  2708. ResetPlayerWeapons(playerid);
  2709. GivePlayerWeapon(playerid, 29, 999);
  2710. rand = random(sizeof(PaintballSpawns));
  2711. SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
  2712. return 1;
  2713. }
  2714. if(PlayerInfo[playerid][pJailed] == 1)
  2715. {
  2716. SetPlayerInterior(playerid, 6);
  2717. SetPlayerPos(playerid,264.6288,77.5742,1001.0391);
  2718. SendClientMessage(playerid, COLOR_LIGHTRED, "Incomplete Jail Sentence, back to jail.");
  2719. return 1;
  2720. }
  2721. if(PlayerInfo[playerid][pJailed] == 2)
  2722. {
  2723. SetPlayerInterior(playerid, 0);
  2724. SetPlayerPos(playerid,268.5777,1857.9351,9.8133);
  2725. SetPlayerWorldBounds(playerid, 337.5694,101.5826,1940.9759,1798.7453); //285.3481,96.9720,1940.9755,1799.0811
  2726. return 1;
  2727. }
  2728. if(MedicBill[playerid] == 1 && PlayerInfo[playerid][pJailed] == 0 && PlayerPaintballing[playerid] == 0)
  2729. {
  2730. new string[256];
  2731. new cut = deathcost; //PlayerInfo[playerid][pLevel]*deathcost;
  2732. GivePlayerMoney(playerid, -cut);
  2733. format(string, sizeof(string), "DOC: Your Medical Bill comes to $%d, Have a nice day.", cut);
  2734. SendClientMessage(playerid, TEAM_CYAN_COLOR, string);
  2735. MedicBill[playerid] = 0;
  2736. MedicTime[playerid] = 0;
  2737. NeedMedicTime[playerid] = 0;
  2738. PlayerInfo[playerid][pDeaths] += 1;
  2739. SetPlayerHealth(playerid, 25.0);
  2740. /*SetPlayerInterior(playerid, 5);
  2741. rand = random(sizeof(gMedicSpawns));
  2742. SetPlayerPos(playerid, gMedicSpawns[rand][0], gMedicSpawns[rand][1], gMedicSpawns[rand][2]); // Warp the player
  2743. SetPlayerFacingAngle(playerid, 270.0);
  2744. TogglePlayerControllable(playerid, 0);
  2745. GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~y~You are recovering from your ~r~wounds~y~...", 35000, 3);
  2746. MedicTime[playerid] = 1;
  2747. if(PlayerInfo[playerid][pDonateRank] > 0)
  2748. {
  2749. NeedMedicTime[playerid] = 30;
  2750. }
  2751. else
  2752. {
  2753. NeedMedicTime[playerid] = 60;
  2754. }
  2755. PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0);
  2756. return 1;*/
  2757. }
  2758. if(house !=255)
  2759. {
  2760. if(SpawnChange[playerid]) //If 1, then you get to your house, else spawn somewhere else
  2761. {
  2762. SetPlayerToTeamColor(playerid);
  2763. SetPlayerInterior(playerid,HouseInfo[house][hInt]);
  2764. SetPlayerPos(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity],HouseInfo[house][hExitz]); // Warp the player
  2765. PlayerInfo[playerid][pLocal] = house;
  2766. PlayerInfo[playerid][pInt] = HouseInfo[house][hInt];
  2767. return 1;
  2768. }
  2769. }
  2770. if(PlayerInfo[playerid][pLeader] == 7)//Mayor spawn
  2771. {
  2772. SetPlayerToTeamColor(playerid);
  2773. SetPlayerInterior(playerid, 3);
  2774. SetPlayerPos(playerid, 356.2998,151.9914,1025.7891);
  2775. PlayerInfo[playerid][pInt] = 3;
  2776. PlayerInfo[playerid][pLocal] = 241;
  2777. return 1;
  2778. }
  2779. if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pLeader] == 1)//Police Force spawn & FBI/ATF
  2780. {
  2781. SetPlayerToTeamColor(playerid);
  2782. rand = random(sizeof(gCopPlayerSpawns));
  2783. SetPlayerPos(playerid, gCopPlayerSpawns[rand][0], gCopPlayerSpawns[rand][1], gCopPlayerSpawns[rand][2]); // Warp the player
  2784. SetPlayerFacingAngle(playerid, 270.0);
  2785. SetPlayerInterior(playerid,0);
  2786. PlayerInfo[playerid][pInt] = 0;
  2787. return 1;
  2788. }
  2789. if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)//National Guard spawn
  2790. {
  2791. SetPlayerToTeamColor(playerid);
  2792. SetPlayerInterior(playerid, 0);
  2793. SetPlayerPos(playerid, -1346.2050,492.3983,11.2027);
  2794. PlayerInfo[playerid][pInt] = 0;
  2795. return 1;
  2796. }
  2797. if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)//Fire/Ambulance spawn
  2798. {
  2799. SetPlayerToTeamColor(playerid);
  2800. SetPlayerInterior(playerid, 0);
  2801. SetPlayerPos(playerid, -2656.0393,635.0596,14.4531);
  2802. PlayerInfo[playerid][pInt] = 0;
  2803. return 1;
  2804. }
  2805. if (PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)//LaCosaNostra spawn
  2806. {
  2807. SetPlayerToTeamColor(playerid);
  2808. SetPlayerInterior(playerid, 0);
  2809. SetPlayerPos(playerid, 1124.2415,-2037.1274,69.8847);
  2810. PlayerInfo[playerid][pInt] = 0;
  2811. return 1;
  2812. }
  2813. if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)//Yakuza spawn
  2814. {
  2815. SetPlayerToTeamColor(playerid);
  2816. SetPlayerInterior(playerid, 0);
  2817. SetPlayerPos(playerid, -2192.3020,646.8816,49.4375);
  2818. PlayerInfo[playerid][pInt] = 0;
  2819. return 1;
  2820. }
  2821. if (PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8) //Hitman spawn
  2822. {
  2823. SetPlayerToTeamColor(playerid);
  2824. SetPlayerPos(playerid, 1102.7017,-299.0774,73.9922);
  2825. SetPlayerInterior(playerid,0);
  2826. PlayerInfo[playerid][pInt] = 0;
  2827. return 1;
  2828. }
  2829. if (PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9) //News spawn
  2830. {
  2831. SetPlayerToTeamColor(playerid);
  2832. SetPlayerPos(playerid, -2050.8962,460.0262,35.1719);
  2833. SetPlayerInterior(playerid,0);
  2834. PlayerInfo[playerid][pInt] = 0;
  2835. return 1;
  2836. }
  2837. if (PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10) //Taxi Cab Company spawn
  2838. {
  2839. SetPlayerToTeamColor(playerid);
  2840. SetPlayerPos(playerid, -1978.5934,102.9237,27.6875);
  2841. SetPlayerInterior(playerid,0);
  2842. PlayerInfo[playerid][pInt] = 0;
  2843. return 1;
  2844. }
  2845. if(IsAnInstructor(playerid)) //Driving/Flying School spawn
  2846. {
  2847. if(SchoolSpawn[playerid] == 0)
  2848. {
  2849. SetPlayerToTeamColor(playerid);
  2850. SetPlayerPos(playerid, -2032.6810,-117.4816,1035.1719);
  2851. SetPlayerFacingAngle(playerid, 275.1114);
  2852. SetPlayerInterior(playerid,3);
  2853. PlayerInfo[playerid][pInt] = 3;
  2854. }
  2855. else if(SchoolSpawn[playerid] == 1)
  2856. {
  2857. SetPlayerToTeamColor(playerid);
  2858. SetPlayerPos(playerid, 414.4144,2531.9580,19.1565);
  2859. SetPlayerFacingAngle(playerid, 4.6505);
  2860. SetPlayerInterior(playerid,0);
  2861. PlayerInfo[playerid][pInt] = 0;
  2862. }
  2863. return 1;
  2864. }
  2865. if ((gTeam[playerid]) == 1)
  2866. {
  2867. SetPlayerToTeamColor(playerid);
  2868. rand = random(sizeof(gMedPlayerSpawns));
  2869. SetPlayerPos(playerid, gMedPlayerSpawns[rand][0], gMedPlayerSpawns[rand][1], gMedPlayerSpawns[rand][2]); // Warp the player
  2870. SetPlayerFacingAngle(playerid, 270.0);
  2871. SetPlayerInterior(playerid,0);
  2872. PlayerInfo[playerid][pInt] = 0;
  2873. return 1;
  2874. }
  2875. if(PlayerInfo[playerid][pFMember] != 255)
  2876. {
  2877. new family = PlayerInfo[playerid][pFMember];
  2878. SetPlayerToTeamColor(playerid);
  2879. SetPlayerInterior(playerid, FamilyInfo[family][FamilyInterior]);
  2880. SetPlayerPos(playerid, FamilyInfo[family][FamilySpawn][0],FamilyInfo[family][FamilySpawn][1],FamilyInfo[family][FamilySpawn][2]);
  2881. SetPlayerFacingAngle(playerid, FamilyInfo[family][FamilySpawn][3]);
  2882. return 1;
  2883. }
  2884. else
  2885. {
  2886. SetPlayerToTeamColor(playerid);
  2887. if(PlayerInfo[playerid][pOrigin] == 1)//USA
  2888. {
  2889. SetPlayerPos(playerid,-2721.2612,-317.8447,7.8438);
  2890. SetPlayerFacingAngle(playerid, 46.8583);
  2891. SetPlayerInterior(playerid,0);
  2892. PlayerInfo[playerid][pInt] = 0;
  2893. }
  2894. else if(PlayerInfo[playerid][pOrigin] == 2)//Europe
  2895. {
  2896. SetPlayerPos(playerid,477.8121,-1499.7649,20.5001);
  2897. SetPlayerFacingAngle(playerid, 262.9963);
  2898. SetPlayerInterior(playerid,0);
  2899. PlayerInfo[playerid][pInt] = 0;
  2900. }
  2901. else if(PlayerInfo[playerid][pOrigin] == 3)//Asia
  2902. {
  2903. SetPlayerPos(playerid,-2155.4368,635.8173,52.3672);
  2904. SetPlayerFacingAngle(playerid, 272.3543);
  2905. SetPlayerInterior(playerid,0);
  2906. PlayerInfo[playerid][pInt] = 0;
  2907. }
  2908. else
  2909. {
  2910. rand = random(sizeof(gRandomPlayerSpawns));
  2911. SetPlayerPos(playerid, gRandomPlayerSpawns[rand][0], gRandomPlayerSpawns[rand][1], gRandomPlayerSpawns[rand][2]); // Warp the player
  2912. SetPlayerFacingAngle(playerid, 270.0);
  2913. SetPlayerInterior(playerid,15);
  2914. PlayerInfo[playerid][pInt] = 15;
  2915. }
  2916. return 1;
  2917. }
  2918. }
  2919. return 1;
  2920. }
  2921.  
  2922. //------------------------------------------------------------------------------------------------------
  2923.  
  2924. public OnPlayerDeath(playerid, killerid, reason)
  2925. {
  2926. new name[MAX_PLAYER_NAME];
  2927. new string[256];
  2928. //new dmessage[128];
  2929. //new deathreason[20];
  2930. new playercash;
  2931. new victimteam;
  2932. new Float:px,Float:py,Float:pz;
  2933. new killerteam;
  2934.  
  2935. victimteam = gTeam[playerid];
  2936. killerteam = gTeam[killerid];
  2937. gPlayerSpawned[playerid] = 0;
  2938. GetPlayerName(playerid, name, sizeof(name));
  2939. PlayerInfo[playerid][pLocal] = 255;
  2940. GetPlayerPos(playerid, px, py, pz);
  2941. if(killerid != 255)
  2942. {
  2943. if(GetPlayerState(killerid) == 2)
  2944. {
  2945. SendClientMessage(killerid, COLOR_YELLOW, "DriveBy Kill, dont abuse it, On foot gets you $$$!");
  2946. return 1;
  2947. }
  2948. }
  2949. if(reason == 38)
  2950. {
  2951. new kstring[128];
  2952. new kickname[MAX_PLAYER_NAME];
  2953. if(IsPlayerConnected(killerid))
  2954. {
  2955. GetPlayerName(killerid, kickname, sizeof(kickname));
  2956. format(string, 256, "AdmWarning: [%d]%s just killed a player with minigun, be sure he's not fake-killing.",killerid,kickname);
  2957. ABroadCast(COLOR_YELLOW,string,1);
  2958. printf("%s", kstring);
  2959. }
  2960. }
  2961. if (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11)
  2962. {
  2963. DisablePlayerCheckpoint(playerid);
  2964. gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
  2965. }
  2966. new caller = Mobile[playerid];
  2967. if(caller != 255)
  2968. {
  2969. if(caller < 255)
  2970. {
  2971. SendClientMessage(caller, COLOR_GRAD2, " The line just went dead....");
  2972. CellTime[caller] = 0;
  2973. CellTime[playerid] = 0;
  2974. Mobile[caller] = 255;
  2975. }
  2976. Mobile[playerid] = 255;
  2977. CellTime[playerid] = 0;
  2978. }
  2979. ClearCrime(playerid);
  2980. if(PlayerPaintballing[playerid] != 0)
  2981. {
  2982. PlayerPaintballKills[killerid] ++;
  2983. if(PlayerPaintballKills[killerid] > PaintballWinnerKills)
  2984. {
  2985. new killer[MAX_PLAYER_NAME];
  2986. PaintballWinner = killerid;
  2987. PaintballWinnerKills = PlayerPaintballKills[killerid];
  2988. GetPlayerName(killerid, killer, sizeof(killer));
  2989. for(new i = 0; i < MAX_PLAYERS; i++)
  2990. {
  2991. if(IsPlayerConnected(i))
  2992. {
  2993. if(PlayerPaintballing[i] != 0)
  2994. {
  2995. format(string, sizeof(string), "* %s is in the lead with %d Kills.",killer,PaintballWinnerKills);
  2996. SendClientMessage(i, COLOR_WHITE, string);
  2997. }
  2998. }
  2999. }
  3000. }
  3001. return 1;
  3002. }
  3003. if(GettingCK[playerid] < 999 || OnCK[playerid] < 999)
  3004. {
  3005. if(IsPlayerConnected(killerid))
  3006. {
  3007. if(GettingCK[killerid] < 999 || OnCK[playerid] < 999)
  3008. {
  3009. new killer[MAX_PLAYER_NAME];
  3010. new dier[MAX_PLAYER_NAME];
  3011. GetPlayerName(playerid, dier, sizeof(dier));
  3012. GetPlayerName(killerid, killer, sizeof(killer));
  3013. format(string, sizeof(string), "* %s has performed a Character Kill on you, you aren't able to play with this Character anymore.",killer);
  3014. SendClientMessage(playerid, COLOR_LIGHTRED, string);
  3015. format(string, sizeof(string), "** %s has Character Killed %s **",killer,dier);
  3016. CKLog(string);
  3017. PlayerInfo[playerid][pCK] = 1;
  3018. if(GettingCK[playerid] < 999) { GettingCK[playerid] = 999; }
  3019. else if(OnCK[playerid] < 999) { OnCK[playerid] = 999; }
  3020. if(GettingCK[killerid] < 999) { GettingCK[killerid] = 999; }
  3021. else if(OnCK[killerid] < 999) { OnCK[killerid] = 999; }
  3022. KickPlayer[playerid] = 1;
  3023. }
  3024. }
  3025. }
  3026. if(PlayerInfo[playerid][pHeadValue] > 0)
  3027. {
  3028. if(IsPlayerConnected(killerid))
  3029. {
  3030. if(gTeam[killerid] == 10 || PlayerInfo[killerid][pLeader] == 8)
  3031. {
  3032. if(GoChase[killerid] == playerid)
  3033. {
  3034. ConsumingMoney[killerid] = 1;
  3035. new killer[MAX_PLAYER_NAME];
  3036. GetPlayerName(killerid, killer, sizeof(killer));
  3037. GivePlayerMoney(killerid, PlayerInfo[playerid][pHeadValue]);
  3038. format(string,128,"<< Hitman %s has fulfilled the contract on %s and collected $%d >>",killer,name,PlayerInfo[playerid][pHeadValue]);
  3039. SendFamilyMessage(8, COLOR_YELLOW, string);
  3040. PlayerInfo[playerid][pHeadValue] = 0;
  3041. GotHit[playerid] = 0;
  3042. GetChased[playerid] = 999;
  3043. GoChase[killerid] = 999;
  3044. }
  3045. }
  3046. }
  3047. }
  3048. if(victimteam >= 4)
  3049. {
  3050. if(IsPlayerConnected(killerid))
  3051. {
  3052. //new killer[MAX_PLAYER_NAME];
  3053. //GetPlayerName(killerid, killer, sizeof(killer));
  3054. new slice = 100; //$100
  3055. playercash = GetPlayerMoney(playerid);
  3056. if(gTeam[killerid] != 2) { WantedPoints[killerid] += 2; } //+ 2 wanted points
  3057. if(SafeTime[playerid] <= 0)
  3058. {
  3059. if(gTeam[killerid] != gTeam[playerid])
  3060. {
  3061. if(GetPlayerState(killerid) == 1)
  3062. {
  3063. PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills] + 2;
  3064. }
  3065. else
  3066. {
  3067. PlayerInfo[killerid][pKills]++;
  3068. }
  3069. PlayerInfo[playerid][pKills]--;
  3070. }
  3071. }
  3072. /*if (strlen(deathreason) > 0)// patch
  3073. {
  3074. if (((gTeam[killerid]) == 1) || ((gTeam[killerid]) == 3 && civnokill) || gTeam[killerid] == gTeam[playerid])//med kill criminal
  3075. {
  3076. format(string, sizeof(string), ".: %s murdered %s. (%s) :.", killer, name, deathreason);
  3077. }
  3078. else
  3079. {
  3080. format(string, sizeof(string), ".: %s murdered %s. (%s) for $%d :.", killer, name, deathreason, slice);
  3081. }
  3082.  
  3083. }
  3084. else
  3085. {
  3086. if (((gTeam[killerid]) == 1) || ((gTeam[killerid]) == 3 && civnokill || gTeam[killerid] == gTeam[playerid]))
  3087. {
  3088. format(string, sizeof(string), ".: %s murdered %s :.", killer, name);
  3089. }
  3090. else
  3091. {
  3092. format(string, sizeof(string), ".: %s murdered %s for $%d :.", killer, name, slice);
  3093. }
  3094. }*/
  3095. if (((gTeam[killerid]) == 1) || ((gTeam[killerid]) == 3 && civnokill) || (gTeam[killerid] == gTeam[playerid] && gTeam[playerid] != 4))
  3096. {
  3097. slice = 0;
  3098. }
  3099. if (((gTeam[killerid]) != 4) && ((gTeam[killerid]) == gTeam[playerid]))//no team kill
  3100. {
  3101. slice = 0;
  3102. }
  3103. if (playercash > 0)
  3104. {
  3105. GivePlayerMoney(playerid, -slice);
  3106. }
  3107. else
  3108. {
  3109. slice = slice+500;
  3110. }
  3111. GivePlayerMoney(killerid, slice);
  3112. //GameTextForPlayer(playerid, dmessage, 5000, 2);
  3113. PlayerPlaySound(killerid, 1083, 0.0, 0.0, 0.0);
  3114. if (((gTeam[killerid]) == 3) && reason != 49)
  3115. {
  3116. SetPlayerCriminal(killerid,255, "First Degree Murder");
  3117. }
  3118. else if (((gTeam[killerid]) == 3) && reason == 49)
  3119. {
  3120. SetPlayerCriminal(killerid,255, "Hit And Run");
  3121. }
  3122. }
  3123. }
  3124. else if (victimteam == 2)
  3125. {
  3126. if(IsPlayerConnected(killerid))
  3127. {
  3128. //new killer[MAX_PLAYER_NAME];
  3129. //GetPlayerName(killerid, killer, sizeof(killer));
  3130. // Cop kill
  3131. PlayerInfo[playerid][pKills]--;
  3132. if (gTeam[killerid] == 2)//cops kill cop
  3133. {
  3134. //format(string,128,".: Officer %s murdered Officer %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
  3135. PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
  3136. GivePlayerMoney(killerid, -suecost);
  3137. GivePlayerMoney(playerid, suecost+100);//+100pays hospital bill
  3138. }
  3139. else
  3140. {
  3141. //format(string,128,".: %s murdered Officer %s (%s) :.",killer,name,deathreason);
  3142. }
  3143. if (gTeam[killerid] >= 3)
  3144. {
  3145. WantedPoints[killerid] += 2; //+ 2 wanted points
  3146. if(reason != 49)
  3147. {
  3148. SetPlayerCriminal(killerid,255, "First Degree Murder");
  3149. }
  3150. else if (reason == 49)
  3151. {
  3152. SetPlayerCriminal(killerid,255, "Hit And Run");
  3153. }
  3154. }
  3155. if(gTeam[killerid] >= 5 && SafeTime[playerid] <= 0)
  3156. {
  3157. if(GetPlayerState(killerid) == 1)
  3158. {
  3159. PlayerInfo[killerid][pKills] = PlayerInfo[killerid][pKills]+2;
  3160. }
  3161. else
  3162. {
  3163. PlayerInfo[killerid][pKills]++;
  3164. }
  3165. WantedPoints[killerid]+=2;
  3166. }
  3167. //BroadCast(COLOR_RED, string);
  3168. }
  3169. }
  3170. else if (victimteam == 3)
  3171. {
  3172. if(IsPlayerConnected(killerid))
  3173. {
  3174. //new killer[MAX_PLAYER_NAME];
  3175. //GetPlayerName(killerid, killer, sizeof(killer));
  3176. // Civ kill
  3177. if ((gTeam[killerid]) == 2)//cops kill civ
  3178. {
  3179. if(WantedLevel[playerid] < 1)
  3180. {
  3181. //format(string,128,".: Officer %s murdered %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
  3182. PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
  3183. GivePlayerMoney(killerid, -suecost);
  3184. GivePlayerMoney(playerid, suecost+100);//+100pays hospital bill
  3185. }
  3186. }
  3187. else
  3188. {
  3189. //format(string,128,".: %s murdered %s (%s) :.",killer,name,deathreason);
  3190. WantedPoints[killerid] += 2;
  3191. }
  3192. if (((gTeam[killerid]) >= 3 || (gTeam[killerid]) == 1) && reason != 49)
  3193. {
  3194. SetPlayerCriminal(killerid,255, "First Degree Murder");
  3195. }
  3196. else if (((gTeam[killerid]) >= 3 || (gTeam[killerid]) == 1) && reason == 49)
  3197. {
  3198. SetPlayerCriminal(killerid,255, "Hit And Run");
  3199. }
  3200. //BroadCast(COLOR_RED, string);
  3201. }
  3202. }
  3203. else if (victimteam == 1)
  3204. {
  3205. if(IsPlayerConnected(killerid))
  3206. {
  3207. //new killer[MAX_PLAYER_NAME];
  3208. //GetPlayerName(killerid, killer, sizeof(killer));
  3209. // Civ kill
  3210. if ((gTeam[killerid]) == 2)//cops kill civ
  3211. {
  3212. //format(string,128,".: Officer %s murdered Paramedic %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
  3213. PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
  3214. GivePlayerMoney(killerid, -suecost);
  3215. GivePlayerMoney(playerid, suecost+100);//+100pays hospital bill
  3216. }
  3217. else if ((gTeam[killerid]) == 1)//med kill civ
  3218. {
  3219. //format(string,128,".: Paramedic %s murdered %s (%s) and was sued for $%d :.",killer,name,deathreason,suecost);
  3220. PlayerPlaySound(killerid, 1084, 0.0, 0.0, 0.0);
  3221. GivePlayerMoney(killerid, -suecost);
  3222. GivePlayerMoney(playerid, suecost+100);//+100pays hospital bill
  3223. }
  3224. else
  3225. {
  3226. //format(string,128,".: %s murdered %s (%s) :.",killer,name,deathreason);
  3227. }
  3228. if (((gTeam[killerid]) == 4) && reason != 49)
  3229. {
  3230. SetPlayerCriminal(killerid,255, "First Degree Murder");
  3231. }
  3232. else if (((gTeam[killerid]) == 3) && reason == 49)
  3233. {
  3234. SetPlayerCriminal(killerid,255, "Hit And Run");
  3235. }
  3236. //BroadCast(COLOR_RED, string);
  3237. }
  3238. }
  3239. if (victimteam >= 3 && WantedPoints[playerid] > 0 && killerteam == 2)
  3240. {
  3241. SetPlayerFree(playerid,killerid, "Got Killed");
  3242. }
  3243. killerid = INVALID_PLAYER_ID;
  3244. SetPlayerColor(playerid,COLOR_GRAD2);
  3245. return 1;
  3246. }
  3247.  
  3248. public OnPlayerSpawn(playerid)
  3249. {
  3250. InitLockDoors(playerid);
  3251. STDPlayer[playerid] = 0;
  3252. gTeam[playerid] = PlayerInfo[playerid][pTeam]; //Set the Team
  3253. if (gTeam[playerid] == 4) //medic / criminal reset team
  3254. {
  3255. gTeam[playerid] = 3;
  3256. }
  3257. if(gPlayerLogged[playerid] == 0)
  3258. {
  3259. SendClientMessage(playerid, COLOR_LIGHTRED, "** This server requires a Login BEFORE spawn (Kicked) **");
  3260. KickPlayer[playerid] = 1;
  3261. }
  3262. if(gTeam[playerid] == 11 && PlayerInfo[playerid][pLeader] < 1)
  3263. {
  3264. MedicBill[playerid] = 0;
  3265. new rand = random(sizeof(CIV));
  3266. SendClientMessage(playerid, COLOR_LIGHTRED, "You are not an Approved Leader, you are now a Civilian !");
  3267. PlayerInfo[playerid][pTeam] = 3;
  3268. gTeam[playerid] = 3;
  3269. SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
  3270. PlayerInfo[playerid][pModel] = CIV[rand];
  3271. SpawnPlayer(playerid);
  3272. }
  3273. if(gTeam[playerid] == 5)
  3274. {
  3275. if(PlayerInfo[playerid][pMember] < 1)
  3276. {
  3277. MedicBill[playerid] = 0;
  3278. new rand = random(sizeof(CIV));
  3279. SendClientMessage(playerid, COLOR_LIGHTRED, "You are not a Family Member, you are now a Civilian !");
  3280. PlayerInfo[playerid][pTeam] = 3;
  3281. gTeam[playerid] = 3;
  3282. SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
  3283. PlayerInfo[playerid][pModel] = CIV[rand];
  3284. SpawnPlayer(playerid);
  3285. }
  3286. }
  3287. if(gTeam[playerid] == 10)
  3288. {
  3289. if(PlayerInfo[playerid][pMember] != 8)
  3290. {
  3291. MedicBill[playerid] = 0;
  3292. new rand = random(sizeof(CIV));
  3293. SendClientMessage(playerid, COLOR_LIGHTRED, "You are not a Member of this Agency, you are now a Civilian !");
  3294. PlayerInfo[playerid][pTeam] = 3;
  3295. gTeam[playerid] = 3;
  3296. SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
  3297. PlayerInfo[playerid][pModel] = CIV[rand];
  3298. SpawnPlayer(playerid);
  3299. }
  3300. }
  3301. if(gTeam[playerid] == 2 && PlayerInfo[playerid][pMember] > 3)
  3302. {
  3303. MedicBill[playerid] = 0;
  3304. new rand = random(sizeof(CIV));
  3305. SendClientMessage(playerid, COLOR_LIGHTRED, "You haven't applied for being an Officer / FBI / National Guard, you are now a Civilian !");
  3306. PlayerInfo[playerid][pTeam] = 3;
  3307. gTeam[playerid] = 3;
  3308. SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
  3309. PlayerInfo[playerid][pModel] = CIV[rand];
  3310. SpawnPlayer(playerid);
  3311. }
  3312. if(gTeam[playerid] == 3)
  3313. {
  3314. if(PlayerInfo[playerid][pMember] > 0 || PlayerInfo[playerid][pLeader] > 0)
  3315. {
  3316. SendClientMessage(playerid, COLOR_LIGHTRED, "You are part of a Family/Force, you've been forced to the right Class + Char !");
  3317. MedicBill[playerid] = 0;
  3318. new model = PlayerInfo[playerid][pChar];
  3319. 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; }
  3320. 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; }
  3321. 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; }
  3322. 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; }
  3323. 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; }
  3324. 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; }
  3325. 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; }
  3326. 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; }
  3327. 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; }
  3328. 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; }
  3329. 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; }
  3330. 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; }
  3331. 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; }
  3332. 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; }
  3333. 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; }
  3334. 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; }
  3335. 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; }
  3336. 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; }
  3337. 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; }
  3338. 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; }
  3339. 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; }
  3340. //SetSpawnInfo(playerid, team, model,0.0,0.0,0.0,0,0,0,0,0,0,0);
  3341. SpawnPlayer(playerid);
  3342. }
  3343. }
  3344. if(PlayerInfo[playerid][pChar] > 0) { SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]); }
  3345. else { SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]); }
  3346. SetPlayerWeapons(playerid);
  3347. SetPlayerSpawn(playerid);
  3348. SetPlayerToTeamColor(playerid);
  3349. PlayerFixRadio(playerid);
  3350. for(new i = 0; i < sizeof(Turfs); i++)
  3351. {
  3352. GangZoneShowForPlayer(playerid, i, TurfInfo[i][zColor]);
  3353. }
  3354. if(MapIconsShown[playerid] != 1)
  3355. {
  3356. MapIconsShown[playerid] = 1;
  3357. for(new i = 0; i < sizeof(BizzInfo); i++)
  3358. {
  3359. SetPlayerMapIcon(playerid,i + 1,BizzInfo[i][bEntranceX],BizzInfo[i][bEntranceY],BizzInfo[i][bEntranceZ],36,COLOR_LIGHTRED);
  3360. }
  3361. for(new i = 0; i < sizeof(SBizzInfo); i++)
  3362. {
  3363. SetPlayerMapIcon(playerid,i + 20,SBizzInfo[i][sbEntranceX],SBizzInfo[i][sbEntranceY],SBizzInfo[i][sbEntranceZ],36,COLOR_LIGHTRED);
  3364. }
  3365. }
  3366. return 1;
  3367. }
  3368.  
  3369. public CKLog(string[])
  3370. {
  3371. new entry[256];
  3372. format(entry, sizeof(entry), "%s\n",string);
  3373. new File:hFile;
  3374. hFile = fopen("ck.log", io_append);
  3375. fwrite(hFile, entry);
  3376. fclose(hFile);
  3377. }
  3378.  
  3379. public PayLog(string[])
  3380. {
  3381. new entry[256];
  3382. format(entry, sizeof(entry), "%s\n",string);
  3383. new File:hFile;
  3384. hFile = fopen("pay.log", io_append);
  3385. fwrite(hFile, entry);
  3386. fclose(hFile);
  3387. }
  3388.  
  3389. public KickLog(string[])
  3390. {
  3391. new entry[256];
  3392. format(entry, sizeof(entry), "%s\n",string);
  3393. new File:hFile;
  3394. hFile = fopen("kick.log", io_append);
  3395. fwrite(hFile, entry);
  3396. fclose(hFile);
  3397. }
  3398.  
  3399. public BanLog(string[])
  3400. {
  3401. new entry[256];
  3402. format(entry, sizeof(entry), "%s\n",string);
  3403. new File:hFile;
  3404. hFile = fopen("ban.log", io_append);
  3405. fwrite(hFile, entry);
  3406. fclose(hFile);
  3407. }
  3408.  
  3409. public OnPlayerEnterCheckpoint(playerid)
  3410. {
  3411. new string[128];
  3412. new name[MAX_PLAYER_NAME];
  3413. if(TaxiCallTime[playerid] > 0 && TaxiAccepted[playerid] < 999)
  3414. {
  3415. TaxiAccepted[playerid] = 999;
  3416. GameTextForPlayer(playerid, "~w~Reached destination", 5000, 1);
  3417. TaxiCallTime[playerid] = 0;
  3418. DisablePlayerCheckpoint(playerid);
  3419. }
  3420. else if(BusCallTime[playerid] > 0 && BusAccepted[playerid] < 999)
  3421. {
  3422. BusAccepted[playerid] = 999;
  3423. GameTextForPlayer(playerid, "~w~Reached destination", 5000, 1);
  3424. BusCallTime[playerid] = 0;
  3425. DisablePlayerCheckpoint(playerid);
  3426. }
  3427. else if(CP[playerid]==1)
  3428. {
  3429. if(IsPlayerInAnyVehicle(playerid))
  3430. {
  3431. PlayerInfo[playerid][pJackSkill] ++;
  3432. if(PlayerInfo[playerid][pJackSkill] == 50)
  3433. { SendClientMessage(playerid, COLOR_YELLOW, "* Your Car Jack Skill is now Level 2, you will earn more Money and quicker Reload Time."); }
  3434. else if(PlayerInfo[playerid][pJackSkill] == 100)
  3435. { SendClientMessage(playerid, COLOR_YELLOW, "* Your Car Jack Skill is now Level 3, you will earn more Money and quicker Reload Time."); }
  3436. else if(PlayerInfo[playerid][pJackSkill] == 200)
  3437. { SendClientMessage(playerid, COLOR_YELLOW, "* Your Car Jack Skill is now Level 4, you will earn more Money and quicker Reload Time."); }
  3438. else if(PlayerInfo[playerid][pJackSkill] == 400)
  3439. { SendClientMessage(playerid, COLOR_YELLOW, "* Your Car Jack Skill is now Level 5, you will earn more Money and quicker Reload Time."); }
  3440. new level = PlayerInfo[playerid][pJackSkill];
  3441. if(level >= 0 && level <= 50)
  3442. {
  3443. new rand = random(sizeof(SELLCAR1));
  3444. format(string, sizeof(string), "You sold a car for $%d, your reload time is 20 minutes.", SELLCAR1[rand]);
  3445. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  3446. GivePlayerMoney(playerid, SELLCAR1[rand]);
  3447. PlayerInfo[playerid][pCarTime] = 1200;
  3448. }
  3449. else if(level >= 51 && level <= 100)
  3450. {
  3451. new rand = random(sizeof(SELLCAR2));
  3452. format(string, sizeof(string), "You sold a car for $%d, your reload time is 18 minutes.", SELLCAR2[rand]);
  3453. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  3454. GivePlayerMoney(playerid, SELLCAR2[rand]);
  3455. PlayerInfo[playerid][pCarTime] = 1080;
  3456. }
  3457. else if(level >= 101 && level <= 200)
  3458. {
  3459. new rand = random(sizeof(SELLCAR3));
  3460. format(string, sizeof(string), "You sold a car for $%d, your reload time is 16 minutes.", SELLCAR3[rand]);
  3461. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  3462. GivePlayerMoney(playerid, SELLCAR3[rand]);
  3463. PlayerInfo[playerid][pCarTime] = 960;
  3464. }
  3465. else if(level >= 201 && level <= 400)
  3466. {
  3467. new rand = random(sizeof(SELLCAR4));
  3468. format(string, sizeof(string), "You sold a car for $%d, your reload time is 14 minutes.", SELLCAR4[rand]);
  3469. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  3470. GivePlayerMoney(playerid, SELLCAR4[rand]);
  3471. PlayerInfo[playerid][pCarTime] = 840;
  3472. }
  3473. else if(level >= 401)
  3474. {
  3475. new money = 6000;
  3476. format(string, sizeof(string), "You sold a car for $%d, your reload time is 12 minutes.", money);
  3477. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  3478. GivePlayerMoney(playerid, money);
  3479. PlayerInfo[playerid][pCarTime] = 720;
  3480. }
  3481. GameTextForPlayer(playerid, "~y~Sold the car", 2500, 1);
  3482. CP[playerid] = 0;
  3483. DisablePlayerCheckpoint(playerid);
  3484. SetVehicleToRespawn(GetPlayerVehicleID(playerid));
  3485. }
  3486. else
  3487. {
  3488. GameTextForPlayer(playerid, "Not in a car", 5000, 1);
  3489. }
  3490. }
  3491. else if(CP[playerid] == 5)
  3492. {
  3493. GameTextForPlayer(playerid, "~y~At the Missions Checkpoint", 2500, 1);
  3494. CP[playerid] = 0;
  3495. DisablePlayerCheckpoint(playerid);
  3496. }
  3497. else if(CP[playerid] == 9)//Karting
  3498. {
  3499. GameTextForPlayer(playerid, "~r~Wait here for more Kart Racers", 4000, 3);
  3500. DisablePlayerCheckpoint(playerid);
  3501. }
  3502. else if(CP[playerid] == 10) { CP[playerid] = 11; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2258.7874,-2402.9712,12.7035,8.0); }
  3503. else if(CP[playerid] == 11) { CP[playerid] = 12; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2225.8755,-2461.3875,12.7190,8.0); }
  3504. else if(CP[playerid] == 12) { CP[playerid] = 13; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2276.9983,-2662.8328,12.8580,8.0); }
  3505. else if(CP[playerid] == 13) { CP[playerid] = 14; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2449.1399,-2663.0562,12.8138,8.0); }
  3506. else if(CP[playerid] == 14) { CP[playerid] = 15; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2566.9814,-2504.5686,12.7692,8.0); }
  3507. else if(CP[playerid] == 15) { CP[playerid] = 16; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2719.0520,-2503.5962,12.7706,8.0); }
  3508. else if(CP[playerid] == 16) { CP[playerid] = 17; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2720.7881,-2405.6589,12.7441,8.0); }
  3509. else if(CP[playerid] == 17) { CP[playerid] = 18; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2571.5195,-2401.1531,12.7528,8.0); }
  3510. else if(CP[playerid] == 18) { CP[playerid] = 19; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2406.6995,-2423.1182,12.6641,8.0); }
  3511. else if(CP[playerid] == 19) { CP[playerid] = 20; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2322.9194,-2341.5715,12.6664,8.0); }
  3512. else if(CP[playerid] == 20)//End of Karting
  3513. {
  3514. CP[playerid] = 0;
  3515. DisablePlayerCheckpoint(playerid);
  3516. GetPlayerName(playerid, name, sizeof(name));
  3517. if(FirstKartWinner == 999)
  3518. {
  3519. FirstKartWinner = playerid;
  3520. for(new i = 0; i < MAX_PLAYERS; i++)
  3521. {
  3522. if(IsPlayerConnected(i))
  3523. {
  3524. if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
  3525. {
  3526. format(string, sizeof(string), "* %s finished First in the Kart Race.",name);
  3527. SendClientMessage(i, COLOR_WHITE, string);
  3528. }
  3529. }
  3530. }
  3531. }
  3532. else if(SecondKartWinner == 999)
  3533. {
  3534. SecondKartWinner = playerid;
  3535. for(new i = 0; i < MAX_PLAYERS; i++)
  3536. {
  3537. if(IsPlayerConnected(i))
  3538. {
  3539. if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
  3540. {
  3541. format(string, sizeof(string), "* %s finished Second in the Kart Race.",name);
  3542. SendClientMessage(i, COLOR_WHITE, string);
  3543. }
  3544. }
  3545. }
  3546. }
  3547. else if(ThirdKartWinner == 999)
  3548. {
  3549. ThirdKartWinner = playerid;
  3550. for(new i = 0; i < MAX_PLAYERS; i++)
  3551. {
  3552. if(IsPlayerConnected(i))
  3553. {
  3554. if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
  3555. {
  3556. format(string, sizeof(string), "* %s finished Third in the Kart Race.",name);
  3557. SendClientMessage(i, COLOR_WHITE, string);
  3558. SendClientMessage(i, COLOR_WHITE, "** Karting Race Over **");
  3559. CP[i] = 0;
  3560. DisablePlayerCheckpoint(i);
  3561. }
  3562. }
  3563. }
  3564. }
  3565. }
  3566. else if(MissionCheckpoint[playerid] > 0 && PlayMission[kToggle] == 1)//Missions + Checkpoint on toggle
  3567. {
  3568. RingTone[playerid] = 20;
  3569. switch(MissionCheckpoint[playerid])
  3570. {
  3571. case 1:
  3572. {
  3573. format(string, sizeof(string), "%s", PlayMission[kGText1]);
  3574. GameTextForPlayer(playerid, string, 8000, 3);
  3575. format(string, sizeof(string), "%s", PlayMission[kText4]);
  3576. SendClientMessage(playerid, COLOR_YELLOW2, string);
  3577. format(string, sizeof(string), "%s", PlayMission[kText5]);
  3578. SendClientMessage(playerid, COLOR_YELLOW2, string);
  3579. format(string, sizeof(string), "%s", PlayMission[kText6]);
  3580. SendClientMessage(playerid, COLOR_YELLOW2, string);
  3581. DisablePlayerCheckpoint(playerid);
  3582. SetPlayerCheckpoint(playerid, PlayMission[kCP2][0], PlayMission[kCP2][1], PlayMission[kCP2][2], 8);
  3583. MissionCheckpoint[playerid] = 2;
  3584. }
  3585. case 2:
  3586. {
  3587. format(string, sizeof(string), "%s", PlayMission[kGText2]);
  3588. GameTextForPlayer(playerid, string, 8000, 3);
  3589. format(string, sizeof(string), "%s", PlayMission[kText7]);
  3590. SendClientMessage(playerid, COLOR_YELLOW2, string);
  3591. format(string, sizeof(string), "%s", PlayMission[kText8]);
  3592. SendClientMessage(playerid, COLOR_YELLOW2, string);
  3593. format(string, sizeof(string), "%s", PlayMission[kText9]);
  3594. SendClientMessage(playerid, COLOR_YELLOW2, string);
  3595. DisablePlayerCheckpoint(playerid);
  3596. SetPlayerCheckpoint(playerid, PlayMission[kCP3][0], PlayMission[kCP3][1], PlayMission[kCP3][2], 8);
  3597. MissionCheckpoint[playerid] = 3;
  3598. }
  3599. case 3:
  3600. {
  3601. format(string, sizeof(string), "%s", PlayMission[kGText3]);
  3602. GameTextForPlayer(playerid, string, 8000, 3);
  3603. format(string, sizeof(string), "%s", PlayMission[kText10]);
  3604. SendClientMessage(playerid, COLOR_YELLOW2, string);
  3605. format(string, sizeof(string), "%s", PlayMission[kText11]);
  3606. SendClientMessage(playerid, COLOR_YELLOW2, string);
  3607. format(string, sizeof(string), "%s", PlayMission[kText12]);
  3608. SendClientMessage(playerid, COLOR_YELLOW2, string);
  3609. DisablePlayerCheckpoint(playerid);
  3610. SetPlayerCheckpoint(playerid, PlayMission[kCP4][0], PlayMission[kCP4][1], PlayMission[kCP4][2], 8);
  3611. MissionCheckpoint[playerid] = 4;
  3612. }
  3613. case 4:
  3614. {
  3615. format(string, sizeof(string), "%s", PlayMission[kGText4]);
  3616. GameTextForPlayer(playerid, string, 8000, 3);
  3617. format(string, sizeof(string), "%s", PlayMission[kText13]);
  3618. SendClientMessage(playerid, COLOR_YELLOW2, string);
  3619. format(string, sizeof(string), "%s", PlayMission[kText14]);
  3620. SendClientMessage(playerid, COLOR_YELLOW2, string);
  3621. format(string, sizeof(string), "%s", PlayMission[kText15]);
  3622. SendClientMessage(playerid, COLOR_YELLOW2, string);
  3623. DisablePlayerCheckpoint(playerid);
  3624. SetPlayerCheckpoint(playerid, PlayMission[kCP5][0], PlayMission[kCP5][1], PlayMission[kCP5][2], 8);
  3625. MissionCheckpoint[playerid] = 5;
  3626. }
  3627. case 5:
  3628. {
  3629. format(string, sizeof(string), "%s", PlayMission[kGText5]);
  3630. GameTextForPlayer(playerid, string, 8000, 3);
  3631. format(string, sizeof(string), "%s", PlayMission[kText16]);
  3632. SendClientMessage(playerid, COLOR_YELLOW2, string);
  3633. format(string, sizeof(string), "%s", PlayMission[kText17]);
  3634. SendClientMessage(playerid, COLOR_YELLOW2, string);
  3635. format(string, sizeof(string), "%s", PlayMission[kText18]);
  3636. SendClientMessage(playerid, COLOR_YELLOW2, string);
  3637. DisablePlayerCheckpoint(playerid);
  3638. SetPlayerCheckpoint(playerid, PlayMission[kCP6][0], PlayMission[kCP6][1], PlayMission[kCP6][2], 8);
  3639. MissionCheckpoint[playerid] = 6;
  3640. }
  3641. case 6:
  3642. {
  3643. format(string, sizeof(string), "%s", PlayMission[kGText6]);
  3644. GameTextForPlayer(playerid, string, 8000, 3);
  3645. format(string, sizeof(string), "..:: Mission Passed : %s | Reward received: $%d ::..", PlayMission[kTitle], PlayMission[kReward]);
  3646. SendClientMessage(playerid, COLOR_GREEN, string);
  3647. DisablePlayerCheckpoint(playerid);
  3648. GivePlayerMoney(playerid, PlayMission[kReward]);
  3649. PlayerInfo[playerid][pMissionNr] = PlayerOnMission[playerid];
  3650. MissionCheckpoint[playerid] = 0;
  3651. PlayerOnMission[playerid] = 0;
  3652. }
  3653. }
  3654. }
  3655. else
  3656. {
  3657. switch (gPlayerCheckpointStatus[playerid])
  3658. {
  3659. case CHECKPOINT_HOME:
  3660. {
  3661. PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
  3662. DisablePlayerCheckpoint(playerid);
  3663. gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
  3664. GameTextForPlayer(playerid, "~w~You are~n~~y~Home", 5000, 1);
  3665. }
  3666. }
  3667. }
  3668. return 1;
  3669. }
  3670.  
  3671. public OnPlayerLeaveCheckpoint(playerid)
  3672. {
  3673. return 1;
  3674. }
  3675.  
  3676. public OnPlayerEnterRaceCheckpoint(playerid)
  3677. {
  3678. return 1;
  3679. }
  3680.  
  3681. public OnPlayerLeaveRaceCheckpoint(playerid)
  3682. {
  3683. return 1;
  3684. }
  3685.  
  3686. public OnRconCommand(cmd[])
  3687. {
  3688. return 1;
  3689. }
  3690.  
  3691. public OnObjectMoved(objectid)
  3692. {
  3693. return 1;
  3694. }
  3695.  
  3696. public OnPlayerObjectMoved(playerid, objectid)
  3697. {
  3698. return 1;
  3699. }
  3700.  
  3701. public OnPlayerPickUpPickup(playerid, pickupid)
  3702. {
  3703. return 1;
  3704. }
  3705.  
  3706. public OnPlayerSelectedMenuRow(playerid, row)
  3707. {
  3708. return 1;
  3709. }
  3710.  
  3711. public OnPlayerExitedMenu(playerid)
  3712. {
  3713. return 1;
  3714. }
  3715.  
  3716. public SetAllPlayerCheckpoint(Float:allx, Float:ally, Float:allz, Float:radi, num)
  3717. {
  3718. for(new i = 0; i < MAX_PLAYERS; i++)
  3719. {
  3720. if(IsPlayerConnected(i))
  3721. {
  3722. SetPlayerCheckpoint(i,allx,ally,allz, radi);
  3723. if (num != 255)
  3724. {
  3725. gPlayerCheckpointStatus[i] = num;
  3726. }
  3727. }
  3728. }
  3729.  
  3730. }
  3731.  
  3732. public SetAllCopCheckpoint(Float:allx, Float:ally, Float:allz, Float:radi)
  3733. {
  3734. for(new i = 0; i < MAX_PLAYERS; i++)
  3735. {
  3736. if(IsPlayerConnected(i))
  3737. {
  3738. if(gTeam[i] == 2)
  3739. {
  3740. SetPlayerCheckpoint(i,allx,ally,allz, radi);
  3741. }
  3742. }
  3743. }
  3744. return 1;
  3745. }
  3746.  
  3747. public OnPlayerStateChange(playerid, newstate, oldstate)
  3748. {
  3749. new string[256];
  3750. if(newstate == PLAYER_STATE_ONFOOT)
  3751. {
  3752. if(PlayerKarting[playerid] > 0 && PlayerInKart[playerid] > 0)
  3753. {
  3754. PlayerInKart[playerid] = 0;
  3755. KartingPlayers --;
  3756. }
  3757. if(TransportDuty[playerid] > 0)
  3758. {
  3759. if(TransportDuty[playerid] == 1)
  3760. {
  3761. TaxiDrivers -= 1;
  3762. }
  3763. else if(TransportDuty[playerid] == 2)
  3764. {
  3765. BusDrivers -= 1;
  3766. }
  3767. TransportDuty[playerid] = 0;
  3768. format(string, sizeof(string), "* You are now Off Duty and earned $%d.", TransportMoney[playerid]);
  3769. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  3770. GivePlayerMoney(playerid, TransportMoney[playerid]);
  3771. ConsumingMoney[playerid] = 1; TransportValue[playerid] = 0; TransportMoney[playerid] = 0;
  3772. }
  3773. if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999)
  3774. {
  3775. if(IsPlayerConnected(TransportDriver[playerid]))
  3776. {
  3777. TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
  3778. TransportTime[TransportDriver[playerid]] = 0;
  3779. TransportCost[TransportDriver[playerid]] = 0;
  3780. format(string, sizeof(string), "~w~The ride cost~n~~r~$%d",TransportCost[playerid]);
  3781. GameTextForPlayer(playerid, string, 5000, 1);
  3782. format(string, sizeof(string), "~w~Passenger left the taxi~n~~g~Earned $%d",TransportCost[playerid]);
  3783. GameTextForPlayer(TransportDriver[playerid], string, 5000, 1);
  3784. GivePlayerMoney(playerid, -TransportCost[playerid]);
  3785. TransportCost[playerid] = 0;
  3786. TransportTime[playerid] = 0;
  3787. TransportDriver[playerid] = 999;
  3788. }
  3789. }
  3790. TelePos[playerid][0] = 0.0;
  3791. TelePos[playerid][1] = 0.0;
  3792. }
  3793. if(newstate == PLAYER_STATE_PASSENGER) // TAXI & BUSSES
  3794. {
  3795. new name[MAX_PLAYER_NAME];
  3796. GetPlayerName(playerid, name, sizeof(name));
  3797. new vehicleid = GetPlayerVehicleID(playerid);
  3798. for(new i = 0; i < MAX_PLAYERS; i++)
  3799. {
  3800. if(IsPlayerConnected(i))
  3801. {
  3802. if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == 2 && TransportDuty[i] > 0)
  3803. {
  3804. if(GetPlayerMoney(playerid) < TransportValue[i])
  3805. {
  3806. format(string, sizeof(string), "* You need $%d to enter.", TransportValue[i]);
  3807. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  3808. RemovePlayerFromVehicle(playerid);
  3809. }
  3810. else
  3811. {
  3812. if(TransportDuty[i] == 1)
  3813. {
  3814. format(string, sizeof(string), "* You paid $%d to the Taxi Driver.", TransportValue[i]);
  3815. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  3816. format(string, sizeof(string), "* Passenger %s has entered your Taxi.", name);
  3817. SendClientMessage(i, COLOR_LIGHTBLUE, string);
  3818. TransportTime[i] = 1;
  3819. TransportTime[playerid] = 1;
  3820. TransportCost[playerid] = TransportValue[i];
  3821. TransportCost[i] = TransportValue[i];
  3822. TransportDriver[playerid] = i;
  3823. }
  3824. else if(TransportDuty[i] == 2)
  3825. {
  3826. format(string, sizeof(string), "* You paid $%d to the Bus Driver.", TransportValue[i]);
  3827. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  3828. format(string, sizeof(string), "* Passenger %s has entered your Bus.", name);
  3829. SendClientMessage(i, COLOR_LIGHTBLUE, string);
  3830. }
  3831. GivePlayerMoney(playerid, - TransportValue[i]);
  3832. TransportMoney[i] += TransportValue[i];
  3833. }
  3834. }
  3835. }
  3836. }
  3837. }
  3838. if(newstate == PLAYER_STATE_WASTED)
  3839. {
  3840. if(WantedLevel[playerid] >= 1)
  3841. {
  3842. new price = WantedLevel[playerid] * 4000;
  3843. new count;
  3844. for(new i = 0; i < MAX_PLAYERS; i++)
  3845. {
  3846. if(IsPlayerConnected(i))
  3847. {
  3848. if(gTeam[i] == 2 && CrimInRange(30.0, playerid,i))
  3849. {
  3850. count = 1;
  3851. format(string, sizeof(string), "~w~Running Suspect~r~Killed~n~Bonus~g~$%d", price);
  3852. GameTextForPlayer(i, string, 5000, 1);
  3853. ConsumingMoney[i] = 1;
  3854. GivePlayerMoney(i, price / 2);
  3855. PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
  3856. }
  3857. }
  3858. }
  3859. if(count == 1)
  3860. {
  3861. GivePlayerMoney(playerid, - price);
  3862. PlayerInfo[playerid][pWantedDeaths] += 1;
  3863. PlayerInfo[playerid][pJailed] = 1;
  3864. PlayerInfo[playerid][pJailTime] = (WantedLevel[playerid])*(600);
  3865. 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);
  3866. SendClientMessage(playerid, COLOR_LIGHTRED, string);
  3867. WantedPoints[playerid] = 0;
  3868. WantedLevel[playerid] = 0;
  3869. }
  3870. }
  3871. }
  3872. if(newstate == PLAYER_STATE_DRIVER) //buggy dont finnish
  3873. {// 38 / 49 / 56 = SS
  3874. new newcar = GetPlayerVehicleID(playerid);
  3875. new oldcar = gLastCar[playerid];
  3876. new housecar = PlayerInfo[playerid][pPhousekey]+1;
  3877. TelePos[playerid][0] = 0.0;
  3878. TelePos[playerid][1] = 0.0;
  3879. if(IsABoat(newcar))
  3880. {
  3881. if(PlayerInfo[playerid][pBoatLic] < 1)
  3882. {
  3883. SendClientMessage(playerid, COLOR_GREY, " You don't know how to Sail yet, so you left the Boat !");
  3884. RemovePlayerFromVehicle(playerid);
  3885. }
  3886. }
  3887. else if(IsAPlane(newcar))
  3888. {
  3889. if(PlayerInfo[playerid][pFlyLic] < 1)
  3890. {
  3891. if(TakingLesson[playerid] == 1) { }
  3892. else {
  3893. SendClientMessage(playerid, COLOR_GREY, " You don't know how to Fly yet, so you left the Plane !");
  3894. RemovePlayerFromVehicle(playerid); }
  3895. }
  3896. }
  3897. else
  3898. {
  3899. if(PlayerInfo[playerid][pCarLic] < 1)
  3900. {
  3901. if(PlayerDrunk[playerid] >= 5)
  3902. {
  3903. WantedPoints[playerid] += 1;
  3904. SetPlayerCriminal(playerid,255, "Drunk Driving");
  3905. }
  3906. if(TakingLesson[playerid] == 1) { }
  3907. else {
  3908. SendClientMessage(playerid, COLOR_GREY, " You don't know how to Drive yet, so you left the Car !");
  3909. RemovePlayerFromVehicle(playerid); }
  3910. }
  3911. else if(PlayerDrunk[playerid] >= 5)
  3912. {
  3913. WantedPoints[playerid] += 1;
  3914. SetPlayerCriminal(playerid,255, "Drunk Driving");
  3915. }
  3916. }//Done with car check
  3917. if(IsACopCar(newcar))
  3918. {
  3919. if(IsACop(playerid)) { }
  3920. else { RemovePlayerFromVehicle(playerid); }
  3921. }
  3922. else if(IsAnAmbulance(newcar))
  3923. {
  3924. if(PlayerInfo[playerid][pMember] == 4||PlayerInfo[playerid][pLeader] == 4) { }
  3925. else { RemovePlayerFromVehicle(playerid); }
  3926. }
  3927. if(IsATruck(newcar))
  3928. {
  3929. format(string, sizeof(string), "Products: %d/%d", PlayerHaul[newcar][pLoad],PlayerHaul[newcar][pCapasity]);
  3930. SendClientMessage(playerid, TEAM_GROVE_COLOR, string);
  3931. SendClientMessage(playerid, COLOR_WHITE, "INFO: You can deliver Products to Businesses.");
  3932. SendClientMessage(playerid, COLOR_WHITE, "INFO: Commands are /load /buyprods /sellprods");
  3933. }
  3934. if(PlayerKarting[playerid] != 0)
  3935. {
  3936. new kart = GetPlayerVehicleID(playerid);
  3937. if(kart==110||kart==111||kart==112||kart==113||kart==114||kart==115)
  3938. {
  3939. PlayerInKart[playerid] = 1;
  3940. KartingPlayers ++;
  3941. }
  3942. }
  3943. if(newcar == 39 || newcar == 40)
  3944. {
  3945. if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)//national guard
  3946. {
  3947. if(PlayerInfo[playerid][pRank] < 3)
  3948. {
  3949. SendClientMessage(playerid,COLOR_GREY," You need Rank 3 to Fly this baby !");
  3950. RemovePlayerFromVehicle(playerid);
  3951. }
  3952. }
  3953. else
  3954. {
  3955. RemovePlayerFromVehicle(playerid);
  3956. }
  3957. }
  3958. if(newcar == 55 || newcar == 59)
  3959. {
  3960. if(PlayerInfo[playerid][pMember] != 4)
  3961. {
  3962. SendClientMessage(playerid,COLOR_GREY," You are not a Fireman !");
  3963. RemovePlayerFromVehicle(playerid);
  3964. }
  3965. }
  3966. if(newcar == 64 || newcar == 65)
  3967. {
  3968. if(PlayerInfo[playerid][pJob] != 14)
  3969. {
  3970. SendClientMessage(playerid,COLOR_GREY," You are not a Bus Driver !");
  3971. RemovePlayerFromVehicle(playerid);
  3972. }
  3973. }
  3974. if(newcar == 69 || newcar == 70 || newcar == 71 || newcar == 99 || newcar == 100 || newcar == 101)
  3975. {
  3976. if(TakingLesson[playerid] == 1) { }
  3977. else if(!IsAnInstructor(playerid))
  3978. {
  3979. SendClientMessage(playerid,COLOR_GREY," You are not a School Instructor !");
  3980. RemovePlayerFromVehicle(playerid);
  3981. }
  3982. }
  3983. if(newcar == 82 || newcar == 84 || newcar == 85 || newcar == 94)
  3984. {
  3985. if(PlayerInfo[playerid][pMember] == 10||PlayerInfo[playerid][pLeader] == 10) { }
  3986. else
  3987. {
  3988. SendClientMessage(playerid,COLOR_GREY," You are not a Taxi Driver !");
  3989. RemovePlayerFromVehicle(playerid);
  3990. }
  3991. }
  3992. if(newcar == 95)
  3993. {
  3994. if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
  3995. {
  3996. if(PlayerInfo[playerid][pRank] < 3)
  3997. {
  3998. SendClientMessage(playerid, COLOR_GREY, " Your Rank is to Low !");
  3999. RemovePlayerFromVehicle(playerid);
  4000. }
  4001. }
  4002. else
  4003. {
  4004. SendClientMessage(playerid, COLOR_GREY, " You are not a Hitman !");
  4005. RemovePlayerFromVehicle(playerid);
  4006. }
  4007. }
  4008. if(newcar == 96 || newcar == 97 || newcar == 98)
  4009. {
  4010. if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9){ }
  4011. else
  4012. {
  4013. SendClientMessage(playerid, COLOR_GREY, " You are not a News Reporter !");
  4014. RemovePlayerFromVehicle(playerid);
  4015. }
  4016. if(PlayerInfo[playerid][pNewsSkill] < 200 && newcar == 96)
  4017. {
  4018. SendClientMessage(playerid, COLOR_GREY, " Your News Reporter Skill is to low, cant fly the Chopper yet !");
  4019. RemovePlayerFromVehicle(playerid);
  4020. }
  4021. }
  4022. if(newcar==110||newcar==111||newcar==112||newcar==113||newcar==114||newcar==115)
  4023. {
  4024. if(PlayerKarting[playerid] != 1)
  4025. {
  4026. RemovePlayerFromVehicle(playerid);
  4027. }
  4028. }
  4029. if(newcar >= 72 && newcar <= 74)
  4030. {
  4031. if (HireCar[playerid] != newcar)
  4032. {
  4033. 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]);
  4034. TogglePlayerControllable(playerid, 0);
  4035. GameTextForPlayer(playerid, string, 5000, 3);
  4036. }
  4037. }
  4038. if(newcar >= 75 && newcar <= 77)
  4039. {
  4040. if (HireCar[playerid] != newcar)
  4041. {
  4042. 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]);
  4043. TogglePlayerControllable(playerid, 0);
  4044. GameTextForPlayer(playerid, string, 5000, 3);
  4045. }
  4046. }
  4047. if(oldcar != 301)
  4048. {
  4049. if((housecar != oldcar && oldcar != 0) && (HireCar[playerid] != oldcar && newcar != housecar))
  4050. {
  4051. if(gLastDriver[oldcar] == playerid && oldcar != newcar)
  4052. {
  4053. gLastDriver[oldcar] = 300;
  4054. gCarLock[oldcar] = 0;
  4055. UnLockCar(oldcar);
  4056. }
  4057. }
  4058. }
  4059. gLastCar[playerid] = newcar;
  4060. gLastDriver[newcar] = playerid;
  4061. }
  4062. if(newstate == PLAYER_STATE_SPAWNED)
  4063. {
  4064. new Float: lwx, Float:lwy, Float:lwz;
  4065. GetPlayerPos(playerid, lwx, lwy, lwz);
  4066. 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
  4067. {
  4068. SetPlayerSpawn(playerid);
  4069. }
  4070. if(WantedPoints[playerid] > 0)
  4071. {
  4072. new dstring[128];
  4073. new wanted = WantedPoints[playerid];
  4074. new diecash = 0;
  4075. while(WantedPoints[playerid] > 0)
  4076. {
  4077. diecash += 500;
  4078. WantedPoints[playerid] --;
  4079. }
  4080. format(dstring, sizeof(dstring), "You lost $%d for dieing with %d Wanted Points.", diecash, wanted);
  4081. SendClientMessage(playerid, COLOR_YELLOW, dstring);
  4082. GivePlayerMoney(playerid, - diecash);
  4083. PlayerInfo[playerid][pWantedDeaths] += 1;
  4084. }
  4085. if(PlayerOnMission[playerid] > 0)
  4086. {
  4087. GameTextForPlayer(playerid, "~r~Mission failed", 5000, 3);
  4088. PlayerOnMission[playerid] = 0;
  4089. PlayerInfo[playerid][pMissionNr] = 0;
  4090. }
  4091. WantedPoints[playerid] = 0;
  4092. WantedLevel[playerid] = 0;
  4093. if(PlayerInfo[playerid][pDonateRank] > 0) { SetPlayerHealth(playerid, 100.0); }
  4094. else { SetPlayerHealth(playerid, 50.0+PlayerInfo[playerid][pSHealth]); }
  4095. MedicBill[playerid] = 1;
  4096. TelePos[playerid][0] = 0.0;
  4097. TelePos[playerid][1] = 0.0;
  4098. gPlayerSpawned[playerid] = 1;
  4099. SafeTime[playerid] = 60;
  4100. }
  4101. return 1;
  4102. }
  4103.  
  4104. public HireCost(carid)
  4105. {
  4106. switch (carid)
  4107. {
  4108. case 69:
  4109. {
  4110. return 90000; //bullit
  4111. }
  4112. case 70:
  4113. {
  4114. return 130000; //infurnus
  4115. }
  4116. case 71:
  4117. {
  4118. return 100000; //turismo
  4119. }
  4120. case 72:
  4121. {
  4122. return 80000;
  4123. }
  4124. case 73:
  4125. {
  4126. return 70000;
  4127. }
  4128. case 74:
  4129. {
  4130. return 60000;
  4131. }
  4132. }
  4133. return 0;
  4134. }
  4135.  
  4136. public CarCheck()
  4137. {
  4138. new string[256];
  4139. for(new j = 0; j<MAX_PLAYERS; j++)
  4140. {
  4141. if(IsPlayerConnected(j))
  4142. {
  4143. SetVehicleParamsForPlayer(99, j, 0, 0);
  4144. SetVehicleParamsForPlayer(100, j, 0, 0);
  4145. SetVehicleParamsForPlayer(101, j, 0, 0);
  4146. SetVehicleParamsForPlayer(102, j, 0, 0);
  4147. SetVehicleParamsForPlayer(103, j, 0, 0);
  4148. SetVehicleParamsForPlayer(104, j, 0, 0);
  4149. SetVehicleParamsForPlayer(105, j, 0, 0);
  4150. SetVehicleParamsForPlayer(106, j, 0, 0);
  4151. SetVehicleParamsForPlayer(107, j, 0, 0);
  4152. SetVehicleParamsForPlayer(108, j, 0, 0);
  4153. SetVehicleParamsForPlayer(109, j, 0, 0);
  4154. new Float:health;
  4155. GetPlayerHealth(j, health);
  4156. SetPlayerHealth(j, health - 1.0);
  4157. if(STDPlayer[j]==1)
  4158. {
  4159. GetPlayerHealth(j, health);
  4160. SetPlayerHealth(j, health - 5.0);
  4161. SendClientMessage(j, COLOR_LIGHTBLUE, "* Lost 4 health due to STD.");
  4162. }
  4163. else if(STDPlayer[j]==2)
  4164. {
  4165. GetPlayerHealth(j, health);
  4166. SetPlayerHealth(j, health - 12.0);
  4167. SendClientMessage(j, COLOR_LIGHTBLUE, "* Lost 8 health due to STD.");
  4168. }
  4169. else if(STDPlayer[j]==3)
  4170. {
  4171. GetPlayerHealth(j, health);
  4172. SetPlayerHealth(j, health - 20.0);
  4173. SendClientMessage(j, COLOR_LIGHTBLUE, "* Lost 12 health due to STD.");
  4174. }
  4175.  
  4176. if(GetPlayerMoney(j) < 0)
  4177. {
  4178. if(MoneyMessage[j]==0)
  4179. {
  4180. format(string, sizeof(string), "You are in debt, you have till next Time Check to get: $%d or you go to jail.", GetPlayerMoney(j));
  4181. SendClientMessage(j, COLOR_LIGHTRED, string);
  4182. MoneyMessage[j] = 1;
  4183. }
  4184. }
  4185. else
  4186. {
  4187. MoneyMessage[j] = 0;
  4188. }
  4189. }
  4190. }
  4191. for(new c = 1; c < 254; c++)
  4192. {
  4193. for(new i = 0; i < MAX_PLAYERS; i++)
  4194. {
  4195. if(IsPlayerConnected(i))
  4196. {
  4197. if (PlayerInfo[i][pJob] == 5)
  4198. {
  4199. SetVehicleParamsForPlayer(c, i, 0, 0);
  4200. }
  4201. }
  4202. }
  4203. if (gLastDriver[c] == 301)
  4204. {
  4205. CarRespawn(c);
  4206. }
  4207. if (gLastDriver[c] >= 300)
  4208. {
  4209. gLastDriver[c]++;
  4210. }
  4211. //foundowner = -1;
  4212. }
  4213. return 1;
  4214. }
  4215.  
  4216. public CarInit()
  4217. {
  4218. for(new c = 1; c < 254; c++)
  4219. {
  4220. gLastDriver[c] = 299;
  4221. }
  4222. gLastDriver[301]=255;
  4223. return 1;
  4224. }
  4225.  
  4226. public CarTow(carid)
  4227. {
  4228. for(new i = 0; i < MAX_PLAYERS; i++)
  4229. {
  4230. if(IsPlayerConnected(i))
  4231. {
  4232. if(IsPlayerInVehicle(i, carid) || HireCar[i] == carid)
  4233. {
  4234. gLastDriver[carid] = 255;
  4235. return 0;
  4236. }
  4237. }
  4238. }
  4239. SetVehiclePos(carid,HouseCarSpawns[carid-1][0], HouseCarSpawns[carid-1][1], HouseCarSpawns[carid-1][2]);
  4240. SetVehicleZAngle(carid, HouseCarSpawns[carid-1][3]);
  4241. return 1;
  4242. }
  4243.  
  4244. public CarRespawn(carid)
  4245. {
  4246. for(new i = 0; i < MAX_PLAYERS; i++)
  4247. {
  4248. if(IsPlayerConnected(i))
  4249. {
  4250. if(IsPlayerInVehicle(i, carid) || HireCar[i] == carid)
  4251. {
  4252. gLastDriver[carid] = 255;
  4253. return 0;
  4254. }
  4255. }
  4256. }
  4257. SetVehicleToRespawn(carid);
  4258. gLastDriver[carid] = 299;
  4259. return 1;
  4260. }
  4261.  
  4262. public LockCar(carid)
  4263. {
  4264. for(new i = 0; i < MAX_PLAYERS; i++)
  4265. {
  4266. if(IsPlayerConnected(i))
  4267. {
  4268. SetVehicleParamsForPlayer(carid,i,0,1);
  4269. }
  4270. }
  4271. }
  4272.  
  4273. public UnLockCar(carid)
  4274. {
  4275. for(new i = 0; i < MAX_PLAYERS; i++)
  4276. {
  4277. if(IsPlayerConnected(i))
  4278. {
  4279. if(!IsAPlane(carid))
  4280. {
  4281. SetVehicleParamsForPlayer(carid,i,0,0);
  4282. }
  4283. }
  4284. }
  4285. }
  4286.  
  4287. public InitLockDoors(playerid)
  4288. {
  4289. if(IsPlayerConnected(playerid))
  4290. {
  4291. new c;
  4292. while (c < 254)
  4293. {
  4294. c++;
  4295. if (gCarLock[c] == 1)
  4296. {
  4297. SetVehicleParamsForPlayer(c,playerid,0,1);
  4298. }
  4299. }
  4300. }
  4301. return 1;
  4302. }
  4303.  
  4304. public OnPlayerExitVehicle(playerid, vehicleid)
  4305. {
  4306. if (GetPlayerState(playerid) == 1)
  4307. {
  4308. return 1;
  4309. }
  4310. if(gGas[playerid] == 1)
  4311. {
  4312. GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Left car", 500, 3);
  4313. }
  4314. return 1;
  4315. }
  4316.  
  4317. public OnPlayerRequestClass(playerid, classid)
  4318. {
  4319. new string[128];
  4320. PlayerPlaySound(playerid, 1187, 0.0, 0.0, 0.0);
  4321. PlayerInfo[playerid][pModel] = Peds[classid][0];
  4322. if (classid == 1)
  4323. {
  4324. format(string, sizeof(string), "~y~> ~p~Police Chief ~y~< ~n~Leaders only!");
  4325. GameTextForPlayer(playerid,string,3500,6);
  4326. }
  4327. else if (classid == 2)
  4328. {
  4329. format(string, sizeof(string), "~y~> ~p~FBI/ATF Leader ~y~< ~n~Leaders only!");
  4330. GameTextForPlayer(playerid,string,3500,6);
  4331. }
  4332. else if (classid == 3)
  4333. {
  4334. format(string, sizeof(string), "~y~> ~p~National Guard General ~y~< ~n~Leaders only!");
  4335. GameTextForPlayer(playerid,string,3500,6);
  4336. }
  4337. else if (classid == 4)
  4338. {
  4339. format(string, sizeof(string), "~y~> ~p~Fire/Ambulance Chief ~y~< ~n~Leaders only!");
  4340. GameTextForPlayer(playerid,string,3500,6);
  4341. }
  4342. else if (classid == 5)
  4343. {
  4344. format(string, sizeof(string), "~y~> ~p~La Cosa Nostra Leader ~y~< ~n~Leaders only!");
  4345. GameTextForPlayer(playerid,string,3500,6);
  4346. }
  4347. else if (classid == 6)
  4348. {
  4349. format(string, sizeof(string), "~y~> ~p~Yakuza Leader ~y~< ~n~Leaders only!");
  4350. GameTextForPlayer(playerid,string,3500,6);
  4351. }
  4352. else if (classid == 7)
  4353. {
  4354. format(string, sizeof(string), "~y~> ~p~Mayor ~y~< ~n~Leaders only!");
  4355. GameTextForPlayer(playerid,string,3500,6);
  4356. }
  4357. else if (classid == 8)
  4358. {
  4359. format(string, sizeof(string), "~y~> ~p~Hitman Leader ~y~< ~n~Leaders only!");
  4360. GameTextForPlayer(playerid,string,3500,6);
  4361. }
  4362. else if (classid == 9)
  4363. {
  4364. format(string, sizeof(string), "~y~> ~p~News Leader ~y~< ~n~Leaders only!");
  4365. GameTextForPlayer(playerid,string,3500,6);
  4366. }
  4367. else if (classid == 10)
  4368. {
  4369. format(string, sizeof(string), "~y~> ~p~Taxi Cab Company Leader ~y~< ~n~Leaders only!");
  4370. GameTextForPlayer(playerid,string,3500,6);
  4371. }
  4372. else if (classid == 11)
  4373. {
  4374. format(string, sizeof(string), "~y~> ~p~License Faction Leader ~y~< ~n~Leaders only!");
  4375. GameTextForPlayer(playerid,string,3500,6);
  4376. }
  4377. else
  4378. {
  4379. format(string, sizeof(string), "~y~> ~g~Civilian ~y~<");
  4380. GameTextForPlayer(playerid,string,3500,6);
  4381. }
  4382. SetPlayerTeamFromClass(playerid,classid);
  4383. SetupPlayerForClassSelection(playerid);
  4384. return 1;
  4385. }
  4386.  
  4387. public SetupPlayerForClassSelection(playerid)
  4388. {
  4389. switch (gTeam[playerid])
  4390. {
  4391. case TEAM_BLUE:
  4392. {
  4393. SetPlayerInterior(playerid,5);
  4394. SetPlayerPos(playerid,323.4,305.6,999.1);
  4395. SetPlayerFacingAngle(playerid, 90.0);
  4396. SetPlayerCameraPos(playerid,323.4-1.5-1.0,305.6,999.1+0.7);
  4397. SetPlayerCameraLookAt(playerid,323.4-1.0,305.6,999.1+0.7);
  4398.  
  4399. }
  4400. case TEAM_ADMIN:
  4401. {
  4402. SetPlayerInterior(playerid,3);
  4403. SetPlayerPos(playerid,-2654.4,1424.2,912.4);
  4404. SetPlayerFacingAngle(playerid, 90.0);
  4405. SetPlayerCameraPos(playerid,-2654.4-1.5,1424.2,912.4+0.7);
  4406. SetPlayerCameraLookAt(playerid,-2654.4,1424.2,912.4+0.7);
  4407. }
  4408. default:
  4409. {
  4410. SetPlayerInterior(playerid,0);
  4411. SetPlayerPos(playerid,-1657.5237,1207.6644,13.6719);
  4412. SetPlayerFacingAngle(playerid,357.6906);
  4413. SetPlayerCameraPos(playerid, -1657.4678,1211.2292,13.6781);
  4414. SetPlayerCameraLookAt(playerid,-1657.5237,1207.6644,13.6719);
  4415. }
  4416. }
  4417. }
  4418.  
  4419. //---------------------------------------------------------
  4420.  
  4421. public SetPlayerTeamFromClass(playerid,classid)
  4422. {
  4423. if (classid >= 1 && classid <= 11)
  4424. {
  4425. gTeam[playerid] = 11; //admin
  4426. PlayerInfo[playerid][pTeam] = 11;
  4427. }
  4428. else
  4429. {
  4430. gTeam[playerid] = 3;
  4431. PlayerInfo[playerid][pTeam] = 3;
  4432. }
  4433. }
  4434.  
  4435. //---------------------------------------------------------
  4436.  
  4437. public SetPlayerCriminal(playerid,declare,reason[])
  4438. {//example: SetPlayerCriminal(playerid,255, "Stealing A Police Vehicle");
  4439. if(IsPlayerConnected(playerid))
  4440. {
  4441. PlayerInfo[playerid][pCrimes] += 1;
  4442. new points = WantedPoints[playerid];
  4443. new turned[MAX_PLAYER_NAME];
  4444. new turner[MAX_PLAYER_NAME];
  4445. new turnmes[128];
  4446. new wantedmes[128];
  4447. new wlevel;
  4448. strmid(PlayerCrime[playerid][pAccusedof], reason, 0, strlen(reason), 255);
  4449. GetPlayerName(playerid, turned, sizeof(turned));
  4450. if (declare == 255)
  4451. {
  4452. format(turner, sizeof(turner), "Unknown");
  4453. strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);
  4454. }
  4455. else
  4456. {
  4457. if(IsPlayerConnected(declare))
  4458. {
  4459. GetPlayerName(declare, turner, sizeof(turner));
  4460. strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);
  4461. strmid(PlayerCrime[declare][pBplayer], turned, 0, strlen(turned), 255);
  4462. strmid(PlayerCrime[declare][pAccusing], reason, 0, strlen(reason), 255);
  4463. }
  4464. }
  4465. format(turnmes, sizeof(turnmes), "You've commited a Crime ( %s ). Reporter: %s.",reason,turner);
  4466. SendClientMessage(playerid, COLOR_LIGHTRED, turnmes);
  4467. if(points > 0)
  4468. {
  4469. new yesno;
  4470. if(points == 3) { if(WantedLevel[playerid] != 1) { WantedLevel[playerid] = 1; wlevel = 1; yesno = 1; } }
  4471. else if(points >= 4 && points <= 5) { if(WantedLevel[playerid] != 2) { WantedLevel[playerid] = 2; wlevel = 2; yesno = 1; } }
  4472. else if(points >= 6 && points <= 7) { if(WantedLevel[playerid] != 3) { WantedLevel[playerid] = 3; wlevel = 3; yesno = 1; } }
  4473. else if(points >= 8 && points <= 9) { if(WantedLevel[playerid] != 4) { WantedLevel[playerid] = 4; wlevel = 4; yesno = 1; } }
  4474. else if(points >= 10 && points <= 11) { if(WantedLevel[playerid] != 5) { WantedLevel[playerid] = 5; wlevel = 5; yesno = 1; } }
  4475. else if(points >= 12 && points <= 13) { if(WantedLevel[playerid] != 6) { WantedLevel[playerid] = 6; wlevel = 6; yesno = 1; } }
  4476. else if(points >= 14) { if(WantedLevel[playerid] != 10) { WantedLevel[playerid] = 10; wlevel = 10; yesno = 1; } }
  4477. if(WantedLevel[playerid] >= 1) { if(gTeam[playerid] == 3) { gTeam[playerid] = 4; } }
  4478. if(yesno)
  4479. {
  4480. format(wantedmes, sizeof(wantedmes), "Current Wanted Level: %d", wlevel);
  4481. SendClientMessage(playerid, COLOR_YELLOW, wantedmes);
  4482. for(new i = 0; i < MAX_PLAYERS; i++)
  4483. {
  4484. if(IsPlayerConnected(i))
  4485. {
  4486. if(PlayerInfo[i][pMember] == 1||PlayerInfo[i][pLeader] == 1)
  4487. {
  4488. format(cbjstore, sizeof(turnmes), "HQ: All Units APB: Reporter: %s",turner);
  4489. SendClientMessage(i, TEAM_BLUE_COLOR, cbjstore);
  4490. format(cbjstore, sizeof(turnmes), "HQ: Crime: %s, Suspect: %s",reason,turned);
  4491. SendClientMessage(i, TEAM_BLUE_COLOR, cbjstore);
  4492. }
  4493. }
  4494. }
  4495. }
  4496. }
  4497. }//not connected
  4498. }
  4499. //---------------------------------------------------------
  4500.  
  4501. public SetPlayerFree(playerid,declare,reason[])
  4502. {
  4503. if(IsPlayerConnected(playerid))
  4504. {
  4505. ClearCrime(playerid);
  4506. new turned[MAX_PLAYER_NAME];
  4507. new turner[MAX_PLAYER_NAME];
  4508. new turnmes[128];
  4509. new crbjstore[128];
  4510. if (declare == 255)
  4511. {
  4512. format(turner, sizeof(turner), "911");
  4513. }
  4514. else
  4515. {
  4516. if(IsPlayerConnected(declare))
  4517. {
  4518. GetPlayerName(declare, turner, sizeof(turner));
  4519. }
  4520. }
  4521. GetPlayerName(playerid, turned, sizeof(turned));
  4522. format(turnmes, sizeof(turnmes), "SMS: %s, Because you %s, you are no longer a Criminal, Sender: MOLE (555)",turned,reason);
  4523. RingTone[playerid] = 20;
  4524. SendClientMessage(playerid, COLOR_YELLOW, turnmes);
  4525. for(new i = 0; i < MAX_PLAYERS; i++)
  4526. {
  4527. if(IsPlayerConnected(i))
  4528. {
  4529. if(PlayerInfo[i][pMember] == 1||PlayerInfo[i][pLeader] == 1)
  4530. {
  4531. format(crbjstore, sizeof(crbjstore), "HQ: All Units Officer %s Has Completed Assignment",turner);
  4532. SendClientMessage(i, COLOR_DBLUE, crbjstore);
  4533. format(crbjstore, sizeof(crbjstore), "HQ: %s Has Been Processed, %s",turned,reason);
  4534. SendClientMessage(i, COLOR_DBLUE, crbjstore);
  4535. }
  4536. }
  4537. }
  4538. }
  4539. }
  4540.  
  4541. public RingToner()
  4542. {
  4543. for(new i = 0; i < MAX_PLAYERS; i++)
  4544. {
  4545. if(IsPlayerConnected(i))
  4546. {
  4547. if(RingTone[i] != 6 && RingTone[i] != 0 && RingTone[i] < 11)
  4548. {
  4549. RingTone[i] = RingTone[i] -1;
  4550. PlayerPlaySound(i, 1138, 0.0, 0.0, 0.0);
  4551. }
  4552. if(RingTone[i] == 6)
  4553. {
  4554. RingTone[i] = RingTone[i] -1;
  4555. }
  4556. if(RingTone[i] == 20)
  4557. {
  4558. RingTone[i] = RingTone[i] -1;
  4559. PlayerPlaySound(i, 1139, 0.0, 0.0, 0.0);
  4560. }
  4561. }
  4562. }
  4563. SetTimer("RingTonerRev", 1000, 0);
  4564. return 1;
  4565. }
  4566.  
  4567. public RingTonerRev()
  4568. {
  4569. for(new i = 0; i < MAX_PLAYERS; i++)
  4570. {
  4571. if(IsPlayerConnected(i))
  4572. {
  4573. if(RingTone[i] != 5 && RingTone[i] != 0 && RingTone[i] < 10)
  4574. {
  4575. RingTone[i] = RingTone[i] -1;
  4576. PlayerPlaySound(i, 1137, 0.0, 0.0, 0.0);
  4577. }
  4578. if(RingTone[i] == 5)
  4579. {
  4580. RingTone[i] = RingTone[i] -1;
  4581. }
  4582. if(RingTone[i] == 19)
  4583. {
  4584. PlayerPlaySound(i, 1139, 0.0, 0.0, 0.0);
  4585. RingTone[i] = 0;
  4586. }
  4587. }
  4588. }
  4589. SetTimer("RingToner", 1000, 0);
  4590. return 1;
  4591. }
  4592.  
  4593. public OtherTimer()
  4594. {
  4595. new Float:maxspeed = 175.0;
  4596. new plname[MAX_PLAYER_NAME];
  4597. new string[256];
  4598. new Float:oldposx, Float:oldposy, Float:oldposz;
  4599. for(new i = 0; i < MAX_PLAYERS; i++)
  4600. {
  4601. if(IsPlayerConnected(i))
  4602. {
  4603. if(SafeTime[i] > 0)
  4604. {
  4605. SafeTime[i]--;
  4606. }
  4607. if(SafeTime[i] == 1)
  4608. {
  4609. if(gPlayerAccount[i] == 1 && gPlayerLogged[i] == 0)
  4610. {
  4611. SendClientMessage(i, COLOR_WHITE, "HINT: You can now login by typing /login <password>");
  4612. }
  4613. }
  4614. if(GetPlayerState(i) == 2)
  4615. {
  4616. GetPlayerPos(i, TelePos[i][3], TelePos[i][4], TelePos[i][5]);
  4617. if(TelePos[i][5] > 550.0)
  4618. {
  4619. TelePos[i][0] = 0.0;
  4620. TelePos[i][1] = 0.0;
  4621. }
  4622. if(TelePos[i][0] != 0.0)
  4623. {
  4624. new Float:xdist = TelePos[i][3]-TelePos[i][0];
  4625. new Float:ydist = TelePos[i][4]-TelePos[i][1];
  4626. new Float:sqxdist = xdist*xdist;
  4627. new Float:sqydist = ydist*ydist;
  4628. new Float:distance = (sqxdist+sqydist)/31;
  4629. if(gSpeedo[i] == 2)
  4630. {
  4631. if(distance <10)
  4632. {
  4633. format(string, 256, "~n~~n~~n~~n~~n~~n~~n~~g~mph : ~w~%.0f",distance);
  4634. }
  4635. if(distance > 10 && distance < 100)
  4636. {
  4637. format(string, 256, "~n~~n~~n~~n~~n~~n~~n~~g~mph : ~w~%.0f",distance);
  4638. }
  4639. if(distance > 100)
  4640. {
  4641. format(string, 256, "~n~~n~~n~~n~~n~~n~~n~~g~mph : ~w~%.0f",distance);
  4642. }
  4643. GameTextForPlayer(i, string, 2000, 5);
  4644. }
  4645. if(distance > maxspeed && PlayerInfo[i][pAdmin] < 1)
  4646. {
  4647. new tmpcar = GetPlayerVehicleID(i);
  4648. if(!IsAPlane(tmpcar))
  4649. {
  4650. GetPlayerName(i, plname, sizeof(plname));
  4651. format(string, 256, "AdmWarning: [%d]%s %.0f mph",i,plname,distance);
  4652. ABroadCast(COLOR_YELLOW,string,1);
  4653. }
  4654. }
  4655. }
  4656. if(TelePos[i][5] < 550.0 && TelePos[i][3] != 0.0)
  4657. {
  4658. TelePos[i][0] = TelePos[i][3];
  4659. TelePos[i][1] = TelePos[i][4];
  4660. }
  4661. }
  4662. if(PlayerInfo[i][pLocal] != 255 && PlayerInfo[i][pInt] != 0)
  4663. {
  4664. new house = PlayerInfo[i][pLocal];
  4665. GetPlayerPos(i, oldposx, oldposy, oldposz);
  4666. if(oldposz != 0.0)
  4667. {
  4668. if(oldposz < 600.0)
  4669. {
  4670. if(house > 10000)
  4671. {
  4672. new tmpcar = GetPlayerVehicleID(i);
  4673. 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)
  4674. {
  4675. if (GetPlayerState(i) == 2)
  4676. {
  4677. SetVehiclePos(tmpcar, HouseCarSpawns[tmpcar-1][0], HouseCarSpawns[tmpcar-1][1], HouseCarSpawns[tmpcar-1][2]);
  4678. SetVehicleZAngle(tmpcar, HouseCarSpawns[tmpcar-1][3]);
  4679. }
  4680. else
  4681. {
  4682. SetPlayerPos(i, HouseCarSpawns[tmpcar-1][0], HouseCarSpawns[tmpcar-1][1], HouseCarSpawns[tmpcar-1][2]);
  4683. }
  4684. new oldcash = gSpentCash[i];
  4685. new Total = GetPlayerMoney(i) - oldcash;
  4686. printf("Total %d = GetPlayerMoney(playerid) %d - oldcash %d",Total,GetPlayerMoney(i),oldcash);
  4687. new name[MAX_PLAYER_NAME];
  4688. GetPlayerName(i, name, sizeof(name));
  4689. format(string,128,"<< %s has left the homemodshop with $%d >>",name,Total);
  4690. PayLog(string);
  4691. gSpentCash[i] = 0;
  4692. TelePos[i][0] = 0.0;
  4693. TelePos[i][1] = 0.0;
  4694. PlayerInfo[i][pLocal] = 255;
  4695. SetPlayerInterior(i,0);
  4696. PlayerInfo[i][pInt] = 0;
  4697. Spectate[i] = 255;
  4698. }
  4699. }
  4700. if(house == 241)//City Hall
  4701. {
  4702. SetPlayerInterior(i,0);
  4703. SetPlayerPos(i,-2162.2554,-2385.9541,30.6250);
  4704. PlayerInfo[i][pInt] = 0;
  4705. PlayerInfo[i][pLocal] = 255;
  4706. }
  4707. if(house == 242)
  4708. {
  4709. SetPlayerInterior(i,0);
  4710. SetPlayerPos(i,1073.0619,-344.5148,73.9922);
  4711. PlayerInfo[i][pInt] = 0;
  4712. PlayerInfo[i][pLocal] = 255;
  4713. }
  4714. if(house >= 99 && house != 10000)
  4715. {
  4716. SetPlayerPos(i, BizzInfo[house-99][bEntranceX], BizzInfo[house-99][bEntranceY],BizzInfo[house-99][bEntranceZ]); // Warp the player
  4717. PlayerInfo[i][pLocal] = 255;
  4718. SetPlayerInterior(i,0);
  4719. PlayerInfo[i][pInt] = 0;
  4720. }
  4721. else if(house < 99 && house != 10000)
  4722. {
  4723. SetPlayerPos(i, HouseInfo[house][hEntrancex], HouseInfo[house][hEntrancey],HouseInfo[house][hEntrancez]); // Warp the player
  4724. PlayerInfo[i][pLocal] = 255;
  4725. SetPlayerInterior(i,0);
  4726. PlayerInfo[i][pInt] = 0;
  4727. }
  4728. }
  4729. }
  4730. }
  4731. if(CellTime[i] > 0)
  4732. {
  4733. if (CellTime[i] == cchargetime)
  4734. {
  4735. CellTime[i] = 1;
  4736. if(Mobile[Mobile[i]] == i)
  4737. {
  4738. CallCost[i] = CallCost[i]+callcost;
  4739. }
  4740. }
  4741. CellTime[i] = CellTime[i] +1;
  4742. if (Mobile[Mobile[i]] == 255 && CellTime[i] == 5)
  4743. {
  4744. if(IsPlayerConnected(Mobile[i]))
  4745. {
  4746. new called[MAX_PLAYER_NAME];
  4747. GetPlayerName(Mobile[i], called, sizeof(called));
  4748. format(string, sizeof(string), "* %s's phone rings.", called);
  4749. RingTone[Mobile[i]] = 10;
  4750. ProxDetector(30.0, Mobile[i], string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  4751. }
  4752. }
  4753. }
  4754. if(CellTime[i] == 0 && CallCost[i] > 0)
  4755. {
  4756. format(string, sizeof(string), "~w~The call cost~n~~r~$%d",CallCost[i]);
  4757. GivePlayerMoney(i, -CallCost[i]);
  4758. SBizzInfo[2][sbTill] += CallCost[i];
  4759. ExtortionSBiz(2, CallCost[i]);
  4760. GameTextForPlayer(i, string, 5000, 1);
  4761. CallCost[i] = 0;
  4762. }
  4763. if(TransportTime[i] > 0)
  4764. {//Taxi driver and passenger only
  4765. if(TransportTime[i] >= 16)
  4766. {
  4767. TransportTime[i] = 1;
  4768. if(TransportDriver[i] < 999)
  4769. {
  4770. if(IsPlayerConnected(TransportDriver[i]))
  4771. {
  4772. TransportCost[i] += TransportValue[TransportDriver[i]];
  4773. TransportCost[TransportDriver[i]] = TransportCost[i];
  4774. }
  4775. }
  4776. }
  4777. TransportTime[i] += 1;
  4778. format(string, sizeof(string), "~r~%d ~w~: ~g~$%d",TransportTime[i],TransportCost[i]);
  4779. GameTextForPlayer(i, string, 15000, 6);
  4780. }
  4781. }
  4782. }
  4783. return 1;
  4784. }
  4785.  
  4786. public SetPlayerUnjail()
  4787. {
  4788. new plname[MAX_PLAYER_NAME];
  4789. new string[256];
  4790. if(PaintballPlayers >= 2 && PaintballRound != 1 && StartingPaintballRound != 1)
  4791. {
  4792. StartingPaintballRound = 1;
  4793. SetTimer("PreparePaintball", 15000, 0);
  4794. }
  4795. if(KartingPlayers >= 2 && KartingRound != 1 && StartingKartRound != 1)
  4796. {
  4797. StartingKartRound = 1;
  4798. SetTimer("PrepareKarting", 15000, 0);
  4799. }
  4800. if(KartingRound != 0 && KartingPlayers < 2)
  4801. {
  4802. StartingKartRound = 0;
  4803. KartingRound = 0;
  4804. EndingKartRound = 1;
  4805. }
  4806. for(new i = 0; i < MAX_PLAYERS; i++)
  4807. {
  4808. if(IsPlayerConnected(i))
  4809. {
  4810. new newcar = GetPlayerVehicleID(i);
  4811. new level = PlayerInfo[i][pLevel];
  4812. if(level >= 0 && level <= 2) { PlayerInfo[i][pPayCheck] += 1; }
  4813. else if(level >= 3 && level <= 4) { PlayerInfo[i][pPayCheck] += 2; }
  4814. else if(level >= 5 && level <= 6) { PlayerInfo[i][pPayCheck] += 3; }
  4815. else if(level >= 7 && level <= 8) { PlayerInfo[i][pPayCheck] += 4; }
  4816. else if(level >= 9 && level <= 10) { PlayerInfo[i][pPayCheck] += 5; }
  4817. else if(level >= 11 && level <= 12) { PlayerInfo[i][pPayCheck] += 6; }
  4818. else if(level >= 13 && level <= 14) { PlayerInfo[i][pPayCheck] += 7; }
  4819. else if(level >= 15 && level <= 16) { PlayerInfo[i][pPayCheck] += 8; }
  4820. else if(level >= 17 && level <= 18) { PlayerInfo[i][pPayCheck] += 9; }
  4821. else if(level >= 19 && level <= 20) { PlayerInfo[i][pPayCheck] += 10; }
  4822. else if(level >= 21) { PlayerInfo[i][pPayCheck] += 11; }
  4823. if(PlayerInfo[i][pJailed] > 0)
  4824. {
  4825. if(PlayerInfo[i][pJailTime] > 0 && WantLawyer[i] == 0)
  4826. {
  4827. PlayerInfo[i][pJailTime]--;
  4828. }
  4829. if(PlayerInfo[i][pJailTime] <= 0 && WantLawyer[i] == 0)
  4830. {
  4831. PlayerInfo[i][pJailTime] = 0;
  4832. if(PlayerInfo[i][pJailed] == 1)
  4833. {
  4834. SetPlayerInterior(i, 6);
  4835. SetPlayerPos(i,268.0903,77.6489,1001.0391);
  4836. }
  4837. else if(PlayerInfo[i][pJailed] == 2)
  4838. {
  4839. SetPlayerWorldBounds(i,20000.0000,-20000.0000,20000.0000,-20000.0000); //Reset world to player
  4840. SetPlayerInterior(i, 0);
  4841. SetPlayerPos(i, 90.2101,1920.4854,17.9422);
  4842. }
  4843. PlayerInfo[i][pJailed] = 0;
  4844. SendClientMessage(i, COLOR_GRAD1," You have paid your debt to society.");
  4845. format(string, sizeof(string), "~g~Freedom~n~~w~Try to be a better citizen");
  4846. GameTextForPlayer(i, string, 5000, 1);
  4847. if(gTeam[i] == 4) { gTeam[i] = 3; }
  4848. ClearCrime(i);
  4849. SetPlayerToTeamColor(i);
  4850. }
  4851. }
  4852. if(GetPlayerMoney(i) - CurrentMoney[i] >= 50000 && PlayerInfo[i][pAdmin] < 1)
  4853. {
  4854. if(ConsumingMoney[i])
  4855. {
  4856. CurrentMoney[i] = GetPlayerMoney(i);
  4857. ConsumingMoney[i] = 0;
  4858. }
  4859. else
  4860. {
  4861. GetPlayerName(i, plname, sizeof(plname));
  4862. format(string, 256, "AdmWarning: [%d]%s just spawned above $50000 in one second (moneycheat), use /check on him.",i,plname);
  4863. ABroadCast(COLOR_YELLOW,string,1);
  4864. PayLog(string);
  4865. CurrentMoney[i] = GetPlayerMoney(i);
  4866. }
  4867. }
  4868. else
  4869. {
  4870. CurrentMoney[i] = GetPlayerMoney(i);
  4871. }
  4872. if(IsABoat(newcar))
  4873. {
  4874. if(PlayerInfo[i][pBoatLic] < 1 && GetPlayerState(i) == 2)
  4875. {
  4876. RemovePlayerFromVehicle(i);
  4877. }
  4878. }
  4879. else if(IsAPlane(newcar))
  4880. {
  4881. if(PlayerInfo[i][pFlyLic] < 1 && GetPlayerState(i) == 2)
  4882. {
  4883. if(TakingLesson[i] == 1) { }
  4884. else { RemovePlayerFromVehicle(i); }
  4885. }
  4886. }
  4887. else
  4888. {
  4889. if(PlayerInfo[i][pCarLic] < 1 && IsPlayerInAnyVehicle(i) && GetPlayerState(i) == 2)
  4890. {
  4891. if(TakingLesson[i] == 1) { }
  4892. else { RemovePlayerFromVehicle(i); }
  4893. }
  4894. }//Done with car check
  4895. if(UsedFind[i] >= 1)
  4896. {
  4897. UsedFind[i] += 1;
  4898. if(UsedFind[i] >= 120)
  4899. {
  4900. UsedFind[i] = 0;
  4901. }
  4902. }
  4903. if(MedicTime[i] > 0)
  4904. {
  4905. if(MedicTime[i] == 3)
  4906. {
  4907. SetPlayerInterior(i, 5);
  4908. new Float:X, Float:Y, Float:Z;
  4909. GetPlayerPos(i, X,Y,Z);
  4910. SetPlayerCameraPos(i, X + 3, Y, Z);
  4911. SetPlayerCameraLookAt(i,X,Y,Z);
  4912. }
  4913. MedicTime[i] ++;
  4914. if(MedicTime[i] >= NeedMedicTime[i])
  4915. {
  4916. new cut = deathcost; //PlayerInfo[playerid][pLevel]*deathcost;
  4917. GivePlayerMoney(i, -cut);
  4918. format(string, sizeof(string), "DOC: Your Medical Bill comes to $%d, Have a nice day.", cut);
  4919. SendClientMessage(i, TEAM_CYAN_COLOR, string);
  4920. TogglePlayerControllable(i, 1);
  4921. MedicBill[i] = 0;
  4922. MedicTime[i] = 0;
  4923. NeedMedicTime[i] = 0;
  4924. PlayerInfo[i][pDeaths] += 1;
  4925. PlayerFixRadio(i);
  4926. SpawnPlayer(i);
  4927. }
  4928. }
  4929. if(WantLawyer[i] >= 1)
  4930. {
  4931. CallLawyer[i] = 111;
  4932. if(WantLawyer[i] == 1)
  4933. {
  4934. SendClientMessage(i, COLOR_LIGHTRED, "Do you want a Lawyer? (Type yes or no)");
  4935. }
  4936. WantLawyer[i] ++;
  4937. if(WantLawyer[i] == 8)
  4938. {
  4939. SendClientMessage(i, COLOR_LIGHTRED, "Do you want a Lawyer? (Type yes or no)");
  4940. }
  4941. if(WantLawyer[i] == 15)
  4942. {
  4943. SendClientMessage(i, COLOR_LIGHTRED, "Do you want a Lawyer? (Type yes or no)");
  4944. }
  4945. if(WantLawyer[i] == 20)
  4946. {
  4947. SendClientMessage(i, COLOR_LIGHTRED, "There is no Lawyer available to you anymore, Jail Time started.");
  4948. WantLawyer[i] = 0;
  4949. CallLawyer[i] = 0;
  4950. }
  4951. }
  4952. if(TutTime[i] >= 1)
  4953. {
  4954. TutTime[i] += 1;
  4955. if(TutTime[i] == 3)
  4956. {
  4957. SendClientMessage(i, COLOR_YELLOW2, "|____ Tutorial: The beginning ____|");
  4958. SendClientMessage(i, COLOR_YELLOW2, "Hi there, i can see that you are new, so here's a quick Tutorial.");
  4959. SendClientMessage(i, COLOR_YELLOW2, "Every new players needs to know what he / she, can and can't do.");
  4960. SendClientMessage(i, COLOR_YELLOW2, "I will give your quiet some information, so please pay attention to avoid questions later on.");
  4961. }
  4962. else if(TutTime[i] == 14)
  4963. {
  4964. SendClientMessage(i, COLOR_YELLOW, "|____ Tutorial: Kind of server ____|");
  4965. }
  4966. else if(TutTime[i] == 16)
  4967. {
  4968. SendClientMessage(i, COLOR_YELLOW2, "This server is a RP server which stands for Role Playing.");
  4969. SendClientMessage(i, COLOR_YELLOW2, "We are absolutely not interested in players that just come along and Deathmatch.");
  4970. SendClientMessage(i, COLOR_YELLOW2, "The name you have also matters alot, other players are getting used to your chosen name");
  4971. SendClientMessage(i, COLOR_YELLOW2, "so it's better to have a name like for example: Oliver_Wood.");
  4972. SendClientMessage(i, COLOR_YELLOW2, "If you want to know more about how to RP, visit our forums and search for the topic.");
  4973. SendClientMessage(i, COLOR_YELLOW2, "(You can find the forum on our webpage: http://www.godfather-rp.com");
  4974. }
  4975. else if(TutTime[i] == 30)
  4976. {
  4977. SendClientMessage(i, COLOR_YELLOW, "|____ Tutorial: Requesting Help ____|");
  4978. }
  4979. else if(TutTime[i] == 32)
  4980. {
  4981. SendClientMessage(i, COLOR_YELLOW2, "If you are confused and would like to know some more information when you are ingame");
  4982. SendClientMessage(i, COLOR_YELLOW2, "simply just ask any Player or an Admin (/admins) in a common way.");
  4983. SendClientMessage(i, COLOR_YELLOW2, "Just use common lines like: Hi, could you help me a sec please?");
  4984. SendClientMessage(i, COLOR_YELLOW2, "Don't start to shout or curse at someone, because it will only make you look worse..");
  4985. SendClientMessage(i, COLOR_YELLOW2, "And you might end up banned, which you want to skip of course.");
  4986. SendClientMessage(i, COLOR_YELLOW2, "Use the commands /o (OOC) /w (Whisper) /sms (If you have the Phone Number) to talk to someone.");
  4987. }
  4988. else if(TutTime[i] == 52)
  4989. {
  4990. SendClientMessage(i, COLOR_YELLOW, "|____ Tutorial: Cheating & Abusing ____|");
  4991. }
  4992. else if(TutTime[i] == 54)
  4993. {
  4994. SendClientMessage(i, COLOR_YELLOW2, "We wish that n0beit was never made and we certainly don't allow players to use it.");
  4995. SendClientMessage(i, COLOR_YELLOW2, "Thats why we don't want YOU to cheat, or allow other players to cheat.");
  4996. SendClientMessage(i, COLOR_YELLOW2, "If you see someone cheating, please report it with /report right away.");
  4997. SendClientMessage(i, COLOR_YELLOW2, "Bug abusing, or in any other way stuff abusing is just as bad as Cheating.");
  4998. SendClientMessage(i, COLOR_YELLOW2, "So we don't want YOU to abuse aswell, simply use the /report as well if you see");
  4999. SendClientMessage(i, COLOR_YELLOW2, "someone abusing something.");
  5000. }
  5001. else if(TutTime[i] == 74)
  5002. {
  5003. SendClientMessage(i, COLOR_YELLOW, "|____ Tutorial: Respect ____|");
  5004. }
  5005. else if(TutTime[i] == 76)
  5006. {
  5007. SendClientMessage(i, COLOR_YELLOW2, "First of all I like to start with Admins, respect Admins in any way.");
  5008. SendClientMessage(i, COLOR_YELLOW2, "We are all trying to keep everyony satisfied and trying to help everyone in anyway possible.");
  5009. SendClientMessage(i, COLOR_YELLOW2, "Secondly, don't curse / shout / swear at other players, this will end you up muted / banned.");
  5010. SendClientMessage(i, COLOR_YELLOW2, "Just treat people with respect, just like you want to be respected.");
  5011. }
  5012. else if(TutTime[i] == 96)
  5013. {
  5014. SendClientMessage(i, COLOR_YELLOW, "|____ Tutorial: Drive-by ____|");
  5015. }
  5016. else if(TutTime[i] == 98)
  5017. {
  5018. SendClientMessage(i, COLOR_YELLOW2, "We don't allow Drive-by's on this server, since it's lame and simple to kill.");
  5019. SendClientMessage(i, COLOR_YELLOW2, "And it's deathmatching, which we definately don't allow.");
  5020. SendClientMessage(i, COLOR_YELLOW2, "Don't do this if you don't want yourself to get banned.");
  5021. }
  5022. else if(TutTime[i] == 108)
  5023. {
  5024. SendClientMessage(i, COLOR_YELLOW, "|____ Tutorial: Language & Advertising ____|");
  5025. }
  5026. else if(TutTime[i] == 110)
  5027. {
  5028. SendClientMessage(i, COLOR_YELLOW2, "We'd like you to use English in any chat.");
  5029. SendClientMessage(i, COLOR_YELLOW2, "If you want to talk with someone in your own Language, use the /w or /sms commands");
  5030. SendClientMessage(i, COLOR_YELLOW2, "Advertising is not allowed aswell, advertising will get you banned aswell.");
  5031. }
  5032. else if(TutTime[i] == 119)
  5033. {
  5034. SendClientMessage(i, COLOR_YELLOW, "|____ Tutorial: The End ____|");
  5035. }
  5036. else if(TutTime[i] == 121)
  5037. {
  5038. SendClientMessage(i, COLOR_YELLOW2, "So that was it, probably obvious but we still want you to remember our rules.");
  5039. SendClientMessage(i, COLOR_YELLOW2, "Just keep reminding them and have fun!");
  5040. SendClientMessage(i, COLOR_YELLOW2, "Greetings from: Role Play - The Godfather Admin Team.");
  5041. }
  5042. else if(TutTime[i] == 127)
  5043. {
  5044. TutTime[i] = 0; PlayerInfo[i][pTut] = 1;
  5045. gOoc[i] = 0; gNews[i] = 0; gFam[i] = 0;
  5046. TogglePlayerControllable(i, 1);
  5047. MedicBill[i] = 0;
  5048. SetPlayerSpawn(i);
  5049. }
  5050. }
  5051. if(PlayerTazeTime[i] >= 1)
  5052. {
  5053. PlayerTazeTime[i] += 1;
  5054. if(PlayerTazeTime[i] == 15)
  5055. {
  5056. PlayerTazeTime[i] = 0;
  5057. }
  5058. else
  5059. {
  5060. new Float:angle;
  5061. GetPlayerFacingAngle(i, angle);
  5062. SetPlayerFacingAngle(i, angle + 90);
  5063. }
  5064. }
  5065. if(PlayerDrunk[i] >= 5)
  5066. {
  5067. PlayerDrunkTime[i] += 1;
  5068. if(PlayerDrunkTime[i] == 8)
  5069. {
  5070. PlayerDrunkTime[i] = 0;
  5071. new Float:angle;
  5072. GetPlayerFacingAngle(i, angle);
  5073. if(IsPlayerInAnyVehicle(i))
  5074. {
  5075. if(GetPlayerState(i) == 2)
  5076. {
  5077. SetVehicleZAngle(GetPlayerVehicleID(i), angle + 25);
  5078. }
  5079. }
  5080. else
  5081. {
  5082. ApplyAnimation(i,"PED", "WALK_DRUNK",4.0,0,1,0,0,0);
  5083. }
  5084. }
  5085. }
  5086. if(PlayerStoned[i] >= 2)
  5087. {
  5088. PlayerStoned[i] += 1;
  5089. if(PlayerStoned[i] == 10)
  5090. {
  5091. PlayerStoned[i] = 2;
  5092. new Float:angle;
  5093. GetPlayerFacingAngle(i, angle);
  5094. if(IsPlayerInAnyVehicle(i))
  5095. {
  5096. if(GetPlayerState(i) == 2)
  5097. {
  5098. SetVehicleZAngle(GetPlayerVehicleID(i), angle + 25);
  5099. }
  5100. }
  5101. else
  5102. {
  5103. SetPlayerFacingAngle(i, angle + 90);
  5104. }
  5105. }
  5106. }
  5107. if(PlayerInfo[i][pCarTime] > 0)
  5108. {
  5109. if(PlayerInfo[i][pCarTime] <= 0)
  5110. {
  5111. PlayerInfo[i][pCarTime] = 0;
  5112. }
  5113. else
  5114. {
  5115. PlayerInfo[i][pCarTime] -= 1;
  5116. }
  5117. }
  5118. if(BoxWaitTime[i] > 0)
  5119. {
  5120. if(BoxWaitTime[i] >= BoxDelay)
  5121. {
  5122. BoxDelay = 0;
  5123. BoxWaitTime[i] = 0;
  5124. PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
  5125. GameTextForPlayer(i, "~g~Match Started", 5000, 1);
  5126. TogglePlayerControllable(i, 1);
  5127. RoundStarted = 1;
  5128. }
  5129. else
  5130. {
  5131. format(string, sizeof(string), "%d", BoxDelay - BoxWaitTime[i]);
  5132. GameTextForPlayer(i, string, 1500, 6);
  5133. BoxWaitTime[i] += 1;
  5134. }
  5135. }
  5136. if(RoundStarted > 0)
  5137. {
  5138. if(PlayerBoxing[i] > 0)
  5139. {
  5140. new trigger = 0;
  5141. new Lost = 0;
  5142. new Float:angle;
  5143. new Float:health;
  5144. GetPlayerHealth(i, health);
  5145. if(health < 12)
  5146. {
  5147. if(i == Boxer1) { Lost = 1; trigger = 1; }
  5148. else if(i == Boxer2) { Lost = 2; trigger = 1; }
  5149. }
  5150. if(health < 28) { GetPlayerFacingAngle(i, angle); SetPlayerFacingAngle(i, angle + 85); }
  5151. if(trigger)
  5152. {
  5153. new winner[MAX_PLAYER_NAME];
  5154. new loser[MAX_PLAYER_NAME];
  5155. new titel[MAX_PLAYER_NAME];
  5156. if(Lost == 1)
  5157. {
  5158. if(IsPlayerConnected(Boxer1) && IsPlayerConnected(Boxer2))
  5159. {
  5160. SetPlayerPos(Boxer1, 765.8433,3.2924,1000.7186); SetPlayerPos(Boxer2, 765.8433,3.2924,1000.7186);
  5161. SetPlayerInterior(Boxer1, 5); SetPlayerInterior(Boxer2, 5);
  5162. GetPlayerName(Boxer1, loser, sizeof(loser));
  5163. GetPlayerName(Boxer2, winner, sizeof(winner));
  5164. if(PlayerInfo[Boxer1][pJob] == 12) { PlayerInfo[Boxer1][pLoses] += 1; }
  5165. if(PlayerInfo[Boxer2][pJob] == 12) { PlayerInfo[Boxer2][pWins] += 1; }
  5166. if(TBoxer < 255)
  5167. {
  5168. if(IsPlayerConnected(TBoxer))
  5169. {
  5170. if(TBoxer != Boxer2)
  5171. {
  5172. if(PlayerInfo[Boxer2][pJob] == 10)
  5173. {
  5174. TBoxer = Boxer2;
  5175. GetPlayerName(TBoxer, titel, sizeof(titel));
  5176. new nstring[MAX_PLAYER_NAME];
  5177. format(nstring, sizeof(nstring), "%s", titel);
  5178. strmid(Titel[TitelName], nstring, 0, strlen(nstring), 255);
  5179. Titel[TitelWins] = PlayerInfo[TBoxer][pWins];
  5180. Titel[TitelLoses] = PlayerInfo[TBoxer][pLoses];
  5181. SaveBoxer();
  5182. format(string, sizeof(string), "Boxing News: %s has Won the fight against Champion %s and is now the new Boxing Champion.", titel, loser);
  5183. OOCOff(COLOR_WHITE,string);
  5184. }
  5185. else
  5186. {
  5187. SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* You would have been the Champion if you had the Boxer Job !");
  5188. }
  5189. }
  5190. else
  5191. {
  5192. GetPlayerName(TBoxer, titel, sizeof(titel));
  5193. format(string, sizeof(string), "Boxing News: Boxing Champion %s has Won the fight against %s.", titel, loser);
  5194. OOCOff(COLOR_WHITE,string);
  5195. Titel[TitelWins] = PlayerInfo[TBoxer][pWins];
  5196. Titel[TitelLoses] = PlayerInfo[Boxer2][pLoses];
  5197. SaveBoxer();
  5198. }
  5199. }
  5200. }//TBoxer
  5201. format(string, sizeof(string), "* You have Lost the Fight against %s.", winner);
  5202. SendClientMessage(Boxer1, COLOR_LIGHTBLUE, string);
  5203. GameTextForPlayer(Boxer1, "~r~You lost", 3500, 1);
  5204. format(string, sizeof(string), "* You have Won the Fight against %s.", loser);
  5205. SendClientMessage(Boxer2, COLOR_LIGHTBLUE, string);
  5206. GameTextForPlayer(Boxer2, "~r~You won", 3500, 1);
  5207. if(GetPlayerHealth(Boxer1, health) < 20)
  5208. {
  5209. SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* You feel exhausted from the Fight, go eat somewhere.");
  5210. SetPlayerHealth(Boxer1, 30.0);
  5211. }
  5212. else
  5213. {
  5214. SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* You feel perfect, even after the Fight.");
  5215. SetPlayerHealth(Boxer1, 50.0);
  5216. }
  5217. if(GetPlayerHealth(Boxer2, health) < 20)
  5218. {
  5219. SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* You feel exhausted from the Fight, go eat somewhere.");
  5220. SetPlayerHealth(Boxer2, 30.0);
  5221. }
  5222. else
  5223. {
  5224. SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* You feel perfect, even after the Fight.");
  5225. SetPlayerHealth(Boxer2, 50.0);
  5226. }
  5227. GameTextForPlayer(Boxer1, "~g~Match Over", 5000, 1); GameTextForPlayer(Boxer2, "~g~Match Over", 5000, 1);
  5228. if(PlayerInfo[Boxer2][pJob] == 10) { PlayerInfo[Boxer2][pBoxSkill] += 1; }
  5229. PlayerBoxing[Boxer1] = 0;
  5230. PlayerBoxing[Boxer2] = 0;
  5231. }
  5232. }
  5233. else if(Lost == 2)
  5234. {
  5235. if(IsPlayerConnected(Boxer1) && IsPlayerConnected(Boxer2))
  5236. {
  5237. SetPlayerPos(Boxer1, 765.8433,3.2924,1000.7186); SetPlayerPos(Boxer2, 765.8433,3.2924,1000.7186);
  5238. SetPlayerInterior(Boxer1, 5); SetPlayerInterior(Boxer2, 5);
  5239. GetPlayerName(Boxer1, winner, sizeof(winner));
  5240. GetPlayerName(Boxer2, loser, sizeof(loser));
  5241. if(PlayerInfo[Boxer2][pJob] == 10) { PlayerInfo[Boxer2][pLoses] += 1; }
  5242. if(PlayerInfo[Boxer1][pJob] == 10) { PlayerInfo[Boxer1][pWins] += 1; }
  5243. if(TBoxer < 255)
  5244. {
  5245. if(IsPlayerConnected(TBoxer))
  5246. {
  5247. if(TBoxer != Boxer1)
  5248. {
  5249. if(PlayerInfo[Boxer1][pJob] == 10)
  5250. {
  5251. TBoxer = Boxer1;
  5252. GetPlayerName(TBoxer, titel, sizeof(titel));
  5253. new nstring[MAX_PLAYER_NAME];
  5254. format(nstring, sizeof(nstring), "%s", titel);
  5255. strmid(Titel[TitelName], nstring, 0, strlen(nstring), 255);
  5256. Titel[TitelWins] = PlayerInfo[TBoxer][pWins];
  5257. Titel[TitelLoses] = PlayerInfo[TBoxer][pLoses];
  5258. SaveBoxer();
  5259. format(string, sizeof(string), "Boxing News: %s has Won the fight against Champion %s and is now the new Boxing Champion.", titel, loser);
  5260. OOCOff(COLOR_WHITE,string);
  5261. }
  5262. else
  5263. {
  5264. SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* You would have been the Champion if you had the Boxer Job !");
  5265. }
  5266. }
  5267. else
  5268. {
  5269. GetPlayerName(TBoxer, titel, sizeof(titel));
  5270. format(string, sizeof(string), "Boxing News: Boxing Champion %s has Won the fight against %s.", titel, loser);
  5271. OOCOff(COLOR_WHITE,string);
  5272. Titel[TitelWins] = PlayerInfo[TBoxer][pWins];
  5273. Titel[TitelLoses] = PlayerInfo[Boxer1][pLoses];
  5274. SaveBoxer();
  5275. }
  5276. }
  5277. }//TBoxer
  5278. format(string, sizeof(string), "* You have Lost the Fight against %s.", winner);
  5279. SendClientMessage(Boxer2, COLOR_LIGHTBLUE, string);
  5280. GameTextForPlayer(Boxer2, "~r~You lost", 3500, 1);
  5281. format(string, sizeof(string), "* You have Won the Fight against %s.", loser);
  5282. SendClientMessage(Boxer1, COLOR_LIGHTBLUE, string);
  5283. GameTextForPlayer(Boxer1, "~g~You won", 3500, 1);
  5284. if(GetPlayerHealth(Boxer1, health) < 20)
  5285. {
  5286. SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* You feel exhausted from the Fight, go eat somewhere.");
  5287. SetPlayerHealth(Boxer1, 30.0);
  5288. }
  5289. else
  5290. {
  5291. SendClientMessage(Boxer1, COLOR_LIGHTBLUE, "* You feel perfect, even after the Fight.");
  5292. SetPlayerHealth(Boxer1, 50.0);
  5293. }
  5294. if(GetPlayerHealth(Boxer2, health) < 20)
  5295. {
  5296. SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* You feel exhausted from the Fight, go eat somewhere.");
  5297. SetPlayerHealth(Boxer2, 30.0);
  5298. }
  5299. else
  5300. {
  5301. SendClientMessage(Boxer2, COLOR_LIGHTBLUE, "* You feel perfect, even after the Fight.");
  5302. SetPlayerHealth(Boxer2, 50.0);
  5303. }
  5304. GameTextForPlayer(Boxer1, "~g~Match Over", 5000, 1); GameTextForPlayer(Boxer2, "~g~Match Over", 5000, 1);
  5305. if(PlayerInfo[Boxer1][pJob] == 10) { PlayerInfo[Boxer1][pBoxSkill] += 1; }
  5306. PlayerBoxing[Boxer1] = 0;
  5307. PlayerBoxing[Boxer2] = 0;
  5308. }
  5309. }
  5310. InRing = 0;
  5311. RoundStarted = 0;
  5312. Boxer1 = 255;
  5313. Boxer2 = 255;
  5314. TBoxer = 255;
  5315. trigger = 0;
  5316. }
  5317. }
  5318. }
  5319. if(StartingPaintballRound == 1 && AnnouncedPaintballRound == 0)
  5320. {
  5321. AnnouncedPaintballRound = 1;
  5322. if(PlayerPaintballing[i] != 0)
  5323. {
  5324. SendClientMessage(i, COLOR_YELLOW, "Paintball Match will be announced in 15 seconds (For getting more Paintball players).");
  5325. }
  5326. }
  5327. if(StartingKartRound == 1 && AnnouncedKartRound == 0)
  5328. {
  5329. AnnouncedKartRound = 1;
  5330. if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
  5331. {
  5332. SendClientMessage(i, COLOR_YELLOW, "Karting Race will be announced in 15 seconds (For getting more Kart Racers).");
  5333. }
  5334. }
  5335. if(EndingKartRound == 1)
  5336. {
  5337. if(PlayerKarting[i] != 0 && PlayerInKart[i] != 0)
  5338. {
  5339. DisablePlayerCheckpoint(i);
  5340. CP[i] = 0;
  5341. }
  5342. }
  5343. if(FindTime[i] > 0)
  5344. {
  5345. 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); }
  5346. else
  5347. {
  5348. format(string, sizeof(string), "%d", FindTimePoints[i] - FindTime[i]);
  5349. GameTextForPlayer(i, string, 1500, 6);
  5350. FindTime[i] += 1;
  5351. }
  5352. }
  5353. if(TaxiCallTime[i] > 0)
  5354. {
  5355. if(TaxiAccepted[i] < 999)
  5356. {
  5357. if(IsPlayerConnected(TaxiAccepted[i]))
  5358. {
  5359. new Float:X,Float:Y,Float:Z;
  5360. GetPlayerPos(TaxiAccepted[i], X, Y, Z);
  5361. SetPlayerCheckpoint(i, X, Y, Z, 5);
  5362. }
  5363. }
  5364. }
  5365. if(BusCallTime[i] > 0)
  5366. {
  5367. if(BusAccepted[i] < 999)
  5368. {
  5369. if(IsPlayerConnected(BusAccepted[i]))
  5370. {
  5371. new Float:X,Float:Y,Float:Z;
  5372. GetPlayerPos(BusAccepted[i], X, Y, Z);
  5373. SetPlayerCheckpoint(i, X, Y, Z, 5);
  5374. }
  5375. }
  5376. }
  5377. if(MedicCallTime[i] > 0)
  5378. {
  5379. 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); }
  5380. else
  5381. {
  5382. format(string, sizeof(string), "%d", 30 - MedicCallTime[i]);
  5383. GameTextForPlayer(i, string, 1500, 6);
  5384. MedicCallTime[i] += 1;
  5385. }
  5386. }
  5387. if(MechanicCallTime[i] > 0)
  5388. {
  5389. 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); }
  5390. else
  5391. {
  5392. format(string, sizeof(string), "%d", 30 - MechanicCallTime[i]);
  5393. GameTextForPlayer(i, string, 1500, 6);
  5394. MechanicCallTime[i] += 1;
  5395. }
  5396. }
  5397. if(Robbed[i] == 1)
  5398. {
  5399. if(RobbedTime[i] <= 0)
  5400. {
  5401. RobbedTime[i] = 0;
  5402. Robbed[i] = 0;
  5403. }
  5404. else
  5405. {
  5406. RobbedTime[i] -= 1;
  5407. }
  5408. }
  5409. if(PlayerCuffed[i] == 1)
  5410. {
  5411. if(PlayerCuffedTime[i] <= 0)
  5412. {
  5413. TogglePlayerControllable(i, 1);
  5414. PlayerCuffed[i] = 0;
  5415. PlayerCuffedTime[i] = 0;
  5416. PlayerTazeTime[i] = 1;
  5417. }
  5418. else
  5419. {
  5420. PlayerCuffedTime[i] -= 1;
  5421. }
  5422. }
  5423. if(PlayerCuffed[i] == 2)
  5424. {
  5425. if(PlayerCuffedTime[i] <= 0)
  5426. {
  5427. GameTextForPlayer(i, "~r~You broke the Cuffs, you are free!", 2500, 3);
  5428. TogglePlayerControllable(i, 1);
  5429. PlayerCuffed[i] = 0;
  5430. PlayerCuffedTime[i] = 0;
  5431. }
  5432. else
  5433. {
  5434. PlayerCuffedTime[i] -= 1;
  5435. }
  5436. }
  5437. if(PlayerToPoint(20, i,2015.4500,1017.0900,996.8750))
  5438. {//Four Dragons
  5439. GameTextForPlayer(i, "~r~Closed", 5000, 1);
  5440. SetPlayerInterior(i, 0);
  5441. SetPlayerPos(i,1022.599975,-1123.699951,23.799999);
  5442. }
  5443. else if(PlayerToPoint(20, i,2233.9099,1710.7300,1011.2987))
  5444. {//Caligula
  5445. GameTextForPlayer(i, "~r~Closed", 5000, 1);
  5446. SetPlayerInterior(i, 0);
  5447. SetPlayerPos(i,1022.599975,-1123.699951,23.799999);
  5448. }
  5449. else if(PlayerToPoint(10, i,2265.7900,1619.5800,1090.4453))
  5450. {//Caligula Roof 1
  5451. GameTextForPlayer(i, "~r~Closed", 5000, 1);
  5452. SetPlayerInterior(i, 0);
  5453. SetPlayerPos(i,1022.599975,-1123.699951,23.799999);
  5454. }
  5455. else if(PlayerToPoint(10, i,2265.7800,1675.9301,1090.4453))
  5456. {//Caligula Roof 2
  5457. GameTextForPlayer(i, "~r~Closed", 5000, 1);
  5458. SetPlayerInterior(i, 0);
  5459. SetPlayerPos(i,1022.599975,-1123.699951,23.799999);
  5460. }
  5461. else if(PlayerToPoint(20, i,1133.0699,-9.5731,1000.6797))
  5462. {//West Casino place
  5463. GameTextForPlayer(i, "~r~Closed", 5000, 1);
  5464. SetPlayerInterior(i, 0);
  5465. SetPlayerPos(i,1022.599975,-1123.699951,23.799999);
  5466. }
  5467. else if(PlayerToPoint(20, i,292.0274,-36.0291,1001.5156))
  5468. {//Ammunation 1
  5469. GameTextForPlayer(i, "~r~Jailed for going to ammunation", 5000, 1);
  5470. SetPlayerInterior(i, 6);
  5471. SetPlayerPos(i,264.6288,77.5742,1001.0391);
  5472. PlayerInfo[i][pJailTime] = 300;
  5473. PlayerInfo[i][pJailed] = 1;
  5474. }
  5475. else if(PlayerToPoint(20, i,308.2740,-141.2833,999.6016))
  5476. {//Ammunation 2
  5477. GameTextForPlayer(i, "~r~Jailed for going to ammunation", 5000, 1);
  5478. SetPlayerInterior(i, 6);
  5479. SetPlayerPos(i,264.6288,77.5742,1001.0391);
  5480. PlayerInfo[i][pJailTime] = 300;
  5481. PlayerInfo[i][pJailed] = 1;
  5482. }
  5483. else if(PlayerToPoint(20, i,294.3212,-108.7869,1001.5156))
  5484. {//Ammunation 3 (small one's)
  5485. GameTextForPlayer(i, "~r~Jailed for going to ammunation", 5000, 1);
  5486. SetPlayerInterior(i, 6);
  5487. SetPlayerPos(i,264.6288,77.5742,1001.0391);
  5488. PlayerInfo[i][pJailTime] = 300;
  5489. PlayerInfo[i][pJailed] = 1;
  5490. }
  5491. else if(PlayerToPoint(20, i,288.8592,-80.4535,1001.5156))
  5492. {//Ammunation 4 (small one's)
  5493. GameTextForPlayer(i, "~r~Jailed for going to ammunation", 5000, 1);
  5494. SetPlayerInterior(i, 6);
  5495. SetPlayerPos(i,264.6288,77.5742,1001.0391);
  5496. PlayerInfo[i][pJailTime] = 300;
  5497. PlayerInfo[i][pJailed] = 1;
  5498. }
  5499. else if(PlayerToPoint(20, i,316.9583,-165.4707,999.6010))
  5500. {//Ammunation 5 (Unprotected)
  5501. GameTextForPlayer(i, "~r~Jailed for going to ammunation", 5000, 1);
  5502. SetPlayerInterior(i, 6);
  5503. SetPlayerPos(i,264.6288,77.5742,1001.0391);
  5504. PlayerInfo[i][pJailTime] = 300;
  5505. PlayerInfo[i][pJailed] = 1;
  5506. }
  5507. }
  5508. }
  5509. }
  5510.  
  5511. public CheckGas()
  5512. {
  5513. new string[256];
  5514. for(new i=0;i<MAX_PLAYERS;i++)
  5515. {
  5516. if(IsPlayerConnected(i))
  5517. {
  5518. if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
  5519. {
  5520. new vehicle = GetPlayerVehicleID(i);
  5521. if(Gas[vehicle] >= 1)
  5522. {
  5523. if(Gas[vehicle] <= 10) { PlayerPlaySound(i, 1085, 0.0, 0.0, 0.0); }
  5524. if(gGas[i] == 1) {
  5525. format(string, sizeof(string), "~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~Fuel:~w~ %d%",Gas[vehicle]);
  5526. GameTextForPlayer(i,string,15500,3); }
  5527. if(IsAPlane(vehicle) || IsABoat(vehicle)) { Gas[vehicle]++; }
  5528. Gas[vehicle]--;
  5529. }
  5530. else
  5531. {
  5532. NoFuel[i] = 1;
  5533. TogglePlayerControllable(i, 0);
  5534. GameTextForPlayer(i,"~w~~n~~n~~n~~n~~n~~n~~n~~n~No fuel in Vehicle~n~Use /exit to leave the vehicle",1500,3);
  5535. }
  5536. }
  5537. }
  5538. }
  5539. return 1;
  5540. }
  5541.  
  5542. public Fillup()
  5543. {
  5544. for(new i=0; i<MAX_PLAYERS; i++)
  5545. {
  5546. if(IsPlayerConnected(i))
  5547. {
  5548. new VID;
  5549. new FillUp;
  5550. new string[256];
  5551. VID = GetPlayerVehicleID(i);
  5552. FillUp = GasMax - Gas[VID];
  5553. if(Refueling[i] == 1)
  5554. {
  5555. if(GetPlayerMoney(i) >= FillUp+4)
  5556. {
  5557. Gas[VID] += FillUp;
  5558. FillUp = FillUp * SBizzInfo[3][sbEntranceCost];
  5559. format(string,sizeof(string),"* Vehicle filled up, for: $%d.",FillUp);
  5560. SendClientMessage(i,COLOR_LIGHTBLUE,string);
  5561. GivePlayerMoney(i, - FillUp);
  5562. SBizzInfo[3][sbTill] += FillUp;
  5563. ExtortionSBiz(3, FillUp);
  5564. Refueling[i] = 0;
  5565. }
  5566. else
  5567. {
  5568. format(string,sizeof(string),"* Not enough Money to refill, it costs $%d to fill your Vehicle.",FillUp);
  5569. SendClientMessage(i,COLOR_LIGHTBLUE,string);
  5570. }
  5571. }
  5572. }
  5573. }
  5574. return 1;
  5575. }
  5576.  
  5577. public StoppedVehicle()
  5578. {
  5579. new Float:x,Float:y,Float:z;
  5580. new Float:distance,value;
  5581. for(new i=0; i<MAX_PLAYERS; i++)
  5582. {
  5583. if(IsPlayerConnected(i))
  5584. {
  5585. if(IsPlayerInAnyVehicle(i))
  5586. {
  5587. new VID;
  5588. VID = GetPlayerVehicleID(i);
  5589. GetPlayerPos(i, x, y, z);
  5590. 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));
  5591. value = floatround(distance * 3600);
  5592. if(UpdateSeconds > 1)
  5593. {
  5594. value = floatround(value / UpdateSeconds);
  5595. }
  5596. if(SpeedMode)
  5597. {
  5598. }
  5599. if(value == 0)
  5600. {
  5601. Gas[VID]++;
  5602. }
  5603. SavePlayerPos[i][LastX] = x;
  5604. SavePlayerPos[i][LastY] = y;
  5605. SavePlayerPos[i][LastZ] = z;
  5606. }
  5607. }
  5608. }
  5609. return 1;
  5610. }
  5611.  
  5612. public SetPlayerWeapons(playerid)
  5613. {
  5614. if(IsPlayerConnected(playerid))
  5615. {
  5616. ResetPlayerWeapons(playerid);
  5617. if(PlayerInfo[playerid][pJailed] < 1)
  5618. {
  5619. if(gTeam[playerid] == 2 || IsACop(playerid))
  5620. {
  5621. GivePlayerWeapon(playerid, 41, 500); //spray
  5622. if(OnDuty[playerid] == 1 || PlayerInfo[playerid][pMember] == 2)//Cops & FBI/ATF
  5623. {
  5624. GivePlayerWeapon(playerid, 41, 500); //spray
  5625. GivePlayerWeapon(playerid, 24, 200);
  5626. GivePlayerWeapon(playerid, 3, 1);
  5627. if(PlayerInfo[playerid][pChar] == 285)//SWAT
  5628. {
  5629. GivePlayerWeapon(playerid, 25, 100);
  5630. GivePlayerWeapon(playerid, 29, 450);
  5631. }
  5632. else if(PlayerInfo[playerid][pChar] == 287)//Army
  5633. {
  5634. GivePlayerWeapon(playerid, 25, 100);
  5635. GivePlayerWeapon(playerid, 31, 500);
  5636. }
  5637. }
  5638. if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)//National Guard
  5639. {
  5640. GivePlayerWeapon(playerid, 24, 200);
  5641. GivePlayerWeapon(playerid, 31, 600);
  5642. GivePlayerWeapon(playerid, 29, 600);
  5643. }
  5644. }
  5645. if(gTeam[playerid] >= 3)
  5646. {
  5647. GivePlayerWeapon(playerid, 5, 0);
  5648. }
  5649. if(PlayerInfo[playerid][pDonateRank] > 0)
  5650. {
  5651. if (PlayerInfo[playerid][pGun1] > 0)
  5652. {
  5653. GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun1], PlayerInfo[playerid][pAmmo1]);
  5654. PlayerInfo[playerid][pGun1] = 0; PlayerInfo[playerid][pAmmo1] = 0;
  5655. }
  5656. if (PlayerInfo[playerid][pGun2] > 0)
  5657. {
  5658. GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun2], PlayerInfo[playerid][pAmmo2]);
  5659. PlayerInfo[playerid][pGun2] = 0; PlayerInfo[playerid][pAmmo2] = 0;
  5660. }
  5661. if (PlayerInfo[playerid][pGun3] > 0)
  5662. {
  5663. GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun3], PlayerInfo[playerid][pAmmo3]);
  5664. PlayerInfo[playerid][pGun3] = 0; PlayerInfo[playerid][pAmmo3] = 0;
  5665. }
  5666. if (PlayerInfo[playerid][pGun4] > 0)
  5667. {
  5668. GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun4], PlayerInfo[playerid][pAmmo4]);
  5669. PlayerInfo[playerid][pGun4] = 0; PlayerInfo[playerid][pAmmo4] = 0;
  5670. }
  5671. }
  5672. else
  5673. {
  5674. if (PlayerInfo[playerid][pGun1] > 0)
  5675. {
  5676. GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun1], PlayerInfo[playerid][pAmmo1]);
  5677. PlayerInfo[playerid][pGun1] = 0; PlayerInfo[playerid][pAmmo1] = 0;
  5678. }
  5679. if (PlayerInfo[playerid][pGun2] > 0)
  5680. {
  5681. GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun2], PlayerInfo[playerid][pAmmo2]);
  5682. PlayerInfo[playerid][pGun2] = 0; PlayerInfo[playerid][pAmmo2] = 0;
  5683. }
  5684. }
  5685. }
  5686. }
  5687. }
  5688.  
  5689. public PrintSBizInfo(playerid,targetid)
  5690. {
  5691. if(IsPlayerConnected(playerid))
  5692. {
  5693. new coordsstring[256];
  5694. SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
  5695. format(coordsstring, sizeof(coordsstring),"*** %s ***",SBizzInfo[targetid][sbMessage]);
  5696. SendClientMessage(playerid, COLOR_WHITE,coordsstring);
  5697. format(coordsstring, sizeof(coordsstring), "Locked: %d EntryFee: $%d Till: $%d", SBizzInfo[targetid][sbLocked], SBizzInfo[targetid][sbEntranceCost], SBizzInfo[targetid][sbTill]);
  5698. SendClientMessage(playerid, COLOR_GRAD1,coordsstring);
  5699. format(coordsstring, sizeof(coordsstring), "Products: %d/%d Extortion By: %s", SBizzInfo[targetid][sbProducts],SBizzInfo[targetid][sbMaxProducts],SBizzInfo[targetid][sbExtortion]);
  5700. SendClientMessage(playerid, COLOR_GRAD2,coordsstring);
  5701. SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
  5702. }
  5703. }
  5704.  
  5705. public PrintBizInfo(playerid,targetid)
  5706. {
  5707. if(IsPlayerConnected(playerid))
  5708. {
  5709. new coordsstring[256];
  5710. SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
  5711. format(coordsstring, sizeof(coordsstring),"*** %s ***",BizzInfo[targetid][bMessage]);
  5712. SendClientMessage(playerid, COLOR_WHITE,coordsstring);
  5713. format(coordsstring, sizeof(coordsstring), "Locked: %d EntryFee: $%d Till: $%d", BizzInfo[targetid][bLocked], BizzInfo[targetid][bEntranceCost], BizzInfo[targetid][bTill]);
  5714. SendClientMessage(playerid, COLOR_GRAD1,coordsstring);
  5715. format(coordsstring, sizeof(coordsstring), "Products: %d/%d Extortion By: %s", BizzInfo[targetid][bProducts],BizzInfo[targetid][bMaxProducts],BizzInfo[targetid][bExtortion]);
  5716. SendClientMessage(playerid, COLOR_GRAD2,coordsstring);
  5717. SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
  5718. }
  5719. }
  5720.  
  5721. public ShowStats(playerid,targetid)
  5722. {
  5723. if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
  5724. {
  5725. new cash = GetPlayerMoney(targetid);
  5726. new atext[20];
  5727. if(PlayerInfo[targetid][pSex] == 1) { atext = "Male"; }
  5728. else if(PlayerInfo[targetid][pSex] == 2) { atext = "Female"; }
  5729. new otext[20];
  5730. if(PlayerInfo[targetid][pOrigin] == 1) { otext = "USA"; }
  5731. else if(PlayerInfo[targetid][pOrigin] == 2) { otext = "Europe"; }
  5732. else if(PlayerInfo[targetid][pOrigin] == 3) { otext = "Asia"; }
  5733. new ttext[20];
  5734. if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4) { ttext = "Medic"; }
  5735. else if(gTeam[targetid] == 3 || gTeam[targetid] == 4) { ttext = "Civilian"; }
  5736. else if(PlayerInfo[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1) { ttext = "Officer"; }
  5737. else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2) { ttext = "FBI Agent"; }
  5738. else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3) { ttext = "National Guard"; }
  5739. else if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4) { ttext = "Firemen/Paramedic"; }
  5740. else if(PlayerInfo[targetid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5) { ttext = "LCN"; }
  5741. else if(PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6) { ttext = "Yakuza"; }
  5742. else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8) { ttext = "Hitmen"; }
  5743. else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9) { ttext = "News Reporter"; }
  5744. else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10) { ttext = "Taxi"; }
  5745. else if(PlayerInfo[targetid][pMember] == 11 || PlayerInfo[targetid][pLeader] == 11) { ttext = "School Instructor"; }
  5746. new dtext[20];
  5747. if(STDPlayer[targetid] == 1) { dtext = "Chlamydia"; }
  5748. else if(STDPlayer[targetid] == 2) { dtext = "Gonorrhea"; }
  5749. else if(STDPlayer[targetid] == 3) { dtext = "Syphilis"; }
  5750. else { dtext = "None"; }
  5751. new ftext[20];
  5752. if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4)
  5753. { ftext = "Firemen/Paramedics"; }
  5754. else if(PlayerInfo[targetid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5)
  5755. { ftext = "La Cosa Nostra"; }
  5756. else if(PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6)
  5757. { ftext = "Yakuza"; }
  5758. else if(PlayerInfo[targetid][pMember] == 11 || PlayerInfo[targetid][pLeader] == 11)
  5759. { ftext = "License Faction"; }
  5760. else
  5761. { ftext = "None"; }
  5762. new f2text[20];
  5763. if(PlayerInfo[targetid][pFMember] < 255) { f2text = FamilyInfo[PlayerInfo[targetid][pFMember]][FamilyName]; }
  5764. else { f2text = "None"; }
  5765. new rtext[64];
  5766. if(gTeam[targetid] == 5 || PlayerInfo[targetid][pFMember] < 255)//The 2 Organisations
  5767. {
  5768. if(PlayerInfo[targetid][pRank] == 1) { rtext = "Outsider"; }
  5769. else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Associate"; }
  5770. else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Soldier"; }
  5771. else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Capo"; }
  5772. else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Underboss"; }
  5773. else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Godfather"; }
  5774. else { rtext = "Outsider"; }
  5775. }
  5776. else if(PlayerInfo[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1)//PD Ranks
  5777. {
  5778. if(PlayerInfo[targetid][pRank] == 1) { rtext = "Cadet"; }
  5779. else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Officer"; }
  5780. else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Sergeant"; }
  5781. else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Lieutenant"; }
  5782. else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Captain"; }
  5783. else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Chief"; }
  5784. else { rtext = "Cadet"; }
  5785. }
  5786. else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2)//FBI Ranks
  5787. {
  5788. if(PlayerInfo[targetid][pRank] == 1) { rtext = "Professional Staff"; }
  5789. else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Special Agent Trainee"; }
  5790. else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Special Agent"; }
  5791. else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Special Agent in Charge"; }
  5792. else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Assistant Director in Charge"; }
  5793. else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Director"; }
  5794. else { rtext = "Intern"; }
  5795. }
  5796. else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3)//NG Ranks
  5797. {
  5798. if(PlayerInfo[targetid][pRank] == 1) { rtext = "Private"; }
  5799. else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Sergeant"; }
  5800. else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Major"; }
  5801. else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Captain"; }
  5802. else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Lieutenant"; }
  5803. else if(PlayerInfo[targetid][pRank] == 6) { rtext = "General"; }
  5804. else { rtext = "Private"; }
  5805. }
  5806. else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8)//Hitman Ranks
  5807. {
  5808. if(PlayerInfo[targetid][pRank] == 1) { rtext = "Freelancer"; }
  5809. else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Marksman"; }
  5810. else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Agent"; }
  5811. else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Special Agent"; }
  5812. else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Vice-Director"; }
  5813. else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Director"; }
  5814. else { rtext = "Freelancer"; }
  5815. }
  5816. else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9)//NR Ranks
  5817. {
  5818. if(PlayerInfo[targetid][pRank] == 1) { rtext = "Intern"; }
  5819. else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Local Reporter"; }
  5820. else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Local Editor"; }
  5821. else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Network Anchor"; }
  5822. else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Network Editor"; }
  5823. else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Network Producer"; }
  5824. else { rtext = "Intern"; }
  5825. }
  5826. else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10)//Taxi Company Ranks
  5827. {
  5828. if(PlayerInfo[targetid][pRank] == 1) { rtext = "Trainee"; }
  5829. else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Taxi Rookie"; }
  5830. else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Cabbie"; }
  5831. else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Dispatcher"; }
  5832. else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Shift Supervisor"; }
  5833. else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Taxi Company Owner"; }
  5834. else { rtext = "Trainee"; }
  5835. }
  5836. else if(IsAnInstructor(targetid))//Driving/Flying School Ranks
  5837. {
  5838. if(PlayerInfo[targetid][pRank] == 1) { rtext = "Trainee"; }
  5839. else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Instructor"; }
  5840. else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Senior Instructor"; }
  5841. else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Manager"; }
  5842. else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Under Boss"; }
  5843. else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Boss"; }
  5844. else { rtext = "Trainee"; }
  5845. }
  5846. else
  5847. {
  5848. rtext = "None";
  5849. }
  5850. new jtext[20];
  5851. if(PlayerInfo[targetid][pJob] == 1) { jtext = "Detective"; }
  5852. else if(PlayerInfo[targetid][pJob] == 2) { jtext = "Lawyer"; }
  5853. else if(PlayerInfo[targetid][pJob] == 3) { jtext = "Whore"; }
  5854. else if(PlayerInfo[targetid][pJob] == 4) { jtext = "Drugs Dealer"; }
  5855. else if(PlayerInfo[targetid][pJob] == 5) { jtext = "Car Jacker"; }
  5856. else if(PlayerInfo[targetid][pJob] == 6) { jtext = "News Reporter"; }
  5857. else if(PlayerInfo[targetid][pJob] == 7) { jtext = "Car Mechanic"; }
  5858. else if(PlayerInfo[targetid][pJob] == 8) { jtext = "Bodyguard"; }
  5859. else if(PlayerInfo[targetid][pJob] == 9) { jtext = "Arms Dealer"; }
  5860. else if(PlayerInfo[targetid][pJob] == 10) { jtext = "Car Dealer"; }
  5861. else if(PlayerInfo[targetid][pJob] == 12) { jtext = "Boxer"; }
  5862. else if(PlayerInfo[targetid][pJob] == 14) { jtext = "Bus Driver"; }
  5863. else if(PlayerInfo[targetid][pJob] == 15) { jtext = "Paper Boy"; }
  5864. else if(PlayerInfo[targetid][pJob] == 16) { jtext = "Trucker"; }
  5865. else { jtext = "None"; }
  5866. new drank[20];
  5867. if(PlayerInfo[targetid][pDonateRank] == 1) { drank = "Power User"; }
  5868. else if(PlayerInfo[targetid][pDonateRank] >= 2) { drank = "Donater"; }
  5869. else { drank = "None"; }
  5870. new married[20];
  5871. strmid(married, PlayerInfo[targetid][pMarriedTo], 0, strlen(PlayerInfo[targetid][pMarriedTo]), 255);
  5872. new age = PlayerInfo[targetid][pAge];
  5873. new ptime = PlayerInfo[targetid][pConnectTime];
  5874. new lotto = PlayerInfo[targetid][pLottoNr];
  5875. new deaths = PlayerInfo[targetid][pDeaths];
  5876. new fishes = PlayerInfo[targetid][pFishes];
  5877. new bigfish = PlayerInfo[targetid][pBiggestFish];
  5878. new crimes = PlayerInfo[targetid][pCrimes];
  5879. new arrests = PlayerInfo[targetid][pArrested];
  5880. new warrests = PlayerInfo[targetid][pWantedDeaths];
  5881. new drugs = PlayerInfo[targetid][pDrugs];
  5882. new mats = PlayerInfo[targetid][pMats];
  5883. new wanted = WantedLevel[targetid];
  5884. new level = PlayerInfo[targetid][pLevel];
  5885. new exp = PlayerInfo[targetid][pExp];
  5886. new kills = PlayerInfo[targetid][pKills];
  5887. new pnumber = PlayerInfo[targetid][pPnumber];
  5888. new account = PlayerInfo[targetid][pAccount];
  5889. new nxtlevel = PlayerInfo[targetid][pLevel]+1;
  5890. new expamount = nxtlevel*levelexp;
  5891. new costlevel = nxtlevel*levelcost;//10k for testing purposes
  5892. new housekey = PlayerInfo[targetid][pPhousekey];
  5893. new bizkey = PlayerInfo[targetid][pPbiskey];
  5894. new intir = PlayerInfo[targetid][pInt];
  5895. new local = PlayerInfo[targetid][pLocal];
  5896. new Float:shealth = PlayerInfo[targetid][pSHealth];
  5897. new Float:health;
  5898. new name[MAX_PLAYER_NAME];
  5899. GetPlayerName(targetid, name, sizeof(name));
  5900. GetPlayerHealth(targetid,health);
  5901. new Float:px,Float:py,Float:pz;
  5902. GetPlayerPos(targetid, px, py, pz);
  5903. new coordsstring[256];
  5904. SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
  5905. format(coordsstring, sizeof(coordsstring),"*** %s ***",name);
  5906. SendClientMessage(playerid, COLOR_WHITE,coordsstring);
  5907. 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);
  5908. SendClientMessage(playerid, COLOR_GRAD1,coordsstring);
  5909. format(coordsstring, sizeof(coordsstring), "DonateRank:[%s] MarriedTo:[%s] PlayingHours:[%d] LottoNr:[%d] Job:[%s]", drank,married,ptime,lotto,jtext);
  5910. SendClientMessage(playerid, COLOR_GRAD3,coordsstring);
  5911. format(coordsstring, sizeof(coordsstring), "FishesCaught:[%d] BiggestFish:[%d] CrimesCommited:[%d] TimesArrested:[%d] WantedDeaths:[%d]", fishes,bigfish,crimes,arrests,warrests );
  5912. SendClientMessage(playerid, COLOR_GRAD4,coordsstring);
  5913. format(coordsstring, sizeof(coordsstring), "Kills:[%d] Deaths:[%d] NextLevel:[$%d] Respect:[%d/%d] WantedLevel:[%d] Family:[%s]",kills,deaths,costlevel,exp,expamount,wanted,f2text);
  5914. SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
  5915. format(coordsstring, sizeof(coordsstring), "Drugs:[%d] Materials:[%d] Team:[%s] Disease:[%s] Organisation:[%s] Rank:[%s]",drugs,mats,ttext,dtext,ftext,rtext);
  5916. SendClientMessage(playerid, COLOR_GRAD5,coordsstring);
  5917. if (PlayerInfo[playerid][pAdmin] >= 1)
  5918. {
  5919. format(coordsstring, sizeof(coordsstring), "House key [%d] Business key [%d] HireKey [%d] int:[%d] local[%d]", housekey,bizkey,HireCar[targetid],intir,local);
  5920. SendClientMessage(playerid, COLOR_GRAD6,coordsstring);
  5921. }
  5922. SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
  5923. }
  5924. }
  5925. //---------------------------------------------------------
  5926.  
  5927. public SetPlayerToTeamColor(playerid)
  5928. {
  5929. if(IsPlayerConnected(playerid))
  5930. {
  5931. SetPlayerColor(playerid,TEAM_HIT_COLOR); // white
  5932. }
  5933. }
  5934.  
  5935. //---------------------------------------------------------
  5936.  
  5937. public GameModeInitExitFunc()
  5938. {
  5939. new string[128];
  5940. format(string, sizeof(string), "Traveling...");
  5941. for(new i = 0; i < MAX_PLAYERS; i++)
  5942. {
  5943. if(IsPlayerConnected(i))
  5944. {
  5945. DisablePlayerCheckpoint(i);
  5946. gPlayerCheckpointStatus[i] = CHECKPOINT_NONE;
  5947. GameTextForPlayer(i, string, 4000, 5);
  5948. SetPlayerCameraPos(i,1460.0, -1324.0, 287.2);
  5949. SetPlayerCameraLookAt(i,1374.5, -1291.1, 239.0);
  5950. OnPlayerUpdate(i);
  5951. gPlayerLogged[i] = 0;
  5952. }
  5953. }
  5954. SetTimer("GameModeExitFunc", 4000, 0);
  5955. return 1;
  5956. }
  5957.  
  5958. public GameModeExitFunc()
  5959. {
  5960. KillTimer(synctimer);
  5961. KillTimer(newmistimer);
  5962. KillTimer(unjailtimer);
  5963. KillTimer(othtimer);
  5964. KillTimer(cartimer);
  5965. KillTimer(accountstimer);
  5966. KillTimer(checkgastimer);
  5967. KillTimer(idletimer);
  5968. KillTimer(pickuptimer);
  5969. KillTimer(productiontimer);
  5970. KillTimer(spectatetimer);
  5971. KillTimer(stoppedvehtimer);
  5972. KillTimer(turftimer);
  5973. GameModeExit();
  5974. }
  5975.  
  5976. //------------------------------------------------------------------------------------------------------
  5977. public SaveMission(playerid,name[])
  5978. {
  5979. if(IsPlayerConnected(playerid))
  5980. {
  5981. new coordsstring[256];
  5982. new missionname[64];
  5983. new var[128];
  5984. new makername[MAX_PLAYER_NAME];
  5985. GetPlayerName(playerid, makername, sizeof(makername));
  5986. new rand = random(999);
  5987. if(rand == 0) { rand = 1; }
  5988. new number = rand;
  5989. if(MissionInfo[mToggle] == 0 || MissionInfo[mToggle] == 1) { }
  5990. else { MissionInfo[mToggle] = 1; }
  5991. format(missionname, sizeof(missionname), "%s.mis",name);
  5992. new File: hFile = fopen(missionname, io_write);
  5993. format(var, 128, "Title=%s\n", MissionInfo[mTitle]);fwrite(hFile, var);
  5994. format(var, 128, "Maker=%s\n", makername);fwrite(hFile, var);
  5995. format(var, 128, "Text1=%s\n", MissionInfo[mText1]);fwrite(hFile, var);
  5996. format(var, 128, "Text2=%s\n", MissionInfo[mText2]);fwrite(hFile, var);
  5997. format(var, 128, "Text3=%s\n", MissionInfo[mText3]);fwrite(hFile, var);
  5998. format(var, 128, "Text4=%s\n", MissionInfo[mText4]);fwrite(hFile, var);
  5999. format(var, 128, "Text5=%s\n", MissionInfo[mText5]);fwrite(hFile, var);
  6000. format(var, 128, "Text6=%s\n", MissionInfo[mText6]);fwrite(hFile, var);
  6001. format(var, 128, "Text7=%s\n", MissionInfo[mText7]);fwrite(hFile, var);
  6002. format(var, 128, "Text8=%s\n", MissionInfo[mText8]);fwrite(hFile, var);
  6003. format(var, 128, "Text9=%s\n", MissionInfo[mText9]);fwrite(hFile, var);
  6004. format(var, 128, "Text10=%s\n", MissionInfo[mText10]);fwrite(hFile, var);
  6005. format(var, 128, "Text11=%s\n", MissionInfo[mText11]);fwrite(hFile, var);
  6006. format(var, 128, "Text12=%s\n", MissionInfo[mText12]);fwrite(hFile, var);
  6007. format(var, 128, "Text13=%s\n", MissionInfo[mText13]);fwrite(hFile, var);
  6008. format(var, 128, "Text14=%s\n", MissionInfo[mText14]);fwrite(hFile, var);
  6009. format(var, 128, "Text15=%s\n", MissionInfo[mText15]);fwrite(hFile, var);
  6010. format(var, 128, "Text16=%s\n", MissionInfo[mText16]);fwrite(hFile, var);
  6011. format(var, 128, "Text17=%s\n", MissionInfo[mText17]);fwrite(hFile, var);
  6012. format(var, 128, "Text18=%s\n", MissionInfo[mText18]);fwrite(hFile, var);
  6013. format(var, 128, "GText1=%s\n", MissionInfo[mGText1]);fwrite(hFile, var);
  6014. format(var, 128, "GText2=%s\n", MissionInfo[mGText2]);fwrite(hFile, var);
  6015. format(var, 128, "GText3=%s\n", MissionInfo[mGText3]);fwrite(hFile, var);
  6016. format(var, 128, "GText4=%s\n", MissionInfo[mGText4]);fwrite(hFile, var);
  6017. format(var, 128, "GText5=%s\n", MissionInfo[mGText5]);fwrite(hFile, var);
  6018. format(var, 128, "GText6=%s\n", MissionInfo[mGText6]);fwrite(hFile, var);
  6019. format(var, 128, "CP1X=%f\n", MissionInfo[mCP1][0]);fwrite(hFile, var);
  6020. format(var, 128, "CP1Y=%f\n", MissionInfo[mCP1][1]);fwrite(hFile, var);
  6021. format(var, 128, "CP1Z=%f\n", MissionInfo[mCP1][2]);fwrite(hFile, var);
  6022. format(var, 128, "CP2X=%f\n", MissionInfo[mCP2][0]);fwrite(hFile, var);
  6023. format(var, 128, "CP2Y=%f\n", MissionInfo[mCP2][1]);fwrite(hFile, var);
  6024. format(var, 128, "CP2Z=%f\n", MissionInfo[mCP2][2]);fwrite(hFile, var);
  6025. format(var, 128, "CP3X=%f\n", MissionInfo[mCP3][0]);fwrite(hFile, var);
  6026. format(var, 128, "CP3Y=%f\n", MissionInfo[mCP3][1]);fwrite(hFile, var);
  6027. format(var, 128, "CP3Z=%f\n", MissionInfo[mCP3][2]);fwrite(hFile, var);
  6028. format(var, 128, "CP4X=%f\n", MissionInfo[mCP4][0]);fwrite(hFile, var);
  6029. format(var, 128, "CP4Y=%f\n", MissionInfo[mCP4][1]);fwrite(hFile, var);
  6030. format(var, 128, "CP4Z=%f\n", MissionInfo[mCP4][2]);fwrite(hFile, var);
  6031. format(var, 128, "CP5X=%f\n", MissionInfo[mCP5][0]);fwrite(hFile, var);
  6032. format(var, 128, "CP5Y=%f\n", MissionInfo[mCP5][1]);fwrite(hFile, var);
  6033. format(var, 128, "CP5Z=%f\n", MissionInfo[mCP5][2]);fwrite(hFile, var);
  6034. format(var, 128, "CP6X=%f\n", MissionInfo[mCP6][0]);fwrite(hFile, var);
  6035. format(var, 128, "CP6Y=%f\n", MissionInfo[mCP6][1]);fwrite(hFile, var);
  6036. format(var, 128, "CP6Z=%f\n", MissionInfo[mCP6][2]);fwrite(hFile, var);
  6037. format(var, 128, "Number=%d\n", number);fwrite(hFile, var);
  6038. format(var, 128, "Reward=%d\n", MissionInfo[mReward]);fwrite(hFile, var);
  6039. format(var, 128, "Toggle=%d\n", MissionInfo[mToggle]);fwrite(hFile, var);
  6040. fclose(hFile);
  6041. format(coordsstring, sizeof(coordsstring), "%s Mission Saved.",name);
  6042. SendClientMessage(playerid, COLOR_GREEN,coordsstring);
  6043. }
  6044. return 1;
  6045. }
  6046.  
  6047. public LoadMission(playerid,name[])
  6048. {
  6049. if(IsPlayerConnected(playerid))
  6050. {
  6051. new strFromFile2[128];
  6052. new missionname[64];
  6053. format(missionname, sizeof(missionname), "%s.mis",name);
  6054. new File: file = fopen(missionname, io_read);
  6055. if (file)
  6056. {
  6057. new key[ 256 ] , val[ 256 ];
  6058. new Data[ 256 ];
  6059. while ( fread( file , Data , sizeof( Data ) ) )
  6060. {
  6061. key = ini_GetKey( Data );
  6062. if( strcmp( key , "Title" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kTitle], val, 0, strlen(val), 255); }
  6063. if( strcmp( key , "Maker" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kMaker], val, 0, strlen(val), 255); }
  6064. if( strcmp( key , "Text1" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText1], val, 0, strlen(val), 255); }
  6065. if( strcmp( key , "Text2" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText2], val, 0, strlen(val), 255); }
  6066. if( strcmp( key , "Text3" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText3], val, 0, strlen(val), 255); }
  6067. if( strcmp( key , "Text4" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText4], val, 0, strlen(val), 255); }
  6068. if( strcmp( key , "Text5" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText5], val, 0, strlen(val), 255); }
  6069. if( strcmp( key , "Text6" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText6], val, 0, strlen(val), 255); }
  6070. if( strcmp( key , "Text7" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText7], val, 0, strlen(val), 255); }
  6071. if( strcmp( key , "Text8" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText8], val, 0, strlen(val), 255); }
  6072. if( strcmp( key , "Text9" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText9], val, 0, strlen(val), 255); }
  6073. if( strcmp( key , "Text10" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText10], val, 0, strlen(val), 255); }
  6074. if( strcmp( key , "Text11" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText11], val, 0, strlen(val), 255); }
  6075. if( strcmp( key , "Text12" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText12], val, 0, strlen(val), 255); }
  6076. if( strcmp( key , "Text13" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText13], val, 0, strlen(val), 255); }
  6077. if( strcmp( key , "Text14" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText14], val, 0, strlen(val), 255); }
  6078. if( strcmp( key , "Text15" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText15], val, 0, strlen(val), 255); }
  6079. if( strcmp( key , "Text16" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText16], val, 0, strlen(val), 255); }
  6080. if( strcmp( key , "Text17" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText17], val, 0, strlen(val), 255); }
  6081. if( strcmp( key , "Text18" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kText18], val, 0, strlen(val), 255); }
  6082. if( strcmp( key , "GText1" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kGText1], val, 0, strlen(val), 255); }
  6083. if( strcmp( key , "GText2" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kGText2], val, 0, strlen(val), 255); }
  6084. if( strcmp( key , "GText3" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kGText3], val, 0, strlen(val), 255); }
  6085. if( strcmp( key , "GText4" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kGText4], val, 0, strlen(val), 255); }
  6086. if( strcmp( key , "GText5" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kGText5], val, 0, strlen(val), 255); }
  6087. if( strcmp( key , "GText6" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayMission[kGText6], val, 0, strlen(val), 255); }
  6088. if( strcmp( key , "CP1X" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP1][0] = floatstr( val ); }
  6089. if( strcmp( key , "CP1Y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP1][1] = floatstr( val ); }
  6090. if( strcmp( key , "CP1Z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP1][2] = floatstr( val ); }
  6091. if( strcmp( key , "CP2X" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP2][0] = floatstr( val ); }
  6092. if( strcmp( key , "CP2Y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP2][1] = floatstr( val ); }
  6093. if( strcmp( key , "CP2Z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP2][2] = floatstr( val ); }
  6094. if( strcmp( key , "CP3X" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP3][0] = floatstr( val ); }
  6095. if( strcmp( key , "CP3Y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP3][1] = floatstr( val ); }
  6096. if( strcmp( key , "CP3Z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP3][2] = floatstr( val ); }
  6097. if( strcmp( key , "CP4X" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP4][0] = floatstr( val ); }
  6098. if( strcmp( key , "CP4Y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP4][1] = floatstr( val ); }
  6099. if( strcmp( key , "CP4Z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP4][2] = floatstr( val ); }
  6100. if( strcmp( key , "CP5X" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP5][0] = floatstr( val ); }
  6101. if( strcmp( key , "CP5Y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP5][1] = floatstr( val ); }
  6102. if( strcmp( key , "CP5Z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP5][2] = floatstr( val ); }
  6103. if( strcmp( key , "CP6X" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP6][0] = floatstr( val ); }
  6104. if( strcmp( key , "CP6Y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP6][1] = floatstr( val ); }
  6105. if( strcmp( key , "CP6Z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kCP6][2] = floatstr( val ); }
  6106. if( strcmp( key , "Number" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kNumber] = strval( val ); }
  6107. if( strcmp( key , "Reward" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kReward] = strval( val ); }
  6108. if( strcmp( key , "Toggle" , true ) == 0 ) { val = ini_GetValue( Data ); PlayMission[kToggle] = strval( val ); }
  6109. }
  6110. fclose(file);
  6111. format(strFromFile2, sizeof(strFromFile2), "%s Mission Loaded.",name);
  6112. SendClientMessage(playerid, COLOR_GREEN,strFromFile2);
  6113. format(strFromFile2, sizeof(strFromFile2), "Mission Available: %s, By : %s | Reward: $%d",PlayMission[kTitle],PlayMission[kMaker],PlayMission[kReward]);
  6114. SendClientMessageToAll(COLOR_GREEN, strFromFile2);
  6115. MissionPlayable = PlayMission[kNumber];
  6116. }
  6117. else
  6118. {
  6119. SendClientMessage(playerid, COLOR_GREEN,"Mission File not found.");
  6120. }
  6121. }
  6122. return 1;
  6123. }
  6124.  
  6125. public LoadBoxer()
  6126. {
  6127. new arrCoords[3][64];
  6128. new strFromFile2[256];
  6129. new File: file = fopen("boxer.ini", io_read);
  6130. if (file)
  6131. {
  6132. fread(file, strFromFile2);
  6133. split(strFromFile2, arrCoords, ',');
  6134. Titel[TitelWins] = strval(arrCoords[0]);
  6135. strmid(Titel[TitelName], arrCoords[1], 0, strlen(arrCoords[1]), 255);
  6136. Titel[TitelLoses] = strval(arrCoords[2]);
  6137. fclose(file);
  6138. }
  6139. return 1;
  6140. }
  6141.  
  6142. public SaveBoxer()
  6143. {
  6144. new coordsstring[256];
  6145. format(coordsstring, sizeof(coordsstring), "%d,%s,%d", Titel[TitelWins],Titel[TitelName],Titel[TitelLoses]);
  6146. new File: file2 = fopen("boxer.ini", io_write);
  6147. fwrite(file2, coordsstring);
  6148. fclose(file2);
  6149. return 1;
  6150. }
  6151.  
  6152. public LoadStuff()
  6153. {
  6154. new arrCoords[4][64];
  6155. new strFromFile2[256];
  6156. new File: file = fopen("stuff.ini", io_read);
  6157. if (file)
  6158. {
  6159. fread(file, strFromFile2);
  6160. split(strFromFile2, arrCoords, ',');
  6161. Jackpot = strval(arrCoords[0]);
  6162. Tax = strval(arrCoords[1]);
  6163. TaxValue = strval(arrCoords[2]);
  6164. Security = strval(arrCoords[3]);
  6165. fclose(file);
  6166. if(Security == 0 || Security == 1)
  6167. {
  6168. }
  6169. else
  6170. {
  6171. GameModeExit();
  6172. }
  6173. }
  6174. else
  6175. {
  6176. GameModeExit();
  6177. }
  6178. return 1;
  6179. }
  6180.  
  6181. public SaveStuff()
  6182. {
  6183. new coordsstring[256];
  6184. format(coordsstring, sizeof(coordsstring), "%d,%d,%d,%d", Jackpot,Tax,TaxValue,Security);
  6185. new File: file2 = fopen("stuff.ini", io_write);
  6186. fwrite(file2, coordsstring);
  6187. fclose(file2);
  6188. return 1;
  6189. }
  6190.  
  6191. public LoadIRC()
  6192. {
  6193. new arrCoords[5][64];
  6194. new strFromFile2[256];
  6195. new File: file = fopen("channels.cfg", io_read);
  6196. if (file)
  6197. {
  6198. new idx;
  6199. while (idx < sizeof(IRCInfo))
  6200. {
  6201. fread(file, strFromFile2);
  6202. split(strFromFile2, arrCoords, '|');
  6203. strmid(IRCInfo[idx][iAdmin], arrCoords[0], 0, strlen(arrCoords[0]), 255);
  6204. strmid(IRCInfo[idx][iMOTD], arrCoords[1], 0, strlen(arrCoords[1]), 255);
  6205. strmid(IRCInfo[idx][iPassword], arrCoords[2], 0, strlen(arrCoords[2]), 255);
  6206. IRCInfo[idx][iNeedPass] = strval(arrCoords[3]);
  6207. IRCInfo[idx][iLock] = strval(arrCoords[4]);
  6208. 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]);
  6209. idx++;
  6210. }
  6211. fclose(file);
  6212. }
  6213. return 1;
  6214. }
  6215.  
  6216. public SaveIRC()
  6217. {
  6218. new idx;
  6219. new File: file2;
  6220. while (idx < sizeof(IRCInfo))
  6221. {
  6222. new coordsstring[256];
  6223. format(coordsstring, sizeof(coordsstring), "%s|%s|%s|%d|%d\n",
  6224. IRCInfo[idx][iAdmin],
  6225. IRCInfo[idx][iMOTD],
  6226. IRCInfo[idx][iPassword],
  6227. IRCInfo[idx][iNeedPass],
  6228. IRCInfo[idx][iLock]);
  6229. if(idx == 0)
  6230. {
  6231. file2 = fopen("channels.cfg", io_write);
  6232. }
  6233. else
  6234. {
  6235. file2 = fopen("channels.cfg", io_append);
  6236. }
  6237. fwrite(file2, coordsstring);
  6238. idx++;
  6239. fclose(file2);
  6240. }
  6241. return 1;
  6242. }
  6243.  
  6244. public LoadTurfs()
  6245. {
  6246. new arrCoords[6][64];
  6247. new strFromFile2[256];
  6248. new File: file = fopen("turfs.cfg", io_read);
  6249. if (file)
  6250. {
  6251. new idx;
  6252. while (idx < sizeof(TurfInfo))
  6253. {
  6254. fread(file, strFromFile2);
  6255. split(strFromFile2, arrCoords, '|');
  6256. strmid(TurfInfo[idx][zOwner], arrCoords[0], 0, strlen(arrCoords[0]), 255);
  6257. strmid(TurfInfo[idx][zColor], arrCoords[1], 0, strlen(arrCoords[1]), 255);
  6258. TurfInfo[idx][zMinX] = floatstr(arrCoords[2]);
  6259. TurfInfo[idx][zMinY] = floatstr(arrCoords[3]);
  6260. TurfInfo[idx][zMaxX] = floatstr(arrCoords[4]);
  6261. TurfInfo[idx][zMaxY] = floatstr(arrCoords[5]);
  6262. //printf("Turf:%d Name: %s Owner:%s MinX:%f MinY:%f MinZ:%f MaxX:%f MaxY:%f MaxZ:%f\n",
  6263. //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]);
  6264. idx++;
  6265. }
  6266. fclose(file);
  6267. }
  6268. return 1;
  6269. }
  6270.  
  6271. public SaveTurfs()
  6272. {
  6273. new idx;
  6274. new File: file2;
  6275. while (idx < sizeof(TurfInfo))
  6276. {
  6277. new coordsstring[256];
  6278. format(coordsstring, sizeof(coordsstring), "%s|%s|%f|%f|%f|%f|%f|%f\n",
  6279. TurfInfo[idx][zOwner],
  6280. TurfInfo[idx][zColor],
  6281. TurfInfo[idx][zMinX],
  6282. TurfInfo[idx][zMinY],
  6283. TurfInfo[idx][zMaxX],
  6284. TurfInfo[idx][zMaxY]);
  6285. if(idx == 0)
  6286. {
  6287. file2 = fopen("turfs.cfg", io_write);
  6288. }
  6289. else
  6290. {
  6291. file2 = fopen("turfs.cfg", io_append);
  6292. }
  6293. fwrite(file2, coordsstring);
  6294. idx++;
  6295. fclose(file2);
  6296. }
  6297. return 1;
  6298. }
  6299.  
  6300. public LoadCK()
  6301. {
  6302. new arrCoords[3][64];
  6303. new strFromFile2[256];
  6304. new File: file = fopen("ck.cfg", io_read);
  6305. if (file)
  6306. {
  6307. new idx;
  6308. while (idx < sizeof(CKInfo))
  6309. {
  6310. fread(file, strFromFile2);
  6311. split(strFromFile2, arrCoords, '|');
  6312. strmid(CKInfo[idx][cSendername], arrCoords[0], 0, strlen(arrCoords[0]), 255);
  6313. strmid(CKInfo[idx][cGiveplayer], arrCoords[1], 0, strlen(arrCoords[1]), 255);
  6314. CKInfo[idx][cUsed] = strval(arrCoords[2]);
  6315. printf("CK:%d Taken: %d Sendername:%s Giveplayer: %s",
  6316. idx,CKInfo[idx][cUsed],CKInfo[idx][cSendername],CKInfo[idx][cGiveplayer]);
  6317. idx++;
  6318. }
  6319. fclose(file);
  6320. }
  6321. return 1;
  6322. }
  6323.  
  6324. public SaveCK()
  6325. {
  6326. new idx;
  6327. new File: file2;
  6328. while (idx < sizeof(CKInfo))
  6329. {
  6330. new coordsstring[256];
  6331. format(coordsstring, sizeof(coordsstring), "%s|%s|%d\n",
  6332. CKInfo[idx][cSendername],
  6333. CKInfo[idx][cGiveplayer],
  6334. CKInfo[idx][cUsed]);
  6335. if(idx == 0)
  6336. {
  6337. file2 = fopen("ck.cfg", io_write);
  6338. }
  6339. else
  6340. {
  6341. file2 = fopen("ck.cfg", io_append);
  6342. }
  6343. fwrite(file2, coordsstring);
  6344. idx++;
  6345. fclose(file2);
  6346. }
  6347. return 1;
  6348. }
  6349.  
  6350. public LoadFamilies()
  6351. {
  6352. new arrCoords[11][64];
  6353. new strFromFile2[256];
  6354. new File: file = fopen("families.cfg", io_read);
  6355. if (file)
  6356. {
  6357. new idx;
  6358. while (idx < sizeof(FamilyInfo))
  6359. {
  6360. fread(file, strFromFile2);
  6361. split(strFromFile2, arrCoords, '|');
  6362. FamilyInfo[idx][FamilyTaken] = strval(arrCoords[0]);
  6363. strmid(FamilyInfo[idx][FamilyName], arrCoords[1], 0, strlen(arrCoords[1]), 255);
  6364. strmid(FamilyInfo[idx][FamilyMOTD], arrCoords[2], 0, strlen(arrCoords[2]), 255);
  6365. strmid(FamilyInfo[idx][FamilyColor], arrCoords[3], 0, strlen(arrCoords[3]), 255);
  6366. strmid(FamilyInfo[idx][FamilyLeader], arrCoords[4], 0, strlen(arrCoords[4]), 255);
  6367. FamilyInfo[idx][FamilyMembers] = strval(arrCoords[5]);
  6368. FamilyInfo[idx][FamilySpawn][0] = floatstr(arrCoords[6]);
  6369. FamilyInfo[idx][FamilySpawn][1] = floatstr(arrCoords[7]);
  6370. FamilyInfo[idx][FamilySpawn][2] = floatstr(arrCoords[8]);
  6371. FamilyInfo[idx][FamilySpawn][3] = floatstr(arrCoords[9]);
  6372. FamilyInfo[idx][FamilyInterior] = strval(arrCoords[10]);
  6373. printf("Family:%d Taken: %d Name:%s MOTD:%s Leader:%s Members:%d SpawnX:%f SpawnY:%f SpawnZ:%f Int:%d",
  6374. 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]);
  6375. idx++;
  6376. }
  6377. fclose(file);
  6378. }
  6379. return 1;
  6380. }
  6381.  
  6382. public SaveFamilies()
  6383. {
  6384. new idx;
  6385. new File: file2;
  6386. while (idx < sizeof(FamilyInfo))
  6387. {
  6388. new coordsstring[256];
  6389. format(coordsstring, sizeof(coordsstring), "%d|%s|%s|%s|%s|%d|%f|%f|%f|%f|%d\n",
  6390. FamilyInfo[idx][FamilyTaken],
  6391. FamilyInfo[idx][FamilyName],
  6392. FamilyInfo[idx][FamilyMOTD],
  6393. FamilyInfo[idx][FamilyColor],
  6394. FamilyInfo[idx][FamilyLeader],
  6395. FamilyInfo[idx][FamilyMembers],
  6396. FamilyInfo[idx][FamilySpawn][0],
  6397. FamilyInfo[idx][FamilySpawn][1],
  6398. FamilyInfo[idx][FamilySpawn][2],
  6399. FamilyInfo[idx][FamilySpawn][3],
  6400. FamilyInfo[idx][FamilyInterior]);
  6401. if(idx == 0)
  6402. {
  6403. file2 = fopen("families.cfg", io_write);
  6404. }
  6405. else
  6406. {
  6407. file2 = fopen("families.cfg", io_append);
  6408. }
  6409. fwrite(file2, coordsstring);
  6410. idx++;
  6411. fclose(file2);
  6412. }
  6413. return 1;
  6414. }
  6415.  
  6416. public LoadPapers()
  6417. {
  6418. new arrCoords[11][64];
  6419. new strFromFile2[256];
  6420. new File: file = fopen("papers.cfg", io_read);
  6421. if (file)
  6422. {
  6423. new idx;
  6424. while (idx < sizeof(PaperInfo))
  6425. {
  6426. fread(file, strFromFile2);
  6427. split(strFromFile2, arrCoords, '|');
  6428. PaperInfo[idx][PaperUsed] = strval(arrCoords[0]);
  6429. strmid(PaperInfo[idx][PaperMaker], arrCoords[1], 0, strlen(arrCoords[1]), 255);
  6430. strmid(PaperInfo[idx][PaperTitle], arrCoords[2], 0, strlen(arrCoords[2]), 255);
  6431. strmid(PaperInfo[idx][PaperText1], arrCoords[3], 0, strlen(arrCoords[3]), 255);
  6432. strmid(PaperInfo[idx][PaperText2], arrCoords[4], 0, strlen(arrCoords[4]), 255);
  6433. strmid(PaperInfo[idx][PaperText3], arrCoords[5], 0, strlen(arrCoords[5]), 255);
  6434. strmid(PaperInfo[idx][PaperText4], arrCoords[6], 0, strlen(arrCoords[6]), 255);
  6435. strmid(PaperInfo[idx][PaperText5], arrCoords[7], 0, strlen(arrCoords[7]), 255);
  6436. strmid(PaperInfo[idx][PaperText6], arrCoords[8], 0, strlen(arrCoords[8]), 255);
  6437. strmid(PaperInfo[idx][PaperText7], arrCoords[9], 0, strlen(arrCoords[9]), 255);
  6438. PaperInfo[idx][SafeSaving] = strval(arrCoords[10]);
  6439. printf("Paper:%d Used: %d Maker:%s Title: %s Text1: %s Text2: %s Text3: %s Text4: %s Text5: %s Text6: %s Text7: %s",
  6440. 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]);
  6441. idx++;
  6442. }
  6443. fclose(file);
  6444. }
  6445. return 1;
  6446. }
  6447.  
  6448. public SavePapers()
  6449. {
  6450. new idx;
  6451. new File: file2;
  6452. while (idx < sizeof(IRCInfo))
  6453. {
  6454. new coordsstring[256];
  6455. format(coordsstring, sizeof(coordsstring), "%d|%s|%s|%s|%s|%s|%s|%s|%s|%s|%d\n",
  6456. PaperInfo[idx][PaperUsed],
  6457. PaperInfo[idx][PaperMaker],
  6458. PaperInfo[idx][PaperTitle],
  6459. PaperInfo[idx][PaperText1],
  6460. PaperInfo[idx][PaperText2],
  6461. PaperInfo[idx][PaperText3],
  6462. PaperInfo[idx][PaperText4],
  6463. PaperInfo[idx][PaperText5],
  6464. PaperInfo[idx][PaperText6],
  6465. PaperInfo[idx][PaperText7],
  6466. PaperInfo[idx][SafeSaving]);
  6467. if(idx == 0)
  6468. {
  6469. file2 = fopen("papers.cfg", io_write);
  6470. }
  6471. else
  6472. {
  6473. file2 = fopen("papers.cfg", io_append);
  6474. }
  6475. fwrite(file2, coordsstring);
  6476. idx++;
  6477. fclose(file2);
  6478. }
  6479. return 1;
  6480. }
  6481.  
  6482. public LoadProperty()
  6483. {
  6484. new arrCoords[29][64];
  6485. new strFromFile2[256];
  6486. new File: file = fopen("property.cfg", io_read);
  6487. if (file)
  6488. {
  6489. new idx;
  6490. while (idx < sizeof(HouseInfo))
  6491. {
  6492. fread(file, strFromFile2);
  6493. split(strFromFile2, arrCoords, ',');
  6494. HouseInfo[idx][hEntrancex] = floatstr(arrCoords[0]);
  6495. HouseInfo[idx][hEntrancey] = floatstr(arrCoords[1]);
  6496. HouseInfo[idx][hEntrancez] = floatstr(arrCoords[2]);
  6497. HouseInfo[idx][hExitx] = floatstr(arrCoords[3]);
  6498. HouseInfo[idx][hExity] = floatstr(arrCoords[4]);
  6499. HouseInfo[idx][hExitz] = floatstr(arrCoords[5]);
  6500. HouseInfo[idx][hHealthx] = strval(arrCoords[6]);
  6501. HouseInfo[idx][hHealthy] = strval(arrCoords[7]);
  6502. HouseInfo[idx][hHealthz] = strval(arrCoords[8]);
  6503. HouseInfo[idx][hArmourx] = strval(arrCoords[9]);
  6504. HouseInfo[idx][hArmoury] = strval(arrCoords[10]);
  6505. HouseInfo[idx][hArmourz] = strval(arrCoords[11]);
  6506. //printf("HouseInfo hEntrancez %f",HouseInfo[idx][hEntrancez]);
  6507. strmid(HouseInfo[idx][hOwner], arrCoords[12], 0, strlen(arrCoords[12]), 255);
  6508. strmid(HouseInfo[idx][hDiscription], arrCoords[13], 0, strlen(arrCoords[13]), 255);
  6509. HouseInfo[idx][hValue] = strval(arrCoords[14]);
  6510. HouseInfo[idx][hHel] = strval(arrCoords[15]);
  6511. HouseInfo[idx][hArm] = strval(arrCoords[16]);
  6512. HouseInfo[idx][hInt] = strval(arrCoords[17]);
  6513. HouseInfo[idx][hLock] = strval(arrCoords[18]);
  6514. HouseInfo[idx][hOwned] = strval(arrCoords[19]);
  6515. HouseInfo[idx][hRooms] = strval(arrCoords[20]);
  6516. HouseInfo[idx][hRent] = strval(arrCoords[21]);
  6517. HouseInfo[idx][hRentabil] = strval(arrCoords[22]);
  6518. HouseInfo[idx][hTakings] = strval(arrCoords[23]);
  6519. HouseInfo[idx][hVec] = strval(arrCoords[24]);
  6520. if(HouseInfo[idx][hVec] == 457)
  6521. {
  6522. HouseInfo[idx][hVec] = 411;
  6523. }
  6524. HouseInfo[idx][hVcol1] = strval(arrCoords[25]);
  6525. HouseInfo[idx][hVcol2] = strval(arrCoords[26]);
  6526. HouseInfo[idx][hDate] = strval(arrCoords[27]);
  6527. HouseInfo[idx][hLevel] = strval(arrCoords[28]);
  6528. printf("HouseInfo:%d Owner:%s hTakings %d hVec %d",idx,HouseInfo[idx][hOwner],HouseInfo[idx][hTakings],HouseInfo[idx][hVec]);
  6529. idx++;
  6530. }
  6531. fclose(file);
  6532. }
  6533. return 1;
  6534. }
  6535.  
  6536. public LoadBizz()
  6537. {
  6538. new arrCoords[19][64];
  6539. new strFromFile2[256];
  6540. new File: file = fopen("bizz.cfg", io_read);
  6541. if (file)
  6542. {
  6543. new idx;
  6544. while (idx < sizeof(BizzInfo))
  6545. {
  6546. fread(file, strFromFile2);
  6547. split(strFromFile2, arrCoords, '|');
  6548. BizzInfo[idx][bOwned] = strval(arrCoords[0]);
  6549. strmid(BizzInfo[idx][bOwner], arrCoords[1], 0, strlen(arrCoords[1]), 255);
  6550. strmid(BizzInfo[idx][bMessage], arrCoords[2], 0, strlen(arrCoords[2]), 255);
  6551. strmid(BizzInfo[idx][bExtortion], arrCoords[3], 0, strlen(arrCoords[3]), 255);
  6552. BizzInfo[idx][bEntranceX] = floatstr(arrCoords[4]);
  6553. BizzInfo[idx][bEntranceY] = floatstr(arrCoords[5]);
  6554. BizzInfo[idx][bEntranceZ] = floatstr(arrCoords[6]);
  6555. BizzInfo[idx][bExitX] = floatstr(arrCoords[7]);
  6556. BizzInfo[idx][bExitY] = floatstr(arrCoords[8]);
  6557. BizzInfo[idx][bExitZ] = floatstr(arrCoords[9]);
  6558. BizzInfo[idx][bLevelNeeded] = strval(arrCoords[10]);
  6559. BizzInfo[idx][bBuyPrice] = strval(arrCoords[11]);
  6560. BizzInfo[idx][bEntranceCost] = strval(arrCoords[12]);
  6561. BizzInfo[idx][bTill] = strval(arrCoords[13]);
  6562. BizzInfo[idx][bLocked] = strval(arrCoords[14]);
  6563. BizzInfo[idx][bInterior] = strval(arrCoords[15]);
  6564. BizzInfo[idx][bProducts] = strval(arrCoords[16]);
  6565. BizzInfo[idx][bMaxProducts] = strval(arrCoords[17]);
  6566. BizzInfo[idx][bPriceProd] = strval(arrCoords[18]);
  6567. printf("BizzInfo:%d Owner:%s Message:%s Entfee:%d Till:%d Products:%d/%d Interior:%d.\n",
  6568. idx,
  6569. BizzInfo[idx][bOwner],
  6570. BizzInfo[idx][bMessage],
  6571. BizzInfo[idx][bEntranceCost],
  6572. BizzInfo[idx][bTill],
  6573. BizzInfo[idx][bProducts],
  6574. BizzInfo[idx][bMaxProducts],
  6575. BizzInfo[idx][bInterior]);
  6576. idx++;
  6577. }
  6578. fclose(file);
  6579. }
  6580. return 1;
  6581. }
  6582.  
  6583.  
  6584. public LoadSBizz()
  6585. {
  6586. new arrCoords[16][64];
  6587. new strFromFile2[256];
  6588. new File: file = fopen("sbizz.cfg", io_read);
  6589. if (file)
  6590. {
  6591. new idx;
  6592. while (idx < sizeof(SBizzInfo))
  6593. {
  6594. fread(file, strFromFile2);
  6595. split(strFromFile2, arrCoords, '|');
  6596. SBizzInfo[idx][sbOwned] = strval(arrCoords[0]);
  6597. strmid(SBizzInfo[idx][sbOwner], arrCoords[1], 0, strlen(arrCoords[1]), 255);
  6598. strmid(SBizzInfo[idx][sbMessage], arrCoords[2], 0, strlen(arrCoords[2]), 255);
  6599. strmid(SBizzInfo[idx][sbExtortion], arrCoords[3], 0, strlen(arrCoords[3]), 255);
  6600. SBizzInfo[idx][sbEntranceX] = floatstr(arrCoords[4]);
  6601. SBizzInfo[idx][sbEntranceY] = floatstr(arrCoords[5]);
  6602. SBizzInfo[idx][sbEntranceZ] = floatstr(arrCoords[6]);
  6603. SBizzInfo[idx][sbLevelNeeded] = strval(arrCoords[7]);
  6604. SBizzInfo[idx][sbBuyPrice] = strval(arrCoords[8]);
  6605. SBizzInfo[idx][sbEntranceCost] = strval(arrCoords[9]);
  6606. SBizzInfo[idx][sbTill] = strval(arrCoords[10]);
  6607. SBizzInfo[idx][sbLocked] = strval(arrCoords[11]);
  6608. SBizzInfo[idx][sbInterior] = strval(arrCoords[12]);
  6609. SBizzInfo[idx][sbProducts] = strval(arrCoords[13]);
  6610. SBizzInfo[idx][sbMaxProducts] = strval(arrCoords[14]);
  6611. SBizzInfo[idx][sbPriceProd] = strval(arrCoords[15]);
  6612. printf("SBizzInfo:%d Owner:%s Message:%s Entfee:%d Till:%d Products:%d/%d Interior:%d.\n",
  6613. idx,
  6614. SBizzInfo[idx][sbOwner],
  6615. SBizzInfo[idx][sbMessage],
  6616. SBizzInfo[idx][sbEntranceCost],
  6617. SBizzInfo[idx][sbTill],
  6618. SBizzInfo[idx][sbProducts],
  6619. SBizzInfo[idx][sbMaxProducts],
  6620. SBizzInfo[idx][sbInterior]);
  6621. idx++;
  6622. }
  6623. fclose(file);
  6624. }
  6625. return 1;
  6626. }
  6627.  
  6628. //------------------------------------------------------------------------------------------------------
  6629. public OnGameModeInit()
  6630. {
  6631. new string[MAX_PLAYER_NAME];
  6632. new string1[MAX_PLAYER_NAME];
  6633. for(new c=0;c<CAR_AMOUNT;c++)
  6634. {
  6635. Gas[c] = GasMax;
  6636. }
  6637. LoadProperty();
  6638. LoadBizz();
  6639. LoadSBizz();
  6640. LoadBoxer();
  6641. LoadStuff();
  6642. LoadIRC();
  6643. LoadFamilies();
  6644. LoadCK();
  6645. LoadTurfs();
  6646. LoadPapers();
  6647. IRCInfo[0][iPlayers] = 0; IRCInfo[1][iPlayers] = 0; IRCInfo[2][iPlayers] = 0;
  6648. IRCInfo[3][iPlayers] = 0; IRCInfo[4][iPlayers] = 0; IRCInfo[5][iPlayers] = 0;
  6649. IRCInfo[6][iPlayers] = 0; IRCInfo[7][iPlayers] = 0; IRCInfo[8][iPlayers] = 0;
  6650. IRCInfo[9][iPlayers] = 0;
  6651. News[hTaken1] = 0; News[hTaken2] = 0; News[hTaken3] = 0; News[hTaken4] = 0; News[hTaken5] = 0;
  6652. format(string, sizeof(string), "Nothing");
  6653. strmid(News[hAdd1], string, 0, strlen(string), 255);
  6654. strmid(News[hAdd2], string, 0, strlen(string), 255);
  6655. strmid(News[hAdd3], string, 0, strlen(string), 255);
  6656. strmid(News[hAdd4], string, 0, strlen(string), 255);
  6657. strmid(News[hAdd5], string, 0, strlen(string), 255);
  6658. format(string1, sizeof(string1), "No-one");
  6659. strmid(News[hContact1], string1, 0, strlen(string1), 255);
  6660. strmid(News[hContact2], string1, 0, strlen(string1), 255);
  6661. strmid(News[hContact3], string1, 0, strlen(string1), 255);
  6662. strmid(News[hContact4], string1, 0, strlen(string1), 255);
  6663. strmid(News[hContact5], string1, 0, strlen(string1), 255);
  6664. PlayerHaul[78][pCapasity] = 100;
  6665. PlayerHaul[79][pCapasity] = 100;
  6666. PlayerHaul[80][pCapasity] = 50;
  6667. PlayerHaul[81][pCapasity] = 50;
  6668. SetGameModeText("The Godfather: LS/SF");
  6669. format(objstore, sizeof(objstore), "MOLE: I got nothing, check back with me later.");
  6670. format(cbjstore, sizeof(cbjstore), "HQ: There is nothing in your Vicinity, Out.");
  6671. format(motd, sizeof(motd), "Welcome to the Role Play - The Godfather Server.");
  6672. gettime(ghour, gminute, gsecond);
  6673. FixHour(ghour);
  6674. ghour = shifthour;
  6675. if(!realtime)
  6676. {
  6677. SetWorldTime(wtime);
  6678. }
  6679. SetPDistance(10);
  6680. EnableTirePopping(1);
  6681. EnableZoneNames(1);
  6682. AllowInteriorWeapons(1);
  6683. AllowAdminTeleport(1);
  6684. UsePlayerPedAnims();
  6685. // CreatedCars check
  6686. for(new i = 0; i < sizeof(CreatedCars); i++)
  6687. {
  6688. CreatedCars[i] = 0;
  6689. }
  6690. // Zones
  6691. for(new i = 0; i < sizeof(TurfInfo); i++)
  6692. {
  6693. Turfs[i] = GangZoneCreate(TurfInfo[i][zMinX],TurfInfo[i][zMinY],TurfInfo[i][zMaxX],TurfInfo[i][zMaxY]);
  6694. }
  6695. // Player Class's
  6696. for(new i = 0; i <= sizeof(Peds)-1; i++)
  6697. {
  6698. AddPlayerClass(Peds[i][0],1958.3783,1343.1572,1100.3746,269.1425,-1,-1,-1,-1,-1,-1);
  6699. }
  6700. // Car Spawns
  6701. for(new h = 0; h < sizeof(HouseInfo); h++)
  6702. {
  6703. AddStaticVehicleEx(HouseInfo[h][hVec], HouseCarSpawns[h][0], HouseCarSpawns[h][1], HouseCarSpawns[h][2], HouseCarSpawns[h][3], HouseInfo[h][hVcol1], HouseInfo[h][hVcol2], 60000);
  6704. gCarLock[h+1] = 1;
  6705. }//34
  6706. AddStaticVehicleEx(596,-1381.9910,457.0832,6.9837,0.1452, 44, 86, 60000);/*Patriot cruiser*/
  6707. AddStaticVehicleEx(596,1558.392000,-1710.859000,5.466783,1.0, -1, -1, 60000);/*CopCruiser*/
  6708. AddStaticVehicleEx(596,1569.639000,-1710.859000,5.466783,1.0, -1, -1, 60000);/*CopCruiser*/
  6709. AddStaticVehicleEx(596,-2139.1995,-2393.7671,30.3452,140.7012, 0, 0, 60000);/*CopCruiser*/
  6710. AddStaticVehicleEx(425,-1279.8262,493.3734,18.0309,219.1345, -1, -1, 60000);/*Hunter*/
  6711. AddStaticVehicleEx(425,-1291.0063,492.3819,18.0305,223.8306, -1, -1, 60000);/*Hunter*/
  6712. AddStaticVehicleEx(596,1601.308000,-1621.916000,13.056540,90.0, -1, -1, 60000);/*CopCruiser*/
  6713. AddStaticVehicleEx(596,1535.8275,-1678.0283,13.1680,359.9876, -1, -1, 60000);/*CopCruiser*/
  6714. AddStaticVehicleEx(596,1561.860000,-1694.905000,6.139762,222.0,-1, -1, 60000);/*CopCruiser*/
  6715. AddStaticVehicleEx(470,-1375.1555,457.5534,6.9837,359.8331,-1, -1, 60000);/*Patriot*/
  6716. AddStaticVehicleEx(467,1067.1295,-295.5681,73.7826,179.6040, 90, -1, 60000);/*Hitman Oceanic*/
  6717. AddStaticVehicleEx(467,1077.3829,-295.1148,73.7812,180.2754, 90, -1, 60000);/*Hitman Oceanic*/
  6718. AddStaticVehicleEx(596,614.8,-588.5,17.4,240.0, -1, -1, 60000);/*CopCruiser*/
  6719. AddStaticVehicleEx(596,635.1,-561.5,16.5,180.0, -1, -1, 60000);/*CopCruiser*/
  6720. AddStaticVehicleEx(596,-2177.5759,-2362.5042,30.4296,141.0939, 0, 0, 60000);/*CopCruiser*/
  6721. AddStaticVehicleEx(490,1539.392000,-1646.262000,6.274928,180.0, -1, -1, 60000);/*FBI Rancher*/
  6722. AddStaticVehicleEx(490,1531.254000,-1647.431000,6.274976,200.0, -1, -1, 60000);/*FBI Rancher*/
  6723. AddStaticVehicleEx(470,-1363.1493,457.1042,6.9836,359.6740, -1, -1, 60000);/*Patriot*/
  6724. AddStaticVehicleEx(470,-1355.5931,456.7297,6.9836,0.0286, -1, -1, 60000);/*Patriot*/
  6725. AddStaticVehicleEx(596,1535.8459,-1668.7560,13.2653,359.7447,-1, -1, 60000);/*CopCruiser*/
  6726. AddStaticVehicleEx(407,-2550.1443,610.7148,14.3281,90.6597, -1, -1, 60000);/*FireTruck*/
  6727. AddStaticVehicleEx(596,-2181.2766,-2375.6953,30.3405,231.7148, 0, 0, 60000);/*CopCruiser*/
  6728. AddStaticVehicleEx(596,1545.7845,-1684.4004,5.6342,271.1593, 89, 1, 60000);/*General Car*/
  6729. AddStaticVehicleEx(596,1530.1611,-1676.0326,5.4563,231.7766, 89, 1, 60000);/*General Car*/
  6730. AddStaticVehicleEx(407,-2551.8792,587.1581,14.3281,90.4374,-1, -1, 60000);/*FireTruck*/
  6731. AddStaticVehicleEx(497, 1517.8,-1656.1,13.7,0.0, -1, -1, 60000);/*Police Maveric*/
  6732. AddStaticVehicleEx(416,-2637.0630,617.3499,14.3281,90.1464, -1, -1, 60000);/*Ambulance*/
  6733. AddStaticVehicleEx(416,-2661.4282,617.3460,14.3288,89.2072, -1, -1, 60000);/*Ambulance*/
  6734. AddStaticVehicleEx(416,-2662.4568,595.3354,14.3281,273.2716, -1, -1, 60000);/*Ambulance*/
  6735. AddStaticVehicleEx(431,1172.5,-1795.5,13.1,0.0, -1, -1, 60000);//64/*Bus*/
  6736. AddStaticVehicleEx(431,1182.1,-1795.9,13.1,0.0, -1, -1, 60000);//65/*Bus*/
  6737. AddStaticVehicleEx(430,-1443.4342,427.0862,-0.6994,268.8489,-1, -1, 60000);/*NG BOAT*/
  6738. AddStaticVehicleEx(430,-1442.0721,390.6206,-0.4339,270.1023,-1, -1, 60000);/*NG BOAT*/
  6739. AddStaticVehicleEx(467,1071.9189,-294.9166,73.7250,178.9444,90, -1, 60000);//68/*Hitman Oceanic*/
  6740. AddStaticVehicleEx(405,-2082.3562,-117.3896,34.9299,177.0056,17, 17, 60000);//69 Driving School /*Sentinel*/
  6741. AddStaticVehicleEx(405,-2072.5933,-117.4564,34.9383,178.0982,17, 17, 60000);//Driving School/*Sentinel*/
  6742. AddStaticVehicleEx(405,-2062.4253,-117.6652,34.9347,180.8394,17, 17, 60000);//Driving School/*Sentinel*/
  6743. AddStaticVehicleEx(434,551.7929,-1285.5260,16.9303,0.4147,-1, -1, 60000);//Rent car/*Hotknife*/
  6744. AddStaticVehicleEx(568,536.9888,-1286.5275,16.9993,359.1704,-1, -1, 60000); //Rent car/*Bandito*/
  6745. AddStaticVehicleEx(434,544.1793,-1286.1422,16.9492,7.3116,-1, -1, 60000);//Rent car/*Hotknife*/
  6746. AddStaticVehicleEx(434,-1949.9493,258.1949,35.1922,70.7581,-1, -1, 60000); //Rent car/*Hotknife*/
  6747. AddStaticVehicleEx(568,-1948.1650,264.8094,35.1930,72.6982,-1, -1, 60000); //Rent car/*Bandito*/
  6748. AddStaticVehicleEx(434,-1947.0601,270.3815,35.1954,66.0783,-1, -1, 60000); //Rent car/*Hotknife*/
  6749. AddStaticVehicleEx(456,2795.2,-2417.8,13.4,90.8,-1,-1,60000);//Component Truck/*Yankee*/
  6750. AddStaticVehicleEx(456,2783.9,-2417.9,13.4,90.8,-1,-1,60000);//Component Truck/*Yankee*/
  6751. AddStaticVehicleEx(440,2794.1,-2455.9,13.4,90.8,-1,-1,60000);//Component Truck/*Rumpo*/
  6752. AddStaticVehicleEx(440,2782.9,-2455.6,13.4,90.8,-1,-1,60000);//Component Truck/*Rumpo*/
  6753. AddStaticVehicleEx(420,-1986.4958,115.9394,27.3324,0.1277,-1, -1, 60000);//Taxi/*Taxi*/
  6754. AddStaticVehicleEx(487,-2703.3201,624.0250,14.1766,180.2649, 1, 3, 60000);//Medic Chopper/*Maverick*/
  6755. AddStaticVehicleEx(420,-1986.5049,129.1749,27.3299,359.6938,-1, -1, 60000);//Taxi/*Taxi*/
  6756. AddStaticVehicleEx(420,-1986.4310,150.1195,27.3299,0.0329,-1, -1, 60000);//Taxi //CAR ID 85/*Taxi*/
  6757. AddStaticVehicleEx(452,720.1,-1694.0,-0.4,179.4,-1,-1,60000);//Fishboat/*Speeder*/
  6758. AddStaticVehicleEx(452,721.2,-1629.4,-0.4,180.9,-1,-1,60000);//Fishboat/*Speeder*/
  6759. AddStaticVehicleEx(452,739.5,-1670.5,-0.6,177.5,-1,-1,60000);//Fishboat/*Speeder*/
  6760. AddStaticVehicleEx(452,-1474.4949,693.0169,0.1996,0.0751,-1,-1,60000);//Fishboat SF/*Speeder*/
  6761. AddStaticVehicleEx(452,-1720.0717,1439.6177,-0.4913,357.6789,-1,-1,60000);//Fishboat SF/*Speeder*/
  6762. AddStaticVehicleEx(520,-1430.4078,508.1596,18.9400,269.6329,44,86,60000);//NG Plane id 91
  6763. AddStaticVehicleEx(520,-1419.9038,493.5340,18.9350,269.6848,44,86,60000);//NG Plane id 92
  6764. AddStaticVehicleEx(520,-1398.6207,507.7513,18.9328,269.8143,44,86,60000); //NG Plane id 93
  6765. AddStaticVehicleEx(420,-1986.6089,163.8508,27.4837,359.5881,-1,-1,60000);//Taxi
  6766. AddStaticVehicleEx(487,1088.1736,-294.8004,73.7886,134.9237, 0, 1, 60000); //Hitman Chopper
  6767. AddStaticVehicleEx(488,-2044.1797,479.9963,35.1399,180.0648,-1,-1,60000); // newschopper
  6768. AddStaticVehicleEx(582,-2022.6146,458.6767,35.1414,0.7133,-1,-1,60000); // newsvan
  6769. AddStaticVehicleEx(582,-2031.3779,459.0133,35.1362,359.7429,-1,-1,60000); // newsvan
  6770. AddStaticVehicleEx(593,382.5172,2536.9561,16.5338,179.7261,-1,-1,60000);//Flyschool
  6771. AddStaticVehicleEx(513,348.3660,2536.9792,16.7418,178.8195,-1,-1,60000);//Flyschool
  6772. AddStaticVehicleEx(487,365.4068,2537.0327,16.6645,181.9959,-1,-1,60000);//Flyschool
  6773. AddStaticVehicleEx(593,-1429.2843,-505.8203,13.7824,205.7709,-1,-1,60000);//Airport SF
  6774. AddStaticVehicleEx(593,-1462.4779,-524.2803,13.7832,204.8137,-1,-1,60000);//Airport SF
  6775. AddStaticVehicleEx(593,1907.7614,-2624.4097,13.5416,53.1810,-1,-1,60000);//Airport LS
  6776. AddStaticVehicleEx(593,1887.0736,-2627.6543,13.5394,52.6116,-1,-1,60000);//Airport LS
  6777. AddStaticVehicleEx(513,-1354.3270,-466.5467,13.7827,162.0134,-1,-1,60000);//Airport SF
  6778. AddStaticVehicleEx(513,-1390.3510,-482.7985,13.7883,250.3124,-1,-1,60000);//Airport SF
  6779. AddStaticVehicleEx(513,1835.3215,-2624.1938,13.5405,56.0569,-1,-1,60000);//Airport LS
  6780. AddStaticVehicleEx(513,1813.2893,-2625.6296,13.5394,53.2858,-1,-1,60000);//Airport LS
  6781. AddStaticVehicleEx(571,2286.2141,-2354.5000,12.8306,225.8705,-1,-1,60000); // kart
  6782. AddStaticVehicleEx(571,2279.9412,-2348.4141,12.8312,225.8585,-1,-1,60000); // kart
  6783. AddStaticVehicleEx(571,2291.7932,-2345.5356,12.8305,227.3060,-1,-1,60000); // kart
  6784. AddStaticVehicleEx(571,2287.5615,-2341.6433,12.8306,226.5350,-1,-1,60000); // kart
  6785. AddStaticVehicleEx(571,2299.6785,-2338.3186,12.8307,224.3563,-1,-1,60000); // kart
  6786. AddStaticVehicleEx(571,2295.3887,-2334.9448,12.8307,227.9102,-1,-1,60000); // kart
  6787. CreateVehicle(494,-1401.0436,-210.0052,1042.9913,1.6623,1,0,60000); //hotring 116
  6788. CreateVehicle(494,-1400.4019,-219.9365,1043.0348,5.3554,1,3,60000); //hotring
  6789. CreateVehicle(494,-1394.4932,-207.7917,1042.9963,3.6872,0,6,60000); //hotring
  6790. CreateVehicle(494,-1393.7854,-217.9354,1043.0325,2.9556,1,2,60000); //hotring
  6791. CreateVehicle(468,-1445.6392,-592.3033,1055.7831,90.2133,-1,-1,60000); //bike 120
  6792. CreateVehicle(468,-1433.1708,-592.4930,1055.6533,92.4067,-1,-1,60000); //bike
  6793. CreateVehicle(468,-1448.5325,-584.4943,1055.4949,95.5400,-1,-1,60000); //bike
  6794. CreateVehicle(468,-1434.8973,-585.1266,1055.2488,91.1533,-1,-1,60000); //bike
  6795. CreateVehicle(468,-1449.2814,1610.7823,1052.5313,272.9406,-1,-1,60000); // bike 124
  6796. CreateVehicle(468,-1453.8767,1611.2418,1052.5313,89.0355,-1,-1,60000); // bike
  6797. CreateVehicle(468,-1454.4746,1614.3342,1052.5313,86.8422,-1,-1,60000); // bike
  6798. CreateVehicle(468,-1449.5795,1614.0684,1052.5313,269.2039,-1,-1,60000); // bike
  6799. CreateVehicle(514,-77.5039,-1108.1729,1.6683,161.8915,-1,-1,60000); // truck
  6800. CreateVehicle(514,-72.3507,-1109.7822,1.6670,161.7769,-1,-1,60000); // truck
  6801. CreateVehicle(514,-67.0126,-1111.7156,1.6688,160.4800,-1,-1,60000); // truck
  6802. CreateVehicle(435,-51.0638,-1135.2831,1.0781,68.3320,-1,-1,60000); // trailer
  6803. CreateVehicle(435,-53.6230,-1139.7546,1.0781,67.5604,-1,-1,60000); // trailer
  6804. CreateVehicle(435,-55.0517,-1144.3676,0.8018,68.1347,-1,-1,60000); // trailer
  6805. LinkVehicleToInterior(116, 7);
  6806. LinkVehicleToInterior(117, 7);
  6807. LinkVehicleToInterior(118, 7);
  6808. LinkVehicleToInterior(119, 7);
  6809. LinkVehicleToInterior(120, 4);
  6810. LinkVehicleToInterior(121, 4);
  6811. LinkVehicleToInterior(122, 4);
  6812. LinkVehicleToInterior(123, 4);
  6813. LinkVehicleToInterior(124, 14);
  6814. LinkVehicleToInterior(125, 14);
  6815. LinkVehicleToInterior(126, 14);
  6816. LinkVehicleToInterior(127, 14);
  6817. for(new h = 0; h < sizeof(HouseInfo); h++)
  6818. {
  6819. if(HouseInfo[h][hOwned] == 0)
  6820. {
  6821. AddStaticPickup(1273, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
  6822. pickups++;
  6823. }
  6824. if(HouseInfo[h][hOwned] == 1)
  6825. {
  6826. AddStaticPickup(1239, 2, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]);
  6827. pickups++;
  6828. }
  6829. }
  6830. for(new h = 0; h < sizeof(BizzInfo); h++)
  6831. {
  6832. if(BizzInfo[h][bOwned] == 0)
  6833. {
  6834. AddStaticPickup(1272, 2, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]);
  6835. pickups++;
  6836. }
  6837. if(BizzInfo[h][bOwned] == 1)
  6838. {
  6839. AddStaticPickup(1239, 2, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]);
  6840. pickups++;
  6841. }
  6842. }
  6843. for(new h = 0; h < sizeof(SBizzInfo); h++)
  6844. {
  6845. if(SBizzInfo[h][sbOwned] == 0)
  6846. {
  6847. AddStaticPickup(1272, 2, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]);
  6848. pickups++;
  6849. }
  6850. if(SBizzInfo[h][sbOwned] == 1)
  6851. {
  6852. AddStaticPickup(1239, 2, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]);
  6853. pickups++;
  6854. }
  6855. }
  6856. AddStaticPickup(1239, 2, 1173.2563,-1323.3102,15.3943); //Hospital 1 near Ammu
  6857. AddStaticPickup(1239, 2, 2029.5945,-1404.6426,17.2512); //Hospital 2 near speedway
  6858. AddStaticPickup(1239, 2, 253.9280,69.6094,1003.6406); //Clear icon in Police Station
  6859. AddStaticPickup(1239, 2, -2162.2554,-2385.9541,30.6250); //City Hall
  6860. AddStaticPickup(1239, 2, 359.5408,206.7693,1008.3828); //Detective Registration
  6861. AddStaticPickup(1239, 2, 347.7374,193.7241,1014.1875); //Lawyer Registration
  6862. AddStaticPickup(1239, 2, 1215.1304,-11.8431,1000.9219); //Whore Registration
  6863. AddStaticPickup(1239, 2, 2166.3772,-1675.3829,15.0859); //DrugDealer Registration
  6864. AddStaticPickup(1239, 2, 1109.3318,-1796.3042,16.5938); //CarJacker Registration
  6865. AddStaticPickup(1239, 2, -2050.8962,460.0262,35.1719); //NewsReporter Registration & /paper
  6866. AddStaticPickup(1239, 2, -2040.9436,456.2395,35.1719); //PaperBoy Registration
  6867. AddStaticPickup(1239, 2, -1932.3859,276.2117,41.0391); //CarMechanic Registration
  6868. AddStaticPickup(1239, 2, 2226.1716,-1718.1792,13.5165); //BodyGuard Registration
  6869. AddStaticPickup(1239, 2, 1366.4325,-1275.2096,13.5469); //ArmsDealer Registration
  6870. AddStaticPickup(1239, 2, 531.7930,-1292.4044,17.2422); //CarDealer Registration
  6871. AddStaticPickup(1239, 2, 766.0804,14.5133,1000.7004); //Boxer Registration
  6872. AddStaticPickup(1239, 2, 1154.2208,-1770.8203,16.5992); //BusDriver Registration
  6873. AddStaticPickup(1239, 2, -77.7288,-1136.3896,1.0781); //Trucker Registration
  6874. AddStaticPickup(1239, 2, 323.0342,1118.5804,1083.8828); //Getting Drugs for DrugDealers
  6875. AddStaticPickup(1239, 2, 1381.0413,-1088.8511,27.3906); //Bill Board (old Job Department)
  6876. AddStaticPickup(1239, 2, 597.1277,-1248.6479,18.2734); //Materials Package building
  6877. AddStaticPickup(1239, 2, -2119.5469,-178.5679,35.3203); //Factory
  6878. AddStaticPickup(1239, 2, 1073.0619,-344.5148,73.9922); //Hitman Agency entrance
  6879. AddStaticPickup(371, 2, 1544.2,-1353.4,329.4); //LS towertop
  6880. AddStaticPickup(371, 2, 1536.0, -1360.0, 1150.0); //LS towertop
  6881. AddStaticPickup(1242, 2, 1527.5,-12.1,1002.0); //binco armor
  6882. AddStaticPickup(1240, 2, 279.3000,1853.5619,8.7649); //area51 health
  6883. pickups=pickups+29;
  6884. printf("Pickups Max = 100, Current Pickups = %d",pickups);
  6885. new randa = random(sizeof(RandCars));
  6886. randa = random(sizeof(RandCars));carselect[0] = RandCars[randa][0];
  6887. randa = random(sizeof(RandCars));carselect[1] = RandCars[randa][0];
  6888. randa = random(sizeof(RandCars));carselect[2] = RandCars[randa][0];
  6889. randa = random(sizeof(RandCars));carselect[3] = RandCars[randa][0];
  6890. randa = random(sizeof(RandCars));carselect[4] = RandCars[randa][0];
  6891. randa = random(sizeof(RandCars));carselect[5] = RandCars[randa][0];
  6892. randa = random(sizeof(RandCars));carselect[6] = RandCars[randa][0];
  6893. randa = random(sizeof(RandCars));carselect[7] = RandCars[randa][0];
  6894. randa = random(sizeof(RandCars));carselect[8] = RandCars[randa][0];
  6895. randa = random(sizeof(RandCars));carselect[9] = RandCars[randa][0];
  6896. randa = random(sizeof(RandCars));carselect[10] = RandCars[randa][0];
  6897. randa = random(sizeof(RandCars));carselect[11] = RandCars[randa][0];
  6898. randa = random(sizeof(RandCars));carselect[12] = RandCars[randa][0];
  6899. randa = random(sizeof(RandCars));carselect[13] = RandCars[randa][0];
  6900. randa = random(sizeof(RandLCars));carselect[14] = RandLCars[randa][0];
  6901. AddStaticVehicleEx(carselect[14], 1279.4,-1337.0,13.5,1.0,-1, -1, -1);//long
  6902. AddStaticVehicleEx(409,1248.6779,-2045.4602,59.6498,268.3867,0,0,60000); // limo LaCosaNostra
  6903. AddStaticVehicleEx(507,1242.7739,-2031.1902,59.7773,178.8082,0,0,60000); // Elegant LaCosaNostra
  6904. AddStaticVehicleEx(507,1242.9808,-2015.0297,59.7788,180.6815,0,0,60000); // Elegant LaCosaNostra
  6905. AddStaticVehicleEx(507,1275.1589,-2046.2448,58.9736,87.6114,0,0,60000); // Elegant LaCosaNostra
  6906. AddStaticVehicleEx(409,-2274.3672,646.6611,49.1778,179.9364,50,50,60000); // limo Yakuza
  6907. AddStaticVehicleEx(421,-2176.6760,636.7382,49.2387,37.7510,50,50,60000); // Washington Yakuza
  6908. AddStaticVehicleEx(421,-2247.8093,649.9500,49.1645,0.0748,50,50,60000); // Washington Yakuza
  6909. AddStaticVehicleEx(421,-2247.4382,667.7339,49.1645,359.8687,50,50,60000); // Washington Yakuza
  6910. AddStaticVehicleEx(409,-2159.6860,-2393.2295,30.5070,52.5176,1,1,60000); // limo mayor
  6911. if (realtime)
  6912. {
  6913. new tmphour;
  6914. new tmpminute;
  6915. new tmpsecond;
  6916. gettime(tmphour, tmpminute, tmpsecond);
  6917. FixHour(tmphour);
  6918. tmphour = shifthour;
  6919. SetWorldTime(tmphour);
  6920. }
  6921. synctimer = SetTimer("SyncUp", 60000, 1);
  6922. unjailtimer = SetTimer("SetPlayerUnjail", 1000, 1);
  6923. othtimer = SetTimer("OtherTimer", 1000, 1);
  6924. cartimer = SetTimer("CarCheck", 30000, 1);
  6925. pickuptimer = SetTimer("CustomPickups", 1000, 1);
  6926. spectatetimer = SetTimer("Spectator", 2000, 1);
  6927. idletimer = SetTimer("IdleKick", idletime, 1);
  6928. productiontimer = SetTimer("Production", 300000, 1); //5 mins (300000)
  6929. accountstimer = SetTimer("SaveAccounts", 1800000, 1); //30 mins every account saved
  6930. checkgastimer = SetTimer("CheckGas", RunOutTime, 1);
  6931. stoppedvehtimer = SetTimer("StoppedVehicle", RunOutTime, 1);
  6932. //for(new i = 0; i < sizeof(CarSpawns); i++)
  6933. for(new i = 0; i < 165; i++)
  6934. {
  6935. AddCar(i);
  6936. }
  6937. CarInit();
  6938. return 1;
  6939. }
  6940.  
  6941. public SyncUp()
  6942. {
  6943. SyncTime();
  6944. DollahScoreUpdate();
  6945. }
  6946.  
  6947. public SyncTime()
  6948. {
  6949. new string[64];
  6950. new tmphour;
  6951. new tmpminute;
  6952. new tmpsecond;
  6953. gettime(tmphour, tmpminute, tmpsecond);
  6954. FixHour(tmphour);
  6955. tmphour = shifthour;
  6956. if ((tmphour > ghour) || (tmphour == 0 && ghour == 23))
  6957. {
  6958. format(string, sizeof(string), "SERVER: The time is now %d:00 hours",tmphour);
  6959. BroadCast(COLOR_WHITE,string);
  6960. ghour = tmphour;
  6961. PayDay();
  6962. if (realtime)
  6963. {
  6964. SetWorldTime(tmphour);
  6965. }
  6966. }
  6967. }
  6968.  
  6969. public SaveAccounts()
  6970. {
  6971. for(new i = 0; i < MAX_PLAYERS; i++)
  6972. {
  6973. if(IsPlayerConnected(i))
  6974. {
  6975. OnPlayerUpdate(i);
  6976. if(PlayerInfo[i][pJob] > 0)
  6977. {
  6978. if(PlayerInfo[i][pContractTime] < 25)
  6979. {
  6980. PlayerInfo[i][pContractTime] ++;
  6981. }
  6982. }
  6983. }
  6984. }
  6985. }
  6986.  
  6987. public IsPlayerInTurf(playerid, turfid)
  6988. {
  6989. if(IsPlayerConnected(playerid))
  6990. {
  6991. if(turfid == -1)
  6992. {
  6993. return 0;
  6994. }
  6995. new Float:x, Float:y, Float:z;
  6996. GetPlayerPos(playerid,x,y,z);
  6997. if(x >= TurfInfo[turfid][zMinX] && x < TurfInfo[turfid][zMaxX] && y >= TurfInfo[turfid][zMinY] && y < TurfInfo[turfid][zMaxY])
  6998. {
  6999. return 1;
  7000. }
  7001. }
  7002. return 0;
  7003. }
  7004.  
  7005. public GetClosestPlayer(p1)
  7006. {
  7007. new x,Float:dis,Float:dis2,player;
  7008. player = -1;
  7009. dis = 99999.99;
  7010. for (x=0;x<MAX_PLAYERS;x++)
  7011. {
  7012. if(IsPlayerConnected(x))
  7013. {
  7014. if(x != p1)
  7015. {
  7016. dis2 = GetDistanceBetweenPlayers(x,p1);
  7017. if(dis2 < dis && dis2 != -1.00)
  7018. {
  7019. dis = dis2;
  7020. player = x;
  7021. }
  7022. }
  7023. }
  7024. }
  7025. return player;
  7026. }
  7027.  
  7028. public Production()
  7029. {
  7030. new string[256];
  7031. for(new i = 0; i < MAX_PLAYERS; i++)
  7032. {
  7033. if(IsPlayerConnected(i))
  7034. {
  7035. if(PlayerInfo[i][pFishes] >= 5) { if(FishCount[i] >= 3) { PlayerInfo[i][pFishes] = 0; } else { FishCount[i] += 1; } }
  7036. if(PlayerDrunk[i] > 0) { PlayerDrunk[i] = 0; PlayerDrunkTime[i] = 0; GameTextForPlayer(i, "~p~Drunk effect~n~~w~Gone", 3500, 1); }
  7037. if(PlayerInfo[i][pPayDay] < 6) { PlayerInfo[i][pPayDay] += 1; } //+ 5 min to PayDay anti-abuse
  7038. for(new k = 0; k < MAX_PLAYERS; k++)
  7039. {
  7040. if(IsPlayerConnected(k))
  7041. {
  7042. if(gTeam[k] == 2 && CrimInRange(80.0, i,k))
  7043. {
  7044. }
  7045. else
  7046. {
  7047. WantedPoints[i] -= 3;
  7048. if(WantedPoints[i] < 0) { WantedPoints[i] = 0; }
  7049. new points = WantedPoints[i];
  7050. new wlevel;
  7051. if(points > 0)
  7052. {
  7053. new yesno;
  7054. if(points == 3) { if(WantedLevel[i] != 1) { WantedLevel[i] = 1; wlevel = 1; yesno = 1; } }
  7055. else if(points >= 4 && points <= 5) { if(WantedLevel[i] != 2) { WantedLevel[i] = 2; wlevel = 2; yesno = 1; } }
  7056. else if(points >= 6 && points <= 7) { if(WantedLevel[i] != 3) { WantedLevel[i] = 3; wlevel = 3; yesno = 1; } }
  7057. else if(points >= 8 && points <= 9) { if(WantedLevel[i] != 4) { WantedLevel[i] = 4; wlevel = 4; yesno = 1; } }
  7058. else if(points >= 10 && points <= 11) { if(WantedLevel[i] != 5) { WantedLevel[i] = 5; wlevel = 5; yesno = 1; } }
  7059. else if(points >= 12 && points <= 13) { if(WantedLevel[i] != 6) { WantedLevel[i] = 6; wlevel = 6; yesno = 1; } }
  7060. else if(points >= 14) { if(WantedLevel[i] != 10) { WantedLevel[i] = 10; wlevel = 10; yesno = 1; } }
  7061. else if(points <= 0) { if(WantedLevel[i] != 0) { ClearCrime(i); WantedLevel[i] = 0; wlevel = 0; yesno = 1;} }
  7062. if(yesno)
  7063. {
  7064. format(string, sizeof(string), "Current Wanted Level: %d", wlevel);
  7065. SendClientMessage(i, COLOR_YELLOW, string);
  7066. }
  7067. }
  7068. }
  7069. }
  7070. }
  7071. }
  7072. }
  7073. }
  7074.  
  7075. public DateProp(playerid)
  7076. {
  7077. new playername[MAX_PLAYER_NAME];
  7078. GetPlayerName(playerid, playername, sizeof(playername));
  7079. new curdate = getdate();
  7080. for(new h = 0; h < sizeof(HouseInfo); h++)
  7081. {
  7082. if (strcmp(playername, HouseInfo[h][hOwner], true) == 0)
  7083. {
  7084. HouseInfo[h][hDate] = curdate;
  7085. OnPropUpdate();
  7086. }
  7087. }
  7088. return 1;
  7089. }
  7090.  
  7091. public Checkprop()
  7092. {
  7093. new olddate;
  7094. new string[256];
  7095. new curdate = getdate();
  7096. for(new h = 0; h < sizeof(HouseInfo); h++)
  7097. {
  7098. if(HouseInfo[h][hOwned] == 1 && HouseInfo[h][hDate] > 9)
  7099. {
  7100. olddate = HouseInfo[h][hDate];
  7101. if(curdate-olddate >= 5)
  7102. {
  7103. HouseInfo[h][hHel] = 0;
  7104. HouseInfo[h][hArm] = 0;
  7105. HouseInfo[h][hHealthx] = 0;
  7106. HouseInfo[h][hHealthy] = 0;
  7107. HouseInfo[h][hHealthz] = 0;
  7108. HouseInfo[h][hArmourx] = 0;
  7109. HouseInfo[h][hArmoury] = 0;
  7110. HouseInfo[h][hArmourz] = 0;
  7111. HouseInfo[h][hLock] = 1;
  7112. HouseInfo[h][hOwned] = 0;
  7113. HouseInfo[h][hVec] = 418;
  7114. HouseInfo[h][hVcol1] = -1;
  7115. HouseInfo[h][hVcol2] = -1;
  7116. strmid(HouseInfo[h][hOwner], "The State", 0, strlen("The State"), 255);
  7117. format(string, sizeof(string), "REAL ESTATE: A House is available at a value of $%d",HouseInfo[h][hValue]);
  7118. SendClientMessageToAll(TEAM_BALLAS_COLOR, string);
  7119. OnPropUpdate();
  7120. }
  7121. }
  7122. }
  7123. return 1;
  7124. }
  7125.  
  7126. public PayDay()
  7127. {
  7128. new string[128];
  7129. new account,interest;
  7130. new rent = 0;
  7131. for(new i = 0; i < MAX_PLAYERS; i++)
  7132. {
  7133. if(IsPlayerConnected(i))
  7134. {
  7135. if(PlayerInfo[i][pLevel] > 0)
  7136. {
  7137. if(MoneyMessage[i]==1)
  7138. {
  7139. SendClientMessage(i, COLOR_LIGHTRED, "You failed to pay your debt, Jail time.");
  7140. GameTextForPlayer(i, "~r~Busted!", 2000, 1);
  7141. SetPlayerInterior(i, 6);
  7142. SetPlayerPos(i, 264.6288,77.5742,1001.0391);
  7143. PlayerInfo[i][pJailed] = 1;
  7144. ResetPlayerWeapons(i);
  7145. WantedPoints[i] = 0;
  7146. PlayerInfo[i][pJailTime] = 240;
  7147. format(string, sizeof(string), "You are jailed for %d seconds. Bail: Unable", PlayerInfo[i][pJailTime]);
  7148. SendClientMessage(i, COLOR_LIGHTBLUE, string);
  7149. }
  7150. new playername2[MAX_PLAYER_NAME];
  7151. GetPlayerName(i, playername2, sizeof(playername2));
  7152. account = PlayerInfo[i][pAccount];
  7153. new key = PlayerInfo[i][pPhousekey];
  7154. if(key != 255)
  7155. {
  7156. rent = HouseInfo[key][hRent];
  7157. if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
  7158. {
  7159. rent = 0;
  7160. }
  7161. else if(rent > GetPlayerMoney(i))
  7162. {
  7163. PlayerInfo[i][pPhousekey] = 255;
  7164. SendClientMessage(i, COLOR_WHITE, "You have been evicted.");
  7165. rent = 0;
  7166. }
  7167. HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
  7168. }
  7169. new tmpintrate;
  7170. if (key != 255 && strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
  7171. {
  7172. if(PlayerInfo[i][pDonateRank] > 0) { tmpintrate = intrate+4; }
  7173. else { tmpintrate = intrate+2; }//HouseInfo[key][hLevel]
  7174. }
  7175. else
  7176. {
  7177. if(PlayerInfo[i][pDonateRank] > 0) { tmpintrate = 3; }
  7178. else { tmpintrate = 1; }
  7179. }
  7180. if(PlayerInfo[i][pPayDay] >= 5)
  7181. {
  7182. Tax += TaxValue;//Should work for every player online
  7183. PlayerInfo[i][pAccount] -= TaxValue;
  7184. if(PlayerInfo[i][pDonateRank] > 0)
  7185. {
  7186. new bonus = PlayerInfo[i][pPayCheck] / 2;
  7187. PlayerInfo[i][pPayCheck] += bonus;
  7188. }
  7189. new checks = PlayerInfo[i][pPayCheck];
  7190. new ebill = (PlayerInfo[i][pAccount]/10000)*(PlayerInfo[i][pLevel]);
  7191. ConsumingMoney[i] = 1;
  7192. GivePlayerMoney(i, checks);
  7193. if(PlayerInfo[i][pAccount] > 0)
  7194. {
  7195. PlayerInfo[i][pAccount] -= ebill;
  7196. SBizzInfo[4][sbTill] += ebill;
  7197. }
  7198. else
  7199. {
  7200. ebill = 0;
  7201. }
  7202. interest = (PlayerInfo[i][pAccount]/1000)*(tmpintrate);
  7203. PlayerInfo[i][pExp]++;
  7204. PlayerPlayMusic(i);
  7205. PlayerInfo[i][pAccount] = account+interest;
  7206. SendClientMessage(i, COLOR_WHITE, "|___ BANK STATMENT ___|");
  7207. format(string, sizeof(string), " Paycheck: $%d Tax Money: -$%d", checks, TaxValue);
  7208. SendClientMessage(i, COLOR_GRAD1, string);
  7209. if(PlayerInfo[i][pPhousekey] != 255 || PlayerInfo[i][pPbiskey] != 255)
  7210. {
  7211. format(string, sizeof(string), " Electricity Bill: -$%d", ebill);
  7212. SendClientMessage(i, COLOR_GRAD1, string);
  7213. }
  7214. format(string, sizeof(string), " Balance: $%d", account);
  7215. SendClientMessage(i, COLOR_GRAD1, string);
  7216. format(string, sizeof(string), " Interest Rate: 0.%d percent",tmpintrate);
  7217. SendClientMessage(i, COLOR_GRAD2, string);
  7218. format(string, sizeof(string), " Interest Gained $%d", interest);
  7219. SendClientMessage(i, COLOR_GRAD3, string);
  7220. SendClientMessage(i, COLOR_GRAD4, "|--------------------------------------|");
  7221. format(string, sizeof(string), " New Balance: $%d", PlayerInfo[i][pAccount]);
  7222. SendClientMessage(i, COLOR_GRAD5, string);
  7223. format(string, sizeof(string), " Rent: -$%d", rent);
  7224. SendClientMessage(i, COLOR_GRAD5, string);
  7225. format(string, sizeof(string), "~y~PayDay~n~~w~Paycheck");
  7226. GameTextForPlayer(i, string, 5000, 1);
  7227. rent = 0;
  7228. PlayerInfo[i][pPayDay] = 0;
  7229. PlayerInfo[i][pPayCheck] = 0;
  7230. PlayerInfo[i][pConnectTime] += 1;
  7231. if(PlayerInfo[i][pDonateRank] > 0)
  7232. {
  7233. PlayerInfo[i][pPayDayHad] += 1;
  7234. if(PlayerInfo[i][pPayDayHad] >= 5)
  7235. {
  7236. PlayerInfo[i][pExp]++;
  7237. PlayerInfo[i][pPayDayHad] = 0;
  7238. }
  7239. }
  7240. }
  7241. else
  7242. {
  7243. SendClientMessage(i, COLOR_LIGHTRED, "* You haven't played long enough to obtain a PayDay.");
  7244. }
  7245. }
  7246. }
  7247. }
  7248. Checkprop();
  7249. return 1;
  7250. }
  7251.  
  7252. strtok(const string[], &index)
  7253. {
  7254. new length = strlen(string);
  7255. while ((index < length) && (string[index] <= ' '))
  7256. {
  7257. index++;
  7258. }
  7259.  
  7260. new offset = index;
  7261. new result[20];
  7262. while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  7263. {
  7264. result[index - offset] = string[index];
  7265. index++;
  7266. }
  7267. result[index - offset] = EOS;
  7268. return result;
  7269. }
  7270.  
  7271. public split(const strsrc[], strdest[][], delimiter)
  7272. {
  7273. new i, li;
  7274. new aNum;
  7275. new len;
  7276. while(i <= strlen(strsrc)){
  7277. if(strsrc[i]==delimiter || i==strlen(strsrc)){
  7278. len = strmid(strdest[aNum], strsrc, li, i, 128);
  7279. strdest[aNum][len] = 0;
  7280. li = i+1;
  7281. aNum++;
  7282. }
  7283. i++;
  7284. }
  7285. return 1;
  7286. }
  7287.  
  7288. public OnPlayerUpdate(playerid)
  7289. {
  7290. if(IsPlayerConnected(playerid))
  7291. {
  7292. if(gPlayerLogged[playerid])
  7293. {
  7294. new string3[32];
  7295. new playername3[MAX_PLAYER_NAME];
  7296. GetPlayerName(playerid, playername3, sizeof(playername3));
  7297. format(string3, sizeof(string3), "%s.ini", playername3);
  7298. new File: hFile = fopen(string3, io_write);
  7299. if (hFile)
  7300. {
  7301. new var[32];
  7302. format(var, 32, "Key=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);
  7303. PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
  7304. format(var, 32, "Level=%d\n",PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
  7305. format(var, 32, "AdminLevel=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
  7306. format(var, 32, "DonateRank=%d\n",PlayerInfo[playerid][pDonateRank]);fwrite(hFile, var);
  7307. format(var, 32, "UpgradePoints=%d\n",PlayerInfo[playerid][gPupgrade]);fwrite(hFile, var);
  7308. format(var, 32, "ConnectedTime=%d\n",PlayerInfo[playerid][pConnectTime]);fwrite(hFile, var);
  7309. format(var, 32, "Registered=%d\n",PlayerInfo[playerid][pReg]);fwrite(hFile, var);
  7310. format(var, 32, "Sex=%d\n",PlayerInfo[playerid][pSex]);fwrite(hFile, var);
  7311. format(var, 32, "Age=%d\n",PlayerInfo[playerid][pAge]);fwrite(hFile, var);
  7312. format(var, 32, "Origin=%d\n",PlayerInfo[playerid][pOrigin]);fwrite(hFile, var);
  7313. format(var, 32, "CK=%d\n",PlayerInfo[playerid][pCK]);fwrite(hFile, var);
  7314. format(var, 32, "Muted=%d\n",PlayerInfo[playerid][pMuted]);fwrite(hFile, var);
  7315. format(var, 32, "Respect=%d\n",PlayerInfo[playerid][pExp]);fwrite(hFile, var);
  7316. format(var, 32, "Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
  7317. format(var, 32, "Bank=%d\n",PlayerInfo[playerid][pAccount]);fwrite(hFile, var);
  7318. format(var, 32, "Crimes=%d\n",PlayerInfo[playerid][pCrimes]);fwrite(hFile, var);
  7319. format(var, 32, "Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var);
  7320. format(var, 32, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var);
  7321. format(var, 32, "Arrested=%d\n",PlayerInfo[playerid][pArrested]);fwrite(hFile, var);
  7322. format(var, 32, "WantedDeaths=%d\n",PlayerInfo[playerid][pWantedDeaths]);fwrite(hFile, var);
  7323. format(var, 32, "Phonebook=%d\n",PlayerInfo[playerid][pPhoneBook]);fwrite(hFile, var);
  7324. format(var, 32, "LottoNr=%d\n",PlayerInfo[playerid][pLottoNr]);fwrite(hFile, var);
  7325. format(var, 32, "Fishes=%d\n",PlayerInfo[playerid][pFishes]);fwrite(hFile, var);
  7326. format(var, 32, "BiggestFish=%d\n",PlayerInfo[playerid][pBiggestFish]);fwrite(hFile, var);
  7327. format(var, 32, "Job=%d\n",PlayerInfo[playerid][pJob]);fwrite(hFile, var);
  7328. format(var, 32, "Paycheck=%d\n",PlayerInfo[playerid][pPayCheck]);fwrite(hFile, var);
  7329. format(var, 32, "HeadValue=%d\n",PlayerInfo[playerid][pHeadValue]);fwrite(hFile, var);
  7330. format(var, 32, "Jailed=%d\n",PlayerInfo[playerid][pJailed]);fwrite(hFile, var);
  7331. format(var, 32, "JailTime=%d\n",PlayerInfo[playerid][pJailTime]);fwrite(hFile, var);
  7332. format(var, 32, "Materials=%d\n",PlayerInfo[playerid][pMats]);fwrite(hFile, var);
  7333. format(var, 32, "Drugs=%d\n",PlayerInfo[playerid][pDrugs]);fwrite(hFile, var);
  7334. format(var, 32, "Leader=%d\n",PlayerInfo[playerid][pLeader]);fwrite(hFile, var);
  7335. format(var, 32, "Member=%d\n",PlayerInfo[playerid][pMember]);fwrite(hFile, var);
  7336. format(var, 32, "FMember=%d\n",PlayerInfo[playerid][pFMember]);fwrite(hFile, var);
  7337. format(var, 32, "Rank=%d\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var);
  7338. format(var, 32, "Char=%d\n",PlayerInfo[playerid][pChar]);fwrite(hFile, var);
  7339. format(var, 32, "ContractTime=%d\n",PlayerInfo[playerid][pContractTime]);fwrite(hFile, var);
  7340. format(var, 32, "DetSkill=%d\n",PlayerInfo[playerid][pDetSkill]);fwrite(hFile, var);
  7341. format(var, 32, "SexSkill=%d\n",PlayerInfo[playerid][pSexSkill]);fwrite(hFile, var);
  7342. format(var, 32, "BoxSkill=%d\n",PlayerInfo[playerid][pBoxSkill]);fwrite(hFile, var);
  7343. format(var, 32, "LawSkill=%d\n",PlayerInfo[playerid][pLawSkill]);fwrite(hFile, var);
  7344. format(var, 32, "MechSkill=%d\n",PlayerInfo[playerid][pMechSkill]);fwrite(hFile, var);
  7345. format(var, 32, "JackSkill=%d\n",PlayerInfo[playerid][pJackSkill]);fwrite(hFile, var);
  7346. format(var, 32, "CarSkill=%d\n",PlayerInfo[playerid][pCarSkill]);fwrite(hFile, var);
  7347. format(var, 32, "NewsSkill=%d\n",PlayerInfo[playerid][pNewsSkill]);fwrite(hFile, var);
  7348. format(var, 32, "DrugsSkill=%d\n",PlayerInfo[playerid][pDrugsSkill]);fwrite(hFile, var);
  7349. format(var, 32, "CookSkill=%d\n",PlayerInfo[playerid][pCookSkill]);fwrite(hFile, var);
  7350. format(var, 32, "FishSkill=%d\n",PlayerInfo[playerid][pFishSkill]);fwrite(hFile, var);
  7351. format(var, 32, "pSHealth=%.1f\n",PlayerInfo[playerid][pSHealth]);fwrite(hFile, var);
  7352. GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
  7353. format(var, 32, "pHealth=%.1f\n",PlayerInfo[playerid][pHealth]);fwrite(hFile, var);
  7354. format(var, 32, "Int=%d\n",PlayerInfo[playerid][pInt]);fwrite(hFile, var);
  7355. format(var, 32, "Local=%d\n",PlayerInfo[playerid][pLocal]);fwrite(hFile, var);
  7356. format(var, 32, "Team=%d\n",PlayerInfo[playerid][pTeam]);fwrite(hFile, var);
  7357. format(var, 32, "Model=%d\n",PlayerInfo[playerid][pModel]);fwrite(hFile, var);
  7358. format(var, 32, "PhoneNr=%d\n",PlayerInfo[playerid][pPnumber]);fwrite(hFile, var);
  7359. format(var, 32, "House=%d\n",PlayerInfo[playerid][pPhousekey]);fwrite(hFile, var);
  7360. format(var, 32, "Bizz=%d\n",PlayerInfo[playerid][pPbiskey]);fwrite(hFile, var);
  7361. if ((PlayerInfo[playerid][pPos_x]==0.0 && PlayerInfo[playerid][pPos_y]==0.0 && PlayerInfo[playerid][pPos_z]==0.0))
  7362. {
  7363. PlayerInfo[playerid][pPos_x] = 1684.9;
  7364. PlayerInfo[playerid][pPos_y] = -2244.5;
  7365. PlayerInfo[playerid][pPos_z] = 13.5;
  7366. }
  7367. if(Spectate[playerid] != 255)
  7368. {
  7369. PlayerInfo[playerid][pPos_x] = Unspec[playerid][sPx];
  7370. PlayerInfo[playerid][pPos_y] = Unspec[playerid][sPy];
  7371. PlayerInfo[playerid][pPos_z] = Unspec[playerid][sPz];
  7372. PlayerInfo[playerid][pInt] = Unspec[playerid][sPint];
  7373. PlayerInfo[playerid][pLocal] = Unspec[playerid][sLocal];
  7374. }
  7375. format(var, 32, "Pos_x=%.1f\n",PlayerInfo[playerid][pPos_x]);fwrite(hFile, var);
  7376. format(var, 32, "Pos_y=%.1f\n",PlayerInfo[playerid][pPos_y]);fwrite(hFile, var);
  7377. format(var, 32, "Pos_z=%.1f\n",PlayerInfo[playerid][pPos_z]);fwrite(hFile, var);
  7378. format(var, 32, "CarLic=%d\n",PlayerInfo[playerid][pCarLic]);fwrite(hFile, var);
  7379. format(var, 32, "FlyLic=%d\n",PlayerInfo[playerid][pFlyLic]);fwrite(hFile, var);
  7380. format(var, 32, "BoatLic=%d\n",PlayerInfo[playerid][pBoatLic]);fwrite(hFile, var);
  7381. format(var, 32, "FishLic=%d\n",PlayerInfo[playerid][pFishLic]);fwrite(hFile, var);
  7382. format(var, 32, "GunLic=%d\n",PlayerInfo[playerid][pGunLic]);fwrite(hFile, var);
  7383. format(var, 32, "Gun1=%d\n",PlayerInfo[playerid][pGun1]);fwrite(hFile, var);
  7384. format(var, 32, "Gun2=%d\n",PlayerInfo[playerid][pGun2]);fwrite(hFile, var);
  7385. format(var, 32, "Gun3=%d\n",PlayerInfo[playerid][pGun3]);fwrite(hFile, var);
  7386. format(var, 32, "Gun4=%d\n",PlayerInfo[playerid][pGun4]);fwrite(hFile, var);
  7387. format(var, 32, "Ammo1=%d\n",PlayerInfo[playerid][pAmmo1]);fwrite(hFile, var);
  7388. format(var, 32, "Ammo2=%d\n",PlayerInfo[playerid][pAmmo2]);fwrite(hFile, var);
  7389. format(var, 32, "Ammo3=%d\n",PlayerInfo[playerid][pAmmo3]);fwrite(hFile, var);
  7390. format(var, 32, "Ammo4=%d\n",PlayerInfo[playerid][pAmmo4]);fwrite(hFile, var);
  7391. format(var, 32, "CarTime=%d\n",PlayerInfo[playerid][pCarTime]);fwrite(hFile, var);
  7392. format(var, 32, "PayDay=%d\n",PlayerInfo[playerid][pPayDay]);fwrite(hFile, var);
  7393. format(var, 32, "PayDayHad=%d\n",PlayerInfo[playerid][pPayDayHad]);fwrite(hFile, var);
  7394. format(var, 32, "CDPlayer=%d\n",PlayerInfo[playerid][pCDPlayer]);fwrite(hFile, var);
  7395. format(var, 32, "Wins=%d\n",PlayerInfo[playerid][pWins]);fwrite(hFile, var);
  7396. format(var, 32, "Loses=%d\n",PlayerInfo[playerid][pLoses]);fwrite(hFile, var);
  7397. format(var, 32, "AlcoholPerk=%d\n",PlayerInfo[playerid][pAlcoholPerk]);fwrite(hFile, var);
  7398. format(var, 32, "DrugPerk=%d\n",PlayerInfo[playerid][pDrugPerk]);fwrite(hFile, var);
  7399. format(var, 32, "MiserPerk=%d\n",PlayerInfo[playerid][pMiserPerk]);fwrite(hFile, var);
  7400. format(var, 32, "PainPerk=%d\n",PlayerInfo[playerid][pPainPerk]);fwrite(hFile, var);
  7401. format(var, 32, "TraderPerk=%d\n",PlayerInfo[playerid][pTraderPerk]);fwrite(hFile, var);
  7402. format(var, 32, "Tutorial=%d\n",PlayerInfo[playerid][pTut]);fwrite(hFile, var);
  7403. format(var, 32, "Mission=%d\n",PlayerInfo[playerid][pMissionNr]);fwrite(hFile, var);
  7404. format(var, 32, "Warnings=%d\n",PlayerInfo[playerid][pWarns]);fwrite(hFile, var);
  7405. format(var, 32, "Adjustable=%d\n",PlayerInfo[playerid][pAdjustable]);fwrite(hFile, var);
  7406. if(PlayerInfo[playerid][pDonateRank] < 1) { PlayerInfo[playerid][pFuel] = 0; }
  7407. format(var, 32, "Fuel=%d\n",PlayerInfo[playerid][pFuel]);fwrite(hFile, var);
  7408. format(var, 32, "Married=%d\n",PlayerInfo[playerid][pMarried]);fwrite(hFile, var);
  7409. format(var, 32, "MarriedTo=%s\n",PlayerInfo[playerid][pMarriedTo]);fwrite(hFile, var);
  7410. fclose(hFile);
  7411. }
  7412. }
  7413. }
  7414. return 1;
  7415. }
  7416.  
  7417. public OnPlayerLogin(playerid,password[])
  7418. {
  7419. new tmp2[256];
  7420. new string2[64];
  7421. new playername2[MAX_PLAYER_NAME];
  7422. GetPlayerName(playerid, playername2, sizeof(playername2));
  7423. format(string2, sizeof(string2), "%s.ini", playername2);
  7424. new File: UserFile = fopen(string2, io_read);
  7425. if ( UserFile )
  7426. {
  7427. new PassData[256];
  7428. new keytmp[256], valtmp[256];
  7429. fread( UserFile , PassData , sizeof( PassData ) );
  7430. keytmp = ini_GetKey( PassData );
  7431. if( strcmp( keytmp , "Key" , true ) == 0 )
  7432. {
  7433. valtmp = ini_GetValue( PassData );
  7434. strmid(PlayerInfo[playerid][pKey], valtmp, 0, strlen(valtmp)-1, 255);
  7435. }
  7436. if(strcmp(PlayerInfo[playerid][pKey],password, true ) == 0 )
  7437. {
  7438. new key[ 256 ] , val[ 256 ];
  7439. new Data[ 256 ];
  7440. while ( fread( UserFile , Data , sizeof( Data ) ) )
  7441. {
  7442. key = ini_GetKey( Data );
  7443. if( strcmp( key , "Level" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLevel] = strval( val ); }
  7444. if( strcmp( key , "AdminLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdmin] = strval( val ); }
  7445. if( strcmp( key , "DonateRank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDonateRank] = strval( val ); }
  7446. if( strcmp( key , "UpgradePoints" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][gPupgrade] = strval( val ); }
  7447. if( strcmp( key , "ConnectedTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pConnectTime] = strval( val ); }
  7448. if( strcmp( key , "Registered" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pReg] = strval( val ); }
  7449. if( strcmp( key , "Sex" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSex] = strval( val ); }
  7450. if( strcmp( key , "Age" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAge] = strval( val ); }
  7451. if( strcmp( key , "Origin" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pOrigin] = strval( val ); }
  7452. if( strcmp( key , "CK" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCK] = strval( val ); }
  7453. if( strcmp( key , "Muted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMuted] = strval( val ); }
  7454. if( strcmp( key , "Respect" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pExp] = strval( val ); }
  7455. if( strcmp( key , "Money" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCash] = strval( val ); }
  7456. if( strcmp( key , "Bank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAccount] = strval( val ); }
  7457. if( strcmp( key , "Crimes" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCrimes] = strval( val ); }
  7458. if( strcmp( key , "Kills" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKills] = strval( val ); }
  7459. if( strcmp( key , "Deaths" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDeaths] = strval( val ); }
  7460. if( strcmp( key , "Arrested" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pArrested] = strval( val ); }
  7461. if( strcmp( key , "WantedDeaths" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWantedDeaths] = strval( val ); }
  7462. if( strcmp( key , "Phonebook" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPhoneBook] = strval( val ); }
  7463. if( strcmp( key , "LottoNr" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLottoNr] = strval( val ); }
  7464. if( strcmp( key , "Fishes" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFishes] = strval( val ); }
  7465. if( strcmp( key , "BiggestFish" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBiggestFish] = strval( val ); }
  7466. if( strcmp( key , "Job" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJob] = strval( val ); }
  7467. if( strcmp( key , "Paycheck" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayCheck] = strval( val ); }
  7468. if( strcmp( key , "HeadValue" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHeadValue] = strval( val ); }
  7469. if( strcmp( key , "Jailed" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJailed] = strval( val ); }
  7470. if( strcmp( key , "JailTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJailTime] = strval( val ); }
  7471. if( strcmp( key , "Materials" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMats] = strval( val ); }
  7472. if( strcmp( key , "Drugs" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDrugs] = strval( val ); }
  7473. if( strcmp( key , "Leader" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLeader] = strval( val ); }
  7474. if( strcmp( key , "Member" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMember] = strval( val ); }
  7475. if( strcmp( key , "FMember" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFMember] = strval( val ); }
  7476. if( strcmp( key , "Rank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRank] = strval( val ); }
  7477. if( strcmp( key , "Char" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pChar] = strval( val ); }
  7478. if( strcmp( key , "ContractTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pContractTime] = strval( val ); }
  7479. if( strcmp( key , "DetSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDetSkill] = strval( val ); }
  7480. if( strcmp( key , "SexSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSexSkill] = strval( val ); }
  7481. if( strcmp( key , "BoxSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBoxSkill] = strval( val ); }
  7482. if( strcmp( key , "LawSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLawSkill] = strval( val ); }
  7483. if( strcmp( key , "MechSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMechSkill] = strval( val ); }
  7484. if( strcmp( key , "JackSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pJackSkill] = strval( val ); }
  7485. if( strcmp( key , "CarSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarSkill] = strval( val ); }
  7486. if( strcmp( key , "NewsSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pNewsSkill] = strval( val ); }
  7487. if( strcmp( key , "DrugsSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDrugsSkill] = strval( val ); }
  7488. if( strcmp( key , "CookSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCookSkill] = strval( val ); }
  7489. if( strcmp( key , "FishSkill" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFishSkill] = strval( val ); }
  7490. if( strcmp( key , "pSHealth" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSHealth] = floatstr( val ); }
  7491. if( strcmp( key , "pHealth" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHealth] = floatstr( val ); }
  7492. if( strcmp( key , "Int" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInt] = strval( val ); }
  7493. if( strcmp( key , "Local" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLocal] = strval( val ); }
  7494. if( strcmp( key , "Team" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTeam] = strval( val ); }
  7495. if( strcmp( key , "Model" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pModel] = strval( val ); }
  7496. if( strcmp( key , "PhoneNr" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPnumber] = strval( val ); }
  7497. if( strcmp( key , "House" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPhousekey] = strval( val ); }
  7498. if( strcmp( key , "Bizz" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPbiskey] = strval( val ); }
  7499. if( strcmp( key , "Pos_x" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_x] = floatstr( val ); }
  7500. if( strcmp( key , "Pos_y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_y] = floatstr( val ); }
  7501. if( strcmp( key , "Pos_z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_z] = floatstr( val ); }
  7502. if( strcmp( key , "CarLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarLic] = strval( val ); }
  7503. if( strcmp( key , "FlyLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFlyLic] = strval( val ); }
  7504. if( strcmp( key , "BoatLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pBoatLic] = strval( val ); }
  7505. if( strcmp( key , "FishLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFishLic] = strval( val ); }
  7506. if( strcmp( key , "GunLic" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGunLic] = strval( val ); }
  7507. if( strcmp( key , "Gun1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun1] = strval( val ); }
  7508. if( strcmp( key , "Gun2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun2] = strval( val ); }
  7509. if( strcmp( key , "Gun3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun3] = strval( val ); }
  7510. if( strcmp( key , "Gun4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun4] = strval( val ); }
  7511. if( strcmp( key , "Ammo1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo1] = strval( val ); }
  7512. if( strcmp( key , "Ammo2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo2] = strval( val ); }
  7513. if( strcmp( key , "Ammo3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo3] = strval( val ); }
  7514. if( strcmp( key , "Ammo4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo4] = strval( val ); }
  7515. if( strcmp( key , "CarTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCarTime] = strval( val ); }
  7516. if( strcmp( key , "PayDay" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayDay] = strval( val ); }
  7517. if( strcmp( key , "PayDayHad" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPayDayHad] = strval( val ); }
  7518. if( strcmp( key , "CDPlayer" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCDPlayer] = strval( val ); }
  7519. if( strcmp( key , "Wins" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWins] = strval( val ); }
  7520. if( strcmp( key , "Loses" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLoses] = strval( val ); }
  7521. if( strcmp( key , "AlcoholPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAlcoholPerk] = strval( val ); }
  7522. if( strcmp( key , "DrugPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pDrugPerk] = strval( val ); }
  7523. if( strcmp( key , "MiserPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMiserPerk] = strval( val ); }
  7524. if( strcmp( key , "PainPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPainPerk] = strval( val ); }
  7525. if( strcmp( key , "TraderPerk" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTraderPerk] = strval( val ); }
  7526. if( strcmp( key , "Tutorial" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTut] = strval( val ); }
  7527. if( strcmp( key , "Mission" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMissionNr] = strval( val ); }
  7528. if( strcmp( key , "Warnings" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWarns] = strval( val ); }
  7529. if( strcmp( key , "Adjustable" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdjustable] = strval( val ); }
  7530. if( strcmp( key , "Fuel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFuel] = strval( val ); }
  7531. if( strcmp( key , "Married" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMarried] = strval( val ); }
  7532. if( strcmp( key , "MarriedTo" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(PlayerInfo[playerid][pMarriedTo], val, 0, strlen(val)-1, 255); }
  7533. }//end while
  7534. fclose(UserFile);//close the file after everything has been read in the while
  7535. }
  7536. else
  7537. {
  7538. SendClientMessage(playerid, COLOR_WHITE, "SERVER: Password does not match your name.");
  7539. fclose(UserFile);
  7540. gPlayerLogTries[playerid] += 1;
  7541. if(gPlayerLogTries[playerid] == 4) { Ban(playerid); }
  7542. return 1;
  7543. }
  7544. PlayerInfo[playerid][pAdjustable] = 0;
  7545. ResetPlayerMoney(playerid);
  7546. ConsumingMoney[playerid] = 1;
  7547. GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
  7548. CurrentMoney[playerid] = PlayerInfo[playerid][pCash];
  7549. if(PlayerInfo[playerid][pReg] == 0)
  7550. {
  7551. PlayerInfo[playerid][pLevel] = 1;
  7552. PlayerInfo[playerid][pSHealth] = 0.0;
  7553. PlayerInfo[playerid][pHealth] = 50.0;
  7554. PlayerInfo[playerid][pPos_x] = 2246.6;
  7555. PlayerInfo[playerid][pPos_y] = -1161.9;
  7556. PlayerInfo[playerid][pPos_z] = 1029.7;
  7557. PlayerInfo[playerid][pInt] = 15;
  7558. PlayerInfo[playerid][pLocal] = 255;
  7559. PlayerInfo[playerid][pTeam] = 3;
  7560. PlayerInfo[playerid][pModel] = 264;
  7561. new randphone = 1000 + random(8999);//minimum 1000 max 9999 //giving one at the start
  7562. PlayerInfo[playerid][pPnumber] = randphone;
  7563. PlayerInfo[playerid][pPhousekey] = 255;
  7564. PlayerInfo[playerid][pPbiskey] = 255;
  7565. PlayerInfo[playerid][pAccount] = 50000;
  7566. PlayerInfo[playerid][pReg] = 1;
  7567. GivePlayerMoney(playerid, 5000);
  7568. }
  7569. if(PlayerInfo[playerid][pLevel] == -999) //autoban
  7570. {
  7571. Ban(playerid);
  7572. }
  7573. else if(PlayerInfo[playerid][pCK] > 0)
  7574. {
  7575. Kick(playerid);
  7576. }
  7577. format(string2, sizeof(string2), "SERVER: Welcome %s",playername2);
  7578. SendClientMessage(playerid, COLOR_WHITE,string2);
  7579. printf("%s has logged in.",playername2);
  7580. if (PlayerInfo[playerid][pDonateRank] > 0)
  7581. {
  7582. SendClientMessage(playerid, COLOR_WHITE,"SERVER: You are a Premium Account user.");
  7583. }
  7584. if (PlayerInfo[playerid][pAdmin] > 0)
  7585. {
  7586. format(string2, sizeof(string2), "SERVER: You are logged in as a Level %d Admin.",PlayerInfo[playerid][pAdmin]);
  7587. SendClientMessage(playerid, COLOR_WHITE,string2);
  7588. }
  7589. 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);
  7590. if(gTeam[playerid] == 0)
  7591. {
  7592. gTeam[playerid] = 3;
  7593. }
  7594. else
  7595. {
  7596. gTeam[playerid] = PlayerInfo[playerid][pTeam];
  7597. }
  7598. gPlayerLogged[playerid] = 1;
  7599. SpawnPlayer(playerid);
  7600. format(tmp2, sizeof(tmp2), "~w~Welcome ~n~~y~ %s", playername2);
  7601. DateProp(playerid);
  7602. GameTextForPlayer(playerid, tmp2, 5000, 1);
  7603. SendClientMessage(playerid, COLOR_YELLOW, motd);
  7604. if(PlayerInfo[playerid][pFMember] < 255)
  7605. {
  7606. format(tmp2, sizeof(tmp2), "Family MOTD: %s.", FamilyInfo[PlayerInfo[playerid][pFMember]][FamilyMOTD]);
  7607. SendClientMessage(playerid, COLOR_YELLOW, tmp2);
  7608. }
  7609. }
  7610. return 1;
  7611. }
  7612.  
  7613. stock ini_GetKey( line[] )
  7614. {
  7615. new keyRes[256];
  7616. keyRes[0] = 0;
  7617. if ( strfind( line , "=" , true ) == -1 ) return keyRes;
  7618. strmid( keyRes , line , 0 , strfind( line , "=" , true ) , sizeof( keyRes) );
  7619. return keyRes;
  7620. }
  7621.  
  7622. stock ini_GetValue( line[] )
  7623. {
  7624. new valRes[256];
  7625. valRes[0]=0;
  7626. if ( strfind( line , "=" , true ) == -1 ) return valRes;
  7627. strmid( valRes , line , strfind( line , "=" , true )+1 , strlen( line ) , sizeof( valRes ) );
  7628. return valRes;
  7629. }
  7630.  
  7631. public OnPropUpdate()
  7632. {
  7633. new idx;
  7634. new File: file2;
  7635. while (idx < sizeof(HouseInfo))
  7636. {
  7637. new coordsstring[256];
  7638. 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",
  7639. HouseInfo[idx][hEntrancex],
  7640. HouseInfo[idx][hEntrancey],
  7641. HouseInfo[idx][hEntrancez],
  7642. HouseInfo[idx][hExitx],
  7643. HouseInfo[idx][hExity],
  7644. HouseInfo[idx][hExitz],
  7645. HouseInfo[idx][hHealthx],
  7646. HouseInfo[idx][hHealthy],
  7647. HouseInfo[idx][hHealthz],
  7648. HouseInfo[idx][hArmourx],
  7649. HouseInfo[idx][hArmoury],
  7650. HouseInfo[idx][hArmourz],
  7651. HouseInfo[idx][hOwner],
  7652. HouseInfo[idx][hDiscription],
  7653. HouseInfo[idx][hValue],
  7654. HouseInfo[idx][hHel],
  7655. HouseInfo[idx][hArm],
  7656. HouseInfo[idx][hInt],
  7657. HouseInfo[idx][hLock],
  7658. HouseInfo[idx][hOwned],
  7659. HouseInfo[idx][hRooms],
  7660. HouseInfo[idx][hRent],
  7661. HouseInfo[idx][hRentabil],
  7662. HouseInfo[idx][hTakings],
  7663. HouseInfo[idx][hVec],
  7664. HouseInfo[idx][hVcol1],
  7665. HouseInfo[idx][hVcol2],
  7666. HouseInfo[idx][hDate],
  7667. HouseInfo[idx][hLevel]);
  7668. if(idx == 0)
  7669. {
  7670. file2 = fopen("property.cfg", io_write);
  7671. }
  7672. else
  7673. {
  7674. file2 = fopen("property.cfg", io_append);
  7675. }
  7676. fwrite(file2, coordsstring);
  7677. idx++;
  7678. fclose(file2);
  7679. }
  7680. idx = 0;
  7681. while (idx < sizeof(BizzInfo))
  7682. {
  7683. new coordsstring[256];
  7684. format(coordsstring, sizeof(coordsstring), "%d|%s|%s|%s|%f|%f|%f|%f|%f|%f|%d|%d|%d|%d|%d|%d|%d|%d|%d\n",
  7685. BizzInfo[idx][bOwned],
  7686. BizzInfo[idx][bOwner],
  7687. BizzInfo[idx][bMessage],
  7688. BizzInfo[idx][bExtortion],
  7689. BizzInfo[idx][bEntranceX],
  7690. BizzInfo[idx][bEntranceY],
  7691. BizzInfo[idx][bEntranceZ],
  7692. BizzInfo[idx][bExitX],
  7693. BizzInfo[idx][bExitY],
  7694. BizzInfo[idx][bExitZ],
  7695. BizzInfo[idx][bLevelNeeded],
  7696. BizzInfo[idx][bBuyPrice],
  7697. BizzInfo[idx][bEntranceCost],
  7698. BizzInfo[idx][bTill],
  7699. BizzInfo[idx][bLocked],
  7700. BizzInfo[idx][bInterior],
  7701. BizzInfo[idx][bProducts],
  7702. BizzInfo[idx][bMaxProducts],
  7703. BizzInfo[idx][bPriceProd]);
  7704. if(idx == 0)
  7705. {
  7706. file2 = fopen("bizz.cfg", io_write);
  7707. }
  7708. else
  7709. {
  7710. file2 = fopen("bizz.cfg", io_append);
  7711. }
  7712. fwrite(file2, coordsstring);
  7713. idx++;
  7714. fclose(file2);
  7715. }
  7716. idx = 0;
  7717. while (idx < sizeof(SBizzInfo))
  7718. {
  7719. new coordsstring[256];
  7720. format(coordsstring, sizeof(coordsstring), "%d|%s|%s|%s|%f|%f|%f|%d|%d|%d|%d|%d|%d|%d|%d|%d\n",
  7721. SBizzInfo[idx][sbOwned],
  7722. SBizzInfo[idx][sbOwner],
  7723. SBizzInfo[idx][sbMessage],
  7724. SBizzInfo[idx][sbExtortion],
  7725. SBizzInfo[idx][sbEntranceX],
  7726. SBizzInfo[idx][sbEntranceY],
  7727. SBizzInfo[idx][sbEntranceZ],
  7728. SBizzInfo[idx][sbLevelNeeded],
  7729. SBizzInfo[idx][sbBuyPrice],
  7730. SBizzInfo[idx][sbEntranceCost],
  7731. SBizzInfo[idx][sbTill],
  7732. SBizzInfo[idx][sbLocked],
  7733. SBizzInfo[idx][sbInterior],
  7734. SBizzInfo[idx][sbProducts],
  7735. SBizzInfo[idx][sbMaxProducts],
  7736. SBizzInfo[idx][sbPriceProd]);
  7737. if(idx == 0)
  7738. {
  7739. file2 = fopen("sbizz.cfg", io_write);
  7740. }
  7741. else
  7742. {
  7743. file2 = fopen("sbizz.cfg", io_append);
  7744. }
  7745. fwrite(file2, coordsstring);
  7746. idx++;
  7747. fclose(file2);
  7748. }
  7749. return 1;
  7750. }
  7751.  
  7752. public BroadCast(color,const string[])
  7753. {
  7754. SendClientMessageToAll(color, string);
  7755. return 1;
  7756. }
  7757.  
  7758. public ABroadCast(color,const string[],level)
  7759. {
  7760. for(new i = 0; i < MAX_PLAYERS; i++)
  7761. {
  7762. if(IsPlayerConnected(i))
  7763. {
  7764. if (PlayerInfo[i][pAdmin] >= level)
  7765. {
  7766. SendClientMessage(i, color, string);
  7767. printf("%s", string);
  7768. }
  7769. }
  7770. }
  7771. return 1;
  7772. }
  7773.  
  7774. public OOCOff(color,const string[])
  7775. {
  7776. for(new i = 0; i < MAX_PLAYERS; i++)
  7777. {
  7778. if(IsPlayerConnected(i))
  7779. {
  7780. if(!gOoc[i])
  7781. {
  7782. SendClientMessage(i, color, string);
  7783. }
  7784. }
  7785. }
  7786. }
  7787.  
  7788. public OOCNews(color,const string[])
  7789. {
  7790. for(new i = 0; i < MAX_PLAYERS; i++)
  7791. {
  7792. if(IsPlayerConnected(i))
  7793. {
  7794. if(!gNews[i])
  7795. {
  7796. SendClientMessage(i, color, string);
  7797. }
  7798. }
  7799. }
  7800. }
  7801.  
  7802. public SendTeamMessage(team, color, string[])
  7803. {
  7804. for(new i = 0; i < MAX_PLAYERS; i++)
  7805. {
  7806. if(IsPlayerConnected(i))
  7807. {
  7808. if(gTeam[i] == team)
  7809. {
  7810. SendClientMessage(i, color, string);
  7811. }
  7812. }
  7813. }
  7814. }
  7815.  
  7816. public SendRadioMessage(member, color, string[])
  7817. {
  7818. for(new i = 0; i < MAX_PLAYERS; i++)
  7819. {
  7820. if(IsPlayerConnected(i))
  7821. {
  7822. if(PlayerInfo[i][pMember] == member || PlayerInfo[i][pLeader] == member)
  7823. {
  7824. SendClientMessage(i, color, string);
  7825. }
  7826. }
  7827. }
  7828. }
  7829.  
  7830. public SendJobMessage(job, color, string[])
  7831. {
  7832. for(new i = 0; i < MAX_PLAYERS; i++)
  7833. {
  7834. if(IsPlayerConnected(i))
  7835. {
  7836. if(PlayerInfo[i][pJob] == job)
  7837. {
  7838. SendClientMessage(i, color, string);
  7839. }
  7840. }
  7841. }
  7842. }
  7843.  
  7844. public SendNewFamilyMessage(family, color, string[])
  7845. {
  7846. for(new i = 0; i < MAX_PLAYERS; i++)
  7847. {
  7848. if(IsPlayerConnected(i))
  7849. {
  7850. if(PlayerInfo[i][pFMember] == family)
  7851. {
  7852. if(!gFam[i])
  7853. {
  7854. SendClientMessage(i, color, string);
  7855. }
  7856. }
  7857. }
  7858. }
  7859. }
  7860.  
  7861. public SendFamilyMessage(family, color, string[])
  7862. {
  7863. for(new i = 0; i < MAX_PLAYERS; i++)
  7864. {
  7865. if(IsPlayerConnected(i))
  7866. {
  7867. if(PlayerInfo[i][pMember] == family || PlayerInfo[i][pLeader] == family)
  7868. {
  7869. if(!gFam[i])
  7870. {
  7871. SendClientMessage(i, color, string);
  7872. }
  7873. }
  7874. }
  7875. }
  7876. }
  7877.  
  7878. public SendIRCMessage(channel, color, string[])
  7879. {
  7880. for(new i = 0; i < MAX_PLAYERS; i++)
  7881. {
  7882. if(IsPlayerConnected(i))
  7883. {
  7884. if(PlayersChannel[i] == channel)
  7885. {
  7886. SendClientMessage(i, color, string);
  7887. }
  7888. }
  7889. }
  7890. }
  7891.  
  7892. public SendTeamBeepMessage(team, color, string[])
  7893. {
  7894. for(new i = 0; i < MAX_PLAYERS; i++)
  7895. {
  7896. if(IsPlayerConnected(i))
  7897. {
  7898. if(gTeam[i] == team)
  7899. {
  7900. SendClientMessage(i, color, string);
  7901. RingTone[i] = 20;
  7902. }
  7903. }
  7904. }
  7905. }
  7906.  
  7907. public SendEnemyMessage(color, string[])
  7908. {
  7909. for(new i = 0; i < MAX_PLAYERS; i++)
  7910. {
  7911. if(IsPlayerConnected(i))
  7912. {
  7913. if(gTeam[i] >= 3)
  7914. {
  7915. SendClientMessage(i, color, string);
  7916. }
  7917. }
  7918. }
  7919. }
  7920.  
  7921.  
  7922. public SendAdminMessage(color, string[])
  7923. {
  7924. for(new i = 0; i < MAX_PLAYERS; i++)
  7925. {
  7926. if(IsPlayerConnected(i))
  7927. {
  7928. if(PlayerInfo[i][pAdmin] >= 1)
  7929. {
  7930. SendClientMessage(i, color, string);
  7931. }
  7932. }
  7933. }
  7934. }
  7935.  
  7936.  
  7937.  
  7938. public AddCar(carcoords)
  7939. {
  7940. new randcol = random(126);
  7941. new randcol2 = 1;
  7942. if (rccounter == 14)
  7943. {
  7944. rccounter = 0;
  7945. }
  7946. AddStaticVehicleEx(carselect[rccounter], CarSpawns[carcoords][pos_x], CarSpawns[carcoords][pos_y], CarSpawns[carcoords][pos_z], CarSpawns[carcoords][z_angle], randcol, randcol2, 60000);
  7947. rccounter++;
  7948. return 1;
  7949. }
  7950.  
  7951. public PlayerPlayMusic(playerid)
  7952. {
  7953. if(IsPlayerConnected(playerid))
  7954. {
  7955. SetTimer("StopMusic", 5000, 0);
  7956. PlayerPlaySound(playerid, 1068, 0.0, 0.0, 0.0);
  7957. }
  7958. }
  7959.  
  7960. public StopMusic()
  7961. {
  7962. for(new i = 0; i < MAX_PLAYERS; i++)
  7963. {
  7964. if(IsPlayerConnected(i))
  7965. {
  7966. PlayerPlaySound(i, 1069, 0.0, 0.0, 0.0);
  7967. }
  7968. }
  7969. }
  7970.  
  7971. public PlayerFixRadio(playerid)
  7972. {
  7973. if(IsPlayerConnected(playerid))
  7974. {
  7975. SetTimer("PlayerFixRadio2", 1000, 0);
  7976. PlayerPlaySound(playerid, 1068, 0.0, 0.0, 0.0);
  7977. Fixr[playerid] = 1;
  7978. }
  7979. }
  7980.  
  7981. public PlayerFixRadio2()
  7982. {
  7983. for(new i = 0; i < MAX_PLAYERS; i++)
  7984. {
  7985. if(IsPlayerConnected(i))
  7986. {
  7987. if(Fixr[i])
  7988. {
  7989. PlayerPlaySound(i, 1069, 0.0, 0.0, 0.0);
  7990. Fixr[i] = 0;
  7991. }
  7992. }
  7993. }
  7994. }
  7995.  
  7996. //---------------------------<[ OnPlayerCommandText ]>--------------------------------------------------------
  7997.  
  7998. public OnPlayerCommandText(playerid, cmdtext[])
  7999. {
  8000. new string[256];
  8001. new playermoney;
  8002. new sendername[MAX_PLAYER_NAME];
  8003. new giveplayer[MAX_PLAYER_NAME];
  8004. new playername[MAX_PLAYER_NAME];
  8005. new cmd[256];
  8006. new tmp[256];
  8007. new giveplayerid, moneys, idx;
  8008. cmd = strtok(cmdtext, idx);
  8009. //-------------------------------[Pay]--------------------------------------------------------------------------
  8010. if(strcmp(cmd, "/pay", true) == 0)
  8011. {
  8012. if(IsPlayerConnected(playerid))
  8013. {
  8014. tmp = strtok(cmdtext, idx);
  8015. if(!strlen(tmp))
  8016. {
  8017. SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /pay [playerid/PartOfName] [amount]");
  8018. return 1;
  8019. }
  8020. //giveplayerid = strval(tmp);
  8021. giveplayerid = ReturnUser(tmp);
  8022. tmp = strtok(cmdtext, idx);
  8023. if(!strlen(tmp))
  8024. {
  8025. SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /pay [playerid/PartOfName] [amount]");
  8026. return 1;
  8027. }
  8028. moneys = strval(tmp);
  8029. if(moneys > 1000 && PlayerInfo[playerid][pLevel] < 3)
  8030. {
  8031. SendClientMessage(playerid, COLOR_GRAD1, "You must be level 3 to pay over 1000");
  8032. return 1;
  8033. }
  8034. if(moneys < 1 || moneys > 99999)
  8035. {
  8036. SendClientMessage(playerid, COLOR_GRAD1, "Dont go below 1, or above 99999 at once.");
  8037. return 1;
  8038. }
  8039. if (IsPlayerConnected(giveplayerid))
  8040. {
  8041. if(giveplayerid != INVALID_PLAYER_ID)
  8042. {
  8043. if(PlayerInfo[giveplayerid][pLocal] == 106)
  8044. {
  8045. SendClientMessage(playerid, COLOR_GRAD1, "Command not allowed in this location");
  8046. return 1;
  8047. }
  8048. if (ProxDetectorS(5.0, playerid, giveplayerid))
  8049. {
  8050. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  8051. GetPlayerName(playerid, sendername, sizeof(sendername));
  8052. playermoney = GetPlayerMoney(playerid);
  8053. if (moneys > 0 && playermoney >= moneys)
  8054. {
  8055. ConsumingMoney[giveplayerid] = 1;
  8056. GivePlayerMoney(playerid, (0 - moneys));
  8057. GivePlayerMoney(giveplayerid, moneys);
  8058. format(string, sizeof(string), " You have sent %s(player: %d), $%d.", giveplayer,giveplayerid, moneys);
  8059. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  8060. SendClientMessage(playerid, COLOR_GRAD1, string);
  8061. format(string, sizeof(string), " You have recieved $%d from %s(player: %d).", moneys, sendername, playerid);
  8062. SendClientMessage(giveplayerid, COLOR_GRAD1, string);
  8063. format(string, sizeof(string), "%s has paid $%d to %s", sendername, moneys, giveplayer);
  8064. PayLog(string);
  8065. if(moneys >= 1000000)
  8066. {
  8067. ABroadCast(COLOR_YELLOW,string,1);
  8068. }
  8069. PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
  8070. format(string, sizeof(string), "* %s takes out some cash, and hands it to %s.", sendername ,giveplayer);
  8071. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  8072. }
  8073. else
  8074. {
  8075. SendClientMessage(playerid, COLOR_GRAD1, " Invalid transaction amount.");
  8076. }
  8077. }
  8078. else
  8079. {
  8080. SendClientMessage(playerid, COLOR_GRAD1, " Your too far away.");
  8081. }
  8082. }//invalid id
  8083. }
  8084. else
  8085. {
  8086. format(string, sizeof(string), " %d is not an active player.", giveplayerid);
  8087. SendClientMessage(playerid, COLOR_GRAD1, string);
  8088. }
  8089. }
  8090. return 1;
  8091. }
  8092.  
  8093. if(strcmp(cmd, "/charity", true) == 0)
  8094. {
  8095. if(IsPlayerConnected(playerid))
  8096. {
  8097. tmp = strtok(cmdtext, idx);
  8098. if(!strlen(tmp))
  8099. {
  8100. SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /charity [amount]");
  8101. return 1;
  8102. }
  8103. if(PlayerInfo[playerid][pLocal] == 106)
  8104. {
  8105. SendClientMessage(playerid, COLOR_GRAD1, "Command not allowed in this location");
  8106. return 1;
  8107. }
  8108. moneys = strval(tmp);
  8109. if(moneys < 0)
  8110. {
  8111. SendClientMessage(playerid, COLOR_GRAD1, "That is not enough.");
  8112. return 1;
  8113. }
  8114. if(GetPlayerMoney(playerid) < moneys)
  8115. {
  8116. SendClientMessage(playerid, COLOR_GRAD1, "You don't have that much money.");
  8117. return 1;
  8118. }
  8119. GivePlayerMoney(playerid, -moneys);
  8120. GetPlayerName(playerid, sendername, sizeof(sendername));
  8121. format(string, sizeof(string), "%s Thank you for you donation of, $%d.",sendername, moneys);
  8122. printf("%s", string);
  8123. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  8124. SendClientMessage(playerid, COLOR_GRAD1, string);
  8125. PayLog(string);
  8126. }
  8127. return 1;
  8128. }
  8129. //-------------------------------[Stats]--------------------------------------------------------------------------
  8130. if (strcmp(cmd, "/stats", true) == 0)
  8131. {
  8132. if(IsPlayerConnected(playerid))
  8133. {
  8134. if (gPlayerLogged[playerid] != 0)
  8135. {
  8136. ShowStats(playerid,playerid);
  8137. }
  8138. else
  8139. {
  8140. SendClientMessage(playerid, COLOR_GRAD1, " You are not Logged in !");
  8141. }
  8142. }
  8143. return 1;
  8144. }
  8145.  
  8146. if(strcmp(cmd, "/dn", true) == 0)
  8147. {
  8148. if(IsPlayerConnected(playerid))
  8149. {
  8150. if (PlayerInfo[playerid][pAdmin] >= 1)
  8151. {
  8152. new Float:slx, Float:sly, Float:slz;
  8153. GetPlayerPos(playerid, slx, sly, slz);
  8154. SetPlayerPos(playerid, slx, sly, slz-2);
  8155. return 1;
  8156. }
  8157. else
  8158. {
  8159. SendClientMessage(playerid, COLOR_GRAD1, " You are not an Admin !");
  8160. }
  8161. }
  8162. return 1;
  8163. }
  8164. if(strcmp(cmd, "/up", true) == 0)
  8165. {
  8166. if(IsPlayerConnected(playerid))
  8167. {
  8168. if (PlayerInfo[playerid][pAdmin] >= 1)
  8169. {
  8170. new Float:slx, Float:sly, Float:slz;
  8171. GetPlayerPos(playerid, slx, sly, slz);
  8172. SetPlayerPos(playerid, slx, sly, slz+2);
  8173. return 1;
  8174. }
  8175. else
  8176. {
  8177. SendClientMessage(playerid, COLOR_GRAD1, " You are not an Admin !");
  8178. }
  8179. }
  8180. return 1;
  8181. }
  8182. if (strcmp(cmd, "/fly", true) == 0)
  8183. {
  8184. if(IsPlayerConnected(playerid))
  8185. {
  8186. if (PlayerInfo[playerid][pAdmin] >= 1)
  8187. {
  8188. new Float:px, Float:py, Float:pz, Float:pa;
  8189. GetPlayerFacingAngle(playerid,pa);
  8190. if(pa >= 0.0 && pa <= 22.5) //n1
  8191. {
  8192. GetPlayerPos(playerid, px, py, pz);
  8193. SetPlayerPos(playerid, px, py+30, pz+5);
  8194. }
  8195. if(pa >= 332.5 && pa < 0.0) //n2
  8196. {
  8197. GetPlayerPos(playerid, px, py, pz);
  8198. SetPlayerPos(playerid, px, py+30, pz+5);
  8199. }
  8200. if(pa >= 22.5 && pa <= 67.5) //nw
  8201. {
  8202. GetPlayerPos(playerid, px, py, pz);
  8203. SetPlayerPos(playerid, px-15, py+15, pz+5);
  8204. }
  8205. if(pa >= 67.5 && pa <= 112.5) //w
  8206. {
  8207. GetPlayerPos(playerid, px, py, pz);
  8208. SetPlayerPos(playerid, px-30, py, pz+5);
  8209. }
  8210. if(pa >= 112.5 && pa <= 157.5) //sw
  8211. {
  8212. GetPlayerPos(playerid, px, py, pz);
  8213. SetPlayerPos(playerid, px-15, py-15, pz+5);
  8214. }
  8215. if(pa >= 157.5 && pa <= 202.5) //s
  8216. {
  8217. GetPlayerPos(playerid, px, py, pz);
  8218. SetPlayerPos(playerid, px, py-30, pz+5);
  8219. }
  8220. if(pa >= 202.5 && pa <= 247.5)//se
  8221. {
  8222. GetPlayerPos(playerid, px, py, pz);
  8223. SetPlayerPos(playerid, px+15, py-15, pz+5);
  8224. }
  8225. if(pa >= 247.5 && pa <= 292.5)//e
  8226. {
  8227. GetPlayerPos(playerid, px, py, pz);
  8228. SetPlayerPos(playerid, px+30, py, pz+5);
  8229. }
  8230. if(pa >= 292.5 && pa <= 332.5)//e
  8231. {
  8232. GetPlayerPos(playerid, px, py, pz);
  8233. SetPlayerPos(playerid, px+15, py+15, pz+5);
  8234. }
  8235. }
  8236. else
  8237. {
  8238. SendClientMessage(playerid, COLOR_GRAD1, " You are not an Admin !");
  8239. }
  8240. }
  8241. return 1;
  8242. }
  8243. if(strcmp(cmd, "/lt", true) == 0)
  8244. {
  8245. if(IsPlayerConnected(playerid))
  8246. {
  8247. if (PlayerInfo[playerid][pAdmin] >= 1)
  8248. {
  8249. new Float:slx, Float:sly, Float:slz;
  8250. GetPlayerPos(playerid, slx, sly, slz);
  8251. SetPlayerPos(playerid, slx, sly+2, slz);
  8252. return 1;
  8253. }
  8254. else
  8255. {
  8256. SendClientMessage(playerid, COLOR_GRAD1, " You are not an Admin !");
  8257. }
  8258. }
  8259. return 1;
  8260. }
  8261. if(strcmp(cmd, "/rt", true) == 0)
  8262. {
  8263. if(IsPlayerConnected(playerid))
  8264. {
  8265. if (PlayerInfo[playerid][pAdmin] >= 1)
  8266. {
  8267. new Float:slx, Float:sly, Float:slz;
  8268. GetPlayerPos(playerid, slx, sly, slz);
  8269. SetPlayerPos(playerid, slx, sly-2, slz-2);
  8270. return 1;
  8271. }
  8272. else
  8273. {
  8274. SendClientMessage(playerid, COLOR_GRAD1, " You are not an Admin !");
  8275. }
  8276. }
  8277. return 1;
  8278. }
  8279. //-------------------------------[Check]--------------------------------------------------------------------------
  8280. if (strcmp(cmd, "/check", true) == 0)
  8281. {
  8282. if(IsPlayerConnected(playerid))
  8283. {
  8284. if (PlayerInfo[playerid][pAdmin] >= 1)
  8285. {
  8286. tmp = strtok(cmdtext, idx);
  8287. if(!strlen(tmp))
  8288. {
  8289. SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /check [playerid/PartOfName]");
  8290. return 1;
  8291. }
  8292. //giveplayerid = strval(tmp);
  8293. giveplayerid = ReturnUser(tmp);
  8294. if(IsPlayerConnected(giveplayerid))
  8295. {
  8296. if(giveplayerid != INVALID_PLAYER_ID)
  8297. {
  8298. ShowStats(playerid,giveplayerid);
  8299. }
  8300. }
  8301. else
  8302. {
  8303. SendClientMessage(playerid, COLOR_GRAD1, " No Such Player");
  8304. }
  8305. }
  8306. else
  8307. {
  8308. SendClientMessage(playerid, COLOR_GRAD1, " You are not an admin");
  8309. }
  8310. }
  8311. return 1;
  8312. }
  8313. if (strcmp(cmd, "/number", true) == 0)
  8314. {
  8315. if(IsPlayerConnected(playerid))
  8316. {
  8317. if (PlayerInfo[playerid][pPhoneBook] == 1)
  8318. {
  8319. tmp = strtok(cmdtext, idx);
  8320. if(!strlen(tmp))
  8321. {
  8322. SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /number [playerid/PartOfName]");
  8323. return 1;
  8324. }
  8325. //giveplayerid = strval(tmp);
  8326. giveplayerid = ReturnUser(tmp);
  8327. if(IsPlayerConnected(giveplayerid))
  8328. {
  8329. if(giveplayerid != INVALID_PLAYER_ID)
  8330. {
  8331. GetPlayerName(giveplayerid, sendername, sizeof(sendername));
  8332. format(string, 256, "Name: %s, Ph: %d",sendername,PlayerInfo[giveplayerid][pPnumber]);
  8333. SendClientMessage(playerid, COLOR_GRAD1, string);
  8334. }
  8335. }
  8336. else
  8337. {
  8338. SendClientMessage(playerid, COLOR_GRAD1, " No Such Player !");
  8339. }
  8340. }
  8341. else
  8342. {
  8343. SendClientMessage(playerid, COLOR_GRAD1, " You do not have a PhoneBook !");
  8344. }
  8345. }
  8346. return 1;
  8347. }
  8348. //-------------------------------[BuyLevel]--------------------------------------------------------------------------
  8349. if (strcmp(cmd, "/buylevel", true) == 0)
  8350. {
  8351. if(IsPlayerConnected(playerid))
  8352. {
  8353. if (gPlayerLogged[playerid] != 0)
  8354. {
  8355. PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
  8356. if(PlayerInfo[playerid][pLevel] >= 0)
  8357. {
  8358. new nxtlevel = PlayerInfo[playerid][pLevel]+1;
  8359. new costlevel = nxtlevel*levelcost;//10k for testing purposes
  8360. new expamount = nxtlevel*levelexp;
  8361. new infostring[256];
  8362. if(GetPlayerMoney(playerid) < costlevel)
  8363. {
  8364. format(infostring, 256, " You do not have enough Cash ($%d) !",costlevel);
  8365. SendClientMessage(playerid, COLOR_GRAD1, infostring);
  8366. return 1;
  8367. }
  8368. else if (PlayerInfo[playerid][pExp] < expamount)
  8369. {
  8370. format(infostring, 256, " You need %d Respect Points, you curently have [%d] !",expamount,PlayerInfo[playerid][pExp]);
  8371. SendClientMessage(playerid, COLOR_GRAD1, infostring);
  8372. return 1;
  8373. }
  8374. else
  8375. {
  8376. format(string, sizeof(string), "~g~LEVEL UP~n~~w~You Are Now Level %d", nxtlevel);
  8377. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  8378. PlayerPlayMusic(playerid);
  8379. GivePlayerMoney(playerid, (-costlevel));
  8380. PlayerInfo[playerid][pLevel]++;
  8381. if(PlayerInfo[playerid][pDonateRank] > 0)
  8382. {
  8383. PlayerInfo[playerid][pExp] -= expamount;
  8384. new total = PlayerInfo[playerid][pExp];
  8385. if(total > 0)
  8386. {
  8387. PlayerInfo[playerid][pExp] = total;
  8388. }
  8389. else
  8390. {
  8391. PlayerInfo[playerid][pExp] = 0;
  8392. }
  8393. }
  8394. else
  8395. {
  8396. PlayerInfo[playerid][pExp] = 0;
  8397. }
  8398. PlayerInfo[playerid][gPupgrade] = PlayerInfo[playerid][gPupgrade]+2;
  8399. GameTextForPlayer(playerid, string, 5000, 1);
  8400. format(infostring, 256, " You bought Level %d for ($%d) Type /upgrade", nxtlevel, costlevel);
  8401. SendClientMessage(playerid, COLOR_GRAD1, infostring);
  8402. format(infostring, 256, " You gave %d unspent Upgrade Points",PlayerInfo[playerid][gPupgrade]);
  8403. SendClientMessage(playerid, COLOR_GRAD2, infostring);
  8404. }
  8405. }
  8406. return 1;
  8407. }
  8408. else
  8409. {
  8410. SendClientMessage(playerid, COLOR_GRAD1, " You are not Logged in !");
  8411. }
  8412. }
  8413. return 1;
  8414. }
  8415. //-------------------------------[UPGRADE]--------------------------------------------------------------------------
  8416. if (strcmp(cmd, "/carcolor", true) == 0)
  8417. {
  8418. if(IsPlayerConnected(playerid))
  8419. {
  8420. new house = PlayerInfo[playerid][pPhousekey];
  8421. GetPlayerName(playerid, playername, sizeof(playername));
  8422. if (house != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
  8423. {
  8424. tmp = strtok(cmdtext, idx);
  8425. if(!strlen(tmp))
  8426. {
  8427. SendClientMessage(playerid, COLOR_GRAD3,"($5000) USAGE: /carcolor [color 1 - 2] [color number]");
  8428. return 1;
  8429. }
  8430. new colornum = strval(tmp);
  8431. if(colornum > 2 || colornum < 1)
  8432. {
  8433. SendClientMessage(playerid, COLOR_GRAD3,"Choices are 1 or 2");
  8434. return 1;
  8435. }
  8436. tmp = strtok(cmdtext, idx);
  8437. if(!strlen(tmp))
  8438. {
  8439. SendClientMessage(playerid, COLOR_GRAD3,"($5000) USAGE: /carcolor [color 1 - 2] [color number]");
  8440. }
  8441. new color = strval(tmp);
  8442. if(color > 126)
  8443. {
  8444. SendClientMessage(playerid, COLOR_GRAD3,"Maximum is 126");
  8445. return 1;
  8446. }
  8447. if (GetPlayerMoney(playerid) < 5000)
  8448. {
  8449. SendClientMessage(playerid, COLOR_GRAD3,"You can't afford that ($5000)");
  8450. }
  8451. if(colornum == 1)
  8452. {
  8453. HouseInfo[house][hVcol1] = color;
  8454. format(string, sizeof(string), "Car color 1 set to %d -$5000",color);
  8455. SendClientMessage(playerid, COLOR_GRAD3,string);
  8456. }
  8457. else
  8458. {
  8459. HouseInfo[house][hVcol2] = color;
  8460. format(string, sizeof(string), "Car color 2 set to %d -$5000",color);
  8461. SendClientMessage(playerid, COLOR_GRAD3,string);
  8462. }
  8463. SendClientMessage(playerid, COLOR_GRAD6, "Your new paintjob will be complete within 24 hours");
  8464. GivePlayerMoney(playerid,-5000);
  8465. SBizzInfo[5][sbTill] += 5000;
  8466. ExtortionSBiz(5, 5000);
  8467. PlayerPlaySound(giveplayerid, 1134, 0.0, 0.0, 0.0);
  8468. OnPropUpdate();
  8469. }
  8470. else
  8471. {
  8472. SendClientMessage(playerid, COLOR_GRAD2, " You don't own a house");
  8473. return 1;
  8474. }
  8475. }
  8476. return 1;
  8477. }
  8478. if (strcmp(cmd, "/carupgrade", true) == 0)
  8479. {
  8480. if(IsPlayerConnected(playerid))
  8481. {
  8482. new house = PlayerInfo[playerid][pPhousekey];
  8483. GetPlayerName(playerid, playername, sizeof(playername));
  8484. if (house != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
  8485. {
  8486. new gunid[16];
  8487. tmp = strtok(cmdtext, idx);
  8488. if(!strlen(tmp))
  8489. {
  8490. format(string, sizeof(string), "USAGE: /carupgrade [carname]");
  8491. SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
  8492. SendClientMessage(playerid, COLOR_WHITE,"*** CAR UPGRADES Cost $100000 ***");
  8493. SendClientMessage(playerid, COLOR_GRAD2,string);
  8494. if(PlayerInfo[playerid][pLevel] >= 3)
  8495. {
  8496. SendClientMessage(playerid, COLOR_GRAD3, "Cars: blistacompact clover elegant emperor glendale greenwood");
  8497. SendClientMessage(playerid, COLOR_GRAD3, "Cars: huntley jester landstalker merit nebula sabre stratum");
  8498. SendClientMessage(playerid, COLOR_GRAD3, "Cars: sunrise tahoma uranus");
  8499. SendClientMessage(playerid, COLOR_GRAD3, "Donation cars: stretch elegy phoenix hotknife bandito sultan");
  8500. }
  8501. SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
  8502. return 1;
  8503. }
  8504. if(SBizzInfo[5][sbProducts] == 0)
  8505. {
  8506. GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
  8507. return 1;
  8508. }
  8509. strmid(gunid, tmp, 0, strlen(cmdtext), 255);
  8510. if (GetPlayerMoney(playerid) > 100000)
  8511. {
  8512. if(strcmp(gunid, "stretch", true, strlen(gunid)) == 0)
  8513. {
  8514. if(PlayerInfo[playerid][pDonateRank] < 1)
  8515. {
  8516. SendClientMessage(playerid, COLOR_GREY, " You don't have a Premium Account !");
  8517. return 1;
  8518. }
  8519. SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Stretch");
  8520. HouseInfo[house][hVec] = 409;
  8521. }
  8522. else if(strcmp(gunid, "hotknife", true, strlen(gunid)) == 0)
  8523. {
  8524. if(PlayerInfo[playerid][pDonateRank] < 1)
  8525. {
  8526. SendClientMessage(playerid, COLOR_GREY, " You don't have a Premium Account !");
  8527. return 1;
  8528. }
  8529. SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Hotknife");
  8530. HouseInfo[house][hVec] = 434;
  8531. }
  8532. else if(strcmp(gunid, "bandito", true, strlen(gunid)) == 0)
  8533. {
  8534. if(PlayerInfo[playerid][pDonateRank] < 1)
  8535. {
  8536. SendClientMessage(playerid, COLOR_GREY, " You don't have a Premium Account !");
  8537. return 1;
  8538. }
  8539. SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Bandito");
  8540. HouseInfo[house][hVec] = 568;
  8541. }
  8542. else if(strcmp(gunid, "sultan", true, strlen(gunid)) == 0)
  8543. {
  8544. if(PlayerInfo[playerid][pDonateRank] < 1)
  8545. {
  8546. SendClientMessage(playerid, COLOR_GREY, " You don't have a Premium Account !");
  8547. return 1;
  8548. }
  8549. SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Sultan");
  8550. HouseInfo[house][hVec] = 560;
  8551. }
  8552. else if(strcmp(gunid, "elegy", true, strlen(gunid)) == 0)
  8553. {
  8554. if(PlayerInfo[playerid][pDonateRank] < 1)
  8555. {
  8556. SendClientMessage(playerid, COLOR_GREY, " You don't have a Premium Account !");
  8557. return 1;
  8558. }
  8559. SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Elegy");
  8560. HouseInfo[house][hVec] = 562;
  8561. }
  8562. else if(strcmp(gunid, "phoenix", true, strlen(gunid)) == 0)
  8563. {
  8564. if(PlayerInfo[playerid][pDonateRank] < 1)
  8565. {
  8566. SendClientMessage(playerid, COLOR_GREY, " You don't have a Premium Account !");
  8567. return 1;
  8568. }
  8569. SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Phoenix");
  8570. HouseInfo[house][hVec] = 603;
  8571. }
  8572. else if(strcmp(gunid, "blistacompact", true, strlen(gunid)) == 0)
  8573. {
  8574. SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Blista Compact");
  8575. HouseInfo[house][hVec] = 496;
  8576. }
  8577. else if(strcmp(gunid, "clover", true, strlen(gunid)) == 0)
  8578. {
  8579. SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Clover");
  8580. HouseInfo[house][hVec] = 542;
  8581. }
  8582. else if(strcmp(gunid, "elegant", true, strlen(gunid)) == 0)
  8583. {
  8584. SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Elegant");
  8585. HouseInfo[house][hVec] = 507;
  8586. }
  8587. else if(strcmp(gunid, "emperor", true, strlen(gunid)) == 0)
  8588. {
  8589. SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Emperor");
  8590. HouseInfo[house][hVec] = 585;
  8591. }
  8592. else if(strcmp(gunid, "glendale", true, strlen(gunid)) == 0)
  8593. {
  8594. SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Glendale");
  8595. HouseInfo[house][hVec] = 466;
  8596. }
  8597. else if(strcmp(gunid, "greenwood", true, strlen(gunid)) == 0)
  8598. {
  8599. SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Greenwood");
  8600. HouseInfo[house][hVec] = 492;
  8601. }
  8602. else if(strcmp(gunid, "huntley", true, strlen(gunid)) == 0)
  8603. {
  8604. SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Huntley");
  8605. HouseInfo[house][hVec] = 579;
  8606. }
  8607. else if(strcmp(gunid, "jester", true, strlen(gunid)) == 0)
  8608. {
  8609. SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Jester");
  8610. HouseInfo[house][hVec] = 559;
  8611. }
  8612. else if(strcmp(gunid, "landstalker", true, strlen(gunid)) == 0)
  8613. {
  8614. SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Landstalker");
  8615. HouseInfo[house][hVec] = 400;
  8616. }
  8617. else if(strcmp(gunid, "merit", true, strlen(gunid)) == 0)
  8618. {
  8619. SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Merit");
  8620. HouseInfo[house][hVec] = 551;
  8621. }
  8622. else if(strcmp(gunid, "nebula", true, strlen(gunid)) == 0)
  8623. {
  8624. SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Nebula");
  8625. HouseInfo[house][hVec] = 516;
  8626. }
  8627. else if(strcmp(gunid, "sabre", true, strlen(gunid)) == 0)
  8628. {
  8629. SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Sabre");
  8630. HouseInfo[house][hVec] = 475;
  8631. }
  8632. else if(strcmp(gunid, "stratum", true, strlen(gunid)) == 0)
  8633. {
  8634. SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Stratum");
  8635. HouseInfo[house][hVec] = 561;
  8636. }
  8637. else if(strcmp(gunid, "sunrise", true, strlen(gunid)) == 0)
  8638. {
  8639. SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Sunrise");
  8640. HouseInfo[house][hVec] = 550;
  8641. }
  8642. else if(strcmp(gunid, "tahoma", true, strlen(gunid)) == 0)
  8643. {
  8644. SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Tahoma");
  8645. HouseInfo[house][hVec] = 566;
  8646. }
  8647. else if(strcmp(gunid, "uranus", true, strlen(gunid)) == 0)
  8648. {
  8649. SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: Your House Car Is Now A Uranus");
  8650. HouseInfo[house][hVec] = 558;
  8651. }
  8652. else
  8653. {
  8654. SendClientMessage(playerid, COLOR_GRAD6, " Unrecognized Car or Donate Rank not High enough.");
  8655. return 1;
  8656. }
  8657. SendClientMessage(playerid, COLOR_GRAD6, "Your new car will be delivered within 24 hours -$100000");
  8658. OnPropUpdate();
  8659. GivePlayerMoney(playerid,-100000);
  8660. SBizzInfo[5][sbTill] += 100000;
  8661. ExtortionSBiz(5, 100000);
  8662. SBizzInfo[5][sbProducts]--;
  8663. PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
  8664. }
  8665. else
  8666. {
  8667. SendClientMessage(playerid, COLOR_GRAD2, " You can't afford that ($100000)");
  8668. return 1;
  8669. }
  8670. }
  8671. else
  8672. {
  8673. SendClientMessage(playerid, COLOR_GRAD2, " You don't own a house");
  8674. return 1;
  8675. }
  8676. }
  8677. return 1;
  8678. }
  8679. if (strcmp(cmd, "/resetupgrades", true) == 0)
  8680. {
  8681. if(IsPlayerConnected(playerid))
  8682. {
  8683. if (gPlayerLogged[playerid] == 0)
  8684. {
  8685. SendClientMessage(playerid, COLOR_GRAD1, " You are not Logged in !");
  8686. return 1;
  8687. }
  8688. if (GetPlayerMoney(playerid) < 100000)
  8689. {
  8690. SendClientMessage(playerid, COLOR_GRAD1, " Cost is $100000 !");
  8691. return 1;
  8692. }
  8693. if (PlayerInfo[playerid][pLevel] < 2)
  8694. {
  8695. SendClientMessage(playerid, COLOR_GRAD1, " You need to be at least level 2 !");
  8696. return 1;
  8697. }
  8698. PlayerInfo[playerid][gPupgrade] = (PlayerInfo[playerid][pLevel]-1)*2;
  8699. PlayerInfo[playerid][pSHealth] = 0.0;
  8700. PlayerInfo[playerid][pAlcoholPerk] = 0;
  8701. PlayerInfo[playerid][pDrugPerk] = 0;
  8702. PlayerInfo[playerid][pMiserPerk] = 0;
  8703. PlayerInfo[playerid][pPainPerk] = 0;
  8704. PlayerInfo[playerid][pTraderPerk] = 0;
  8705. GivePlayerMoney(playerid,-100000);
  8706. PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
  8707. format(string, 256, " You have %d unspent Upgrade Points !",PlayerInfo[playerid][gPupgrade]);
  8708. SendClientMessage(playerid, COLOR_GRAD2, string);
  8709. }
  8710. return 1;
  8711. }
  8712. if (strcmp(cmd, "/buygun", true) == 0)
  8713. {
  8714. if(IsPlayerConnected(playerid))
  8715. {
  8716. if(GetPlayerMoney(playerid) < 1)
  8717. {
  8718. SendClientMessage(playerid, COLOR_GREY, " You dont have enough money with you !");
  8719. return 1;
  8720. }
  8721. new gun;
  8722. new gunid[16];
  8723. new gunstring1[256];
  8724. new gunstring2[256];
  8725. new gunstring3[256];
  8726. new gunstring4[256];
  8727. new gunstring5[256];
  8728. new infostring[256];
  8729. new guncharge;
  8730. new ammocharge;
  8731. new location = PlayerInfo[playerid][pLocal];
  8732. if(location == 99 || location == 100 || location == 102)
  8733. {
  8734. if(BizzInfo[location-99][bProducts] <= 0)
  8735. {
  8736. GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
  8737. return 1;
  8738. }
  8739. new mod = 100;
  8740. tmp = strtok(cmdtext, idx);
  8741. if(!strlen(tmp))
  8742. {
  8743. format(string, sizeof(string), "USAGE: /buygun [gunname] [ammoamount]");
  8744. SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
  8745. SendClientMessage(playerid, COLOR_WHITE,"*** Guns & Ammo ***");
  8746. SendClientMessage(playerid, COLOR_GRAD2,string);
  8747. format(gunstring1, 256, "Weapons: parachute ($%d) golfclub ($%d) nightstick ($%d) baseballbat ($%d) shovel ($%d) poolcue ($%d)",
  8748. 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);
  8749. SendClientMessage(playerid, COLOR_GRAD3, gunstring1);
  8750. format(gunstring2, 256, "Weapons: purpledildo ($%d) whitedildo ($%d) longwhitedildo ($%d) whitedildo2 ($%d) flowers ($%d) cane",
  8751. 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);
  8752. SendClientMessage(playerid, COLOR_GRAD3, gunstring2);
  8753. format(gunstring3, 256, "Weapons: sdpistol ($%d) deagle ($%d) mp5 ($%d)",
  8754. 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);
  8755. SendClientMessage(playerid, COLOR_GRAD3, gunstring3);
  8756. format(gunstring4, 256, "Weapons: shotgun ($%d) ak47 ($%d) m4 ($%d) rifle ($%d)",
  8757. 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);
  8758. SendClientMessage(playerid, COLOR_GRAD3, gunstring4);
  8759. format(gunstring5, 256, "Weapons: pistolammo ($%d) shotgunammo ($%d) smgammo ($%d) assaultammo ($%d) rifleammo ($%d)",
  8760. GunPrice[25][0],GunPrice[26][0],GunPrice[27][0],GunPrice[28][0],GunPrice[29][0]);
  8761. SendClientMessage(playerid, COLOR_GRAD3, gunstring5);
  8762. SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
  8763. return 1;
  8764. }
  8765. strmid(gunid, tmp, 0, strlen(cmdtext), 255);
  8766. tmp = strtok(cmdtext, idx);
  8767. if(!strlen(tmp))
  8768. {
  8769. format(string, sizeof(string), "USAGE: /buygun [gunname] [ammoamount]");
  8770. return 1;
  8771. }
  8772. new ammo = strval(tmp);
  8773. if(ammo < 1 || ammo > 999) { SendClientMessage(playerid, COLOR_GREY, " Ammo ammount not lower then 1 or higher then 999 !"); return 1; }
  8774. if (strcmp(gunid, "parachute", true, strlen(gunid)) == 0)
  8775. {
  8776. gun = 46;
  8777. guncharge = GunPrice[0][0]/100*mod;
  8778. ammocharge = 0;
  8779. }
  8780. else if (strcmp(gunid, "golfclub", true, strlen(gunid)) == 0)
  8781. {
  8782. gun = 2; guncharge = GunPrice[1][0]/100*mod; ammocharge = 0;
  8783. PlayerInfo[playerid][pGun1] = 2; PlayerInfo[playerid][pAmmo1] = 1;
  8784. }
  8785. else if (strcmp(gunid, "nightstick", true, strlen(gunid)) == 0)
  8786. {
  8787. gun = 3; guncharge = GunPrice[2][0]/100*mod; ammocharge = 0;
  8788. PlayerInfo[playerid][pGun1] = 3; PlayerInfo[playerid][pAmmo1] = 1;
  8789. }
  8790. else if (strcmp(gunid, "baseballbat", true, strlen(gunid)) == 0)
  8791. {
  8792. gun = 5; guncharge = GunPrice[4][0]/100*mod; ammocharge = 0;
  8793. PlayerInfo[playerid][pGun1] = 5; PlayerInfo[playerid][pAmmo1] = 1;
  8794. }
  8795. else if (strcmp(gunid, "shovel", true, strlen(gunid)) == 0)
  8796. {
  8797. gun = 6; guncharge = GunPrice[5][0]/100*mod; ammocharge = 0;
  8798. PlayerInfo[playerid][pGun1] = 6; PlayerInfo[playerid][pAmmo1] = 1;
  8799. }
  8800. else if (strcmp(gunid, "poolcue", true, strlen(gunid)) == 0)
  8801. {
  8802. gun = 7; guncharge = GunPrice[6][0]/100*mod; ammocharge = 0;
  8803. PlayerInfo[playerid][pGun1] = 7; PlayerInfo[playerid][pAmmo1] = 1;
  8804. }
  8805. else if (strcmp(gunid, "purpledildo", true, strlen(gunid)) == 0)
  8806. {
  8807. gun = 10; guncharge = GunPrice[7][0]/100*mod; ammocharge = 0;
  8808. PlayerInfo[playerid][pGun1] = 10; PlayerInfo[playerid][pAmmo1] = 1;
  8809. }
  8810. else if (strcmp(gunid, "whitedildo", true, strlen(gunid)) == 0)
  8811. {
  8812. gun = 11; guncharge = GunPrice[8][0]/100*mod; ammocharge = 0;
  8813. PlayerInfo[playerid][pGun1] = 11; PlayerInfo[playerid][pAmmo1] = 1;
  8814. }
  8815. else if (strcmp(gunid, "longwhitedildo", true, strlen(gunid)) == 0)
  8816. {
  8817. gun = 12; guncharge = GunPrice[9][0]/100*mod; ammocharge = 0;
  8818. PlayerInfo[playerid][pGun1] = 12; PlayerInfo[playerid][pAmmo1] = 1;
  8819. }
  8820. else if (strcmp(gunid, "whitedildo2", true, strlen(gunid)) == 0)
  8821. {
  8822. gun = 13; guncharge = GunPrice[10][0]/100*mod; ammocharge = 0;
  8823. PlayerInfo[playerid][pGun1] = 13; PlayerInfo[playerid][pAmmo1] = 1;
  8824. }
  8825. else if (strcmp(gunid, "flowers", true, strlen(gunid)) == 0)
  8826. {
  8827. gun = 14; guncharge = GunPrice[11][0]/100*mod; ammocharge = 0;
  8828. PlayerInfo[playerid][pGun1] = 14; PlayerInfo[playerid][pAmmo1] = 1;
  8829. }
  8830. else if (strcmp(gunid, "cane", true, strlen(gunid)) == 0)
  8831. {
  8832. gun = 15; guncharge = GunPrice[12][0]/100*mod; ammocharge = 0;
  8833. PlayerInfo[playerid][pGun1] = 15; PlayerInfo[playerid][pAmmo1] = 1;
  8834. }
  8835. else if (strcmp(gunid, "sdpistol", true, strlen(gunid)) == 0)
  8836. {
  8837. gun = 23; guncharge = GunPrice[13][0]/100*mod; ammocharge = GunPrice[25][0]*ammo;
  8838. PlayerInfo[playerid][pGun2] = 23; PlayerInfo[playerid][pAmmo2] = ammo;
  8839. }
  8840. else if (strcmp(gunid, "deagle", true, strlen(gunid)) == 0)
  8841. {
  8842. gun = 24; guncharge = GunPrice[15][0]/100*mod; ammocharge = GunPrice[25][0]*ammo;
  8843. PlayerInfo[playerid][pGun2] = 24; PlayerInfo[playerid][pAmmo2] = ammo;
  8844. }
  8845. else if (strcmp(gunid, "mp5", true, strlen(gunid)) == 0)
  8846. {
  8847. gun = 29; guncharge = GunPrice[18][0]/100*mod; ammocharge = GunPrice[27][0]*ammo;
  8848. PlayerInfo[playerid][pGun3] = 29; PlayerInfo[playerid][pAmmo3] = ammo;
  8849. }
  8850. else if (strcmp(gunid, "shotgun", true, strlen(gunid)) == 0)
  8851. {
  8852. gun = 25; guncharge = GunPrice[19][0]/100*mod; ammocharge = GunPrice[26][0]*ammo;
  8853. PlayerInfo[playerid][pGun3] = 25; PlayerInfo[playerid][pAmmo3] = ammo;
  8854. }
  8855. else if (strcmp(gunid, "ak47", true, strlen(gunid)) == 0)
  8856. {
  8857. gun = 30; guncharge = GunPrice[22][0]/100*mod; ammocharge = GunPrice[28][0]*ammo;
  8858. PlayerInfo[playerid][pGun4] = 30; PlayerInfo[playerid][pAmmo4] = ammo;
  8859. }
  8860. else if (strcmp(gunid, "m4", true, strlen(gunid)) == 0)
  8861. {
  8862. gun = 31; guncharge = GunPrice[23][0]/100*mod; ammocharge = GunPrice[28][0]*ammo;
  8863. PlayerInfo[playerid][pGun4] = 31; PlayerInfo[playerid][pAmmo4] = ammo;
  8864. }
  8865. else if (strcmp(gunid, "rifle", true, strlen(gunid)) == 0)
  8866. {
  8867. gun = 33; guncharge = GunPrice[24][0]/100*mod; ammocharge = GunPrice[29][0]*ammo;
  8868. PlayerInfo[playerid][pGun4] = 33; PlayerInfo[playerid][pAmmo4] = ammo;
  8869. }
  8870. else
  8871. {
  8872. SendClientMessage(playerid, COLOR_GRAD6, "ShopKeeper says: I have never heard of that weapon.");
  8873. return 1;
  8874. }
  8875. if((guncharge+ammocharge) > GetPlayerMoney(playerid))
  8876. {
  8877. format(infostring, 256, " You don't have $%d !",guncharge+ammocharge);
  8878. SendClientMessage(playerid, COLOR_GRAD3, infostring);
  8879. return 1;
  8880. }
  8881. if(GetPlayerMoney(playerid) < (guncharge+ammocharge))
  8882. {
  8883. SendClientMessage(playerid, COLOR_GREY, " Can't afford that !");
  8884. return 1;
  8885. }
  8886. new payout = guncharge + ammocharge;
  8887. format(infostring, 256, "You have purchased %s with %d ammo for $%d",gunid,ammo,payout);
  8888. SendClientMessage(playerid, COLOR_GRAD3, infostring);
  8889. if(location == 102 && IsACop(playerid)) { }
  8890. else { GivePlayerMoney(playerid, - payout); }
  8891. BizzInfo[location-99][bTill] += payout;
  8892. ExtortionBiz(location-99, payout);
  8893. BizzInfo[location-99][bProducts]--;
  8894. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  8895. GivePlayerWeapon(playerid, gun, ammo);
  8896. GetPlayerName(playerid, sendername, sizeof(sendername));
  8897. format(string, sizeof(string), "%s bought weapons for $%d at biz %d", sendername, payout, location-99);
  8898. printf("%s", string);
  8899. PayLog(string);
  8900. }
  8901. else
  8902. {
  8903. SendClientMessage(playerid, COLOR_WHITE,"You are not in a store.");
  8904. return 1;
  8905. }
  8906. }
  8907. return 1;
  8908. }
  8909. if (strcmp(cmd, "/upgrade", true) == 0)
  8910. {
  8911. if(IsPlayerConnected(playerid))
  8912. {
  8913. new gunid[16];
  8914. new infostring[256];
  8915. tmp = strtok(cmdtext, idx);
  8916. if(!strlen(tmp))
  8917. {
  8918. format(string, sizeof(string), "USAGE: /upgrade [upgradename] (You have %d Upgrade points)",PlayerInfo[playerid][gPupgrade]);
  8919. SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
  8920. SendClientMessage(playerid, COLOR_WHITE,"*** UPGRADES ***");
  8921. SendClientMessage(playerid, COLOR_GRAD2,string);
  8922. if(PlayerInfo[playerid][pLevel] == 2)
  8923. {
  8924. SendClientMessage(playerid, COLOR_GRAD3, "Level 2 Perks: Alcoholic, DrugAddict");
  8925. }
  8926. else if(PlayerInfo[playerid][pLevel] == 3)
  8927. {
  8928. SendClientMessage(playerid, COLOR_GRAD3, "Level 3 Perks: Alcoholic, DrugAddict, Miser");
  8929. }
  8930. else if(PlayerInfo[playerid][pLevel] == 3)
  8931. {
  8932. SendClientMessage(playerid, COLOR_GRAD3, "Level 4 Perks: Alcoholic, DrugAddict, Miser, Trader");
  8933. }
  8934. else if(PlayerInfo[playerid][pLevel] >= 5)
  8935. {
  8936. SendClientMessage(playerid, COLOR_GRAD3, "Level 5 Perks: Alcoholic, DrugAddict, Miser, Trader, PainKillers");
  8937. }
  8938. SendClientMessage(playerid, COLOR_GRAD5, "Extra Health: health");
  8939. SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
  8940. return 1;
  8941. }
  8942. strmid(gunid, tmp, 0, strlen(cmdtext), 255);
  8943. if (PlayerInfo[playerid][gPupgrade] > 1)
  8944. {
  8945. if (PlayerInfo[playerid][pLevel] >= 1 && (strcmp(gunid, "health", true, strlen(gunid)) == 0))
  8946. {
  8947. if (PlayerInfo[playerid][pSHealth] < 50)
  8948. {
  8949. PlayerInfo[playerid][pSHealth] = PlayerInfo[playerid][pSHealth]+5.0;
  8950. format(infostring, 256, "New Upgrade: You Will Now Spawn With %.2f Health (+5)",PlayerInfo[playerid][pSHealth]+50);
  8951. }
  8952. else
  8953. {
  8954. SendClientMessage(playerid, COLOR_GRAD6, " You Have Maximum Spawn Health");
  8955. return 1;
  8956. }
  8957. }
  8958. else if (PlayerInfo[playerid][pLevel] >= 2 && (strcmp(gunid, "alcoholic", true, strlen(gunid)) == 0))
  8959. {
  8960. if (PlayerInfo[playerid][pAlcoholPerk] < 3)
  8961. {
  8962. PlayerInfo[playerid][pAlcoholPerk] += 1;
  8963. format(infostring, 256, "New Perk Upgrade: Your Alcoholic Perk is now Level %d.",PlayerInfo[playerid][pAlcoholPerk]);
  8964. PlayerInfo[playerid][gPupgrade]--;
  8965. }
  8966. else
  8967. {
  8968. SendClientMessage(playerid, COLOR_GRAD6, " Your Alcoholic Perk is maxed out !");
  8969. return 1;
  8970. }
  8971. }
  8972. else if (PlayerInfo[playerid][pLevel] >= 2 && (strcmp(gunid, "drugaddict", true, strlen(gunid)) == 0))
  8973. {
  8974. if (PlayerInfo[playerid][pDrugPerk] < 3)
  8975. {
  8976. PlayerInfo[playerid][pDrugPerk] += 1;
  8977. format(infostring, 256, "New Perk Upgrade: Your Drug Addict Perk is now Level %d.",PlayerInfo[playerid][pDrugPerk]);
  8978. PlayerInfo[playerid][gPupgrade]--;
  8979. }
  8980. else
  8981. {
  8982. SendClientMessage(playerid, COLOR_GRAD6, " Your Drug Addict Perk is maxed out !");
  8983. return 1;
  8984. }
  8985. }
  8986. else if (PlayerInfo[playerid][pLevel] >= 3 && (strcmp(gunid, "miser", true, strlen(gunid)) == 0))
  8987. {
  8988. if (PlayerInfo[playerid][pMiserPerk] < 3)
  8989. {
  8990. PlayerInfo[playerid][pMiserPerk] += 1;
  8991. format(infostring, 256, "New Perk Upgrade: Your Miser Perk is now Level %d.",PlayerInfo[playerid][pMiserPerk]);
  8992. PlayerInfo[playerid][gPupgrade]--;
  8993. }
  8994. else
  8995. {
  8996. SendClientMessage(playerid, COLOR_GRAD6, " Your Miser Perk is maxed out !");
  8997. return 1;
  8998. }
  8999. }
  9000. else if (PlayerInfo[playerid][pLevel] >= 4 && (strcmp(gunid, "trader", true, strlen(gunid)) == 0))
  9001. {
  9002. if (PlayerInfo[playerid][pTraderPerk] < 3)
  9003. {
  9004. PlayerInfo[playerid][pTraderPerk] += 1;
  9005. format(infostring, 256, "New Perk Upgrade: Your Trader Perk is now Level %d.",PlayerInfo[playerid][pTraderPerk]);
  9006. PlayerInfo[playerid][gPupgrade]--;
  9007. }
  9008. else
  9009. {
  9010. SendClientMessage(playerid, COLOR_GRAD6, " Your Trader Perk is maxed out !");
  9011. return 1;
  9012. }
  9013. }
  9014. else if (PlayerInfo[playerid][pLevel] >= 5 && (strcmp(gunid, "painkillers", true, strlen(gunid)) == 0))
  9015. {
  9016. if (PlayerInfo[playerid][pPainPerk] < 3)
  9017. {
  9018. PlayerInfo[playerid][pPainPerk] += 1;
  9019. format(infostring, 256, "New Perk Upgrade: Your Pain Killers Perk is now Level %d.",PlayerInfo[playerid][pPainPerk]);
  9020. PlayerInfo[playerid][gPupgrade]--;
  9021. }
  9022. else
  9023. {
  9024. SendClientMessage(playerid, COLOR_GRAD6, " Your Pain Killers Perk is maxed out !");
  9025. return 1;
  9026. }
  9027. }
  9028. else
  9029. {
  9030. SendClientMessage(playerid, COLOR_GRAD6, " Unrecognized Upgrade");
  9031. return 1;
  9032. }
  9033. }
  9034. else
  9035. {
  9036. SendClientMessage(playerid, COLOR_GRAD6, " You Have 0 Upgrade Points");
  9037. return 1;
  9038. }
  9039. SendClientMessage(playerid, COLOR_GRAD6, infostring);
  9040. PlayerInfo[playerid][gPupgrade]--;
  9041. }
  9042. return 1;
  9043. }
  9044. //-------------------------------[Login]--------------------------------------------------------------------------
  9045. if (strcmp(cmd, "/login", true) ==0 )
  9046. {
  9047. if(IsPlayerConnected(playerid))
  9048. {
  9049. new tmppass[64];
  9050. if(gPlayerLogged[playerid] == 1)
  9051. {
  9052. SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are already logged in.");
  9053. return 1;
  9054. }
  9055. tmp = strtok(cmdtext, idx);
  9056. if(!strlen(tmp))
  9057. {
  9058. SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /login [password]");
  9059. return 1;
  9060. }
  9061. strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
  9062. Encrypt(tmppass);
  9063. OnPlayerLogin(playerid,tmppass);
  9064. }
  9065. return 1;
  9066. }
  9067. //----------------------------------[ooc]-----------------------------------------------
  9068. if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
  9069. {
  9070. if(IsPlayerConnected(playerid))
  9071. {
  9072. if(gPlayerLogged[playerid] == 0)
  9073. {
  9074. SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
  9075. return 1;
  9076. }
  9077. if ((noooc) && PlayerInfo[playerid][pAdmin] < 1)
  9078. {
  9079. SendClientMessage(playerid, COLOR_GRAD2, " The OOC channel has been disabled by an Admin !");
  9080. return 1;
  9081. }
  9082. if(PlayerInfo[playerid][pMuted] == 1)
  9083. {
  9084. SendClientMessage(playerid, TEAM_CYAN_COLOR, " You can't speak, you have been silenced !");
  9085. return 1;
  9086. }
  9087. GetPlayerName(playerid, sendername, sizeof(sendername));
  9088. new length = strlen(cmdtext);
  9089. while ((idx < length) && (cmdtext[idx] <= ' '))
  9090. {
  9091. idx++;
  9092. }
  9093. new offset = idx;
  9094. new result[64];
  9095. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  9096. {
  9097. result[idx - offset] = cmdtext[idx];
  9098. idx++;
  9099. }
  9100. result[idx - offset] = EOS;
  9101. if(!strlen(result))
  9102. {
  9103. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/o)oc [ooc chat]");
  9104. return 1;
  9105. }
  9106. format(string, sizeof(string), "(( %s: %s ))", sendername, result);
  9107. OOCOff(COLOR_OOC,string);
  9108. printf("%s", string);
  9109. }
  9110. return 1;
  9111. }
  9112. if(strcmp(cmd, "/noooc", true) == 0)
  9113. {
  9114. if(IsPlayerConnected(playerid))
  9115. {
  9116. if (PlayerInfo[playerid][pAdmin] >= 3 && (!noooc))
  9117. {
  9118. noooc = 1;
  9119. BroadCast(COLOR_GRAD2, " OOC chat channel disabled by an Admin !");
  9120. }
  9121. else if (PlayerInfo[playerid][pAdmin] >= 3 && (noooc))
  9122. {
  9123. noooc = 0;
  9124. BroadCast(COLOR_GRAD2, " OOC chat channel enabled by an Admin !");
  9125. }
  9126. else
  9127. {
  9128. SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
  9129. }
  9130. }
  9131. return 1;
  9132. }
  9133. if(strcmp(cmd, "/speedo", true) == 0)
  9134. {
  9135. if(IsPlayerConnected(playerid))
  9136. {
  9137. if (gSpeedo[playerid] == 1)
  9138. {
  9139. gSpeedo[playerid] = 2;
  9140. GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~g~on", 5000, 5);
  9141. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  9142. }
  9143. else if (gSpeedo[playerid] == 2)
  9144. {
  9145. gSpeedo[playerid] = 1;
  9146. GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~r~off", 5000, 5);
  9147. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  9148. }
  9149. else
  9150. {
  9151. SendClientMessage(playerid, COLOR_GRAD1, "you dont have a speedometer");
  9152. }
  9153. }
  9154. return 1;
  9155. }
  9156. if(strcmp(cmd, "/fuel", true) == 0)
  9157. {
  9158. if(IsPlayerConnected(playerid))
  9159. {
  9160. if (gGas[playerid] == 0)
  9161. {
  9162. gGas[playerid] = 1;
  9163. GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~g~Fuel Info on", 5000, 5);
  9164. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  9165. }
  9166. else if (gGas[playerid] == 1)
  9167. {
  9168. gGas[playerid] = 0;
  9169. GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~r~Fuel Info off", 5000, 5);
  9170. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  9171. }
  9172. }
  9173. return 1;
  9174. }
  9175. //----------------------------------[advertise]-----------------------------------------------
  9176. if(strcmp(cmd, "/advertise", true) == 0 || strcmp(cmd, "/ad", true) == 0)
  9177. {
  9178. if(IsPlayerConnected(playerid))
  9179. {
  9180. if(gPlayerLogged[playerid] == 0)
  9181. {
  9182. SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
  9183. return 1;
  9184. }
  9185. GetPlayerName(playerid, sendername, sizeof(sendername));
  9186. new length = strlen(cmdtext);
  9187. while ((idx < length) && (cmdtext[idx] <= ' '))
  9188. {
  9189. idx++;
  9190. }
  9191. new offset = idx;
  9192. new result[64];
  9193. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  9194. {
  9195. result[idx - offset] = cmdtext[idx];
  9196. idx++;
  9197. }
  9198. result[idx - offset] = EOS;
  9199. if(!strlen(result))
  9200. {
  9201. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/ad)vertise [advert text]");
  9202. return 1;
  9203. }
  9204. if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1))
  9205. {
  9206. format(string, sizeof(string), " Please try again later %d seconds between Advertisements !", (addtimer/1000));
  9207. SendClientMessage(playerid, COLOR_GRAD2, string);
  9208. return 1;
  9209.  
  9210. }
  9211. new payout = idx * 25;
  9212. if(GetPlayerMoney(playerid) < payout)
  9213. {
  9214. format(string, sizeof(string), "* You used %d characters which cost $%d, you don't have enough.", offset, payout);
  9215. SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
  9216. return 1;
  9217. }
  9218. GivePlayerMoney(playerid, - payout);
  9219. SBizzInfo[7][sbTill] += payout;
  9220. ExtortionSBiz(7, payout);
  9221. format(string, sizeof(string), "Advertisement: %s, Contact: %s Ph: %d", result, sendername,PlayerInfo[playerid][pPnumber]);
  9222. OOCNews(TEAM_GROVE_COLOR,string);
  9223. format(string, sizeof(string), "~r~Paid $%d~n~~w~Message contained: %d Characters", payout, idx);
  9224. GameTextForPlayer(playerid, string, 5000, 5);
  9225. if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;}
  9226. }
  9227. return 1;
  9228. }
  9229. //----------------------------------[government]-----------------------------------------------
  9230. if(strcmp(cmd, "/government", true) == 0 || strcmp(cmd, "/gov", true) == 0)
  9231. {
  9232. if(IsPlayerConnected(playerid))
  9233. {
  9234. if(gTeam[playerid] != 2)
  9235. {
  9236. SendClientMessage(playerid, COLOR_GREY, " You are not a Cop !");
  9237. return 1;
  9238. }
  9239. if(PlayerInfo[playerid][pRank] < 5)
  9240. {
  9241. SendClientMessage(playerid, COLOR_GREY, " You need to be Rank 5 to be able to use this !");
  9242. return 1;
  9243. }
  9244. GetPlayerName(playerid, sendername, sizeof(sendername));
  9245. new length = strlen(cmdtext);
  9246. while ((idx < length) && (cmdtext[idx] <= ' '))
  9247. {
  9248. idx++;
  9249. }
  9250. new offset = idx;
  9251. new result[64];
  9252. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  9253. {
  9254. result[idx - offset] = cmdtext[idx];
  9255. idx++;
  9256. }
  9257. result[idx - offset] = EOS;
  9258. if(!strlen(result))
  9259. {
  9260. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/gov)ernment [text]");
  9261. return 1;
  9262. }
  9263. SendClientMessageToAll(COLOR_WHITE, "|___________ Government News Announcement ___________|");
  9264. format(string, sizeof(string), "Officer %s: %s", sendername, result);
  9265. SendClientMessageToAll(COLOR_DBLUE, string);
  9266. }
  9267. return 1;
  9268. }
  9269. //----------------------------------[togooc]-----------------------------------------------
  9270.  
  9271. if(strcmp(cmd, "/togooc", true) == 0)
  9272. {
  9273. if(IsPlayerConnected(playerid))
  9274. {
  9275. if (!gOoc[playerid])
  9276. {
  9277. gOoc[playerid] = 1;
  9278. SendClientMessage(playerid, COLOR_GRAD2, " OOC chat channel Disabled !");
  9279. }
  9280. else if (gOoc[playerid])
  9281. {
  9282. gOoc[playerid] = 0;
  9283. SendClientMessage(playerid, COLOR_GRAD2, " OOC chat channel Enabled !");
  9284. }
  9285. }
  9286. return 1;
  9287. }
  9288. if(strcmp(cmd, "/tognews", true) == 0)
  9289. {
  9290. if(IsPlayerConnected(playerid))
  9291. {
  9292. if (!gNews[playerid])
  9293. {
  9294. gNews[playerid] = 1;
  9295. SendClientMessage(playerid, COLOR_GRAD2, " News chat channel Disabled !");
  9296. }
  9297. else if (gNews[playerid])
  9298. {
  9299. gNews[playerid] = 0;
  9300. SendClientMessage(playerid, COLOR_GRAD2, " News chat channel Enabled !");
  9301. }
  9302. }
  9303. return 1;
  9304. }
  9305. if(strcmp(cmd, "/togfam", true) == 0)
  9306. {
  9307. if(IsPlayerConnected(playerid))
  9308. {
  9309. if (!gFam[playerid])
  9310. {
  9311. gFam[playerid] = 1;
  9312. SendClientMessage(playerid, COLOR_GRAD2, " Family chat channel Disabled !");
  9313. }
  9314. else if (gFam[playerid])
  9315. {
  9316. gFam[playerid] = 0;
  9317. SendClientMessage(playerid, COLOR_GRAD2, " Family chat channel Enabled !");
  9318. }
  9319. }
  9320. return 1;
  9321. }
  9322. if(strcmp(cmd, "/togwhisper", true) == 0)
  9323. {
  9324. if(IsPlayerConnected(playerid))
  9325. {
  9326. if(PlayerInfo[playerid][pDonateRank] > 0 || PlayerInfo[playerid][pAdmin] > 1)
  9327. {
  9328. if (!HidePM[playerid])
  9329. {
  9330. HidePM[playerid] = 1;
  9331. SendClientMessage(playerid, COLOR_GRAD2, " Whisper chat channel Disabled !");
  9332. }
  9333. else if (HidePM[playerid])
  9334. {
  9335. HidePM[playerid] = 0;
  9336. SendClientMessage(playerid, COLOR_GRAD2, " Whisper chat channel Enabled !");
  9337. }
  9338. }
  9339. else
  9340. {
  9341. SendClientMessage(playerid, COLOR_GREY, " Not an Admin / Premium Account User !");
  9342. return 1;
  9343. }
  9344. }
  9345. return 1;
  9346. }
  9347. if(strcmp(cmd, "/togphone", true) == 0)
  9348. {
  9349. if(IsPlayerConnected(playerid))
  9350. {
  9351. if(PlayerInfo[playerid][pDonateRank] > 0 || PlayerInfo[playerid][pAdmin] > 1)
  9352. {
  9353. if (!PhoneOnline[playerid])
  9354. {
  9355. PhoneOnline[playerid] = 1;
  9356. SendClientMessage(playerid, COLOR_GRAD2, " Your Phone is Offline !");
  9357. }
  9358. else if (PhoneOnline[playerid])
  9359. {
  9360. PhoneOnline[playerid] = 0;
  9361. SendClientMessage(playerid, COLOR_GRAD2, " Your Phone is Online !");
  9362. }
  9363. }
  9364. else
  9365. {
  9366. SendClientMessage(playerid, COLOR_GREY, " Not an Admin / Premium Account User !");
  9367. return 1;
  9368. }
  9369. }
  9370. return 1;
  9371. }
  9372. //----------------------------------[Emote]-----------------------------------------------
  9373. if(strcmp(cmd, "/me", true) == 0)
  9374. {
  9375. if(IsPlayerConnected(playerid))
  9376. {
  9377. if(gPlayerLogged[playerid] == 0)
  9378. {
  9379. SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
  9380. return 1;
  9381. }
  9382. GetPlayerName(playerid, sendername, sizeof(sendername));
  9383. new length = strlen(cmdtext);
  9384. while ((idx < length) && (cmdtext[idx] <= ' '))
  9385. {
  9386. idx++;
  9387. }
  9388. new offset = idx;
  9389. new result[64];
  9390. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  9391. {
  9392. result[idx - offset] = cmdtext[idx];
  9393. idx++;
  9394. }
  9395. result[idx - offset] = EOS;
  9396. if(!strlen(result))
  9397. {
  9398. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /me [action]");
  9399. return 1;
  9400. }
  9401. format(string, sizeof(string), "* %s %s", sendername, result);
  9402. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  9403. printf("%s", string);
  9404. }
  9405. return 1;
  9406. }
  9407. //----------------------------------[Local]-----------------------------------------------
  9408. if(strcmp(cmd, "/local", true) == 0 || strcmp(cmd, "/l", true) == 0 || strcmp(cmd, "/say", true) == 0)
  9409. {
  9410. if(IsPlayerConnected(playerid))
  9411. {
  9412. if(gPlayerLogged[playerid] == 0)
  9413. {
  9414. SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
  9415. return 1;
  9416. }
  9417. GetPlayerName(playerid, sendername, sizeof(sendername));
  9418. new length = strlen(cmdtext);
  9419. while ((idx < length) && (cmdtext[idx] <= ' '))
  9420. {
  9421. idx++;
  9422. }
  9423. new offset = idx;
  9424. new result[64];
  9425. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  9426. {
  9427. result[idx - offset] = cmdtext[idx];
  9428. idx++;
  9429. }
  9430. result[idx - offset] = EOS;
  9431. if(!strlen(result))
  9432. {
  9433. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/l)ocal [local chat]");
  9434. return 1;
  9435. }
  9436. format(string, sizeof(string), "%s Says: %s", sendername, result);
  9437. ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  9438. printf("%s", string);
  9439. }
  9440. return 1;
  9441. }
  9442. if(strcmp(cmd, "/b", true) == 0)//local ooc
  9443. {
  9444. if(IsPlayerConnected(playerid))
  9445. {
  9446. if(gPlayerLogged[playerid] == 0)
  9447. {
  9448. SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
  9449. return 1;
  9450. }
  9451. GetPlayerName(playerid, sendername, sizeof(sendername));
  9452. new length = strlen(cmdtext);
  9453. while ((idx < length) && (cmdtext[idx] <= ' '))
  9454. {
  9455. idx++;
  9456. }
  9457. new offset = idx;
  9458. new result[64];
  9459. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  9460. {
  9461. result[idx - offset] = cmdtext[idx];
  9462. idx++;
  9463. }
  9464. result[idx - offset] = EOS;
  9465. if(!strlen(result))
  9466. {
  9467. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /b [local ooc chat]");
  9468. return 1;
  9469. }
  9470. format(string, sizeof(string), "%s Says: (( %s ))", sendername, result);
  9471. ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  9472. printf("%s", string);
  9473. }
  9474. return 1;
  9475. }
  9476. if(strcmp(cmd, "/close", true) == 0 || strcmp(cmd, "/c", true) == 0)
  9477. {
  9478. if(IsPlayerConnected(playerid))
  9479. {
  9480. if(gPlayerLogged[playerid] == 0)
  9481. {
  9482. SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
  9483. return 1;
  9484. }
  9485. GetPlayerName(playerid, sendername, sizeof(sendername));
  9486. new length = strlen(cmdtext);
  9487. while ((idx < length) && (cmdtext[idx] <= ' '))
  9488. {
  9489. idx++;
  9490. }
  9491. new offset = idx;
  9492. new result[64];
  9493. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  9494. {
  9495. result[idx - offset] = cmdtext[idx];
  9496. idx++;
  9497. }
  9498. result[idx - offset] = EOS;
  9499. if(!strlen(result))
  9500. {
  9501. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /(c)lose [close chat text]");
  9502. return 1;
  9503. }
  9504. format(string, sizeof(string), "%s Says: %s", sendername, result);
  9505. ProxDetector(3.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  9506. printf("%s", string);
  9507. }
  9508. return 1;
  9509. }
  9510. //----------------------------------[Shout]-----------------------------------------------
  9511. if(strcmp(cmd, "/shout", true) == 0 || strcmp(cmd, "/s", true) == 0)
  9512. {
  9513. if(IsPlayerConnected(playerid))
  9514. {
  9515. if(gPlayerLogged[playerid] == 0)
  9516. {
  9517. SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
  9518. return 1;
  9519. }
  9520. GetPlayerName(playerid, sendername, sizeof(sendername));
  9521. new length = strlen(cmdtext);
  9522. while ((idx < length) && (cmdtext[idx] <= ' '))
  9523. {
  9524. idx++;
  9525. }
  9526. new offset = idx;
  9527. new result[64];
  9528. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  9529. {
  9530. result[idx - offset] = cmdtext[idx];
  9531. idx++;
  9532. }
  9533. result[idx - offset] = EOS;
  9534. if(!strlen(result))
  9535. {
  9536. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/s)hout [local chat]");
  9537. return 1;
  9538. }
  9539. format(string, sizeof(string), "%s Shouts: %s!!", sendername, result);
  9540. ProxDetector(30.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_FADE1,COLOR_FADE2);
  9541. printf("%s", string);
  9542. }
  9543. return 1;
  9544. }
  9545. //----------------------------------[Shout]-----------------------------------------------
  9546. if(strcmp(cmd, "/megaphone", true) == 0 || strcmp(cmd, "/m", true) == 0)
  9547. {
  9548. if(IsPlayerConnected(playerid))
  9549. {
  9550. new tmpcar = GetPlayerVehicleID(playerid);
  9551. GetPlayerName(playerid, sendername, sizeof(sendername));
  9552. new length = strlen(cmdtext);
  9553. while ((idx < length) && (cmdtext[idx] <= ' '))
  9554. {
  9555. idx++;
  9556. }
  9557. new offset = idx;
  9558. new result[64];
  9559. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  9560. {
  9561. result[idx - offset] = cmdtext[idx];
  9562. idx++;
  9563. }
  9564. result[idx - offset] = EOS;
  9565. if(!strlen(result))
  9566. {
  9567. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/m)egaphone [megaphone chat]");
  9568. return 1;
  9569. }
  9570. if(gTeam[playerid] == 2 || IsACop(playerid))
  9571. {
  9572. if(!IsACopCar(tmpcar))
  9573. {
  9574. SendClientMessage(playerid, COLOR_GRAD2, " You are not in a Police Vehicle !");
  9575. return 1;
  9576. }
  9577. if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1)
  9578. {
  9579. format(string, sizeof(string), "[Officer %s:o< %s]", sendername, result);
  9580. ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  9581. }
  9582. else if(PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 2)
  9583. {
  9584. format(string, sizeof(string), "[Agent %s:o< %s]", sendername, result);
  9585. ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  9586. }
  9587. else if(PlayerInfo[playerid][pMember] == 3||PlayerInfo[playerid][pLeader] == 3)
  9588. {
  9589. format(string, sizeof(string), "[Soldier %s:o< %s]", sendername, result);
  9590. ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
  9591. }
  9592. printf("%s", string);
  9593. }
  9594. else
  9595. {
  9596. SendClientMessage(playerid, COLOR_GRAD2, " You are not part of a Team !");
  9597. return 1;
  9598. }
  9599. }
  9600. return 1;
  9601. }
  9602. //----------------------------------[Team]-----------------------------------------------
  9603. if(strcmp(cmd, "/radio", true) == 0 || strcmp(cmd, "/r", true) == 0)
  9604. {
  9605. if(IsPlayerConnected(playerid))
  9606. {
  9607. GetPlayerName(playerid, sendername, sizeof(sendername));
  9608. new length = strlen(cmdtext);
  9609. while ((idx < length) && (cmdtext[idx] <= ' '))
  9610. {
  9611. idx++;
  9612. }
  9613. new offset = idx;
  9614. new result[64];
  9615. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  9616. {
  9617. result[idx - offset] = cmdtext[idx];
  9618. idx++;
  9619. }
  9620. result[idx - offset] = EOS;
  9621. if(!strlen(result))
  9622. {
  9623. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/r)adio [radio chat]");
  9624. return 1;
  9625. }
  9626. if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
  9627. {
  9628. if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Chief %s: %s, over. **", sendername, result); }
  9629. else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Captain %s: %s, over. **", sendername, result); }
  9630. else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Lieutenant %s: %s, over. **", sendername, result); }
  9631. else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Sergeant %s: %s, over. **", sendername, result); }
  9632. else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Officer %s: %s, over. **", sendername, result); }
  9633. else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Cadet %s: %s, over. **", sendername, result); }
  9634. else
  9635. {
  9636. format(string, sizeof(string), "** Cadet %s: %s, over. **", sendername, result);
  9637. }
  9638. SendRadioMessage(1, TEAM_BLUE_COLOR, string);
  9639. printf("%s", string);
  9640. return 1;
  9641. }
  9642. else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
  9643. {
  9644. if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Director %s: %s, over. **", sendername, result); }
  9645. else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Assistant Director in Charge %s: %s, over. **", sendername, result); }
  9646. else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Special Agent in Charge %s: %s, over. **", sendername, result); }
  9647. else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Special Agent %s: %s, over. **", sendername, result); }
  9648. else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Special Agent Trainee %s: %s, over. **", sendername, result); }
  9649. else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Professional Staff %s: %s, over. **", sendername, result); }
  9650. else
  9651. {
  9652. format(string, sizeof(string), "** Intern %s: %s, over. **", sendername, result);
  9653. }
  9654. SendRadioMessage(2, TEAM_BLUE_COLOR, string);
  9655. printf("%s", string);
  9656. return 1;
  9657. }
  9658. else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
  9659. {
  9660. if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** General %s: %s, over. **", sendername, result); }
  9661. else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Lieutenant %s: %s, over. **", sendername, result); }
  9662. else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Captain %s: %s, over. **", sendername, result); }
  9663. else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Major %s: %s, over. **", sendername, result); }
  9664. else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Sergeant %s: %s, over. **", sendername, result); }
  9665. else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Private %s: %s, over. **", sendername, result); }
  9666. else
  9667. {
  9668. format(string, sizeof(string), "** Private %s: %s, over. **", sendername, result);
  9669. }
  9670. SendRadioMessage(3, TEAM_BLUE_COLOR, string);
  9671. printf("%s", string);
  9672. return 1;
  9673. }
  9674. else if(gTeam[playerid] == 1||PlayerInfo[playerid][pMember]==4||PlayerInfo[playerid][pLeader]==4)
  9675. {
  9676. format(string, sizeof(string), "** Paramedic %s: %s, over. **", sendername, result);
  9677. SendRadioMessage(4, TEAM_CYAN_COLOR, string);
  9678. printf("%s", string);
  9679. return 1;
  9680. }
  9681. else
  9682. {
  9683. SendClientMessage(playerid, COLOR_GRAD2, " You are not part of a Team !");
  9684. return 1;
  9685. }
  9686. }
  9687. return 1;
  9688. }
  9689. //----------------------------------[offduty]-----------------------------------------------
  9690. if(strcmp(cmd, "/duty", true) == 0)
  9691. {
  9692. if(IsPlayerConnected(playerid))
  9693. {
  9694. GetPlayerName(playerid, sendername, sizeof(sendername));
  9695. if(PlayerInfo[playerid][pMember] == 1)
  9696. {
  9697. if (PlayerToPoint(3, playerid,255.3,77.4,1003.6) || PlayerToPoint(3,playerid,-1616.1294,681.1594,7.1875) || PlayerInfo[playerid][pLocal] != 255)
  9698. {
  9699. if(OnDuty[playerid]==0)
  9700. {
  9701. format(string, sizeof(string), "* Officer %s took a Badge and a Gun from his locker.", sendername);
  9702. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  9703. GivePlayerWeapon(playerid, 24, 70);
  9704. GivePlayerWeapon(playerid, 3, 0);
  9705. OnDuty[playerid] = 1;
  9706. }
  9707. else if(OnDuty[playerid]==1)
  9708. {
  9709. format(string, sizeof(string), "* Officer %s places his Badge and Gun in his locker.", sendername);
  9710. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  9711. GivePlayerWeapon(playerid, 23, 150);
  9712. GivePlayerWeapon(playerid, 5, 0);
  9713. OnDuty[playerid] = 0;
  9714. }
  9715. }
  9716. else
  9717. {
  9718. SendClientMessage(playerid, COLOR_GRAD2, " You are not in a locker room !");
  9719. return 1;
  9720. }
  9721. }
  9722. else if(PlayerInfo[playerid][pMember] == 4||PlayerInfo[playerid][pLeader] == 4)
  9723. {
  9724. if(JobDuty[playerid] == 1)
  9725. {
  9726. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now Off Duty from your Medic Job and will not receive calls anymore.");
  9727. JobDuty[playerid] = 0;
  9728. Medics -= 1;
  9729. }
  9730. else
  9731. {
  9732. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now On Duty with your Medic Job and will receive calls from people in need.");
  9733. JobDuty[playerid] = 1;
  9734. Medics += 1;
  9735. }
  9736. }
  9737. else if(PlayerInfo[playerid][pJob] == 7)
  9738. {
  9739. if(JobDuty[playerid] == 1)
  9740. {
  9741. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now Off Duty from your Car Mechanic Job and will not receive calls anymore.");
  9742. JobDuty[playerid] = 0;
  9743. Mechanics -= 1;
  9744. }
  9745. else
  9746. {
  9747. SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You are now On Duty with your Car Mechanic Job and will receive calls from people in need.");
  9748. JobDuty[playerid] = 1;
  9749. Mechanics += 1;
  9750. }
  9751. }
  9752. else
  9753. {
  9754. SendClientMessage(playerid, COLOR_GRAD1, " You are not a Cop !");
  9755. }
  9756. }
  9757. return 1;
  9758. }
  9759. //----------------------------------[departments]-----------------------------------------------
  9760. if(strcmp(cmd, "/departments", true) == 0 || strcmp(cmd, "/d", true) == 0)
  9761. {
  9762. if(IsPlayerConnected(playerid))
  9763. {
  9764. GetPlayerName(playerid, sendername, sizeof(sendername));
  9765. new length = strlen(cmdtext);
  9766. while ((idx < length) && (cmdtext[idx] <= ' '))
  9767. {
  9768. idx++;
  9769. }
  9770. new offset = idx;
  9771. new result[64];
  9772. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  9773. {
  9774. result[idx - offset] = cmdtext[idx];
  9775. idx++;
  9776. }
  9777. result[idx - offset] = EOS;
  9778. if(!strlen(result))
  9779. {
  9780. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/d)epartments [department chat]");
  9781. return 1;
  9782. }
  9783. if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
  9784. {
  9785. if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Chief %s: %s, over. **", sendername, result); }
  9786. else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Captain %s: %s, over. **", sendername, result); }
  9787. else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Lieutenant %s: %s, over. **", sendername, result); }
  9788. else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Sergeant %s: %s, over. **", sendername, result); }
  9789. else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Officer %s: %s, over. **", sendername, result); }
  9790. else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Cadet %s: %s, over. **", sendername, result); }
  9791. else
  9792. {
  9793. format(string, sizeof(string), "** Officer %s: %s, over. **", sendername, result);
  9794. }
  9795. SendTeamMessage(2, COLOR_ALLDEPT, string);
  9796. SendTeamMessage(1, COLOR_ALLDEPT, string);
  9797. printf("%s", string);
  9798. return 1;
  9799. }
  9800. else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
  9801. {
  9802. if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Director %s: %s, over. **", sendername, result); }
  9803. else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Assistant Director in Charge %s: %s, over. **", sendername, result); }
  9804. else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Special Agent in Charge %s: %s, over. **", sendername, result); }
  9805. else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Special Agent %s: %s, over. **", sendername, result); }
  9806. else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Special Agent Trainee %s: %s, over. **", sendername, result); }
  9807. else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Professional Staff %s: %s, over. **", sendername, result); }
  9808. else
  9809. {
  9810. format(string, sizeof(string), "** Intern %s: %s, over. **", sendername, result);
  9811. }
  9812. SendTeamMessage(2, COLOR_ALLDEPT, string);
  9813. SendTeamMessage(1, COLOR_ALLDEPT, string);
  9814. printf("%s", string);
  9815. return 1;
  9816. }
  9817. else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
  9818. {
  9819. if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** General %s: %s, over. **", sendername, result); }
  9820. else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Lieutenant %s: %s, over. **", sendername, result); }
  9821. else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Captain %s: %s, over. **", sendername, result); }
  9822. else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Major %s: %s, over. **", sendername, result); }
  9823. else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Sergeant %s: %s, over. **", sendername, result); }
  9824. else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Private %s: %s, over. **", sendername, result); }
  9825. else
  9826. {
  9827. format(string, sizeof(string), "** Private %s: %s, over. **", sendername, result);
  9828. }
  9829. SendTeamMessage(2, COLOR_ALLDEPT, string);
  9830. SendTeamMessage(1, COLOR_ALLDEPT, string);
  9831. printf("%s", string);
  9832. return 1;
  9833. }
  9834. else if(gTeam[playerid] == 1||PlayerInfo[playerid][pMember]==4||PlayerInfo[playerid][pLeader]==4)
  9835. {
  9836. format(string, sizeof(string), "** Paramedic %s: %s, over. **", sendername, result);
  9837. SendTeamMessage(2, COLOR_ALLDEPT, string);
  9838. SendTeamMessage(1, COLOR_ALLDEPT, string);
  9839. printf("%s", string);
  9840. return 1;
  9841. }
  9842. else
  9843. {
  9844. SendClientMessage(playerid, COLOR_GRAD2, " You are not part of a Team !");
  9845. return 1;
  9846. }
  9847. }
  9848. return 1;
  9849. }
  9850. //----------------------------------[mdc]-----------------------------------------------
  9851. if(strcmp(cmd, "/mdc", true) == 0)
  9852. {
  9853. if(IsPlayerConnected(playerid))
  9854. {
  9855. if(!IsACop(playerid))
  9856. {
  9857. SendClientMessage(playerid, COLOR_GREY, " You are not a Cop !");
  9858. return 1;
  9859. }
  9860. new tmpcar = GetPlayerVehicleID(playerid);
  9861. tmp = strtok(cmdtext, idx);
  9862. if(!strlen(tmp))
  9863. {
  9864. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /mdc [playerid/PartOfName]");
  9865. return 1;
  9866. }
  9867. //giveplayerid = strval(tmp);
  9868. giveplayerid = ReturnUser(tmp);
  9869. if(IsACopCar(tmpcar)||PlayerToPoint(5.0, playerid, 253.9280,69.6094,1003.6406))
  9870. {
  9871. if(IsPlayerConnected(giveplayerid))
  9872. {
  9873. if(giveplayerid != INVALID_PLAYER_ID)
  9874. {
  9875. GetPlayerName(giveplayerid, sendername, sizeof(sendername));
  9876. SendClientMessage(playerid, TEAM_BLUE_COLOR,"______-=MOBILE DATA COMPUTER=-_______");
  9877. format(string, sizeof(string), "Name : %s", sendername);
  9878. SendClientMessage(playerid, COLOR_WHITE,string);
  9879. format(string, sizeof(string), "Crime : %s", PlayerCrime[giveplayerid][pAccusedof]);
  9880. SendClientMessage(playerid, COLOR_GRAD2,string);
  9881. format(string, sizeof(string), "Claimant : %s", PlayerCrime[giveplayerid][pVictim]);
  9882. SendClientMessage(playerid, COLOR_GRAD3,string);
  9883. format(string, sizeof(string), "Reported : %s", PlayerCrime[giveplayerid][pAccusing]);
  9884. SendClientMessage(playerid, COLOR_GRAD4,string);
  9885. format(string, sizeof(string), "Accused : %s", PlayerCrime[giveplayerid][pBplayer]);
  9886. SendClientMessage(playerid, COLOR_GRAD5,string);
  9887. SendClientMessage(playerid, TEAM_BLUE_COLOR,"_______________________________________");
  9888. }
  9889. }
  9890. else
  9891. {
  9892. SendClientMessage(playerid, COLOR_GREY, " That player is Offline !");
  9893. return 1;
  9894. }
  9895. }
  9896. else
  9897. {
  9898. SendClientMessage(playerid, COLOR_GRAD2, " You are not in a Police Vehicle or in the Police Department.");
  9899. return 1;
  9900. }
  9901. }
  9902. return 1;
  9903. }
  9904. //----------------------------------[SetCrim]-----------------------------------------------
  9905. if(strcmp(cmd, "/suspect", true) == 0 || strcmp(cmd, "/su", true) == 0)
  9906. {
  9907. if(IsPlayerConnected(playerid))
  9908. {
  9909. if(OnDuty[playerid] != 1 && PlayerInfo[playerid][pMember] == 1)
  9910. {
  9911. SendClientMessage(playerid, COLOR_GREY, " You are not on Duty!");
  9912. return 1;
  9913. }
  9914. tmp = strtok(cmdtext, idx);
  9915. if(!strlen(tmp))
  9916. {
  9917. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/su)spect [playerid/PartOfName] [crime discription]");
  9918. return 1;
  9919. }
  9920. giveplayerid = ReturnUser(tmp);
  9921. if (gTeam[playerid] == 2 || IsACop(playerid))
  9922. {
  9923. if(IsPlayerConnected(giveplayerid))
  9924. {
  9925. if(giveplayerid != INVALID_PLAYER_ID)
  9926. {
  9927. if (gTeam[giveplayerid] != 2)
  9928. {
  9929. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  9930. GetPlayerName(playerid, sendername, sizeof(sendername));
  9931. new length = strlen(cmdtext);
  9932. while ((idx < length) && (cmdtext[idx] <= ' '))
  9933. {
  9934. idx++;
  9935. }
  9936. new offset = idx;
  9937. new result[64];
  9938. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  9939. {
  9940. result[idx - offset] = cmdtext[idx];
  9941. idx++;
  9942. }
  9943. result[idx - offset] = EOS;
  9944. if(!strlen(result))
  9945. {
  9946. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/su)spect [playerid/PartOfName] [crime text]");
  9947. return 1;
  9948. }
  9949. if(WantedPoints[giveplayerid] == 0) { WantedPoints[giveplayerid] = 3; }
  9950. else { WantedPoints[giveplayerid]+= 2; }
  9951. SetPlayerCriminal(giveplayerid,playerid, result);
  9952. return 1;
  9953. }
  9954. else
  9955. {
  9956. SendClientMessage(playerid, COLOR_GRAD2, " You can't suspect a Cop !");
  9957. }
  9958. }
  9959. }
  9960. else
  9961. {
  9962. format(string, sizeof(string), " %d is not an active player.", giveplayerid);
  9963. SendClientMessage(playerid, COLOR_GRAD1, string);
  9964. return 1;
  9965. }
  9966. }
  9967. else
  9968. {
  9969. SendClientMessage(playerid, COLOR_GRAD2, " You are not a Cop / FBI / National Guard !");
  9970. }
  9971. }
  9972. return 1;
  9973. }
  9974. //----------------------------------[LOCK]-----------------------------------------------
  9975. if(strcmp(cmd, "/lock", true) == 0)
  9976. {
  9977. if(IsPlayerConnected(playerid))
  9978. {
  9979. new carid;
  9980. if (gTeam[playerid] == 2 || gTeam[playerid] == 1)
  9981. {
  9982. if(gLastCar[playerid] == 0 && PlayerInfo[playerid][pPhousekey] == 255)
  9983. {
  9984. SendClientMessage(playerid, COLOR_GRAD2, " You dont have a Vehicle.");
  9985. return 1;
  9986. }
  9987. else if(gLastCar[playerid] != 0 && gLastCar[playerid] != PlayerInfo[playerid][pPhousekey]+1)
  9988. {
  9989. if (HireCar[playerid] != gLastCar[playerid] && HireCar[playerid] != 299)
  9990. {
  9991. gLastDriver[HireCar[playerid]] = 300;
  9992. gCarLock[HireCar[playerid]] = 0;
  9993. UnLockCar(HireCar[playerid]);
  9994. }
  9995. HireCar[playerid] = gLastCar[playerid];
  9996. }
  9997. }
  9998. if (PlayerInfo[playerid][pPhousekey] == 255)
  9999. {
  10000. if(HireCar[playerid] == 299)
  10001. {
  10002. SendClientMessage(playerid, COLOR_GRAD2, " You dont have a Vehicle.");
  10003. return 1;
  10004. }
  10005. }
  10006. carid = PlayerInfo[playerid][pPhousekey]+1;
  10007. if(HireCar[playerid] != 299 && !SwitchKey[playerid])
  10008. {
  10009. carid = HireCar[playerid];
  10010. }
  10011. //new driver = gLastDriver[carid];
  10012. new lockstatus = gCarLock[carid];
  10013. new Float:cx,Float:cy,Float:cz;
  10014. GetVehiclePos(carid, cx, cy, cz);
  10015. switch (lockstatus)
  10016. {
  10017. case 0:
  10018. {
  10019. if(HireCar[playerid] == 299 && PlayerInfo[playerid][pPhousekey] == 255)
  10020. {
  10021. SendClientMessage(playerid, COLOR_GRAD2, " You dont have a Vehicle");
  10022. return 1;
  10023. }
  10024. if(HireCar[playerid] == carid && !SwitchKey[playerid])
  10025. {
  10026. GameTextForPlayer(playerid, "~w~Hire Vehicle ~r~Locked", 5000, 6);
  10027. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  10028. gCarLock[carid] = 1;
  10029. LockCar(carid);
  10030. }
  10031. else if (PlayerInfo[playerid][pPhousekey] == carid-1)
  10032. {
  10033. GameTextForPlayer(playerid, "~w~House Vehicle ~r~Locked", 5000, 6);
  10034. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  10035. gCarLock[carid] = 1;
  10036. LockCar(carid);
  10037. return 1;
  10038. }
  10039. }
  10040. case 1:
  10041. {
  10042. if(HireCar[playerid] == 299 && PlayerInfo[playerid][pPhousekey] == 255)
  10043. {
  10044. SendClientMessage(playerid, COLOR_GRAD2, " You dont have a Vehicle");
  10045. return 1;
  10046. }
  10047. if(HireCar[playerid] == carid && !SwitchKey[playerid])
  10048. {
  10049. GameTextForPlayer(playerid, "~w~Hire Vehicle ~g~Unlocked", 5000, 6);
  10050. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  10051. gCarLock[carid] = 0;
  10052. UnLockCar(carid);
  10053. }
  10054. if (PlayerInfo[playerid][pPhousekey] == carid-1)
  10055. {
  10056. GameTextForPlayer(playerid, "~w~House Vehicle ~g~Unlocked", 5000, 6);
  10057. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  10058. gCarLock[carid] = 0;
  10059. UnLockCar(carid);
  10060. return 1;
  10061. }
  10062. }
  10063. default:
  10064. {
  10065. SendClientMessage(playerid, COLOR_GRAD2, " Error");
  10066. }
  10067. }
  10068. if(carid == 256)
  10069. {
  10070. SendClientMessage(playerid, COLOR_GRAD2, " You dont have a Vehicle !");
  10071. }
  10072. }
  10073. return 1;
  10074. }
  10075. if(strcmp(cmd, "/open", true) == 0)
  10076. {
  10077. if(IsPlayerConnected(playerid))
  10078. {
  10079. for(new i = 0; i < sizeof(HouseInfo); i++)
  10080. {
  10081. 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]))
  10082. {
  10083. if(PlayerInfo[playerid][pPhousekey] == i)
  10084. {
  10085. if(HouseInfo[i][hLock] == 1)
  10086. {
  10087. HouseInfo[i][hLock] = 0;
  10088. GameTextForPlayer(playerid, "~w~Door ~g~Unlocked", 5000, 6);
  10089. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  10090. return 1;
  10091. }
  10092. if(HouseInfo[i][hLock] == 0)
  10093. {
  10094. HouseInfo[i][hLock] = 1;
  10095. GameTextForPlayer(playerid, "~w~Door ~r~Locked", 5000, 6);
  10096. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  10097. return 1;
  10098. }
  10099. }
  10100. else
  10101. {
  10102. GameTextForPlayer(playerid, "~r~You Dont Have A Key", 5000, 6);
  10103. return 1;
  10104. }
  10105. }
  10106. }
  10107. for(new i = 0; i < sizeof(BizzInfo); i++)
  10108. {
  10109. 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]))
  10110. {
  10111. if(PlayerInfo[playerid][pPbiskey] == i)
  10112. {
  10113. if(BizzInfo[i][bLocked] == 1)
  10114. {
  10115. BizzInfo[i][bLocked] = 0;
  10116. GameTextForPlayer(playerid, "~w~Bussiness ~g~Open", 5000, 6);
  10117. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  10118. return 1;
  10119. }
  10120. if(BizzInfo[i][bLocked] == 0)
  10121. {
  10122. BizzInfo[i][bLocked] = 1;
  10123. GameTextForPlayer(playerid, "~w~Bussiness ~r~Closed", 5000, 6);
  10124. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  10125. return 1;
  10126. }
  10127. }
  10128. else
  10129. {
  10130. GameTextForPlayer(playerid, "~r~You Dont Have A Key", 5000, 6);
  10131. return 1;
  10132. }
  10133. }
  10134. }
  10135. for(new i = 0; i < sizeof(SBizzInfo); i++)
  10136. {
  10137. if (PlayerToPoint(3, playerid,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
  10138. {
  10139. if(PlayerInfo[playerid][pPbiskey] == i+100)
  10140. {
  10141. if(SBizzInfo[i][sbLocked] == 1)
  10142. {
  10143. SBizzInfo[i][sbLocked] = 0;
  10144. GameTextForPlayer(playerid, "~w~Bussiness ~g~Open", 5000, 6);
  10145. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  10146. return 1;
  10147. }
  10148. if(SBizzInfo[i][sbLocked] == 0)
  10149. {
  10150. SBizzInfo[i][sbLocked] = 1;
  10151. GameTextForPlayer(playerid, "~w~Bussiness ~r~Closed", 5000, 6);
  10152. PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
  10153. return 1;
  10154. }
  10155. }
  10156. else
  10157. {
  10158. GameTextForPlayer(playerid, "~r~You Dont Have A Key", 5000, 6);
  10159. return 1;
  10160. }
  10161. }
  10162. }
  10163. }
  10164. return 1;
  10165. }
  10166. //----------------------------------[Wisper]-----------------------------------------------
  10167. if(strcmp(cmd, "/wisper", true) == 0 || strcmp(cmd, "/w", true) == 0)
  10168. {
  10169. if(IsPlayerConnected(playerid))
  10170. {
  10171. if(gPlayerLogged[playerid] == 0)
  10172. {
  10173. SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
  10174. return 1;
  10175. }
  10176. tmp = strtok(cmdtext, idx);
  10177. if(!strlen(tmp))
  10178. {
  10179. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/w)isper [playerid/PartOfName] [whisper text]");
  10180. return 1;
  10181. }
  10182. giveplayerid = ReturnUser(tmp);
  10183. if (IsPlayerConnected(giveplayerid))
  10184. {
  10185. if(giveplayerid != INVALID_PLAYER_ID)
  10186. {
  10187. if(HidePM[giveplayerid] > 0)
  10188. {
  10189. SendClientMessage(playerid, COLOR_GREY, " That player is blocking Whispers !");
  10190. return 1;
  10191. }
  10192. GetPlayerName(playerid, sendername, sizeof(sendername));
  10193. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  10194. if(giveplayerid == playerid)
  10195. {
  10196. format(string, sizeof(string), "* %s mutters somthing.", sendername);
  10197. ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  10198. }
  10199. new length = strlen(cmdtext);
  10200. while ((idx < length) && (cmdtext[idx] <= ' '))
  10201. {
  10202. idx++;
  10203. }
  10204. new offset = idx;
  10205. new result[64];
  10206. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  10207. {
  10208. result[idx - offset] = cmdtext[idx];
  10209. idx++;
  10210. }
  10211. result[idx - offset] = EOS;
  10212. if(!strlen(result))
  10213. {
  10214. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/w)isper [playerid/PartOfName] [whisper text]");
  10215. return 1;
  10216. }
  10217. format(string, sizeof(string), "%s(ID: %d) whispers: %s", sendername, playerid, (result));
  10218. SendClientMessage(giveplayerid, COLOR_YELLOW, string);
  10219. format(string, sizeof(string), "Wisper sent to %s(ID: %d).", giveplayer, giveplayerid);
  10220. SendClientMessage(playerid, COLOR_YELLOW, string);
  10221. SBizzInfo[2][sbTill] += txtcost / 2;
  10222. ExtortionSBiz(2, txtcost / 2);
  10223. return 1;
  10224. }
  10225. }
  10226. else
  10227. {
  10228. format(string, sizeof(string), " %d is not an active player.", giveplayerid);
  10229. SendClientMessage(playerid, COLOR_GRAD1, string);
  10230. }
  10231. }
  10232. return 1;
  10233. }
  10234. //----------------------------------[Bank System]-----------------------------------------------
  10235. if(strcmp(cmd, "/withdraw", true) == 0)
  10236. {
  10237. if(IsPlayerConnected(playerid))
  10238. {
  10239. if(PlayerInfo[playerid][pLocal] != 103)
  10240. {
  10241. SendClientMessage(playerid, COLOR_GREY, " You are not at the Bank !");
  10242. return 1;
  10243. }
  10244. tmp = strtok(cmdtext, idx);
  10245. if(!strlen(tmp))
  10246. {
  10247. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /withdraw [amount]");
  10248. format(string, sizeof(string), " You Have $%d in your account.", PlayerInfo[playerid][pAccount]);
  10249. SendClientMessage(playerid, COLOR_GRAD3, string);
  10250. return 1;
  10251. }
  10252. new cashdeposit = strval(tmp);
  10253. if(!strlen(tmp))
  10254. {
  10255. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /withdraw [amount]");
  10256. format(string, sizeof(string), " You Have $%d in your account.", PlayerInfo[playerid][pAccount]);
  10257. SendClientMessage(playerid, COLOR_GRAD3, string);
  10258. return 1;
  10259. }
  10260. if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
  10261. {
  10262. SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much !");
  10263. return 1;
  10264. }
  10265. ConsumingMoney[playerid] = 1;
  10266. GivePlayerMoney(playerid,cashdeposit);
  10267. PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
  10268. format(string, sizeof(string), " You Have Withdrawn $%d from your account Total: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
  10269. SendClientMessage(playerid, COLOR_YELLOW, string);
  10270. return 1;
  10271. }
  10272. return 1;
  10273. }
  10274. if(strcmp(cmd, "/bank", true) == 0 || strcmp(cmd, "/deposit", true) == 0)
  10275. {
  10276. if(IsPlayerConnected(playerid))
  10277. {
  10278. if(PlayerInfo[playerid][pLocal] != 103)
  10279. {
  10280. SendClientMessage(playerid, COLOR_GREY, " You are not at the Bank !");
  10281. return 1;
  10282. }
  10283. tmp = strtok(cmdtext, idx);
  10284. if(!strlen(tmp))
  10285. {
  10286. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /bank [amount]");
  10287. format(string, sizeof(string), " You Have $%d in your account.", PlayerInfo[playerid][pAccount]);
  10288. SendClientMessage(playerid, COLOR_GRAD3, string);
  10289. return 1;
  10290. }
  10291. new cashdeposit = strval(tmp);
  10292. if(!strlen(tmp))
  10293. {
  10294. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /bank [amount]");
  10295. format(string, sizeof(string), " You Have $%d in your account.", PlayerInfo[playerid][pAccount]);
  10296. SendClientMessage(playerid, COLOR_GRAD3, string);
  10297. return 1;
  10298. }
  10299. if (cashdeposit > GetPlayerMoney(playerid) || cashdeposit < 1)
  10300. {
  10301. SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much");
  10302. return 1;
  10303. }
  10304. GivePlayerMoney(playerid,-cashdeposit);
  10305. new curfunds = PlayerInfo[playerid][pAccount];
  10306. PlayerInfo[playerid][pAccount]=cashdeposit+PlayerInfo[playerid][pAccount];
  10307. SendClientMessage(playerid, COLOR_WHITE, "|___ BANK STATMENT ___|");
  10308. format(string, sizeof(string), " Old Balance: $%d", curfunds);
  10309. SendClientMessage(playerid, COLOR_GRAD2, string);
  10310. format(string, sizeof(string), " Deposit: $%d",cashdeposit);
  10311. SendClientMessage(playerid, COLOR_GRAD4, string);
  10312. SendClientMessage(playerid, COLOR_GRAD6, "|-----------------------------------------|");
  10313. format(string, sizeof(string), " New Balance: $%d", PlayerInfo[playerid][pAccount]);
  10314. SendClientMessage(playerid, COLOR_WHITE, string);
  10315. return 1;
  10316. }
  10317. return 1;
  10318. }
  10319. if(strcmp(cmd, "/balance", true) == 0)
  10320. {
  10321. if(IsPlayerConnected(playerid))
  10322. {
  10323. if(PlayerInfo[playerid][pLocal] != 103)
  10324. {
  10325. SendClientMessage(playerid, COLOR_GREY, " You are not at the Bank !");
  10326. return 1;
  10327. }
  10328. format(string, sizeof(string), " You Have $%d in your account.",PlayerInfo[playerid][pAccount]);
  10329. SendClientMessage(playerid, COLOR_YELLOW, string);
  10330. }
  10331. return 1;
  10332. }
  10333. if(strcmp(cmd, "/dice", true) == 0)
  10334. {
  10335. if(IsPlayerConnected(playerid))
  10336. {
  10337. new dice = random(6)+1;
  10338. if (gDice[playerid] == 1)
  10339. {
  10340. GetPlayerName(playerid, sendername, sizeof(sendername));
  10341. format(string, sizeof(string), "* %s Throws a Dice that lands on %d", sendername,dice);
  10342. ProxDetector(5.0, playerid, string, TEAM_GREEN_COLOR,TEAM_GREEN_COLOR,TEAM_GREEN_COLOR,TEAM_GREEN_COLOR,TEAM_GREEN_COLOR);
  10343. }
  10344. else
  10345. {
  10346. SendClientMessage(playerid, COLOR_GRAD2, " You Don't Have A Dice");
  10347. return 1;
  10348. }
  10349. }
  10350. return 1;
  10351. }
  10352. if(strcmp(cmd, "/transfer", true) == 0 || strcmp(cmd, "/wiretransfer", true) == 0)
  10353. {
  10354. if(IsPlayerConnected(playerid))
  10355. {
  10356. if(PlayerInfo[playerid][pLevel] < 3)
  10357. {
  10358. SendClientMessage(playerid, COLOR_GRAD1, " You must be level 3 !");
  10359. return 1;
  10360. }
  10361. if(PlayerInfo[playerid][pLocal] != 103)
  10362. {
  10363. SendClientMessage(playerid, COLOR_GREY, " You are not at the Bank !");
  10364. return 1;
  10365. }
  10366. tmp = strtok(cmdtext, idx);
  10367. if(!strlen(tmp))
  10368. {
  10369. SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /transfer [playerid/PartOfName] [amount]");
  10370. return 1;
  10371. }
  10372. giveplayerid = ReturnUser(tmp);
  10373. tmp = strtok(cmdtext, idx);
  10374. if(!strlen(tmp))
  10375. {
  10376. SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /transfer [playerid/PartOfName] [amount]");
  10377. return 1;
  10378. }
  10379. moneys = strval(tmp);
  10380. if (IsPlayerConnected(giveplayerid))
  10381. {
  10382. if(giveplayerid != INVALID_PLAYER_ID)
  10383. {
  10384. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  10385. GetPlayerName(playerid, sendername, sizeof(sendername));
  10386. playermoney = PlayerInfo[playerid][pAccount] ;
  10387. if (moneys > 0 && playermoney >= moneys)
  10388. {
  10389. PlayerInfo[playerid][pAccount] -= moneys;
  10390. PlayerInfo[giveplayerid][pAccount] += moneys;
  10391. format(string, sizeof(string), " You have transferd $%d to %s's account", moneys, giveplayer,giveplayerid);
  10392. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  10393. SendClientMessage(playerid, COLOR_GRAD1, string);
  10394. format(string, sizeof(string), " You have recieved $%d to into your account from %s", moneys, sendername, playerid);
  10395. SendClientMessage(giveplayerid, COLOR_GRAD1, string);
  10396. format(string, sizeof(string), "%s transferd $%d to %s", sendername, moneys, giveplayer);
  10397. if(moneys >= 500000)
  10398. {
  10399. ABroadCast(COLOR_YELLOW,string,1);
  10400. }
  10401. printf("%s", string);
  10402. PayLog(string);
  10403. PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
  10404. }
  10405. else
  10406. {
  10407. SendClientMessage(playerid, COLOR_GRAD1, " Invalid transaction amount.");
  10408. }
  10409. }
  10410. }
  10411. else
  10412. {
  10413. format(string, sizeof(string), " %d is not an active player.", giveplayerid);
  10414. SendClientMessage(playerid, COLOR_GRAD1, string);
  10415. }
  10416. }
  10417. return 1;
  10418. }
  10419. if(strcmp(cmd, "/buy", true) == 0)
  10420. {
  10421. if(IsPlayerConnected(playerid))
  10422. {
  10423. if (!PlayerToPoint(100, playerid,-30.875, -88.9609, 1004.53))//centerpoint 24-7
  10424. {
  10425. SendClientMessage(playerid, COLOR_GRAD2, " You are not in a 24-7 !");
  10426. return 1;
  10427. }
  10428. tmp = strtok(cmdtext, idx);
  10429. if(!strlen(tmp))
  10430. {
  10431. SendClientMessage(playerid, COLOR_WHITE, "USAGE: /buy [item number]");
  10432. SendClientMessage(playerid, COLOR_GREEN, "|_______ 24-7 _______|");
  10433. SendClientMessage(playerid, COLOR_GRAD1, "| 1: Cell Phone $500 2: Scratch Card $7500");
  10434. SendClientMessage(playerid, COLOR_GRAD2, "| 3: Phone Book $5000 4: Dice $500");
  10435. SendClientMessage(playerid, COLOR_GRAD3, "| 5: Vehicle Key $5000 6: Vehicle Lock $10000");
  10436. SendClientMessage(playerid, COLOR_GRAD4, "| 7: Speedometer $5000 8: Condom $50");
  10437. SendClientMessage(playerid, COLOR_GRAD5, "| 9: CD-Player $2500 10: Chicken $10 ");
  10438. SendClientMessage(playerid, COLOR_GRAD5, "| 11: Hamburger $10 12: Frozen Pizza $10");
  10439. return 1;
  10440. }
  10441. new item = strval(tmp);
  10442. if(SBizzInfo[9][sbProducts] == 0)
  10443. {
  10444. GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
  10445. return 1;
  10446. }
  10447. if (item == 1 && GetPlayerMoney(playerid) > 500)
  10448. {
  10449. if(PlayerInfo[playerid][pTraderPerk] > 0)
  10450. {
  10451. new skill = 500 / 100;
  10452. new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
  10453. new payout = 500 - price;
  10454. format(string, sizeof(string), "~r~-$%d", payout);
  10455. GameTextForPlayer(playerid, string, 5000, 1);
  10456. GivePlayerMoney(playerid,- payout);
  10457. SBizzInfo[9][sbTill] += payout;
  10458. ExtortionSBiz(9, payout);
  10459. }
  10460. else
  10461. {
  10462. format(string, sizeof(string), "~r~-$%d", 500);
  10463. GameTextForPlayer(playerid, string, 5000, 1);
  10464. GivePlayerMoney(playerid,-500);
  10465. SBizzInfo[9][sbTill] += 500;
  10466. ExtortionSBiz(9, 500);
  10467. }
  10468. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  10469. new randphone = 1000 + random(8999);//minimum 1000 max 9999
  10470. PlayerInfo[playerid][pPnumber] = randphone;
  10471. format(string, sizeof(string), " Mobile Phone Purchased your new Number is %d", randphone);
  10472. SendClientMessage(playerid, COLOR_GRAD4, string);
  10473. SendClientMessage(playerid, COLOR_GRAD5, "You can check this anytime by Typing /stats");
  10474. SendClientMessage(playerid, COLOR_WHITE, "HINT: You can now type /help to see your cell phone commands.");
  10475. return 1;
  10476. }
  10477. else if (item == 2 && GetPlayerMoney(playerid) > 7500)
  10478. {
  10479. if(PlayerInfo[playerid][pTraderPerk] > 0)
  10480. {
  10481. new skill = 7500 / 100;
  10482. new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
  10483. new payout = 7500 - price;
  10484. GivePlayerMoney(playerid,- payout);
  10485. SBizzInfo[9][sbTill] += payout;
  10486. ExtortionSBiz(9, payout);
  10487. format(string, sizeof(string), "~r~-$%d", payout);
  10488. GameTextForPlayer(playerid, string, 5000, 1);
  10489. }
  10490. else
  10491. {
  10492. GivePlayerMoney(playerid,-7500);
  10493. SBizzInfo[9][sbTill] += 7500;
  10494. ExtortionSBiz(9, 7500);
  10495. format(string, sizeof(string), "~r~-$%d", 1000);
  10496. GameTextForPlayer(playerid, string, 5000, 1);
  10497. }
  10498. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  10499. new prize;
  10500. new symb1[32]; new symb2[32]; new symb3[32];
  10501. new randcard1 = random(10);//minimum 1000 max 9999
  10502. new randcard2 = random(10);//minimum 1000 max 9999
  10503. new randcard3 = random(10);//minimum 1000 max 9999
  10504. if(randcard1 >= 5)
  10505. {
  10506. format(symb1, sizeof(symb1), "~b~]");
  10507. randcard1 = 1;
  10508. }
  10509. else if(randcard1 <= 4 && randcard1 >= 2)
  10510. {
  10511. format(symb1, sizeof(symb1), "~g~]");
  10512. randcard1 = 2;
  10513. }
  10514. else if(randcard1 < 2)
  10515. {
  10516. format(symb1, sizeof(symb1), "~y~]");
  10517. randcard1 = 3;
  10518. }
  10519. if(randcard2 >= 5)
  10520. {
  10521. format(symb2, sizeof(symb2), "~b~]");
  10522. randcard2 = 1;
  10523. }
  10524. else if(randcard2 <= 4 && randcard2 >= 2)
  10525. {
  10526. format(symb2, sizeof(symb2), "~g~]");
  10527. randcard2 = 2;
  10528. }
  10529. else if(randcard2 < 2)
  10530. {
  10531. format(symb2, sizeof(symb2), "~y~]");
  10532. randcard2 = 3;
  10533. }
  10534. if(randcard3 >= 5)
  10535. {
  10536. format(symb3, sizeof(symb3), "~b~]");
  10537. randcard3 = 1;
  10538. }
  10539. else if(randcard3 <= 4 && randcard3 >= 2)
  10540. {
  10541. format(symb3, sizeof(symb3), "~g~]");
  10542. randcard3 = 2;
  10543. }
  10544. else if(randcard3 < 2)
  10545. {
  10546. format(symb3, sizeof(symb3), "~y~]");
  10547. randcard3 = 3;
  10548. }
  10549. if(randcard1 == randcard2 && randcard1 == randcard3)
  10550. {
  10551. if(randcard1 > 5)
  10552. {
  10553. prize = 2500;
  10554. }
  10555. if(randcard1 <= 4 && randcard1 >= 2)
  10556. {
  10557. prize = 1500;
  10558. }
  10559. if(randcard1 < 2)
  10560. {
  10561. prize = 500;
  10562. }
  10563. GivePlayerMoney(playerid,prize);
  10564. SBizzInfo[9][sbTill] -= prize;
  10565. ExtortionSBiz(9, prize);
  10566. format(string, sizeof(string), "%s %s %s ~n~~n~~w~~g~$%d",symb1,symb2,symb3, prize);
  10567. }
  10568. else
  10569. {
  10570. format(string, sizeof(string), "%s %s %s ~n~~n~~w~~r~$0",symb1,symb2,symb3);
  10571. }
  10572. GameTextForPlayer(playerid, string, 3000, 3);
  10573. return 1;
  10574. }
  10575. else if (item == 3 && GetPlayerMoney(playerid) > 5000)
  10576. {
  10577. if(PlayerInfo[playerid][pTraderPerk] > 0)
  10578. {
  10579. new skill = 5000 / 100;
  10580. new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
  10581. new payout = 5000 - price;
  10582. GivePlayerMoney(playerid,- payout);
  10583. SBizzInfo[9][sbTill] += payout;
  10584. ExtortionSBiz(9, payout);
  10585. format(string, sizeof(string), "~r~-$%d", payout);
  10586. GameTextForPlayer(playerid, string, 5000, 1);
  10587. }
  10588. else
  10589. {
  10590. GivePlayerMoney(playerid,-5000);
  10591. SBizzInfo[9][sbTill] += 5000;
  10592. ExtortionSBiz(9, 5000);
  10593. format(string, sizeof(string), "~r~-$%d", 5000);
  10594. GameTextForPlayer(playerid, string, 5000, 1);
  10595. }
  10596. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  10597. PlayerInfo[playerid][pPhoneBook] = 1;
  10598. format(string, sizeof(string), " Phone Book Purchased you can look up any Players Number !");
  10599. SendClientMessage(playerid, COLOR_GRAD4, string);
  10600. SendClientMessage(playerid, COLOR_WHITE, "HINT: Type /number <id/name>.");
  10601. return 1;
  10602. }
  10603. else if (item == 4 && GetPlayerMoney(playerid) > 500)
  10604. {
  10605. if(PlayerInfo[playerid][pTraderPerk] > 0)
  10606. {
  10607. new skill = 500 / 100;
  10608. new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
  10609. new payout = 500 - price;
  10610. GivePlayerMoney(playerid,- payout);
  10611. SBizzInfo[9][sbTill] += payout;
  10612. ExtortionSBiz(9, payout);
  10613. format(string, sizeof(string), "~r~-$%d", payout);
  10614. GameTextForPlayer(playerid, string, 5000, 1);
  10615. }
  10616. else
  10617. {
  10618. GivePlayerMoney(playerid,-500);
  10619. SBizzInfo[9][sbTill] += 500;
  10620. ExtortionSBiz(9, 500);
  10621. format(string, sizeof(string), "~r~-$%d", 500);
  10622. GameTextForPlayer(playerid, string, 5000, 1);
  10623. }
  10624. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  10625. gDice[playerid] = 1;
  10626. format(string, sizeof(string), " Dice Purchased you can throw your Dice.");
  10627. SendClientMessage(playerid, COLOR_GRAD4, string);
  10628. SendClientMessage(playerid, COLOR_WHITE, "HINT: Type /dice ");
  10629. return 1;
  10630. }
  10631. else if(item == 5 && GetPlayerMoney(playerid) > 5000)
  10632. {
  10633. if (gLastCar[playerid] != 0)
  10634. {
  10635. if(HireCar[playerid] != 299)
  10636. {
  10637. gCarLock[HireCar[playerid]] = 0;
  10638. UnLockCar(HireCar[playerid]);
  10639. HireCar[playerid] = 299;
  10640. }
  10641. if(PlayerInfo[playerid][pTraderPerk] > 0)
  10642. {
  10643. new skill = 5000 / 100;
  10644. new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
  10645. new payout = 5000 - price;
  10646. GivePlayerMoney(playerid,- payout);
  10647. SBizzInfo[9][sbTill] += payout;
  10648. ExtortionSBiz(9, payout);
  10649. format(string, sizeof(string), "~r~-$%d", payout);
  10650. GameTextForPlayer(playerid, string, 5000, 1);
  10651. }
  10652. else
  10653. {
  10654. GivePlayerMoney(playerid,-5000);
  10655. SBizzInfo[9][sbTill] += 5000;
  10656. ExtortionSBiz(9, 5000);
  10657. format(string, sizeof(string), "~r~-$%d", 5000);
  10658. GameTextForPlayer(playerid, string, 5000, 1);
  10659. }
  10660. SBizzInfo[9][sbProducts]--;
  10661. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  10662. HireCar[playerid] = gLastCar[playerid];
  10663. format(string, sizeof(string), "Key Purchased You Can Lock Your Last Vehicle.");
  10664. SendClientMessage(playerid, COLOR_GRAD4, string);
  10665. SendClientMessage(playerid, COLOR_WHITE, "HINT: Type /lock ");
  10666. }
  10667. else
  10668. {
  10669. SendClientMessage(playerid, COLOR_WHITE, " You don't have a Vehicle to fit it to !");
  10670. }
  10671. return 1;
  10672. }
  10673. else if (item == 6 && GetPlayerMoney(playerid) > 10000)
  10674. {
  10675. if(PlayerInfo[playerid][pPhousekey] != 255)
  10676. {
  10677. for(new i = 0; i < MAX_PLAYERS; i++)
  10678. {
  10679. if(IsPlayerConnected(i) == 1 && HireCar[PlayerInfo[playerid][pPhousekey]+1])
  10680. {
  10681. HireCar[i] = 299;
  10682. }
  10683. }
  10684. if(PlayerInfo[playerid][pTraderPerk] > 0)
  10685. {
  10686. new skill = 10000 / 100;
  10687. new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
  10688. new payout = 10000 - price;
  10689. GivePlayerMoney(playerid,- payout);
  10690. SBizzInfo[9][sbTill] += payout;
  10691. ExtortionSBiz(9, payout);
  10692. format(string, sizeof(string), "~r~-$%d", payout);
  10693. GameTextForPlayer(playerid, string, 5000, 1);
  10694. }
  10695. else
  10696. {
  10697. GivePlayerMoney(playerid,-10000);
  10698. SBizzInfo[9][sbTill] += 10000;
  10699. ExtortionSBiz(9, 10000);
  10700. format(string, sizeof(string), "~r~-$%d", 10000);
  10701. GameTextForPlayer(playerid, string, 5000, 1);
  10702. }
  10703. SBizzInfo[9][sbProducts]--;
  10704. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  10705. format(string, sizeof(string), "New Locks Purchased.");
  10706. SendClientMessage(playerid, COLOR_GRAD4, string);
  10707. SendClientMessage(playerid, COLOR_WHITE, "HINT: Type /lock ");
  10708. }
  10709. else
  10710. {
  10711. SendClientMessage(playerid, COLOR_WHITE, " You don't have a Vehicle to fit it to !");
  10712. }
  10713. return 1;
  10714. }
  10715. else if (item == 7 && GetPlayerMoney(playerid) > 5000)
  10716. {
  10717. gSpeedo[playerid] = 1;
  10718. if(PlayerInfo[playerid][pTraderPerk] > 0)
  10719. {
  10720. new skill = 5000 / 100;
  10721. new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
  10722. new payout = 5000 - price;
  10723. GivePlayerMoney(playerid,- payout);
  10724. SBizzInfo[9][sbTill] += payout;
  10725. ExtortionSBiz(9, payout);
  10726. format(string, sizeof(string), "~r~-$%d", payout);
  10727. GameTextForPlayer(playerid, string, 5000, 1);
  10728. }
  10729. else
  10730. {
  10731. GivePlayerMoney(playerid,-5000);
  10732. SBizzInfo[9][sbTill] += 5000;
  10733. ExtortionSBiz(9, 5000);
  10734. format(string, sizeof(string), "~r~-$%d", 5000);
  10735. GameTextForPlayer(playerid, string, 5000, 1);
  10736. }
  10737. SBizzInfo[9][sbProducts]--;
  10738. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  10739. format(string, sizeof(string), "Speedometer Purchased.");
  10740. SendClientMessage(playerid, COLOR_GRAD4, string);
  10741. SendClientMessage(playerid, COLOR_WHITE, "HINT: Type /speedo ");
  10742. return 1;
  10743. }
  10744. else if (item == 8 && GetPlayerMoney(playerid) > 49)
  10745. {
  10746. if(PlayerInfo[playerid][pTraderPerk] > 0)
  10747. {
  10748. new skill = 50 / 100;
  10749. new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
  10750. new payout = 50 - price;
  10751. GivePlayerMoney(playerid,- payout);
  10752. format(string, sizeof(string), "~r~-$%d", payout);
  10753. GameTextForPlayer(playerid, string, 5000, 1);
  10754. }
  10755. else
  10756. {
  10757. GivePlayerMoney(playerid,-50);
  10758. format(string, sizeof(string), "~r~-$%d", 50);
  10759. GameTextForPlayer(playerid, string, 5000, 1);
  10760. }
  10761. Condom[playerid] ++;
  10762. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  10763. format(string, sizeof(string), "Condom Purchased.");
  10764. SendClientMessage(playerid, COLOR_GRAD4, string);
  10765. return 1;
  10766. }
  10767. else if (item == 9 && GetPlayerMoney(playerid) > 2500)
  10768. {
  10769. if(PlayerInfo[playerid][pTraderPerk] > 0)
  10770. {
  10771. new skill = 2500 / 100;
  10772. new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
  10773. new payout = 2500 - price;
  10774. GivePlayerMoney(playerid, - payout);
  10775. format(string, sizeof(string), "~r~-$%d", payout);
  10776. GameTextForPlayer(playerid, string, 5000, 1);
  10777. }
  10778. else
  10779. {
  10780. GivePlayerMoney(playerid, - 2500);
  10781. format(string, sizeof(string), "~r~-$%d", 2500);
  10782. GameTextForPlayer(playerid, string, 5000, 1);
  10783. }
  10784. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  10785. format(string, sizeof(string), "CD-Player Purchased.");
  10786. SendClientMessage(playerid, COLOR_GRAD4, string);
  10787. SendClientMessage(playerid, COLOR_WHITE, "HINT: Type /music");
  10788. PlayerInfo[playerid][pCDPlayer] = 1;
  10789. return 1;
  10790. }
  10791. else if (item == 10 && GetPlayerMoney(playerid) > 10)
  10792. {
  10793. if(Groceries[playerid][pChickens] >= 3)
  10794. {
  10795. SendClientMessage(playerid, COLOR_GREY, " You have to many Chickens, Cook some first !");
  10796. return 1;
  10797. }
  10798. if(PlayerInfo[playerid][pTraderPerk] > 0)
  10799. {
  10800. new skill = 10 / 100;
  10801. new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
  10802. new payout = 10 - price;
  10803. GivePlayerMoney(playerid, - payout);
  10804. format(string, sizeof(string), "~r~-$%d", payout);
  10805. GameTextForPlayer(playerid, string, 5000, 1);
  10806. }
  10807. else
  10808. {
  10809. GivePlayerMoney(playerid, - 10);
  10810. format(string, sizeof(string), "~r~-$%d", 10);
  10811. GameTextForPlayer(playerid, string, 5000, 1);
  10812. }
  10813. GivePlayerMoney(playerid, - 10);
  10814. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  10815. format(string, sizeof(string), "Chicken Purchased.");
  10816. SendClientMessage(playerid, COLOR_GRAD4, string);
  10817. format(string, sizeof(string), "~r~-$%d", 10);
  10818. GameTextForPlayer(playerid, string, 5000, 1);
  10819. new rand = random(15);
  10820. Groceries[playerid][pChickens] += 1;
  10821. Groceries[playerid][pChicken] += rand;
  10822. return 1;
  10823. }
  10824. else if (item == 11 && GetPlayerMoney(playerid) > 10)
  10825. {
  10826. if(Groceries[playerid][pHamburgers] >= 3)
  10827. {
  10828. SendClientMessage(playerid, COLOR_GREY, " You have to many Hamburgers, Cook some first !");
  10829. return 1;
  10830. }
  10831. if(PlayerInfo[playerid][pTraderPerk] > 0)
  10832. {
  10833. new skill = 10 / 100;
  10834. new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
  10835. new payout = 10 - price;
  10836. GivePlayerMoney(playerid, - payout);
  10837. format(string, sizeof(string), "~r~-$%d", payout);
  10838. GameTextForPlayer(playerid, string, 5000, 1);
  10839. }
  10840. else
  10841. {
  10842. GivePlayerMoney(playerid, - 10);
  10843. format(string, sizeof(string), "~r~-$%d", 10);
  10844. GameTextForPlayer(playerid, string, 5000, 1);
  10845. }
  10846. GivePlayerMoney(playerid, - 10);
  10847. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  10848. format(string, sizeof(string), "Hamburger Purchased.");
  10849. SendClientMessage(playerid, COLOR_GRAD4, string);
  10850. format(string, sizeof(string), "~r~-$%d", 10);
  10851. GameTextForPlayer(playerid, string, 5000, 1);
  10852. new rand = random(15);
  10853. Groceries[playerid][pHamburgers] += 1;
  10854. Groceries[playerid][pHamburger] += rand;
  10855. return 1;
  10856. }
  10857. else if (item == 12 && GetPlayerMoney(playerid) > 10)
  10858. {
  10859. if(Groceries[playerid][pPizzas] >= 3)
  10860. {
  10861. SendClientMessage(playerid, COLOR_GREY, " You have to many Pizzas, Cook some first !");
  10862. return 1;
  10863. }
  10864. if(PlayerInfo[playerid][pTraderPerk] > 0)
  10865. {
  10866. new skill = 10 / 100;
  10867. new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
  10868. new payout = 10 - price;
  10869. GivePlayerMoney(playerid, - payout);
  10870. format(string, sizeof(string), "~r~-$%d", payout);
  10871. GameTextForPlayer(playerid, string, 5000, 1);
  10872. }
  10873. else
  10874. {
  10875. GivePlayerMoney(playerid, - 10);
  10876. format(string, sizeof(string), "~r~-$%d", 10);
  10877. GameTextForPlayer(playerid, string, 5000, 1);
  10878. }
  10879. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  10880. format(string, sizeof(string), "Frozen Pizza Purchased.");
  10881. SendClientMessage(playerid, COLOR_GRAD4, string);
  10882. new rand = random(15);
  10883. Groceries[playerid][pPizzas] += 1;
  10884. Groceries[playerid][pPizza] += rand;
  10885. return 1;
  10886. }
  10887. else
  10888. {
  10889. SendClientMessage(playerid, COLOR_WHITE, " You don't have the cash for that !");
  10890. }
  10891. }
  10892. return 1;
  10893. }
  10894. if(strcmp(cmd, "/buyhouse", true) == 0)
  10895. {
  10896. if(IsPlayerConnected(playerid))
  10897. {
  10898. new Float:oldposx, Float:oldposy, Float:oldposz;
  10899. GetPlayerName(playerid, playername, sizeof(playername));
  10900. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  10901. for(new h = 0; h < sizeof(HouseInfo); h++)
  10902. {
  10903. if(PlayerToPoint(2.0, playerid, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == 0)
  10904. {
  10905. if(PlayerInfo[playerid][pLevel] < HouseInfo[h][hLevel])
  10906. {
  10907. format(string, sizeof(string), " You must be Level %d to purchase this !", HouseInfo[h][hLevel]);
  10908. SendClientMessage(playerid, COLOR_GRAD5, string);
  10909. return 1;
  10910. }
  10911. if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
  10912. {
  10913. SendClientMessage(playerid, COLOR_WHITE, " You already own a house, type /sellhouse if you want to buy this one !");
  10914. return 1;
  10915. }
  10916. if(GetPlayerMoney(playerid) > HouseInfo[h][hValue])
  10917. {
  10918. PlayerInfo[playerid][pPhousekey] = h;
  10919. HouseInfo[h][hOwned] = 1;
  10920. GetPlayerName(playerid, sendername, sizeof(sendername));
  10921. strmid(HouseInfo[h][hOwner], sendername, 0, strlen(sendername), 255);
  10922. GivePlayerMoney(playerid,-HouseInfo[h][hValue]);
  10923. PlayerPlayMusic(playerid);
  10924. SetPlayerInterior(playerid,HouseInfo[h][hInt]);
  10925. SetPlayerPos(playerid,HouseInfo[h][hExitx],HouseInfo[h][hExity],HouseInfo[h][hExitz]);
  10926. GameTextForPlayer(playerid, "~w~Welcome Home~n~You can exit at any time by moving to this door and typing /exit", 5000, 3);
  10927. PlayerInfo[playerid][pInt] = HouseInfo[h][hInt];
  10928. PlayerInfo[playerid][pLocal] = h;
  10929. SendClientMessage(playerid, COLOR_WHITE, "Congratulations, on your new Purchase !");
  10930. SendClientMessage(playerid, COLOR_WHITE, "Type /help to review the new property help section !");
  10931. DateProp(playerid);
  10932. OnPropUpdate();
  10933. OnPlayerUpdate(playerid);
  10934. return 1;
  10935. }
  10936. else
  10937. {
  10938. SendClientMessage(playerid, COLOR_WHITE, " You don't have the cash for that !");
  10939. return 1;
  10940. }
  10941. }
  10942. }
  10943. }
  10944. return 1;
  10945. }
  10946. if(strcmp(cmd, "/rentroom", true) == 0)
  10947. {
  10948. if(IsPlayerConnected(playerid))
  10949. {
  10950. new Float:oldposx, Float:oldposy, Float:oldposz;
  10951. GetPlayerName(playerid, playername, sizeof(playername));
  10952. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  10953. for(new h = 0; h < sizeof(HouseInfo); h++)
  10954. {
  10955. if(PlayerToPoint(2.0, playerid, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == 1 && HouseInfo[h][hRentabil] == 1)
  10956. {
  10957. if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
  10958. {
  10959. SendClientMessage(playerid, COLOR_WHITE, " You already own a house, type /sellhouse if you want to rent this one.");
  10960. return 1;
  10961. }
  10962. if(GetPlayerMoney(playerid) > HouseInfo[h][hRent])
  10963. {
  10964. PlayerInfo[playerid][pPhousekey] = h;
  10965. GivePlayerMoney(playerid,-HouseInfo[h][hRent]);
  10966. HouseInfo[h][hTakings] = HouseInfo[h][hTakings]+HouseInfo[h][hRent];
  10967. PlayerPlayMusic(playerid);
  10968. SetPlayerInterior(playerid,HouseInfo[h][hInt]);
  10969. SetPlayerPos(playerid,HouseInfo[h][hExitx],HouseInfo[h][hExity],HouseInfo[h][hExitz]);
  10970. GameTextForPlayer(playerid, "~w~Welcome Home~n~You can exit at any time by moving to this door and typing /exit", 5000, 3);
  10971. PlayerInfo[playerid][pInt] = HouseInfo[h][hInt];
  10972. PlayerInfo[playerid][pLocal] = h;
  10973. SendClientMessage(playerid, COLOR_WHITE, "Congratulations, You can enter and exit here anytime.");
  10974. SendClientMessage(playerid, COLOR_WHITE, "Type /help to review the new property help section.");
  10975. OnPlayerUpdate(playerid);
  10976. return 1;
  10977. }
  10978. else
  10979. {
  10980. SendClientMessage(playerid, COLOR_WHITE, "You don't have the cash for that");
  10981. return 1;
  10982. }
  10983. }
  10984. }
  10985. }
  10986. return 1;
  10987. }
  10988. if(strcmp(cmd, "/rentcar", true) == 0)
  10989. {
  10990. if(IsPlayerConnected(playerid))
  10991. {
  10992. if(GetPlayerVehicleID(playerid) >= 72 && GetPlayerVehicleID(playerid) <= 77)
  10993. {
  10994. new hirefee = HireCost(GetPlayerVehicleID(playerid));
  10995. if(GetPlayerVehicleID(playerid) >= 72 && GetPlayerVehicleID(playerid) <= 74)
  10996. {
  10997. if(SBizzInfo[0][sbProducts] == 0)
  10998. {
  10999. GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
  11000. return 1;
  11001. }
  11002. if(PlayerInfo[playerid][pPbiskey] == 0)
  11003. {
  11004. GameTextForPlayer(playerid, "~w~No charge for the boss", 5000, 3);
  11005. TogglePlayerControllable(playerid, 1);
  11006. return 1;
  11007. }
  11008. if (GetPlayerMoney(playerid) < SBizzInfo[0][sbEntranceCost])
  11009. {
  11010. SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much cash !");
  11011. return 1;
  11012. }
  11013. GivePlayerMoney(playerid,-SBizzInfo[0][sbEntranceCost]);
  11014. SBizzInfo[0][sbTill] += SBizzInfo[0][sbEntranceCost];
  11015. ExtortionSBiz(0, SBizzInfo[0][sbEntranceCost]);
  11016. SBizzInfo[0][sbProducts]--;
  11017. }
  11018. if(GetPlayerVehicleID(playerid) >= 75 && GetPlayerVehicleID(playerid) <= 77)
  11019. {
  11020. if(SBizzInfo[1][sbProducts] == 0)
  11021. {
  11022. GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
  11023. return 1;
  11024. }
  11025. if(PlayerInfo[playerid][pPbiskey] == 1)
  11026. {
  11027. GameTextForPlayer(playerid, "~w~No charge for the boss", 5000, 3);
  11028. TogglePlayerControllable(playerid, 1);
  11029. return 1;
  11030. }
  11031. if (GetPlayerMoney(playerid) < SBizzInfo[1][sbEntranceCost])
  11032. {
  11033. SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much cash !");
  11034. return 1;
  11035. }
  11036. GivePlayerMoney(playerid,-SBizzInfo[1][sbEntranceCost]);
  11037. SBizzInfo[1][sbTill] += SBizzInfo[1][sbEntranceCost];
  11038. ExtortionSBiz(1, SBizzInfo[1][sbEntranceCost]);
  11039. SBizzInfo[1][sbProducts]--;
  11040. }
  11041. if(HireCar[playerid] != 299)
  11042. {
  11043. gCarLock[HireCar[playerid]] = 0;
  11044. UnLockCar(HireCar[playerid]);
  11045. }
  11046. HireCar[playerid] = GetPlayerVehicleID(playerid);
  11047. OnPropUpdate();
  11048. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  11049. 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);
  11050. TogglePlayerControllable(playerid, 1);
  11051. GameTextForPlayer(playerid, string, 5000, 3);
  11052. }
  11053. }
  11054. return 1;
  11055. }
  11056. if(strcmp(cmd, "/hirecar", true) == 0)
  11057. {
  11058. if(IsPlayerConnected(playerid))
  11059. {
  11060. if (PlayerInfo[playerid][pAdmin] >= 1337)
  11061. {
  11062. tmp = strtok(cmdtext, idx);
  11063. if(!strlen(tmp))
  11064. {
  11065. SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /hirecar [key id]");
  11066. return 1;
  11067. }
  11068. new car = strval(tmp);
  11069. HireCar[playerid] = car;
  11070. format(string, sizeof(string), "Key Fashioned You Can Lock Car %d.",car);
  11071. SendClientMessage(playerid, COLOR_GRAD4, string);
  11072. SendClientMessage(playerid, COLOR_WHITE, "HINT: Type /lock ");
  11073. return 1;
  11074. }
  11075. }
  11076. return 1;
  11077. }
  11078. if(strcmp(cmd, "/switchkey", true) == 0)
  11079. {
  11080. if(IsPlayerConnected(playerid))
  11081. {
  11082. if(!SwitchKey[playerid])
  11083. {
  11084. if(HireCar[playerid] != 299)
  11085. {
  11086. SwitchKey[playerid] = 1;
  11087. GameTextForPlayer(playerid, "~w~You control now your house car", 5000, 6);
  11088. }
  11089. else
  11090. {
  11091. GameTextForPlayer(playerid, "~w~You do not hire a car", 5000, 6);
  11092. }
  11093. return 1;
  11094. }
  11095. else
  11096. {
  11097. SwitchKey[playerid] = 0;
  11098. GameTextForPlayer(playerid, "~w~You control now your hire car", 5000, 6);
  11099. }
  11100. }
  11101. return 1;
  11102. }
  11103. if(strcmp(cmd, "/givekey", true) == 0)
  11104. {
  11105. if(IsPlayerConnected(playerid))
  11106. {
  11107. tmp = strtok(cmdtext, idx);
  11108. new car;
  11109. if(!strlen(tmp))
  11110. {
  11111. SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /givekey [playerid/PartOfName]");
  11112. return 1;
  11113. }
  11114. giveplayerid = ReturnUser(tmp);
  11115. if(HireCar[playerid] == 299 && PlayerInfo[playerid][pPhousekey] == 255)
  11116. {
  11117. SendClientMessage(playerid, COLOR_GRAD1, " You dont have a key to give");
  11118. return 1;
  11119. }
  11120. else
  11121. {
  11122. if(HireCar[playerid] != 299 && SwitchKey[playerid] == 0)
  11123. {
  11124. car = HireCar[playerid];
  11125. gCarLock[car] = 0;
  11126. UnLockCar(car);
  11127. HireCar[playerid] = 299;
  11128. }
  11129. else
  11130. {
  11131. car = PlayerInfo[playerid][pPhousekey]+1;
  11132. }
  11133. }
  11134. if (IsPlayerConnected(giveplayerid))
  11135. {
  11136. if(giveplayerid != INVALID_PLAYER_ID)
  11137. {
  11138. if(ProxDetectorS(5.0, playerid, giveplayerid))
  11139. {
  11140. if(HireCar[giveplayerid] != 299)
  11141. {
  11142. gCarLock[HireCar[giveplayerid]] = 0;
  11143. UnLockCar(HireCar[giveplayerid]);
  11144. }
  11145. HireCar[giveplayerid] = car;
  11146. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  11147. GetPlayerName(playerid, sendername, sizeof(sendername));
  11148. format(string, sizeof(string), " You have given %s the key to your vehicle", giveplayer);
  11149. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  11150. SendClientMessage(playerid, COLOR_GRAD1, string);
  11151. format(string, sizeof(string), " You have recieved the key to a vehicle from %s", sendername);
  11152. SendClientMessage(giveplayerid, COLOR_GRAD1, string);
  11153. format(string, sizeof(string), "* %s takes out a set of keys, and tosses them to %s.", sendername ,giveplayer);
  11154. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  11155. }
  11156. }
  11157. }
  11158. }
  11159. return 1;
  11160. }
  11161. if(strcmp(cmd, "/unrentcar", true) == 0)
  11162. {
  11163. if(IsPlayerConnected(playerid))
  11164. {
  11165. if(HireCar[playerid] != 299)
  11166. {
  11167. gCarLock[HireCar[playerid]] = 0;
  11168. UnLockCar(HireCar[playerid]);
  11169. HireCar[playerid] = 299;
  11170. GameTextForPlayer(playerid, "~w~You no longer rent a car", 5000, 3);
  11171. }
  11172. }
  11173. return 1;
  11174. }
  11175. if(strcmp(cmd, "/unrent", true) == 0)
  11176. {
  11177. if(IsPlayerConnected(playerid))
  11178. {
  11179. GetPlayerName(playerid, playername, sizeof(playername));
  11180. if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
  11181. {
  11182. SendClientMessage(playerid, COLOR_WHITE, " You own this house !");
  11183. return 1;
  11184. }
  11185. PlayerInfo[playerid][pPhousekey] = 255;
  11186. SendClientMessage(playerid, COLOR_WHITE, "You are now homeless.");
  11187. }
  11188. return 1;
  11189. }
  11190. if(strcmp(cmd, "/housewithdraw", true) == 0)
  11191. {
  11192. if(IsPlayerConnected(playerid))
  11193. {
  11194. GetPlayerName(playerid, playername, sizeof(playername));
  11195. new bouse = PlayerInfo[playerid][pPhousekey];
  11196. if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
  11197. {
  11198. tmp = strtok(cmdtext, idx);
  11199. if(!strlen(tmp))
  11200. {
  11201. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /housewithdraw [amount]");
  11202. format(string, sizeof(string), " You Have $%d in your cashbox.", HouseInfo[bouse][hTakings]);
  11203. SendClientMessage(playerid, COLOR_GRAD3, string);
  11204. return 1;
  11205. }
  11206. new cashdeposit = strval(tmp);
  11207. if(!strlen(tmp))
  11208. {
  11209. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /housewithdraw [amount]");
  11210. format(string, sizeof(string), " You Have $%d in your cashbox.", HouseInfo[bouse][hTakings]);
  11211. SendClientMessage(playerid, COLOR_GRAD3, string);
  11212. return 1;
  11213. }
  11214. if (cashdeposit > HouseInfo[bouse][hTakings] || cashdeposit < 1)
  11215. {
  11216. SendClientMessage(playerid, COLOR_GRAD2, " You dont have that much !");
  11217. return 1;
  11218. }
  11219. if (!PlayerToPoint(100, playerid,HouseInfo[bouse][hExitx],HouseInfo[bouse][hExity],HouseInfo[bouse][hExitz]))
  11220. {
  11221. SendClientMessage(playerid, COLOR_GRAD2, " You are to far from your house !");
  11222. return 1;
  11223. }
  11224. else
  11225. {
  11226. ConsumingMoney[playerid] = 1;
  11227. GivePlayerMoney(playerid,cashdeposit);
  11228. HouseInfo[bouse][hTakings]=HouseInfo[bouse][hTakings]-cashdeposit;
  11229. format(string, sizeof(string), " You Have Withdrawn $%d from your cashbox Total: $%d ", cashdeposit,HouseInfo[bouse][hTakings]);
  11230. OnPropUpdate();
  11231. SendClientMessage(playerid, COLOR_YELLOW, string);
  11232. return 1;
  11233. }
  11234. }
  11235. else
  11236. {
  11237. SendClientMessage(playerid, COLOR_WHITE, "You don't own a house.");
  11238. }
  11239. }
  11240. return 1;
  11241.  
  11242. }
  11243. if(strcmp(cmd, "/asellbiz", true) == 0)
  11244. {
  11245. if(IsPlayerConnected(playerid))
  11246. {
  11247. GetPlayerName(playerid, playername, sizeof(playername));
  11248. tmp = strtok(cmdtext, idx);
  11249. if(!strlen(tmp))
  11250. {
  11251. SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /asellbiz [bizid]");
  11252. return 1;
  11253. }
  11254. new biz = strval(tmp);
  11255. if (PlayerInfo[playerid][pAdmin] >= 4)
  11256. {
  11257. BizzInfo[biz][bLocked] = 1;
  11258. BizzInfo[biz][bOwned] = 0;
  11259. strmid(BizzInfo[biz][bOwner], "The State", 0, strlen("The State"), 255);
  11260. strmid(BizzInfo[biz][bExtortion], "No-one", 0, strlen("No-one"), 255);
  11261. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  11262. format(string, sizeof(string), "~w~You have sold the Business");
  11263. GameTextForPlayer(playerid, string, 10000, 3);
  11264. OnPropUpdate();
  11265. return 1;
  11266. }
  11267. else
  11268. {
  11269. SendClientMessage(playerid, COLOR_WHITE, "You are not an admin.");
  11270. }
  11271. }
  11272. return 1;
  11273. }
  11274. if(strcmp(cmd, "/asellsbiz", true) == 0)
  11275. {
  11276. if(IsPlayerConnected(playerid))
  11277. {
  11278. GetPlayerName(playerid, playername, sizeof(playername));
  11279. tmp = strtok(cmdtext, idx);
  11280. if(!strlen(tmp))
  11281. {
  11282. SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /asellsbiz [sbizid]");
  11283. return 1;
  11284. }
  11285. new sbiz = strval(tmp);
  11286. if (PlayerInfo[playerid][pAdmin] >= 4)
  11287. {
  11288. SBizzInfo[sbiz][sbLocked] = 1;
  11289. SBizzInfo[sbiz][sbOwned] = 0;
  11290. strmid(SBizzInfo[sbiz][sbOwner], "The State", 0, strlen("The State"), 255);
  11291. strmid(SBizzInfo[sbiz][sbExtortion], "No-one", 0, strlen("No-one"), 255);
  11292. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  11293. format(string, sizeof(string), "~w~You have sold the Business");
  11294. GameTextForPlayer(playerid, string, 10000, 3);
  11295. OnPropUpdate();
  11296. return 1;
  11297. }
  11298. else
  11299. {
  11300. SendClientMessage(playerid, COLOR_WHITE, "You are not an admin.");
  11301. }
  11302. }
  11303. return 1;
  11304. }
  11305. if(strcmp(cmd, "/asellhouse", true) == 0)
  11306. {
  11307. if(IsPlayerConnected(playerid))
  11308. {
  11309. GetPlayerName(playerid, playername, sizeof(playername));
  11310. tmp = strtok(cmdtext, idx);
  11311. if(!strlen(tmp))
  11312. {
  11313. SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /asellhouse [houseid]");
  11314. return 1;
  11315. }
  11316. new house = strval(tmp);
  11317. if (PlayerInfo[playerid][pAdmin] >= 4)
  11318. {
  11319. HouseInfo[house][hHel] = 0;
  11320. HouseInfo[house][hArm] = 0;
  11321. HouseInfo[house][hHealthx] = 0;
  11322. HouseInfo[house][hHealthy] = 0;
  11323. HouseInfo[house][hHealthz] = 0;
  11324. HouseInfo[house][hArmourx] = 0;
  11325. HouseInfo[house][hArmoury] = 0;
  11326. HouseInfo[house][hArmourz] = 0;
  11327. HouseInfo[house][hLock] = 1;
  11328. HouseInfo[house][hOwned] = 0;
  11329. HouseInfo[house][hVec] = 418;
  11330. HouseInfo[house][hVcol1] = -1;
  11331. HouseInfo[house][hVcol2] = -1;
  11332. strmid(HouseInfo[house][hOwner], "The State", 0, strlen("The State"), 255);
  11333. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  11334. format(string, sizeof(string), "~w~You have sold this property", HouseInfo[house][hValue]);
  11335. GameTextForPlayer(playerid, string, 10000, 3);
  11336. OnPropUpdate();
  11337. return 1;
  11338. }
  11339. else
  11340. {
  11341. SendClientMessage(playerid, COLOR_WHITE, "You are not an admin.");
  11342. }
  11343. }
  11344. return 1;
  11345. }
  11346.  
  11347. if(strcmp(cmd, "/sellhouse", true) == 0)
  11348. {
  11349. if(IsPlayerConnected(playerid))
  11350. {
  11351. GetPlayerName(playerid, playername, sizeof(playername));
  11352. if(PlayerInfo[playerid][pPhousekey] == 255)
  11353. {
  11354. SendClientMessage(playerid, COLOR_WHITE, "You don't own a house.");
  11355. return 1;
  11356. }
  11357. if(PlayerInfo[playerid][pMarried] > 0)
  11358. {
  11359. SendClientMessage(playerid, COLOR_GREY, " You are Married, can't sell the House !");
  11360. return 1;
  11361. }
  11362. if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
  11363. {
  11364. new house = PlayerInfo[playerid][pPhousekey];
  11365. HouseInfo[house][hHel] = 0;
  11366. HouseInfo[house][hArm] = 0;
  11367. HouseInfo[house][hHealthx] = 0;
  11368. HouseInfo[house][hHealthy] = 0;
  11369. HouseInfo[house][hHealthz] = 0;
  11370. HouseInfo[house][hArmourx] = 0;
  11371. HouseInfo[house][hArmoury] = 0;
  11372. HouseInfo[house][hArmourz] = 0;
  11373. HouseInfo[house][hLock] = 1;
  11374. HouseInfo[house][hOwned] = 0;
  11375. HouseInfo[house][hVec] = 418;
  11376. HouseInfo[house][hVcol1] = -1;
  11377. HouseInfo[house][hVcol2] = -1;
  11378. GetPlayerName(playerid, sendername, sizeof(sendername));
  11379. strmid(HouseInfo[house][hOwner], "The State", 0, strlen("The State"), 255);
  11380. ConsumingMoney[playerid] = 1;
  11381. GivePlayerMoney(playerid,HouseInfo[house][hValue]);
  11382. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  11383. format(string, sizeof(string), "~w~Congratulations~n~ You have sold your property for ~n~~g~$%d", HouseInfo[house][hValue]);
  11384. GameTextForPlayer(playerid, string, 10000, 3);
  11385. PlayerInfo[playerid][pPhousekey] = 255;
  11386. if(PlayerInfo[playerid][pLocal] == house)
  11387. {
  11388. SetPlayerInterior(playerid,0);
  11389. SetPlayerPos(playerid,HouseInfo[house][hEntrancex],HouseInfo[house][hEntrancey],HouseInfo[house][hEntrancez]);
  11390. PlayerInfo[playerid][pInt] = 0;
  11391. }
  11392. OnPropUpdate();
  11393. OnPlayerUpdate(playerid);
  11394. return 1;
  11395. }
  11396. else
  11397. {
  11398. SendClientMessage(playerid, COLOR_WHITE, "You don't own a house.");
  11399. }
  11400. }
  11401. return 1;
  11402. }
  11403. if(strcmp(cmd, "/houseupgrade", true) == 0 || strcmp(cmd, "/hu", true) == 0)
  11404. {
  11405. if(IsPlayerConnected(playerid))
  11406. {
  11407. new house = PlayerInfo[playerid][pPhousekey];
  11408. GetPlayerName(playerid, playername, sizeof(playername));
  11409. if (house != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
  11410. {
  11411. tmp = strtok(cmdtext, idx);
  11412. if(!strlen(tmp))
  11413. {
  11414. SendClientMessage(playerid, COLOR_WHITE, "USAGE: /houseupgrade [item number]");
  11415. SendClientMessage(playerid, COLOR_GRAD1, "|_______ Home Supplys _______|");
  11416. SendClientMessage(playerid, COLOR_GRAD2, "| 1: Health Upgrade $50000");
  11417. SendClientMessage(playerid, COLOR_GRAD3, "| 2: Armour Upgrade $100000");
  11418. SendClientMessage(playerid, COLOR_GRAD5, "| 3: TV $500");
  11419. return 1;
  11420. }
  11421. new item = strval(tmp);
  11422. switch (item)
  11423. {
  11424. case 1:
  11425. {
  11426. if(SBizzInfo[6][sbProducts] == 0)
  11427. {
  11428. GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
  11429. return 1;
  11430. }
  11431. if(PlayerInfo[playerid][pLevel] < 5)
  11432. {
  11433. SendClientMessage(playerid, COLOR_GRAD5, "You Must Be Level 5 To Purchase This");
  11434. return 1;
  11435. }
  11436. if(GetPlayerMoney(playerid) < 50000)
  11437. {
  11438. SendClientMessage(playerid, COLOR_GRAD5, "You Don't Have The Cash To Purchase This");
  11439. return 1;
  11440. }
  11441. HouseInfo[house][hHel] = 1;
  11442. GivePlayerMoney(playerid,-50000);
  11443. SBizzInfo[6][sbTill] += 50000;//heal buisness
  11444. ExtortionSBiz(6, 50000);
  11445. SBizzInfo[6][sbProducts]--;
  11446. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  11447. SendClientMessage(playerid, COLOR_GRAD5, "You Can Now Heal Yourself At Home, Type /heal.");
  11448. }
  11449. case 2:
  11450. {
  11451. if(!IsACop(playerid))
  11452. {
  11453. SendClientMessage(playerid, COLOR_GREY, " You can't buy this, you are not a Cop !");
  11454. return 1;
  11455. }
  11456. if(SBizzInfo[6][sbProducts] == 0)
  11457. {
  11458. GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
  11459. return 1;
  11460. }
  11461. if (PlayerInfo[playerid][pLevel] < 7)
  11462. {
  11463. SendClientMessage(playerid, COLOR_GRAD5, "You Must Be Level 7 To Purchase This");
  11464. return 1;
  11465. }
  11466. if(GetPlayerMoney(playerid) < 100000)
  11467. {
  11468. SendClientMessage(playerid, COLOR_GRAD5, "You Don't Have The Cash To Purchase This");
  11469. return 1;
  11470. }
  11471. HouseInfo[house][hArm] = 1;
  11472. GivePlayerMoney(playerid,-100000);
  11473. SBizzInfo[6][sbTill] += 100000;//heal buisness
  11474. ExtortionSBiz(6, 100000);
  11475. SBizzInfo[6][sbProducts]--;
  11476. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  11477. SendClientMessage(playerid, COLOR_GRAD5, "You Can Now Get Armour At Home, Type /heal.");
  11478. }
  11479. case 3:
  11480. {
  11481. if(SBizzInfo[6][sbProducts] == 0)
  11482. {
  11483. GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
  11484. return 1;
  11485. }
  11486. if (PlayerInfo[playerid][pLevel] < 3)
  11487. {
  11488. SendClientMessage(playerid, COLOR_GRAD5, "You Must Be Level 3 To Purchase This");
  11489. return 1;
  11490. }
  11491. if(GetPlayerMoney(playerid) < 500)
  11492. {
  11493. SendClientMessage(playerid, COLOR_GRAD5, "You Don't Have The Cash To Purchase This");
  11494. return 1;
  11495. }
  11496. HouseInfo[house][hHealthx] = 1;
  11497. GivePlayerMoney(playerid,-500);
  11498. SBizzInfo[6][sbTill] += 500;
  11499. ExtortionSBiz(6, 500);
  11500. SBizzInfo[6][sbProducts]--;
  11501. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  11502. SendClientMessage(playerid, COLOR_GRAD5, "You can now use your TV set, type /tv.");
  11503. }
  11504. }
  11505. OnPropUpdate();
  11506. OnPlayerUpdate(playerid);
  11507. return 1;
  11508. }
  11509. else
  11510. {
  11511. SendClientMessage(playerid, COLOR_GRAD2, " You don't own a house");
  11512. return 1;
  11513. }
  11514. }
  11515. return 1;
  11516. }
  11517. if(strcmp(cmd, "/setrent", true) == 0)
  11518. {
  11519. if(IsPlayerConnected(playerid))
  11520. {
  11521. new bouse = PlayerInfo[playerid][pPhousekey];
  11522. GetPlayerName(playerid, playername, sizeof(playername));
  11523. if (bouse != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
  11524. {
  11525. tmp = strtok(cmdtext, idx);
  11526. if(!strlen(tmp))
  11527. {
  11528. SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setrent [RentFee]");
  11529. return 1;
  11530. }
  11531. if(strval(tmp) < 1 || strval(tmp) > 99999)
  11532. {
  11533. SendClientMessage(playerid, COLOR_WHITE, "Minimum rent is $1, Maximum rent is $99999.");
  11534. return 1;
  11535. }
  11536. HouseInfo[bouse][hRent] = strval(tmp);
  11537. OnPropUpdate();
  11538. format(string, sizeof(string), "House rent set to $%d", HouseInfo[bouse][hRent]);
  11539. SendClientMessage(playerid, COLOR_WHITE, string);
  11540. return 1;
  11541. }
  11542. else
  11543. {
  11544. SendClientMessage(playerid, COLOR_GRAD2, " You don't own a house");
  11545. return 1;
  11546. }
  11547. }
  11548. return 1;
  11549. }
  11550. if(strcmp(cmd, "/evictall", true) == 0)
  11551. {
  11552. if(IsPlayerConnected(playerid))
  11553. {
  11554. new bouse = PlayerInfo[playerid][pPhousekey];
  11555. if (bouse != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
  11556. {
  11557. for(new i = 0; i < MAX_PLAYERS; i++)
  11558. {
  11559. if(IsPlayerConnected(i))
  11560. {
  11561. if(i != playerid)
  11562. {
  11563. if (PlayerInfo[i][pPhousekey] == PlayerInfo[playerid][pPhousekey] )
  11564. {
  11565. SendClientMessage(i, COLOR_WHITE, "You have been evicted from your house.");
  11566. SendClientMessage(playerid, COLOR_WHITE, "Everyone have been evicted.");
  11567. PlayerInfo[i][pPhousekey] = 255;
  11568. return 1;
  11569. }
  11570. }
  11571. }
  11572. }
  11573. }
  11574. else
  11575. {
  11576. SendClientMessage(playerid, COLOR_GRAD2, " You don't own a house !");
  11577. return 1;
  11578. }
  11579. }
  11580. return 1;
  11581. }
  11582. if(strcmp(cmd, "/evict", true) == 0)
  11583. {
  11584. if(IsPlayerConnected(playerid))
  11585. {
  11586. new bouse = PlayerInfo[playerid][pPhousekey];
  11587. GetPlayerName(playerid, playername, sizeof(playername));
  11588. if (bouse != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
  11589. {
  11590. tmp = strtok(cmdtext, idx);
  11591. if(!strlen(tmp))
  11592. {
  11593. SendClientMessage(playerid, COLOR_WHITE, "USAGE: /evict [playerid/PartOfName]");
  11594. }
  11595. new target;
  11596. //target = strval(tmp);
  11597. target = ReturnUser(tmp);
  11598. if (target == playerid)
  11599. {
  11600. SendClientMessage(target, COLOR_WHITE, "You cant evict yourself.");
  11601. return 1;
  11602. }
  11603. if(IsPlayerConnected(target))
  11604. {
  11605. if(target != INVALID_PLAYER_ID)
  11606. {
  11607. if(PlayerInfo[target][pPhousekey] == PlayerInfo[playerid][pPhousekey])
  11608. {
  11609. SendClientMessage(target, COLOR_WHITE, "You have been evicted");
  11610. SendClientMessage(playerid, COLOR_WHITE, "Player has been evicted");
  11611. PlayerInfo[target][pPhousekey] = 255;
  11612. return 1;
  11613. }
  11614. else
  11615. {
  11616. SendClientMessage(playerid, COLOR_WHITE, "Player doesn't rent at your House !");
  11617. return 1;
  11618. }
  11619. }
  11620. }
  11621. }
  11622. else
  11623. {
  11624. SendClientMessage(playerid, COLOR_GRAD2, " You don't own a house !");
  11625. return 1;
  11626. }
  11627. }
  11628. return 1;
  11629. }
  11630. if(strcmp(cmd, "/setrentable", true) == 0)
  11631. {
  11632. if(IsPlayerConnected(playerid))
  11633. {
  11634. new bouse = PlayerInfo[playerid][pPhousekey];
  11635. GetPlayerName(playerid, playername, sizeof(playername));
  11636. if (bouse != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
  11637. {
  11638. tmp = strtok(cmdtext, idx);
  11639. if(!strlen(tmp))
  11640. {
  11641. SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setrentable [0/1]");
  11642. }
  11643. HouseInfo[bouse][hRentabil] = strval(tmp);
  11644. OnPropUpdate();
  11645. format(string, sizeof(string), "House rentable set to %d.", HouseInfo[bouse][hRentabil]);
  11646. SendClientMessage(playerid, COLOR_WHITE, string);
  11647. return 1;
  11648. }
  11649. else
  11650. {
  11651. SendClientMessage(playerid, COLOR_GRAD2, " You don't own a house !");
  11652. return 1;
  11653. }
  11654. }
  11655. return 1;
  11656. }
  11657. if(strcmp(cmd, "/call", true) == 0)
  11658. {
  11659. if(IsPlayerConnected(playerid))
  11660. {
  11661. tmp = strtok(cmdtext, idx);
  11662. if(!strlen(tmp))
  11663. {
  11664. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /call [phonenumber]");
  11665. return 1;
  11666. }
  11667. if(PlayerInfo[playerid][pPnumber] == 0)
  11668. {
  11669. SendClientMessage(playerid, COLOR_GRAD2, " You dont't have a cell phone !");
  11670. return 1;
  11671. }
  11672. GetPlayerName(playerid, sendername, sizeof(sendername));
  11673. format(string, sizeof(string), "* %s takes out a cellphone.", sendername);
  11674. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  11675. new phonenumb = strval(tmp);
  11676. if(phonenumb == 911)
  11677. {
  11678. SendClientMessage(playerid, COLOR_WHITE, "HINT: You now use T to talk on your cellphone, type /hangup to hang up");
  11679. SendClientMessage(playerid, COLOR_ALLDEPT, "EMERGENCY: Which Service Do You Require, Police or Paramedic?");
  11680. Mobile[playerid] = 911;
  11681. return 1;
  11682. }
  11683. if(phonenumb == PlayerInfo[playerid][pPnumber])
  11684. {
  11685. SendClientMessage(playerid, COLOR_GRAD2, " You just get a busy tone...");
  11686. return 1;
  11687. }
  11688. if(Mobile[playerid] != 255)
  11689. {
  11690. SendClientMessage(playerid, COLOR_GRAD2, " You are already on a call...");
  11691. return 1;
  11692. }
  11693. for(new i = 0; i < MAX_PLAYERS; i++)
  11694. {
  11695. if(IsPlayerConnected(i))
  11696. {
  11697. if(PlayerInfo[i][pPnumber] == phonenumb && phonenumb != 0)
  11698. {
  11699. giveplayerid = i;
  11700. Mobile[playerid] = giveplayerid; //caller connecting
  11701. if(IsPlayerConnected(giveplayerid))
  11702. {
  11703. if(giveplayerid != INVALID_PLAYER_ID)
  11704. {
  11705. if(PhoneOnline[giveplayerid] > 0)
  11706. {
  11707. SendClientMessage(playerid, COLOR_GREY, " That players Phone is Offline !");
  11708. return 1;
  11709. }
  11710. if (Mobile[giveplayerid] == 255)
  11711. {
  11712. format(string, sizeof(string), "Your Mobile is Ringing Type (/Pickup) CallerID: %s", sendername);
  11713. SendClientMessage(giveplayerid, COLOR_YELLOW, string);
  11714. GetPlayerName(giveplayerid, sendername, sizeof(sendername));
  11715. RingTone[giveplayerid] = 10;
  11716. format(string, sizeof(string), "* %s's phone begins to ring.", sendername);
  11717. SendClientMessage(playerid, COLOR_WHITE, "HINT: You now use T to talk on your cellphone, type /hangup to hang up");
  11718. ProxDetector(30.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  11719. CellTime[playerid] = 1;
  11720. return 1;
  11721. }
  11722. }
  11723. }
  11724. }
  11725. }
  11726. }
  11727. SendClientMessage(playerid, COLOR_GRAD2, " You just get a Busy tone...");
  11728. }
  11729. return 1;
  11730. }
  11731. if(strcmp(cmd, "/txt", true) == 0 || strcmp(cmd, "/t", true) == 0 || strcmp(cmd, "/sms", true) == 0)
  11732. {
  11733. if(IsPlayerConnected(playerid))
  11734. {
  11735. if(gPlayerLogged[playerid] == 0)
  11736. {
  11737. SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
  11738. return 1;
  11739. }
  11740. tmp = strtok(cmdtext, idx);
  11741. if(!strlen(tmp))
  11742. {
  11743. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/t)ext [phonenumber] [text chat]");
  11744. return 1;
  11745. }
  11746. if(PlayerInfo[playerid][pPnumber] == 0)
  11747. {
  11748. SendClientMessage(playerid, COLOR_GRAD2, " You dont't have a cell phone...");
  11749. return 1;
  11750. }
  11751. GetPlayerName(playerid, sendername, sizeof(sendername));
  11752. format(string, sizeof(string), "* %s takes out a cellphone.", sendername);
  11753. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  11754. new phonenumb = strval(tmp);
  11755. new length = strlen(cmdtext);
  11756. while ((idx < length) && (cmdtext[idx] <= ' '))
  11757. {
  11758. idx++;
  11759. }
  11760. new offset = idx;
  11761. new result[64];
  11762. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  11763. {
  11764. result[idx - offset] = cmdtext[idx];
  11765. idx++;
  11766. }
  11767. result[idx - offset] = EOS;
  11768. if(!strlen(result))
  11769. {
  11770. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/t)ext [phonenumber] [text chat]");
  11771. return 1;
  11772. }
  11773. if(phonenumb == 555)
  11774. {
  11775. if ((strcmp("yes", result, true, strlen(result)) == 0) && (strlen(result) == strlen("yes")))
  11776. {
  11777. SendClientMessage(playerid, COLOR_WHITE, "Text Message Delivered.");
  11778. if (gTeam[playerid] == 2 || gTeam[playerid] == 1)
  11779. {
  11780. SendClientMessage(playerid, COLOR_YELLOW, "SMS: I have no idea what you're talking about, Sender: MOLE (555)");
  11781. RingTone[playerid] = 20;
  11782. return 1;
  11783. }
  11784. return 1;
  11785. }
  11786. else
  11787. {
  11788. SendClientMessage(playerid, COLOR_YELLOW, "SMS: A simple Yes will do, Sender: MOLE (555)");
  11789. RingTone[playerid] = 20;
  11790. return 1;
  11791. }
  11792. }
  11793. for(new i = 0; i < MAX_PLAYERS; i++)
  11794. {
  11795. if(IsPlayerConnected(i))
  11796. {
  11797. if(PlayerInfo[i][pPnumber] == phonenumb && phonenumb != 0)
  11798. {
  11799. giveplayerid = i;
  11800. Mobile[playerid] = giveplayerid; //caller connecting
  11801. if(IsPlayerConnected(giveplayerid))
  11802. {
  11803. if(giveplayerid != INVALID_PLAYER_ID)
  11804. {
  11805. if(PhoneOnline[giveplayerid] > 0)
  11806. {
  11807. SendClientMessage(playerid, COLOR_GREY, " That players Phone is Offline !");
  11808. return 1;
  11809. }
  11810. format(string, sizeof(string), "SMS: %s, Sender: %s (%d)", result,sendername,PlayerInfo[playerid][pPnumber]);
  11811. GetPlayerName(giveplayerid, sendername, sizeof(sendername));
  11812. //format(string, sizeof(string), "* %s's phone beeps.", sendername);
  11813. RingTone[giveplayerid] =20;
  11814. SendClientMessage(playerid, COLOR_WHITE, "Text Message Delivered");
  11815. SendClientMessage(giveplayerid, COLOR_YELLOW, string);
  11816. SendClientMessage(playerid, COLOR_YELLOW, string);
  11817. format(string, sizeof(string), "~r~$-%d", txtcost);
  11818. GameTextForPlayer(playerid, string, 5000, 1);
  11819. GivePlayerMoney(playerid,-txtcost);
  11820. SBizzInfo[2][sbTill] += txtcost;
  11821. ExtortionSBiz(2, txtcost);
  11822. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  11823. Mobile[playerid] = 255;
  11824. return 1;
  11825. }
  11826. }
  11827. }
  11828. }
  11829. }
  11830. SendClientMessage(playerid, COLOR_GRAD2, " Message Delivery Failed...");
  11831. }
  11832. return 1;
  11833. }
  11834. //----------------------------------[pickup]-----------------------------------------------
  11835.  
  11836. if(strcmp(cmd, "/pickup", true) == 0 || strcmp(cmd, "/p", true) == 0)
  11837. {
  11838. if(IsPlayerConnected(playerid))
  11839. {
  11840. if(Mobile[playerid] != 255)
  11841. {
  11842. SendClientMessage(playerid, COLOR_GRAD2, " You are already on a call...");
  11843. return 1;
  11844. }
  11845. for(new i = 0; i < MAX_PLAYERS; i++)
  11846. {
  11847. if(IsPlayerConnected(i))
  11848. {
  11849. if(Mobile[i] == playerid)
  11850. {
  11851. Mobile[playerid] = i; //caller connecting
  11852. SendClientMessage(i, COLOR_GRAD2, " They Picked up the call.");
  11853. GetPlayerName(playerid, sendername, sizeof(sendername));
  11854. format(string, sizeof(string), "* %s answers his cellphone.", sendername);
  11855. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  11856. RingTone[playerid] = 0;
  11857. }
  11858.  
  11859. }
  11860. }
  11861. }
  11862. return 1;
  11863. }
  11864. if(strcmp(cmd, "/hangup", true) == 0 || strcmp(cmd, "/h", true) == 0)
  11865. {
  11866. if(IsPlayerConnected(playerid))
  11867. {
  11868. new caller = Mobile[playerid];
  11869. if(IsPlayerConnected(caller))
  11870. {
  11871. if(caller != INVALID_PLAYER_ID)
  11872. {
  11873. if(caller != 255)
  11874. {
  11875. if(caller < 255)
  11876. {
  11877. SendClientMessage(caller, COLOR_GRAD2, " They hung up.");
  11878. CellTime[caller] = 0;
  11879. CellTime[playerid] = 0;
  11880. SendClientMessage(playerid, COLOR_GRAD2, " You hung up.");
  11881. Mobile[caller] = 255;
  11882. }
  11883. Mobile[playerid] = 255;
  11884. CellTime[playerid] = 0;
  11885. RingTone[playerid] = 0;
  11886. return 1;
  11887. }
  11888. }
  11889. }
  11890. SendClientMessage(playerid, COLOR_GRAD2, " Your phone is in your pocket.");
  11891. }
  11892. return 1;
  11893. }
  11894. //----------------------------------[TIME]-----------------------------------------------
  11895. if(strcmp(cmd, "/fixr", true) == 0)
  11896. {
  11897. if(IsPlayerConnected(playerid))
  11898. {
  11899. PlayerFixRadio(playerid);
  11900. }
  11901. return 1;
  11902. }
  11903. if(strcmp(cmd, "/time", true) == 0)
  11904. {
  11905. if(IsPlayerConnected(playerid))
  11906. {
  11907. new mtext[20];
  11908. new year, month,day;
  11909. getdate(year, month, day);
  11910. if(month == 1) { mtext = "January"; }
  11911. else if(month == 2) { mtext = "February"; }
  11912. else if(month == 3) { mtext = "March"; }
  11913. else if(month == 4) { mtext = "April"; }
  11914. else if(month == 5) { mtext = "May"; }
  11915. else if(month == 6) { mtext = "June"; }
  11916. else if(month == 7) { mtext = "Juli"; }
  11917. else if(month == 8) { mtext = "August"; }
  11918. else if(month == 9) { mtext = "September"; }
  11919. else if(month == 10) { mtext = "October"; }
  11920. else if(month == 11) { mtext = "November"; }
  11921. else if(month == 12) { mtext = "December"; }
  11922. new hour,minuite,second;
  11923. gettime(hour,minuite,second);
  11924. FixHour(hour);
  11925. hour = shifthour;
  11926. if (minuite < 10)
  11927. {
  11928. if (PlayerInfo[playerid][pJailTime] > 0)
  11929. {
  11930. 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);
  11931. }
  11932. else
  11933. {
  11934. format(string, sizeof(string), "~y~%d %s~n~~g~|~w~%d:0%d~g~|", day, mtext, hour, minuite);
  11935. }
  11936. }
  11937. else
  11938. {
  11939. if (PlayerInfo[playerid][pJailTime] > 0)
  11940. {
  11941. 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);
  11942. }
  11943. else
  11944. {
  11945. format(string, sizeof(string), "~y~%d %s~n~~g~|~w~%d:%d~g~|", day, mtext, hour, minuite);
  11946. }
  11947. }
  11948. GameTextForPlayer(playerid, string, 5000, 1);
  11949. }
  11950. return 1;
  11951. }
  11952. //----------------------{HOUSES}-------------------
  11953. if(strcmp(cmd, "/house", true) == 0)
  11954. {
  11955. if(IsPlayerConnected(playerid))
  11956. {
  11957. if(PlayerInfo[playerid][pAdmin] >= 1337)
  11958. {
  11959. tmp = strtok(cmdtext, idx);
  11960. if(!strlen(tmp))
  11961. {
  11962. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /house [housenumber]");
  11963. return 1;
  11964. }
  11965. new housenum = strval(tmp);
  11966. SetPlayerInterior(playerid,HouseInfo[housenum][hInt]);
  11967. SetPlayerPos(playerid,HouseInfo[housenum][hExitx],HouseInfo[housenum][hExity],HouseInfo[housenum][hExitz]);
  11968. GameTextForPlayer(playerid, "~w~Teleporting", 5000, 1);
  11969. PlayerInfo[playerid][pInt] = HouseInfo[housenum][hInt];
  11970. PlayerInfo[playerid][pLocal] = housenum;
  11971. }
  11972. }
  11973. return 1;
  11974. }
  11975. if(strcmp(cmd, "/houseo", true) == 0)
  11976. {
  11977. if(IsPlayerConnected(playerid))
  11978. {
  11979. if(PlayerInfo[playerid][pAdmin] >= 1337)
  11980. {
  11981. tmp = strtok(cmdtext, idx);
  11982. if(!strlen(tmp))
  11983. {
  11984. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /houseo [housenumber]");
  11985. return 1;
  11986. }
  11987. new housenum = strval(tmp);
  11988. SetPlayerPos(playerid,HouseInfo[housenum][hEntrancex],HouseInfo[housenum][hEntrancey],HouseInfo[housenum][hEntrancez]);
  11989. GameTextForPlayer(playerid, "~w~Teleporting", 5000, 1);
  11990. }
  11991. }
  11992. return 1;
  11993. }
  11994. if(strcmp(cmd, "/biz", true) == 0)
  11995. {
  11996. if(IsPlayerConnected(playerid))
  11997. {
  11998. if(PlayerInfo[playerid][pAdmin] >= 1337)
  11999. {
  12000. tmp = strtok(cmdtext, idx);
  12001. if(!strlen(tmp))
  12002. {
  12003. SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /biz [biznumber]");
  12004. return 1;
  12005. }
  12006. new housenum = strval(tmp);
  12007. SetPlayerInterior(playerid,BizzInfo[housenum][bInterior]);
  12008. SetPlayerPos(playerid,BizzInfo[housenum][bExitX],BizzInfo[housenum][bExitY],BizzInfo[housenum][bExitZ]);
  12009. GameTextForPlayer(playerid, "~w~Teleporting", 5000, 1);
  12010. PlayerInfo[playerid][pInt] = BizzInfo[housenum][bInterior];
  12011. PlayerInfo[playerid][pLocal] = housenum+99;
  12012. }
  12013. }
  12014. return 1;
Add Comment
Please, Sign In to add comment