Guest User

Untitled

a guest
Jan 28th, 2014
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 128.33 KB | None | 0 0
  1. CMD:accept(playerid, params[])
  2. {
  3. new string[128];
  4. new sendername[MAX_PLAYER_NAME];
  5. new giveplayer[MAX_PLAYER_NAME];
  6. new giveplayerid;
  7. if(IsPlayerConnected(playerid)) {
  8. if(isnull(params)) {
  9. SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /accept [name]");
  10. SendClientMessageEx(playerid, COLOR_GREY, "Available names: Sex, Mats, Crack, Pot, Weapon, Craft, Repair, Lawyer, Bodyguard, Job, Live, Refill");
  11. SendClientMessageEx(playerid, COLOR_GREY, "Available names: Faction, RR, Family, Taxi, Bus, Boxing, Medic, Mechanic, Ticket, Car, Supcall, Izzys Death");
  12. return 1;
  13. }
  14. if(strcmp(params,"drink",true) == 0) {
  15. if((DrinkOffer[playerid] != INVALID_PLAYER_ID) && (IsPlayerConnected(DrinkOffer[playerid]))) {
  16. if (ProxDetectorS(8.0, playerid, DrinkOffer[playerid])) {
  17. ShowPlayerDialog(playerid, DRINKLISTDIALOG, DIALOG_STYLE_LIST, "Available Drinks", "Beer ($60)\nVodka ($100)\nWhiskey ($100)\nWater ($20)\nSoda($20)", "Purchase", "Cancel");
  18. }
  19. else {
  20. SendClientMessageEx(playerid, COLOR_GREY, " You're too far away from the bartender.");
  21. DrinkOffer[playerid] = INVALID_PLAYER_ID;
  22. return 1;
  23. }
  24. return 1;
  25. }
  26. else {
  27. SendClientMessageEx(playerid, COLOR_GREY, " No-one has offered you a drink.");
  28. return 1;
  29. }
  30. }
  31. if(strcmp(params,"death",true) == 0) {
  32. if(GetPVarInt(playerid, "Injured") == 1) {
  33. SendClientMessageEx(playerid, COLOR_WHITE, "You gave up hope and fell unconscious, you were immediately sent to the hospital.");
  34. KillEMSQueue(playerid);
  35. ResetPlayerWeaponsEx(playerid);
  36. SpawnPlayer(playerid);
  37. }
  38. else { SendClientMessageEx(playerid, COLOR_GREY, " You are not injured, you can't do this right now !"); }
  39. }
  40. if(strcmp(params,"car",true) == 0) {
  41. if(VehicleOffer[playerid] < 999) {
  42. if(IsPlayerConnected(VehicleOffer[playerid])) {
  43. if(GetPlayerCash(playerid) > VehiclePrice[playerid]) {
  44. if(IsPlayerInVehicle(VehicleOffer[playerid], PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvId])) {
  45. if(!ProxDetectorS(8.0, VehicleOffer[playerid], playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You are not near the car dealer");
  46. new playervehicleid = GetPlayerFreeVehicleId(playerid);
  47. new carsamount = GetPlayerVehicleCount(playerid);
  48. if(PlayerInfo[playerid][pDonateRank] == 0 && carsamount >= 2) return SendClientMessageEx(playerid, COLOR_GREY, "ERROR: You can't have more cars.");
  49. if(PlayerInfo[playerid][pDonateRank] == 1 && carsamount >= 3) return SendClientMessageEx(playerid, COLOR_GREY, "ERROR: You can't have more cars.");
  50. if(PlayerInfo[playerid][pDonateRank] == 2 && carsamount >= 4) return SendClientMessageEx(playerid, COLOR_GREY, "ERROR: You can't have more cars.");
  51. if(PlayerInfo[playerid][pDonateRank] == 3 && carsamount >= 5) return SendClientMessageEx(playerid, COLOR_GREY, "ERROR: You can't have more cars.");
  52. if(playervehicleid == -1) return SendClientMessageEx(playerid, COLOR_GREY, "ERROR: You can't have more cars.");
  53. new ip[32], ipex[32];
  54. GetPlayerIp(playerid, ip, sizeof(ip));
  55. GetPlayerIp(VehicleOffer[playerid], ipex, sizeof(ipex));
  56. format(string, sizeof(string), "[CAR] %s (IP: %s) has paid $%d to %s for the %s (IP: %s)", GetPlayerNameEx(playerid), ip, VehiclePrice[playerid], GetPlayerNameEx(VehicleOffer[playerid]), GetVehicleName(PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvId]), ipex);
  57. Log("logs/pay.log", string);
  58. GetPlayerName(VehicleOffer[playerid], giveplayer, sizeof(giveplayer));
  59. GetPlayerName(playerid, sendername, sizeof(sendername));
  60. format(string, sizeof(string), "* You bought the %s for $%d, from %s. (Check /carhelp for more help)", GetVehicleName(PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvId]), VehiclePrice[playerid],giveplayer);
  61. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  62. format(string, sizeof(string), "* You sold your %s to %s for $%d.",GetVehicleName(PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvId]), sendername,VehiclePrice[playerid]);
  63. SendClientMessageEx(VehicleOffer[playerid], COLOR_LIGHTBLUE, string);
  64. GivePlayerCash( VehicleOffer[playerid], VehiclePrice[playerid] );
  65. GivePlayerCash(playerid, -VehiclePrice[playerid]);
  66. RemovePlayerFromVehicle(VehicleOffer[playerid]);
  67. new Float:slx, Float:sly, Float:slz;
  68. GetPlayerPos(VehicleOffer[playerid], slx, sly, slz);
  69. SetPlayerPos(VehicleOffer[playerid], slx, sly, slz+2);
  70. PlayerVehicleInfo[playerid][playervehicleid][pvId] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvId];
  71. PlayerVehicleInfo[playerid][playervehicleid][pvModelId] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvModelId];
  72. PlayerVehicleInfo[playerid][playervehicleid][pvPosX] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvPosX];
  73. PlayerVehicleInfo[playerid][playervehicleid][pvPosY] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvPosY];
  74. PlayerVehicleInfo[playerid][playervehicleid][pvPosZ] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvPosZ];
  75. PlayerVehicleInfo[playerid][playervehicleid][pvPosAngle] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvPosAngle];
  76. PlayerVehicleInfo[playerid][playervehicleid][pvLock] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvLock];
  77. PlayerVehicleInfo[playerid][playervehicleid][pvLocked] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvLocked];
  78. PlayerVehicleInfo[playerid][playervehicleid][pvPaintJob] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvPaintJob];
  79. PlayerVehicleInfo[playerid][playervehicleid][pvColor1] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvColor1];
  80. PlayerVehicleInfo[playerid][playervehicleid][pvColor2] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvColor2];
  81. strmid(PlayerVehicleInfo[playerid][playervehicleid][pvAllowPlayer], PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvAllowPlayer], 0, strlen(PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvAllowPlayer]), 255);
  82. PlayerVehicleInfo[playerid][playervehicleid][pvAllowedPlayerId] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvAllowedPlayerId];
  83. PlayerVehicleInfo[playerid][playervehicleid][pvPark] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvPark];
  84. for(new m = 0; m < MAX_MODS; m++) {
  85. PlayerVehicleInfo[playerid][playervehicleid][pvMods][m] = PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvMods][m];
  86. }
  87. PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvId] = 0;
  88. PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvModelId] = 0;
  89. PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvPosX] = 0.0;
  90. PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvPosY] = 0.0;
  91. PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvPosZ] = 0.0;
  92. PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvPosAngle] = 0.0;
  93. PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvLock] = 0;
  94. PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvLocked] = 0;
  95. PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvPaintJob] = -1;
  96. PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvColor1] = 0;
  97. PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvImpounded] = 0;
  98. PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvColor2] = 0;
  99. strmid(PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvAllowPlayer], "No-one", 0, strlen("No-one"), 255);
  100. PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvAllowedPlayerId] = INVALID_PLAYER_ID;
  101. PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvPark] = 0;
  102. for(new m = 0; m < MAX_MODS; m++) {
  103. PlayerVehicleInfo[VehicleOffer[playerid]][VehicleId[playerid]][pvMods][m] = 0;
  104. }
  105. VehicleOffer[playerid] = 999;
  106. VehiclePrice[playerid] = 0;
  107. return 1;
  108. }
  109. else {
  110. SendClientMessageEx(playerid, COLOR_GREY, " The Car Dealer is not in the offered car!");
  111. return 1;
  112. }
  113. }
  114. else {
  115. SendClientMessageEx(playerid, COLOR_GREY, " You can't afford the car!");
  116. return 1;
  117. }
  118. }
  119. return 1;
  120. }
  121. else {
  122. SendClientMessageEx(playerid, COLOR_GREY, " Nobody offered to buy a car!");
  123. return 1;
  124. }
  125. }
  126. if(strcmp(params,"house",true) == 0) {
  127. if(HouseOffer[playerid] < 999) {
  128. if(IsPlayerConnected(HouseOffer[playerid])) {
  129. if(PlayerInfo[HouseOffer[playerid]][pPhousekey] == INVALID_HOUSE_ID) {
  130. SendClientMessageEx(playerid, COLOR_WHITE, "They don't own that house");
  131. return 1;
  132. }
  133. if(GetPlayerCash(playerid) > HousePrice[playerid]) {
  134.  
  135. new house;
  136. if(House[playerid] == 1) house = PlayerInfo[HouseOffer[playerid]][pPhousekey];
  137. else if(House[playerid] == 2) house = PlayerInfo[HouseOffer[playerid]][pPhousekey2];
  138. else return SendClientMessageEx(playerid, COLOR_RED, "Error: No house specified");
  139. ClearHouse(house);
  140. HouseInfo[house][hLock] = 1;
  141. format( HouseInfo[house][hOwner], 128, "Nobody" );
  142. sendername = GetPlayerNameEx(HouseOffer[playerid]);
  143. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  144. format(string, sizeof(string), "~w~Congratulations~n~ You have sold your property for ~n~~g~$%d", HousePrice[playerid]);
  145. GameTextForPlayer(HouseOffer[playerid], string, 4000, 3);
  146. if(House[playerid] == 1) PlayerInfo[HouseOffer[playerid]][pPhousekey] = INVALID_HOUSE_ID;
  147. else PlayerInfo[HouseOffer[playerid]][pPhousekey2] = INVALID_HOUSE_ID;
  148. SaveHouses();
  149. OnPlayerStatsUpdate(HouseOffer[playerid]);
  150. DestroyDynamicPickup(HouseInfo[house][hPickupID]);
  151. HouseInfo[house][hPickupID] = CreateDynamicPickup(1273, 23, HouseInfo[house][hExteriorX], HouseInfo[house][hExteriorY], HouseInfo[house][hExteriorZ]);
  152. GivePlayerCash(HouseOffer[playerid],HousePrice[playerid]);
  153.  
  154. PlayerInfo[playerid][pPhousekey] = house;
  155. HouseInfo[house][hOwned] = 1;
  156. GetPlayerName(playerid, sendername, sizeof(sendername));
  157. strmid(HouseInfo[house][hOwner], sendername, 0, strlen(sendername), 255);
  158. GivePlayerCash(playerid,-HousePrice[playerid]);
  159. SendClientMessageEx(playerid, COLOR_WHITE, "Congratulations on your new purchase!");
  160. SendClientMessageEx(playerid, COLOR_WHITE, "Type /help to review the property help section!");
  161. SaveHouses();
  162. OnPlayerStatsUpdate(playerid);
  163. DestroyDynamicPickup(HouseInfo[house][hPickupID]);
  164. HouseInfo[house][hPickupID] = CreateDynamicPickup(1273, 23, HouseInfo[house][hExteriorX], HouseInfo[house][hExteriorY], HouseInfo[house][hExteriorZ]);
  165. format(string, sizeof(string), "This house is owned by\n %s\nLevel: %d\nID: %d",HouseInfo[house][hOwner],HouseInfo[house][hLevel],house);
  166. UpdateDynamic3DTextLabelText(HouseInfo[house][hTextID], COLOR_GREEN, string);
  167.  
  168. new ip[32], ipex[32];
  169. GetPlayerIp(HouseOffer[playerid],ip,sizeof(ip));
  170. GetPlayerIp(playerid,ipex,sizeof(ipex));
  171. format(string,sizeof(string),"%s (IP: %s) has sold their house (ID %d) to %s (IP: %s) for $%d.",GetPlayerNameEx(HouseOffer[playerid]),ip,house,GetPlayerNameEx(playerid),ipex,HousePrice[playerid]);
  172. Log("logs/house.log", string);
  173.  
  174. HouseOffer[playerid] = 999;
  175. HousePrice[playerid] = 0;
  176. House[playerid] = 0;
  177. }
  178. else {
  179. SendClientMessageEx(playerid, COLOR_GREY, " You can't afford the house!");
  180. HouseOffer[playerid] = 999;
  181. HousePrice[playerid] = 0;
  182. House[playerid] = 0;
  183. return 1;
  184. }
  185. }
  186. return 1;
  187. }
  188. else {
  189. SendClientMessageEx(playerid, COLOR_GREY, " Nobody offered to buy a house!");
  190. return 1;
  191. }
  192. }
  193. else if(strcmp(params, "handshake",true) == 0) {
  194. new
  195. Count;
  196.  
  197. foreach(Player, i) {
  198. if(GetPVarInt(i, "shrequest") == playerid) {
  199. new
  200. Float: ppFloats[3];
  201.  
  202. GetPlayerPos(i, ppFloats[0], ppFloats[1], ppFloats[2]);
  203.  
  204. if(!IsPlayerInRangeOfPoint(playerid, 5, ppFloats[0], ppFloats[1], ppFloats[2])) {
  205. Count++;
  206. SendClientMessageEx(playerid, COLOR_WHITE, "You're too far away. You can't accept the handshake right now.");
  207. }
  208. else {
  209. switch(GetPVarInt(i, "shstyle")) {
  210. case 1:
  211. {
  212. Count++;
  213. PlayerFacePlayer( playerid, i );
  214. ApplyAnimation( playerid, "GANGS", "hndshkaa", 4.0, 1, 1, 1, 0, 1000 );
  215. ApplyAnimation( i, "GANGS", "hndshkaa", 4.0, 1, 1, 1, 0, 1000 );
  216. SetPVarInt(i, "shrequest", INVALID_PLAYER_ID);
  217. format(string, sizeof(string), "* %s has shook hands with %s.", GetPlayerNameEx(i), GetPlayerNameEx(playerid));
  218. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  219. DeletePVar(i, "shstyle");
  220. }
  221. case 2:
  222. {
  223. Count++;
  224. PlayerFacePlayer( playerid, i );
  225. ApplyAnimation( playerid, "GANGS", "hndshkba", 4.0, 1, 1, 1, 0, 1000 );
  226. ApplyAnimation( i, "GANGS", "hndshkba", 4.0, 1, 1, 1, 0, 1000 );
  227. SetPVarInt(i, "shrequest", INVALID_PLAYER_ID);
  228. format(string, sizeof(string), "* %s has shook hands with %s.", GetPlayerNameEx(i), GetPlayerNameEx(playerid));
  229. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  230. DeletePVar(i, "shstyle");
  231. }
  232. case 3:
  233. {
  234. Count++;
  235. PlayerFacePlayer( playerid, i );
  236. ApplyAnimation( playerid, "GANGS", "hndshkca", 4.0, 1, 1, 1, 0, 1000 );
  237. ApplyAnimation( i, "GANGS", "hndshkca", 4.0, 1, 1, 1, 0, 1000 );
  238. SetPVarInt(i, "shrequest", INVALID_PLAYER_ID);
  239. format(string, sizeof(string), "* %s has shook hands with %s.", GetPlayerNameEx(i), GetPlayerNameEx(playerid));
  240. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  241. DeletePVar(i, "shstyle");
  242. }
  243. case 4:
  244. {
  245. Count++;
  246. PlayerFacePlayer( playerid, i );
  247. ApplyAnimation( playerid, "GANGS", "hndshkcb", 4.0, 1, 1, 1, 0, 1000 );
  248. ApplyAnimation( i, "GANGS", "hndshkca", 4.0, 1, 1, 1, 0, 1000 );
  249. SetPVarInt(i, "shrequest", INVALID_PLAYER_ID);
  250. format(string, sizeof(string), "* %s has shook hands with %s.", GetPlayerNameEx(i), GetPlayerNameEx(playerid));
  251. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  252. DeletePVar(i, "shstyle");
  253. }
  254. case 5:
  255. {
  256. Count++;
  257. PlayerFacePlayer( playerid, i );
  258. ApplyAnimation( playerid, "GANGS", "hndshkda", 4.0, 1, 1, 1, 0, 1000 );
  259. ApplyAnimation( i, "GANGS", "hndshkca", 4.0, 1, 1, 1, 0, 1000 );
  260. SetPVarInt(i, "shrequest", INVALID_PLAYER_ID);
  261. format(string, sizeof(string), "* %s has shook hands with %s.", GetPlayerNameEx(i), GetPlayerNameEx(playerid));
  262. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  263. DeletePVar(i, "shstyle");
  264. }
  265. case 6:
  266. {
  267. Count++;
  268. PlayerFacePlayer( playerid, i );
  269. ApplyAnimation( playerid, "GANGS","hndshkfa_swt", 4.0, 1, 1, 1, 0, 2600 );
  270. ApplyAnimation( i, "GANGS","hndshkfa_swt", 4.0, 1, 1, 1, 0, 2600 );
  271. SetPVarInt(i, "shrequest", INVALID_PLAYER_ID);
  272. format(string, sizeof(string), "* %s has shook hands with %s.", GetPlayerNameEx(i), GetPlayerNameEx(playerid));
  273. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  274. DeletePVar(i, "shstyle");
  275. }
  276. case 7:
  277. {
  278. Count++;
  279. PlayerFacePlayer( playerid, i );
  280. ApplyAnimation( playerid, "GANGS", "prtial_hndshk_01", 4.0, 1, 1, 1, 0, 1250 );
  281. ApplyAnimation( i, "GANGS", "prtial_hndshk_01", 4.0, 1, 1, 1, 0, 1250 );
  282. SetPVarInt(i, "shrequest", INVALID_PLAYER_ID);
  283. format(string, sizeof(string), "* %s has shook hands with %s.", GetPlayerNameEx(i), GetPlayerNameEx(playerid));
  284. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  285. DeletePVar(i, "shstyle");
  286. }
  287. case 8:
  288. {
  289. Count++;
  290. PlayerFacePlayer( playerid, i );
  291. ApplyAnimation( playerid, "GANGS", "prtial_hndshk_biz_01", 3.7, 1, 1, 1, 0, 2200 );
  292. ApplyAnimation( i, "GANGS", "prtial_hndshk_biz_01", 3.5, 1, 1, 1, 0, 2200 );
  293. SetPVarInt(i, "shrequest", INVALID_PLAYER_ID);
  294. format(string, sizeof(string), "* %s has shook hands with %s.", GetPlayerNameEx(i), GetPlayerNameEx(playerid));
  295. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  296. DeletePVar(i, "shstyle");
  297. }
  298. }
  299. }
  300. }
  301. }
  302. if(Count == 0) return SendClientMessageEx(playerid, COLOR_WHITE, "You don't have any pending handshake requests.");
  303. return 1;
  304. }
  305. else if(strcmp(params,"invite",true) == 0)
  306. {
  307. if(hInviteOffer[playerid] < 999)
  308. {
  309. if(IsPlayerConnected(hInviteOffer[playerid]))
  310. {
  311. hInviteHouse[playerid] = (hInviteSlot[playerid] == 1) ? (PlayerInfo[hInviteOffer[playerid]][pPhousekey]) : (PlayerInfo[hInviteOffer[playerid]][pPhousekey2]);
  312. format(string, sizeof(string), "* You have accepted %s's house invite, a checkpoint has been set to their house.", GetPlayerNameEx(hInviteOffer[playerid]));
  313. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  314. format(string, sizeof(string), "* %s has accepted your house invite.", GetPlayerNameEx(playerid));
  315. SendClientMessageEx(hInviteOffer[playerid], COLOR_LIGHTBLUE, string);
  316. DisablePlayerCheckpoint(playerid);
  317. SetPlayerCheckpoint(playerid,HouseInfo[hInviteHouse[playerid]][hExteriorX], HouseInfo[hInviteHouse[playerid]][hExteriorY], HouseInfo[hInviteHouse[playerid]][hExteriorZ], 4.0);
  318. gPlayerCheckpointStatus[playerid] = CHECKPOINT_HOME;
  319. hInviteSlot[playerid] = 0;
  320. hInviteOffer[playerid] = 999;
  321. hInviteHouse[playerid] = INVALID_HOUSE_ID;
  322. return 1;
  323. }
  324. else
  325. {
  326. hInviteSlot[playerid] = 0;
  327. hInviteOffer[playerid] = 999;
  328. hInviteHouse[playerid] = INVALID_HOUSE_ID;
  329. SendClientMessageEx(playerid, COLOR_GREY, "The player who sent you a house invite has disconnected.");
  330. }
  331. }
  332. else
  333. {
  334. SendClientMessageEx(playerid, COLOR_GREY, "Nobody sent you a house invite.");
  335. return 1;
  336. }
  337. return 1;
  338. }
  339. else if(strcmp(params,"divorce",true) == 0) {
  340. if(DivorceOffer[playerid] < 999) {
  341. if(IsPlayerConnected(DivorceOffer[playerid])) {
  342. if(ProxDetectorS(10.0, playerid, DivorceOffer[playerid])) {
  343. GetPlayerName(DivorceOffer[playerid], giveplayer, sizeof(giveplayer));
  344. GetPlayerName(playerid, sendername, sizeof(sendername));
  345. format(string, sizeof(string), "* You have signed the divorce papers from %s, you are now single again.", giveplayer);
  346. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  347. format(string, sizeof(string), "* %s has signed the divorce papers, you are now single again.", sendername);
  348. SendClientMessageEx(DivorceOffer[playerid], COLOR_LIGHTBLUE, string);
  349. ClearMarriage(playerid);
  350. ClearMarriage(DivorceOffer[playerid]);
  351. PlayerInfo[playerid][pPhousekey] = INVALID_HOUSE_ID;
  352. return 1;
  353. }
  354. else {
  355. SendClientMessageEx(playerid, COLOR_GREY, " The player that sent you the Divorce Papers is not near you!");
  356. return 1;
  357. }
  358. }
  359. }
  360. else {
  361. SendClientMessageEx(playerid, COLOR_GREY, "Nobody sent you any divorce papers.");
  362. return 1;
  363. }
  364. }
  365. else if(strcmp(params,"faction",true) == 0) {
  366. if(InviteOffer[playerid] < 999) {
  367. if(IsPlayerConnected(InviteOffer[playerid])) {
  368. if( PlayerInfo[playerid][pFactionBanned] >= 1 && PlayerInfo[playerid][pFactionBanned] == InviteFaction[playerid] ) {
  369. SendClientMessageEx(playerid, COLOR_WHITE, "You are unable to accept this faction invite, as you're banned from this faction. Contact a Head Admin.");
  370. return 1;
  371. }
  372.  
  373. if(GetPVarInt(playerid, "IsInArena") >= 0) {
  374. SendClientMessageEx(playerid, COLOR_WHITE, "Please wait until your Paintball Arena match is over.");
  375. return 1;
  376. }
  377.  
  378. if( PlayerInfo[playerid][pCSFBanned] >= 1 ) {
  379. switch( InviteFaction[ playerid ] ) {
  380. case 1, 2, 3, 4, 5, 6, 7, 11, 12: return SendClientMessageEx(playerid, COLOR_WHITE, "You are unable to accept this faction invite, as you're banned from Civil Service Factions. Contact a Head Admin.");
  381. }
  382. }
  383.  
  384. new ftext[64];
  385. if(InviteFaction[playerid] > 0 && InviteFamily[playerid] == 255) {
  386. if(InviteFaction[playerid] == 1) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "LSPD"; ChosenSkin[playerid] = 280; SetPlayerSkin(playerid, 280); }
  387. else if(InviteFaction[playerid] == 2) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "SAHP"; ChosenSkin[playerid] = 282; SetPlayerSkin(playerid, 282); }
  388. else if(InviteFaction[playerid] == 3) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "DOC"; ChosenSkin[playerid] = 287; SetPlayerSkin(playerid, 287); }
  389. else if(InviteFaction[playerid] == 4) { PlayerInfo[playerid][pTeam] = 1; gTeam[playerid] = 1; ftext = "LSFD"; ChosenSkin[playerid] = 70; SetPlayerSkin(playerid, 70); }
  390. else if(InviteFaction[playerid] == 5) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "Superior Court System"; }
  391. else if(InviteFaction[playerid] == 6) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "City of Los Santos Government"; ChosenSkin[playerid] = 120; SetPlayerSkin(playerid, 258); }
  392. else if(InviteFaction[playerid] == 7) { PlayerInfo[playerid][pTeam] = 2; gTeam[playerid] = 2; ftext = "SASD"; ChosenSkin[playerid] = 286; SetPlayerSkin(playerid, 286); }
  393. else if(InviteFaction[playerid] == 8) { PlayerInfo[playerid][pTeam] = 10; gTeam[playerid] = 10; ftext = "Hitman Agency"; ChosenSkin[playerid] = 127; SetPlayerSkin(playerid, 127); }
  394. else if(InviteFaction[playerid] == 9) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ftext = "Fox11 News"; ChosenSkin[playerid] = 148; SetPlayerSkin(playerid, 148); }
  395. else if(InviteFaction[playerid] == 10) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ftext = "Taxi Cab Company"; ChosenSkin[playerid] = 255; SetPlayerSkin(playerid, 255); }
  396. else if(InviteFaction[playerid] == 11) { PlayerInfo[playerid][pTeam] = 12; gTeam[playerid] = 12; ftext = "NG"; ChosenSkin[playerid] = 287; SetPlayerSkin(playerid, 287); }
  397. else if(InviteFaction[playerid] == 12) { PlayerInfo[playerid][pTeam] = 13; gTeam[playerid] = 13; ftext = "Tierra Robada"; ChosenSkin[playerid] = 255; SetPlayerSkin(playerid, 255); }
  398. else if(InviteFaction[playerid] == 13) { PlayerInfo[playerid][pTeam] = 14; gTeam[playerid] = 14; ftext = "NOOSE"; ChosenSkin[playerid] = 255; SetPlayerSkin(playerid, 255); }
  399. else if(InviteFaction[playerid] == 14) { PlayerInfo[playerid][pTeam] = 14; gTeam[playerid] = 14; ftext = "Rapid Recovery"; ChosenSkin[playerid] = 50; SetPlayerSkin(playerid, 50); }
  400. else if(InviteFaction[playerid] == 15) { PlayerInfo[playerid][pTeam] = 15; gTeam[playerid] = 15; ftext = "Cal Trans"; ChosenSkin[playerid] = 27; SetPlayerSkin(playerid, 27); }
  401. else if(InviteFaction[playerid] == 16) { PlayerInfo[playerid][pTeam] = 16; gTeam[playerid] = 16; ftext = "TPS"; ChosenSkin[playerid] = 133; SetPlayerSkin(playerid, 133); }
  402. else if(InviteFaction[playerid] == 17) { PlayerInfo[playerid][pTeam] = 17; gTeam[playerid] = 17; ftext = "Izzy's Automotive"; ChosenSkin[playerid] = 16; SetPlayerSkin(playerid, 16); }
  403. else if(InviteFaction[playerid] == 18) { PlayerInfo[playerid][pTeam] = 18; gTeam[playerid] = 18; ftext = "VACANT FACTION"; ChosenSkin[playerid] = 16; SetPlayerSkin(playerid, 16); }
  404. else if(InviteFaction[playerid] == 19) { PlayerInfo[playerid][pTeam] = 19; gTeam[playerid] = 19; ftext = "VACANT FACTION"; ChosenSkin[playerid] = 16; SetPlayerSkin(playerid, 16); }
  405. else { return 1; }
  406. PlayerInfo[playerid][pMember] = InviteFaction[playerid];
  407. if(InviteFaction[playerid] == 1 || InviteFaction[playerid] == 9 || InviteFaction[playerid] == 13) {
  408. PlayerInfo[playerid][pRank] = 0;
  409. }
  410. else {
  411. PlayerInfo[playerid][pRank] = 1;
  412. }
  413. PlayerInfo[playerid][pDivision] = 0;
  414. format(string, sizeof(string), " You have accepted the invitation and joined the %s, you were invited by %s.", ftext, GetPlayerNameEx(InviteOffer[playerid]));
  415. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  416. format(string, sizeof(string), " %s has accepted the invitation and joined the %s.", GetPlayerNameEx(playerid),ftext);
  417. SendClientMessageEx(InviteOffer[playerid], COLOR_LIGHTBLUE, string);
  418. /*if(InviteFaction[playerid] != 5) {
  419. SetPlayerInterior(playerid,0);
  420. new rand = random(sizeof(gInviteSpawns));
  421. // Warp the player
  422. SetPlayerPos(playerid, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
  423. SetPlayerFacingAngle(playerid, gInviteSpawns[rand][3]);
  424. SetPlayerCameraPos(playerid,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
  425. SetPlayerCameraLookAt(playerid,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
  426. TogglePlayerControllable(playerid, 0);
  427. SelectChar[playerid] = 255;
  428. SelectCharID[playerid] = PlayerInfo[playerid][pMember];
  429. SelectCharPlace[playerid] = 1;
  430. PlayerInfo[playerid][pModel] = ChosenSkin[playerid];
  431. PlayerInfo[playerid][pChar] = ChosenSkin[playerid];
  432. SendClientMessageEx(playerid, COLOR_LIGHTRED, "* Use 'next' to browse through the available skins.");
  433. SendClientMessageEx(playerid, COLOR_LIGHTRED, "* If you've found the skin you wish to use, type 'done'.");
  434. }*/
  435. InviteOffer[playerid] = 999;
  436. InviteFaction[playerid] = 0;
  437. InviteFamily[playerid] = 255;
  438. }
  439. }
  440. }
  441. else {
  442. SendClientMessageEx(playerid, COLOR_GREY, " No one has invited you to join an organisation/family!");
  443. return 1;
  444. }
  445. }
  446. else if(strcmp(params,"family",true) == 0) {
  447. if(InviteOffer[playerid] < 999) {
  448. if(IsPlayerConnected(InviteOffer[playerid])) {
  449. if(InviteFaction[playerid] == 0 && InviteFamily[playerid] != 255) {
  450. if(GetPVarInt(playerid, "IsInArena") >= 0) {
  451. SendClientMessageEx(playerid, COLOR_WHITE, "Please wait until your Paintball Arena match is over.");
  452. return 1;
  453. }
  454.  
  455. if(PlayerInfo[playerid][pJailTime] > 1) {
  456. SendClientMessageEx(playerid, COLOR_WHITE, "Please wait until you are released from jail/prison before you accept the invite.");
  457. return 1;
  458. }
  459.  
  460. if( PlayerInfo[playerid][pMember] >= 3 || PlayerInfo[playerid][pFMember] != 255 || PlayerInfo[playerid][pLeader] >= 3 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 && PlayerInfo[playerid][pDivision] >= 3 || PlayerInfo[playerid][pMember] == 2 && PlayerInfo[playerid][pDivision] == 1) {
  461. SendClientMessageEx(playerid, COLOR_WHITE, "You can't accept this invite as you're already in a family/faction.");
  462. }
  463. else {
  464. PlayerInfo[playerid][pFMember] = InviteFamily[playerid];
  465. PlayerInfo[playerid][pRank] = 1;
  466. FamilyInfo[InviteFamily[playerid]][FamilyMembers] ++;
  467. SaveFamilies();
  468. format(string, sizeof(string), " You have accepted the invitation and joined the %s, you were invited by %s.", FamilyInfo[InviteFamily[playerid]][FamilyName], GetPlayerNameEx(InviteOffer[playerid]));
  469. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  470. format(string, sizeof(string), " %s has accepted the invitation and joined the %s.", GetPlayerNameEx(playerid),FamilyInfo[InviteFamily[playerid]][FamilyName]);
  471. SendClientMessageEx(InviteOffer[playerid], COLOR_LIGHTBLUE, string);
  472. SendClientMessageEx(playerid, COLOR_WHITE, "Use (/f)amily to talk in family chat. If you wish to acquire a family skin, type /clothes inside a clothes store.");
  473. /*SetPlayerInterior(playerid,0);
  474. ChosenSkin[playerid] = FamilyInfo[InviteFamily[playerid]][FamilySkins][0];
  475. new rand = random(sizeof(gInviteSpawns));
  476. // Warp the player
  477. SetPlayerPos(playerid, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
  478. SetPlayerFacingAngle(playerid, gInviteSpawns[rand][3]);
  479. SetPlayerCameraPos(playerid,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
  480. SetPlayerCameraLookAt(playerid,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
  481. TogglePlayerControllable(playerid, 0);
  482. SetPlayerSkin(playerid, ChosenSkin[playerid]);
  483. SelectFChar[playerid] = 255;
  484. SelectFCharID[playerid] = PlayerInfo[playerid][pFMember];
  485. SelectFCharPlace[playerid] = 1;
  486. PlayerInfo[playerid][pModel] = ChosenSkin[playerid];
  487. PlayerInfo[playerid][pChar] = ChosenSkin[playerid];
  488. SendClientMessageEx(playerid, COLOR_LIGHTRED, "* Use 'next' to browse through the available skins.");
  489. SendClientMessageEx(playerid, COLOR_LIGHTRED, "* If you've found the skin you wish to use, type 'done'.");*/
  490. InviteOffer[playerid] = 999;
  491. InviteFaction[playerid] = 0;
  492. InviteFamily[playerid] = 255;
  493. }
  494. }
  495. }
  496. }
  497. else {
  498. SendClientMessageEx(playerid, COLOR_GREY, " No one has invited you to join an organisation/family!");
  499. return 1;
  500. }
  501. }
  502. else if(strcmp(params,"witness",true) == 0) {
  503. if(MarryWitnessOffer[playerid] < 999) {
  504. if(IsPlayerConnected(MarryWitnessOffer[playerid])) {
  505. if(ProxDetectorS(10.0, playerid, MarryWitnessOffer[playerid])) {
  506. GetPlayerName(MarryWitnessOffer[playerid], giveplayer, sizeof(giveplayer));
  507. GetPlayerName(playerid, sendername, sizeof(sendername));
  508. format(string, sizeof(string), "* You have accepted %s's request to be their marriage witness.", giveplayer);
  509. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  510. format(string, sizeof(string), "* %s has accepted your request to be your marriage witness.", sendername);
  511. SendClientMessageEx(MarryWitnessOffer[playerid], COLOR_LIGHTBLUE, string);
  512. MarryWitness[MarryWitnessOffer[playerid]] = playerid;
  513. MarryWitnessOffer[playerid] = 999;
  514. return 1;
  515. }
  516. else {
  517. SendClientMessageEx(playerid, COLOR_GREY, " The player that requested you to be their marriage witness is not near you!");
  518. return 1;
  519. }
  520. }
  521. }
  522. else {
  523. SendClientMessageEx(playerid, COLOR_GREY, " No-one asked you to be their marriage witness!");
  524. return 1;
  525. }
  526. }
  527. else if(strcmp(params,"marriage",true) == 0) {
  528. if(ProposeOffer[playerid] < 999) {
  529. if(IsPlayerConnected(ProposeOffer[playerid])) {
  530. if(ProxDetectorS(10.0, playerid, ProposeOffer[playerid])) {
  531. if(MarryWitness[ProposeOffer[playerid]] == 999) {
  532. SendClientMessageEx(playerid, COLOR_GREY, " The proposer doesn't have a marriage witness!");
  533. return 1;
  534. }
  535. if(IsPlayerConnected(MarryWitness[ProposeOffer[playerid]])) {
  536. if(ProxDetectorS(12.0, ProposeOffer[playerid], MarryWitness[ProposeOffer[playerid]])) {
  537. if(IsPlayerInRangeOfPoint(playerid, 10.0, 1963.9612, -369.1851, 1093.7289)) {
  538. GetPlayerName(ProposeOffer[playerid], giveplayer, sizeof(giveplayer));
  539. GetPlayerName(playerid, sendername, sizeof(sendername));
  540. format(string, sizeof(string), "* You have accepted %s's request to be your husband.", giveplayer);
  541. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  542. format(string, sizeof(string), "* %s has accepted your request to be your wife.", sendername);
  543. SendClientMessageEx(ProposeOffer[playerid], COLOR_LIGHTBLUE, string);
  544. format(string, sizeof(string), "Priest: %s, do you take %s as your lovely husband? (Type 'yes', as anything else will reject the marriage.)", sendername, giveplayer);
  545. SendClientMessageEx(playerid, COLOR_WHITE, string);
  546. MarriageCeremoney[playerid] = 1;
  547. ProposedTo[ProposeOffer[playerid]] = playerid;
  548. GotProposedBy[playerid] = ProposeOffer[playerid];
  549. MarryWitness[ProposeOffer[playerid]] = 999;
  550. ProposeOffer[playerid] = 999;
  551. return 1;
  552. }
  553. else {
  554. SendClientMessageEx(playerid, COLOR_GREY, " You are not at the church!");
  555. return 1;
  556. }
  557. }
  558. else {
  559. SendClientMessageEx(playerid, COLOR_GREY, " The marriage witness is not near your proposer!");
  560. return 1;
  561. }
  562. }
  563. return 1;
  564. }
  565. else {
  566. SendClientMessageEx(playerid, COLOR_GREY, " The player that proposed to you is not near you!");
  567. return 1;
  568. }
  569. }
  570. }
  571. else {
  572. SendClientMessageEx(playerid, COLOR_GREY, " Nobody proposed to you!");
  573. return 1;
  574. }
  575. }
  576. else if(strcmp(params,"ticket",true) == 0) {
  577. if(TicketOffer[playerid] < 999) {
  578. if(IsPlayerConnected(TicketOffer[playerid])) {
  579. if (ProxDetectorS(5.0, playerid, TicketOffer[playerid])) {
  580. if(GetPlayerCash(playerid) >= TicketMoney[playerid]) {
  581. new ip[32], ipex[32];
  582. GetPlayerIp(playerid, ip, sizeof(ip));
  583. GetPlayerIp(TicketOffer[playerid], ipex, sizeof(ipex));
  584. format(string, sizeof(string), "[FACTION TICKET] %s (IP: %s) has paid $%d to %s (IP: %s)", GetPlayerNameEx(playerid), ip, TicketMoney[playerid], GetPlayerNameEx(TicketOffer[playerid]), ipex);
  585. Log("logs/pay.log", string);
  586. format(string, sizeof(string), "* You have paid the ticket of $%d to %s.", TicketMoney[playerid], GetPlayerNameEx(TicketOffer[playerid]));
  587. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  588. format(string, sizeof(string), "* %s has paid your ticket of $%d.", GetPlayerNameEx(playerid), TicketMoney[playerid]);
  589. SendClientMessageEx(TicketOffer[playerid], COLOR_LIGHTBLUE, string);
  590. format(string, sizeof(string), "* %s has paid the ticket.", GetPlayerNameEx(playerid));
  591. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  592. GivePlayerCash(playerid, - TicketMoney[playerid]);
  593. Tax += TicketMoney[playerid];
  594. TicketOffer[playerid] = 999;
  595. TicketMoney[playerid] = 0;
  596. if(GetPlayerCash(playerid) < 1) GivePlayerCash(playerid, 0);
  597. return 1;
  598. }
  599. }
  600. else {
  601. SendClientMessageEx(playerid, COLOR_GREY, " The officer is not near you!");
  602. return 1;
  603. }
  604. }
  605. }
  606. else {
  607. SendClientMessageEx(playerid, COLOR_GREY, " No-one offered you a ticket!");
  608. return 1;
  609. }
  610. }
  611. else if(strcmp(params,"boxing",true) == 0) {
  612. if(BoxOffer[playerid] < 999) {
  613. if(IsPlayerConnected(BoxOffer[playerid])) {
  614. new points;
  615. new mypoints;
  616. GetPlayerName(BoxOffer[playerid], giveplayer, sizeof(giveplayer));
  617. GetPlayerName(playerid, sendername, sizeof(sendername));
  618. new level = PlayerInfo[BoxOffer[playerid]][pBoxSkill];
  619. if(level >= 0 && level <= 50) { points = 40; }
  620. else if(level >= 51 && level <= 100) { points = 50; }
  621. else if(level >= 101 && level <= 200) { points = 60; }
  622. else if(level >= 201 && level <= 400) { points = 70; }
  623. else if(level >= 401) { points = 80; }
  624. if(PlayerInfo[playerid][pJob] == 12 || PlayerInfo[playerid][pJob2] == 12) {
  625. new clevel = PlayerInfo[playerid][pBoxSkill];
  626. if(clevel >= 0 && clevel <= 50) { mypoints = 40; }
  627. else if(clevel >= 51 && clevel <= 100) { mypoints = 50; }
  628. else if(clevel >= 101 && clevel <= 200) { mypoints = 60; }
  629. else if(clevel >= 201 && clevel <= 400) { mypoints = 70; }
  630. else if(clevel >= 401) { mypoints = 80; }
  631. }
  632. else {
  633. mypoints = 30;
  634. }
  635. format(string, sizeof(string), "* You have accepted the Boxing Challenge from %s, and will fight with %d Health.",giveplayer,mypoints);
  636. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  637. format(string, sizeof(string), "* %s has accepted your Boxing Challenge Request, you will fight with %d Health.",sendername,points);
  638. SendClientMessageEx(BoxOffer[playerid], COLOR_LIGHTBLUE, string);
  639. if(IsPlayerInRangeOfPoint(playerid,20.0,758.98, -60.32, 1000.78) || IsPlayerInRangeOfPoint(BoxOffer[playerid],20.0,758.98, -60.32, 1000.78)) {
  640. ResetPlayerWeapons(playerid);
  641. ResetPlayerWeapons(BoxOffer[playerid]);
  642. SetPlayerHealth(playerid, mypoints);
  643. SetPlayerHealth(BoxOffer[playerid], points);
  644. SetPlayerInterior(playerid, 7); SetPlayerInterior(BoxOffer[playerid], 7);
  645. SetPlayerPos(playerid, 768.94, -70.87, 1001.56); SetPlayerFacingAngle(playerid, 131.8632);
  646. SetPlayerPos(BoxOffer[playerid], 764.35, -66.48, 1001.56); SetPlayerFacingAngle(BoxOffer[playerid], 313.1165);
  647. TogglePlayerControllable(playerid, 0); TogglePlayerControllable(BoxOffer[playerid], 0);
  648. GameTextForPlayer(playerid, "~r~Waiting", 3000, 1); GameTextForPlayer(BoxOffer[playerid], "~r~Waiting", 3000, 1);
  649. new name[MAX_PLAYER_NAME];
  650. new dstring[MAX_PLAYER_NAME];
  651. new wstring[MAX_PLAYER_NAME];
  652. GetPlayerName(playerid, name, sizeof(name));
  653. format(dstring, sizeof(dstring), "%s", name);
  654. strmid(wstring, dstring, 0, strlen(dstring), 255);
  655. if(strcmp(Titel[TitelName] ,wstring, true ) == 0 ) {
  656. format(string, sizeof(string), "Boxing News: Boxing Champion %s will fight VS %s, in 60 seconds (Grove Street Gym).", sendername, giveplayer);
  657. OOCOff(COLOR_WHITE,string);
  658. TBoxer = playerid;
  659. BoxDelay = 60;
  660. }
  661. GetPlayerName(BoxOffer[playerid], name, sizeof(name));
  662. format(dstring, sizeof(dstring), "%s", name);
  663. strmid(wstring, dstring, 0, strlen(dstring), 255);
  664. if(strcmp(Titel[TitelName] ,wstring, true ) == 0 ) {
  665. format(string, sizeof(string), "Boxing News: Boxing Champion %s will fight VS %s, in 60 seconds (Grove Street Gym).", giveplayer, sendername);
  666. OOCOff(COLOR_WHITE,string);
  667. TBoxer = BoxOffer[playerid];
  668. BoxDelay = 60;
  669. }
  670. BoxWaitTime[playerid] = 1; BoxWaitTime[BoxOffer[playerid]] = 1;
  671. if(BoxDelay < 1) { BoxDelay = 20; }
  672. InRing = 1;
  673. Boxer1 = BoxOffer[playerid];
  674. Boxer2 = playerid;
  675. PlayerBoxing[playerid] = 1;
  676. PlayerBoxing[BoxOffer[playerid]] = 1;
  677. BoxOffer[playerid] = 999;
  678. return 1;
  679. }
  680. ResetPlayerWeapons(playerid);
  681. ResetPlayerWeapons(BoxOffer[playerid]);
  682. SetPlayerHealth(playerid, mypoints);
  683. SetPlayerHealth(BoxOffer[playerid], points);
  684. SetPlayerInterior(playerid, 5); SetPlayerInterior(BoxOffer[playerid], 5);
  685. SetPlayerPos(playerid, 762.9852,2.4439,1001.5942); SetPlayerFacingAngle(playerid, 131.8632);
  686. SetPlayerPos(BoxOffer[playerid], 758.7064,-1.8038,1001.5942); SetPlayerFacingAngle(BoxOffer[playerid], 313.1165);
  687. TogglePlayerControllable(playerid, 0); TogglePlayerControllable(BoxOffer[playerid], 0);
  688. GameTextForPlayer(playerid, "~r~Waiting", 3000, 1); GameTextForPlayer(BoxOffer[playerid], "~r~Waiting", 3000, 1);
  689. new name[MAX_PLAYER_NAME];
  690. new dstring[MAX_PLAYER_NAME];
  691. new wstring[MAX_PLAYER_NAME];
  692. GetPlayerName(playerid, name, sizeof(name));
  693. format(dstring, sizeof(dstring), "%s", name);
  694. strmid(wstring, dstring, 0, strlen(dstring), 255);
  695. if(strcmp(Titel[TitelName] ,wstring, true ) == 0 ) {
  696. format(string, sizeof(string), "Boxing News: Boxing Champion %s will fight VS %s, in 60 seconds (Grove Street Gym).", sendername, giveplayer);
  697. OOCOff(COLOR_WHITE,string);
  698. TBoxer = playerid;
  699. BoxDelay = 60;
  700. }
  701. GetPlayerName(BoxOffer[playerid], name, sizeof(name));
  702. format(dstring, sizeof(dstring), "%s", name);
  703. strmid(wstring, dstring, 0, strlen(dstring), 255);
  704. if(strcmp(Titel[TitelName] ,wstring, true ) == 0 ) {
  705. format(string, sizeof(string), "Boxing News: Boxing Champion %s will fight VS %s, in 60 seconds (Grove Street Gym).", giveplayer, sendername);
  706. OOCOff(COLOR_WHITE,string);
  707. TBoxer = BoxOffer[playerid];
  708. BoxDelay = 60;
  709. }
  710. BoxWaitTime[playerid] = 1; BoxWaitTime[BoxOffer[playerid]] = 1;
  711. if(BoxDelay < 1) { BoxDelay = 20; }
  712. InRing = 1;
  713. Boxer1 = BoxOffer[playerid];
  714. Boxer2 = playerid;
  715. PlayerBoxing[playerid] = 1;
  716. PlayerBoxing[BoxOffer[playerid]] = 1;
  717. BoxOffer[playerid] = 999;
  718. return 1;
  719. }
  720. return 1;
  721. }
  722. else {
  723. SendClientMessageEx(playerid, COLOR_GREY, " No-one offered you a Boxing Challenge!");
  724. return 1;
  725. }
  726. }
  727. // accept taxi
  728. else if(strcmp(params,"taxi",true) == 0) {
  729. if(TransportDuty[playerid] != 1) {
  730. SendClientMessageEx(playerid, COLOR_GREY, " You are not a Taxi Driver!");
  731. return 1;
  732. }
  733. if(TaxiCallTime[playerid] > 0) {
  734. SendClientMessageEx(playerid, COLOR_GREY, " You have already accepted a taxi call!");
  735. return 1;
  736. }
  737. if(TaxiCall < 999) {
  738. if(IsPlayerConnected(TaxiCall)) {
  739. GetPlayerName(playerid, sendername, sizeof(sendername));
  740. GetPlayerName(TaxiCall, giveplayer, sizeof(giveplayer));
  741. format(string, sizeof(string), "* You have accepted the taxi call from %s, you will see the marker until you have reached it.",giveplayer);
  742. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  743. format(string, sizeof(string), "* Taxi Driver %s has accepted your Taxi Call; please wait at your current position.",sendername);
  744. SendClientMessageEx(TaxiCall, COLOR_LIGHTBLUE, string);
  745. GameTextForPlayer(playerid, "~w~Taxi Caller~n~~r~Go to the red marker.", 5000, 1);
  746. TaxiCallTime[playerid] = 1;
  747. TaxiAccepted[playerid] = TaxiCall;
  748. TaxiCall = 999;
  749. return 1;
  750. }
  751. }
  752. else {
  753. SendClientMessageEx(playerid, COLOR_GREY, " Nobody called for a taxi yet!");
  754. return 1;
  755. }
  756. }
  757. else if(strcmp(params,"izzys",true) == 0) {
  758. if(PlayerInfo[playerid][pMember] != 17) {
  759. SendClientMessageEx(playerid, COLOR_GREY, " You are not apart of Izzy's Automotive!");
  760. return 1;
  761. }
  762. if(IACallTime[playerid] > 0) {
  763. SendClientMessageEx(playerid, COLOR_GREY, " You have already accepted an IA Call!");
  764. return 1;
  765. }
  766. if(GetPVarInt(playerid, "Packages") >= 1 || IAAccepted[playerid] != 999 || TaxiAccepted[playerid] != 999 || EMSAccepted[playerid] != 999 || BusAccepted[playerid] != 999 || MedicAccepted[playerid] != 999 || MedicAccepted[playerid] != 999 || MechanicCallTime[playerid] >= 1) {
  767. SendClientMessageEx(playerid, COLOR_WHITE, "Please ensure that your current checkpoint is destroyed first (you either have material packages, or another existing checkpoint).");
  768. return 1;
  769. }
  770. if(IACall < 999) {
  771. if(IsPlayerConnected(IACall)) {
  772. if(playerid == IACall) return 1;
  773. GetPlayerName(playerid, sendername, sizeof(sendername));
  774. GetPlayerName(IACall, giveplayer, sizeof(giveplayer));
  775. format(string, sizeof(string), "* You have accepted the IA Call from %s, you have 60 Seconds to get there.",giveplayer);
  776. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  777. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* After the 60 Seconds the Red Marker will dissapear.");
  778. format(string, sizeof(string), "* Izzy's Automotive Worker %s has accepted your Call, please wait at your current position.",sendername);
  779. SendClientMessageEx(IACall, COLOR_LIGHTBLUE, string);
  780. new Float:X,Float:Y,Float:Z;
  781. GetPlayerPos(IACall, X, Y, Z);
  782. SetPlayerCheckpoint(playerid, X, Y, Z, 5);
  783. GameTextForPlayer(playerid, "~w~IA Caller~n~~r~Goto redmarker", 5000, 1);
  784. IACallTime[playerid] = 1;
  785. IAAccepted[playerid] = IACall;
  786. IACall = 999;
  787. return 1;
  788. }
  789. }
  790. else {
  791. SendClientMessageEx(playerid, COLOR_GREY, " No-one has called for Izzy's Automotive!");
  792. return 1;
  793. }
  794. }
  795. else if(strcmp(params,"rr",true) == 0)
  796. {
  797. new targetid;
  798. if(sscanf(params,"u",targetid)) return SendClientMessageEx(playerid,-1,"USAGE: /accept rr [Playerid/PartOfName]");
  799. if(PlayerInfo[playerid][pMember] != 14) {
  800. SendClientMessageEx(playerid, COLOR_GREY, " You are not apart of Rapid Recovery!");
  801. return 1;
  802. }
  803. if(RRCallTime[playerid] > 0) {
  804. SendClientMessageEx(playerid, COLOR_GREY, " You have already accepted a RR Call!");
  805. return 1;
  806. }
  807. if(GetPVarInt(playerid, "Packages") >= 1 || RRAccepted[playerid] != 999 || TaxiAccepted[playerid] != 999 || EMSAccepted[playerid] != 999 || BusAccepted[playerid] != 999 || MedicAccepted[playerid] != 999 || MedicAccepted[playerid] != 999 || MechanicCallTime[playerid] >= 1) {
  808. SendClientMessageEx(playerid, COLOR_WHITE, "Please ensure that your current checkpoint is destroyed first (you either have material packages, or another existing checkpoint).");
  809. return 1;
  810. }
  811. if(IsPlayerConnected(targetid))
  812. {
  813. if(playerid == targetid) return 1;
  814. if(RequestedRRService[playerid] == 0) return SendClientMessageEx(playerid,-1,"That player must have cancelled their request!");
  815.  
  816. GetPlayerName(playerid, sendername, sizeof(sendername));
  817. GetPlayerName(targetid, giveplayer, sizeof(giveplayer));
  818. format(string, sizeof(string), "* You have accepted the RR Call from %s",giveplayer);
  819. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  820. //SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* After the 60 Seconds the Red Marker will dissapear.");
  821. format(string, sizeof(string), "* Rapid Worker %s has accepted your RR Call, please wait at your current position.",sendername);
  822. SendClientMessageEx(targetid, COLOR_LIGHTBLUE, string);
  823. new Float:X,Float:Y,Float:Z;
  824. GetPlayerPos(targetid, X, Y, Z);
  825. SetPlayerCheckpoint(playerid, X, Y, Z, 5);
  826. GameTextForPlayer(playerid, "~w~RR Caller~n~~r~Goto redmarker", 5000, 1);
  827. //RRCallTime[playerid] = 1;
  828. RRAccepted[playerid] = targetid;
  829. targetid = 999;
  830. return 1;
  831. }
  832. }
  833. else {
  834. SendClientMessageEx(playerid, COLOR_GREY, " No-one has called for Rapid Recovery!");
  835. return 1;
  836. }
  837. }
  838. else if(strcmp(params,"bus",true) == 0) {
  839. if(TransportDuty[playerid] != 2) {
  840. SendClientMessageEx(playerid, COLOR_GREY, " You are not a bus driver!");
  841. return 1;
  842. }
  843. if(BusCallTime[playerid] > 0) {
  844. SendClientMessageEx(playerid, COLOR_GREY, " You have already accepted a bus call!");
  845. return 1;
  846. }
  847. if(BusCall < 999) {
  848. if(IsPlayerConnected(BusCall)) {
  849. if(GetPVarInt(playerid, "Packages") >= 1 || TaxiAccepted[playerid] != 999 || EMSAccepted[playerid] != 999 || BusAccepted[playerid] != 999 || MedicAccepted[playerid] != 999 || MechanicCallTime[playerid] >= 1) {
  850. SendClientMessageEx(playerid, COLOR_WHITE, "Please ensure that your current checkpoint is destroyed first (you either have material packages, or another existing checkpoint).");
  851. return 1;
  852. }
  853. GetPlayerName(playerid, sendername, sizeof(sendername));
  854. GetPlayerName(BusCall, giveplayer, sizeof(giveplayer));
  855. format(string, sizeof(string), "* You have accepted the Bus Call from %s, you will see the marker untill you have reached it.",giveplayer);
  856. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  857. format(string, sizeof(string), "* Bus Driver %s has accepted your bus call; please wait at your current position.",sendername);
  858. SendClientMessageEx(BusCall, COLOR_LIGHTBLUE, string);
  859. new Float:X,Float:Y,Float:Z;
  860. GetPlayerPos(BusCall, X, Y, Z);
  861. SetPlayerCheckpoint(playerid, X, Y, Z, 5);
  862. GameTextForPlayer(playerid, "~w~Bus Caller~n~~r~Goto redmarker", 5000, 1);
  863. BusCallTime[playerid] = 1;
  864. BusAccepted[playerid] = BusCall;
  865. BusCall = 999;
  866. return 1;
  867. }
  868. }
  869. else {
  870. SendClientMessageEx(playerid, COLOR_GREY, " No-one called for a Bus yet!");
  871. return 1;
  872. }
  873. }
  874. else if(strcmp(params,"medic",true) == 0) {
  875. if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4) {
  876. if(MedicCallTime[playerid] > 0) {
  877. SendClientMessageEx(playerid, COLOR_GREY, " You have already accepted a Medic Call!");
  878. return 1;
  879. }
  880. if(GetPVarInt(playerid, "Packages") >= 1 || TaxiAccepted[playerid] != 999 || EMSAccepted[playerid] != 999 || BusAccepted[playerid] != 999 || MedicAccepted[playerid] != 999 || MechanicCallTime[playerid] >= 1) {
  881. SendClientMessageEx(playerid, COLOR_WHITE, "Please ensure that your current checkpoint is destroyed first (you either have material packages, or another existing checkpoint).");
  882. return 1;
  883. }
  884. if(MedicCall < 999) {
  885. if(IsPlayerConnected(MedicCall)) {
  886. GetPlayerName(playerid, sendername, sizeof(sendername));
  887. GetPlayerName(MedicCall, giveplayer, sizeof(giveplayer));
  888. format(string, sizeof(string), "* You have accepted the Medic Call from %s",giveplayer);
  889. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  890. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* After the 45 Seconds the Red Marker will dissapear.");
  891. format(string, sizeof(string), "* Medic %s has accepted your Medic Call please wait at your current Position.",sendername);
  892. SendClientMessageEx(MedicCall, COLOR_LIGHTBLUE, string);
  893. new Float:X,Float:Y,Float:Z;
  894. GetPlayerPos(MedicCall, X, Y, Z);
  895. SetPlayerCheckpoint(playerid, X, Y, Z, 5);
  896. new zone[MAX_ZONE_NAME];
  897. GetPlayer3DZone(MedicCall, zone, sizeof(zone));
  898. format(string, sizeof(string), "HINT: %s is located in %s", GetPlayerNameEx(MedicCall), zone);
  899. SendClientMessageEx(playerid, COLOR_WHITE, string);
  900. MedicCallTime[playerid] = 1;
  901. MedicAccepted[playerid] = MedicCall;
  902. MedicCall = 999;
  903. return 1;
  904. }
  905. }
  906. else {
  907. SendClientMessageEx(playerid, COLOR_GREY, " No-one called for a Medic yet!");
  908. return 1;
  909. }
  910. }
  911. else {
  912. SendClientMessageEx(playerid, COLOR_GREY, " You are not a Medic!");
  913. return 1;
  914. }
  915. }
  916. else if(strcmp(params,"mechanic",true) == 0) {
  917. if(PlayerInfo[playerid][pJob] != 7 && PlayerInfo[playerid][pJob2] != 7) {
  918. SendClientMessageEx(playerid, COLOR_GREY, " You are not a Car Mechanic!");
  919. return 1;
  920. }
  921. if(MechanicCallTime[playerid] > 0) {
  922. SendClientMessageEx(playerid, COLOR_GREY, " You have already accepted a Mechanic Call!");
  923. return 1;
  924. }
  925. if(GetPVarInt(playerid, "Packages") >= 1 || TaxiAccepted[playerid] != 999 || EMSAccepted[playerid] != 999 || BusAccepted[playerid] != 999 || MedicAccepted[playerid] != 999 || MechanicCallTime[playerid] >= 1) {
  926. SendClientMessageEx(playerid, COLOR_WHITE, "Please ensure that your current checkpoint is destroyed first (you either have material packages, or another existing checkpoint).");
  927. return 1;
  928. }
  929. if(MechanicCall < 999) {
  930. if(IsPlayerConnected(MechanicCall)) {
  931. if(playerid == MechanicCall) return 1;
  932. GetPlayerName(playerid, sendername, sizeof(sendername));
  933. GetPlayerName(MechanicCall, giveplayer, sizeof(giveplayer));
  934. format(string, sizeof(string), "* You have accepted the Mechanic Call from %s, you have 30 Seconds to get there.",giveplayer);
  935. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  936. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* After the 30 Seconds the Red Marker will dissapear.");
  937. format(string, sizeof(string), "* Car Mechanic %s has accepted your Mechanic Call please wait at your current Position.",sendername);
  938. SendClientMessageEx(MechanicCall, COLOR_LIGHTBLUE, string);
  939. new Float:X,Float:Y,Float:Z;
  940. GetPlayerPos(MechanicCall, X, Y, Z);
  941. SetPlayerCheckpoint(playerid, X, Y, Z, 5);
  942. GameTextForPlayer(playerid, "~w~Mechanic Caller~n~~r~Goto redmarker", 5000, 1);
  943. MechanicCallTime[playerid] = 1;
  944. MechanicCall = 999;
  945. return 1;
  946. }
  947. }
  948. else {
  949. SendClientMessageEx(playerid, COLOR_GREY, " No-one called for a Car Mechanic yet!");
  950. return 1;
  951. }
  952. }
  953. else if(strcmp(params,"job",true) == 0) {
  954. if(GettingJob[playerid] > 0) {
  955. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* Congratulations with your new Job, type /help to see your new command.");
  956. if(GettingJob[playerid] == 14) {
  957. SendClientMessageEx(playerid, COLOR_WHITE, "HINT: You can find drug crates in Willowfield. ( Goto checkpoint )");
  958. if(GetPVarInt(playerid, "Packages") >= 1 || TaxiAccepted[playerid] != 999 || EMSAccepted[playerid] != 999 || BusAccepted[playerid] != 999 || MedicAccepted[playerid] != 999 || MechanicCallTime[playerid] >= 1) {
  959. SendClientMessageEx(playerid, COLOR_WHITE, "Please ensure that your current checkpoint is destroyed first (you either have material packages, or another existing checkpoint).");
  960. return 1;
  961. }
  962. SetPlayerCheckpoint(playerid, 2076.4624,-2046.4349,13.5469, 3);
  963. }
  964. if(GettingJob[playerid] == 21) {
  965. SendClientMessageEx(playerid, COLOR_WHITE, "You have been given a Pizza Stack uniform!");
  966. PlayerInfo[playerid][pChar] = 155;
  967. PlayerInfo[playerid][pModel] = 155;
  968. SetPlayerSkin(playerid, 155);
  969. }
  970. PlayerInfo[playerid][pJob] = GettingJob[playerid];
  971. GettingJob[playerid] = 0;
  972. return 1;
  973. }
  974. if(GettingJob2[playerid] > 0) {
  975. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* Congratulations with your new Job, type /help to see your new command.");
  976. SendClientMessageEx(playerid, COLOR_YELLOW, "VIP: You have taken this as a secondary job.");
  977. if(GettingJob2[playerid] == 14) {
  978. SendClientMessageEx(playerid, COLOR_WHITE, "HINT: You can find drug crates in blueberry. ( Goto checkpoint )");
  979. SetPlayerCheckpoint(playerid, 51.9720,-292.6349,1.7031, 3);
  980. }
  981. if(GettingJob[playerid] == 17 || GettingJob2[playerid] == 17) {
  982. PlayerInfo[playerid][pTaxiLicense] = 1;
  983. }
  984. if(GettingJob2[playerid] == 21) {
  985. SendClientMessageEx(playerid, COLOR_WHITE, "You have been given a Pizza Stack uniform!");
  986. PlayerInfo[playerid][pChar] = 155;
  987. PlayerInfo[playerid][pModel] = 155;
  988. SetPlayerSkin(playerid, 155);
  989. }
  990. PlayerInfo[playerid][pJob2] = GettingJob2[playerid];
  991. GettingJob2[playerid] = 0;
  992. return 1;
  993. }
  994. else {
  995. SendClientMessageEx(playerid, COLOR_GREY, " You haven't even been at a job place yet!");
  996. return 1;
  997. }
  998. }
  999. else if(strcmp(params,"live",true) == 0) {
  1000. if(LiveOffer[playerid] < 999) {
  1001. if(IsPlayerConnected(LiveOffer[playerid])) {
  1002. if (ProxDetectorS(5.0, playerid, LiveOffer[playerid])) {
  1003. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You are frozen till the Live Conversation ends.");
  1004. SendClientMessageEx(LiveOffer[playerid], COLOR_LIGHTBLUE, "* You are frozen till the Live Conversation ends (use /live again).");
  1005. TogglePlayerControllable(playerid, 0);
  1006. TogglePlayerControllable(LiveOffer[playerid], 0);
  1007. TalkingLive[playerid] = LiveOffer[playerid];
  1008. TalkingLive[LiveOffer[playerid]] = playerid;
  1009. LiveOffer[playerid] = 999;
  1010. return 1;
  1011. }
  1012. else {
  1013. SendClientMessageEx(playerid, COLOR_GREY, " You are to far away from the News Reporter!");
  1014. return 1;
  1015. }
  1016. }
  1017. return 1;
  1018. }
  1019. else {
  1020. SendClientMessageEx(playerid, COLOR_GREY, " No-one gave you a Live Conversation offer!");
  1021. return 1;
  1022. }
  1023. }
  1024. else if(strcmp(params,"lawyer",true) == 0) {
  1025. if(sscanf(params[21], "u", giveplayerid))
  1026. {
  1027. SendClientMessageEx(playerid, COLOR_GRAD2, "USAGE: /accept lawyer [playerid]");
  1028. return 1;
  1029. }
  1030. if (gTeam[playerid] == 2 || IsACop(playerid)) {
  1031. if(IsPlayerConnected(giveplayerid)) {
  1032. if(giveplayerid != INVALID_PLAYER_ID) {
  1033. if(PlayerInfo[giveplayerid][pJob] == 2 || PlayerInfo[giveplayerid][pJob2] == 2) {
  1034. GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  1035. GetPlayerName(playerid, sendername, sizeof(sendername));
  1036. format(string, sizeof(string), "* You allowed %s to free a Jailed Person.", giveplayer);
  1037. SendClientMessageEx(playerid, COLOR_LIGHTBLUE,string);
  1038. format(string, sizeof(string), "* Officer %s approved (allowed) you to free a Jailed Person. (use /free)", sendername);
  1039. SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE,string);
  1040. ApprovedLawyer[giveplayerid] = 1;
  1041. return 1;
  1042. }
  1043. }
  1044. }
  1045. return 1;
  1046. }
  1047. else {
  1048. SendClientMessageEx(playerid, COLOR_GREY, "Invalid action! (You are no cop / Player is not a Lawyer / Bad ID)");
  1049. return 1;
  1050. }
  1051. }
  1052. else if(strcmp(params,"bodyguard",true) == 0) {
  1053. if(GuardOffer[playerid] < 999) {
  1054. if(GetPlayerCash(playerid) > GuardPrice[playerid]) {
  1055. if(IsPlayerConnected(GuardOffer[playerid])) {
  1056. if(ProxDetectorS(6.0, playerid, GuardOffer[playerid])) {
  1057. new Float:armour;
  1058. GetPlayerArmour(playerid, armour);
  1059. if(armour >= 50) {
  1060. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You already have a vest!");
  1061. return 1;
  1062. }
  1063. new ip[32], ipex[32];
  1064. GetPlayerIp(playerid, ip, sizeof(ip));
  1065. GetPlayerIp(GuardOffer[playerid], ipex, sizeof(ipex));
  1066. format(string, sizeof(string), "[BODYGUARD] %s (IP:%s) has paid $%d to %s (IP:%s)", GetPlayerNameEx(playerid), ip, GuardPrice[playerid], GetPlayerNameEx(GuardOffer[playerid]), ipex);
  1067. Log("logs/pay.log", string);
  1068.  
  1069. GuardWarn[playerid][GuardOffer[playerid]] += GuardPrice[playerid];
  1070. if(GuardWarn[playerid][GuardOffer[playerid]] >= 25000 && (PlayerInfo[GuardOffer[playerid]][pLevel] <= 3 || PlayerInfo[playerid][pLevel] <= 3)) {
  1071. format(string, sizeof(string), "%s (IP:%s) has guarded %s (IP:%s) $%d in this session.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(GuardOffer[playerid]), ipex, GuardWarn[playerid][GuardOffer[playerid]]);
  1072. Log("logs/pay.log", string);
  1073. ABroadCast(COLOR_YELLOW, string, 2);
  1074. }
  1075.  
  1076. SetPlayerArmour(playerid, 50);
  1077. GetPlayerName(GuardOffer[playerid], giveplayer, sizeof(giveplayer));
  1078. GetPlayerName(playerid, sendername, sizeof(sendername));
  1079. format(string, sizeof(string), "* You accepted the protection for $%d from %s.",GuardPrice[playerid],GetPlayerNameEx(GuardOffer[playerid]));
  1080. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  1081. format(string, sizeof(string), "* %s accepted your protection, and the $%d was added to your money.",GetPlayerNameEx(playerid),GuardPrice[playerid]);
  1082. SendClientMessageEx(GuardOffer[playerid], COLOR_LIGHTBLUE, string);
  1083. GivePlayerCash(GuardOffer[playerid], GuardPrice[playerid]);
  1084. GivePlayerCash(playerid, -GuardPrice[playerid]);
  1085. ExtortionTurfsWarsZone(GuardOffer[playerid], 2, GuardPrice[playerid]);
  1086. GuardOffer[playerid] = 999;
  1087. GuardPrice[playerid] = 0;
  1088. return 1;
  1089. }
  1090. else {
  1091. SendClientMessageEx(playerid, COLOR_GRAD2, "You are not near the person offering you guard!");
  1092. return 1;
  1093. }
  1094. }
  1095. return 1;
  1096. }
  1097. else {
  1098. SendClientMessageEx(playerid, COLOR_GREY, " You can't afford the Protection!");
  1099. return 1;
  1100. }
  1101. }
  1102. else {
  1103. SendClientMessageEx(playerid, COLOR_GREY, " No-one offered you any Protection!");
  1104. return 1;
  1105. }
  1106. }
  1107. else if(strcmp(params,"defense",true) == 0) {
  1108. if(DefendOffer[playerid] < 999) {
  1109. if(GetPlayerCash(playerid) > DefendPrice[playerid]) {
  1110. if(IsPlayerConnected(DefendOffer[playerid])) {
  1111. new ip[32], ipex[32];
  1112. GetPlayerIp(playerid, ip, sizeof(ip));
  1113. GetPlayerIp(DefendOffer[playerid], ipex, sizeof(ipex));
  1114. format(string, sizeof(string), "[LAWYER] %s (IP:%s) has paid $%d to %s (IP:%s)", GetPlayerNameEx(playerid), ip, DefendPrice[playerid], GetPlayerNameEx(DefendOffer[playerid]), ipex);
  1115. Log("logs/pay.log", string);
  1116. PlayerInfo[playerid][pWantedLevel]--;
  1117. WantedPoints[playerid]--;
  1118. SetPlayerWantedLevel(playerid, PlayerInfo[playerid][pWantedLevel]);
  1119. SetPlayerToTeamColor(playerid);
  1120. giveplayer = GetPlayerNameEx(DefendOffer[playerid]);
  1121. sendername = GetPlayerNameEx(playerid);
  1122. format(string, sizeof(string), "* You accepted the Defense for $%d from Lawyer %s.",DefendPrice[playerid],giveplayer);
  1123. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  1124. format(string, sizeof(string), "* %s accepted your Defense, and the $%d was added to your money.",sendername,DefendPrice[playerid]);
  1125. SendClientMessageEx(DefendOffer[playerid], COLOR_LIGHTBLUE, string);
  1126. GivePlayerCash( DefendOffer[playerid],DefendPrice[playerid]);
  1127. GivePlayerCash(playerid, -DefendPrice[playerid]);
  1128. DefendOffer[playerid] = 999;
  1129. DefendPrice[playerid] = 0;
  1130. return 1;
  1131. }
  1132. return 1;
  1133. }
  1134. else {
  1135. SendClientMessageEx(playerid, COLOR_GREY, " You can't afford the Protection!");
  1136. return 1;
  1137. }
  1138. }
  1139. else {
  1140. SendClientMessageEx(playerid, COLOR_GREY, " No-one offered you any Protection!");
  1141. return 1;
  1142. }
  1143. }
  1144. else if(strcmp(params,"appeal",true) == 0) {
  1145. if(AppealOffer[playerid] < 999) {
  1146. if(IsPlayerConnected(AppealOffer[playerid])) {
  1147. AppealOfferAccepted[playerid] = 1;
  1148. giveplayer = GetPlayerNameEx(AppealOffer[playerid]);
  1149. sendername = GetPlayerNameEx(playerid);
  1150. format(string, sizeof(string), "* You accepted the appeal from Lawyer %s.",giveplayer);
  1151. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  1152. format(string, sizeof(string), "* %s accepted your appeal, a message to the Judicial System has been sent, please wait at the courtroom.",sendername);
  1153. SendClientMessageEx(AppealOffer[playerid], COLOR_LIGHTBLUE, string);
  1154. return 1;
  1155. }
  1156. return 1;
  1157. }
  1158. else {
  1159. SendClientMessageEx(playerid, COLOR_GREY, " No-one offered you any Protection!");
  1160. return 1;
  1161. }
  1162. }
  1163. else if(strcmp(params,"mats",true) == 0)
  1164. {
  1165. if(MatsOffer[playerid] < 999)
  1166. {
  1167. if(GetPlayerCash(playerid) >= MatsPrice[playerid])
  1168. {
  1169. if(IsPlayerConnected(MatsOffer[playerid]))
  1170. {
  1171. if(GetPVarInt(playerid, "SellMatsTimer") > 0)
  1172. {
  1173. format(string, sizeof(string), "You must wait %d seconds before accepting materials.", GetPVarInt(playerid, "SellMatsTimer"));
  1174. SendClientMessageEx(playerid,COLOR_GREY,string);
  1175. return 1;
  1176. }
  1177. if(PlayerInfo[MatsOffer[playerid]][pMats] < MatsAmount[playerid])
  1178. {
  1179. SendClientMessageEx(playerid,COLOR_GREY, "That player does not have that amount of materials anymore!");
  1180. return 1;
  1181. }
  1182. new ip[32], ipex[32];
  1183. GetPlayerIp(playerid, ip, sizeof(ip));
  1184. GetPlayerIp(MatsOffer[playerid], ipex, sizeof(ipex));
  1185. format(string, sizeof(string), "[MATERIALS (%d)] %s (IP:%s) has paid $%d to %s (IP:%s)", MatsAmount[playerid], GetPlayerNameEx(playerid), ip, MatsPrice[playerid], GetPlayerNameEx(MatsOffer[playerid]), ipex);
  1186. Log("logs/pay.log", string);
  1187.  
  1188. MatsWarn[playerid][MatsOffer[playerid]] += MatsPrice[playerid];
  1189. if(MatsWarn[playerid][MatsOffer[playerid]] >= 25000 && (PlayerInfo[MatsOffer[playerid]][pLevel] <= 3 || PlayerInfo[playerid][pLevel] <= 3))
  1190. {
  1191. format(string, sizeof(string), "%s (IP:%s) has sold %s (IP:%s) $%d of materials in this session.", GetPlayerNameEx(MatsOffer[playerid]), ipex, GetPlayerNameEx(playerid), ip, MatsWarn[playerid][MatsOffer[playerid]]);
  1192. ABroadCast(COLOR_YELLOW, string, 2);
  1193. }
  1194.  
  1195. format(string, sizeof(string), "* You bought %d materials for $%d from %s.", MatsAmount[playerid], MatsPrice[playerid], GetPlayerNameEx(MatsOffer[playerid]));
  1196. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  1197. format(string, sizeof(string), "* %s has bought your %d materials, the $%d was added to your money.", GetPlayerNameEx(playerid), MatsAmount[playerid], MatsPrice[playerid]);
  1198. SendClientMessageEx(MatsOffer[playerid], COLOR_LIGHTBLUE, string);
  1199.  
  1200. GivePlayerCash(MatsOffer[playerid], MatsPrice[playerid]);
  1201. GivePlayerCash(playerid, -MatsPrice[playerid]);
  1202. PlayerInfo[playerid][pMats] += MatsAmount[playerid];
  1203. PlayerInfo[MatsOffer[playerid]][pMats] -= MatsAmount[playerid];
  1204.  
  1205. MatsOffer[playerid] = 999;
  1206. MatsPrice[playerid] = 0;
  1207. MatsAmount[playerid] = 0;
  1208. }
  1209. }
  1210. else
  1211. {
  1212. SendClientMessageEx(playerid, COLOR_GREY, "You can't afford those materials!");
  1213. return 1;
  1214. }
  1215. }
  1216. else
  1217. {
  1218. SendClientMessageEx(playerid, COLOR_GREY, "No-one offered you any materials!");
  1219. return 1;
  1220. }
  1221. }
  1222. else if(strcmp(params,"pot",true) == 0) {
  1223. if(PotOffer[playerid] < 999) {
  1224. if(GetPlayerCash(playerid) > PotPrice[playerid]) {
  1225. if(PlayerInfo[playerid][pPot] < 25) {
  1226. if(IsPlayerConnected(PotOffer[playerid])) {
  1227. if(PlayerInfo[PotOffer[playerid]][pPot] < PotGram[playerid])
  1228. {
  1229. SendClientMessageEx(playerid,COLOR_GREY, "That player does not have that amount of pot anymore!");
  1230. return 1;
  1231. }
  1232. new ip[32], ipex[32];
  1233. GetPlayerIp(playerid, ip, sizeof(ip));
  1234. GetPlayerIp(PotOffer[playerid], ipex, sizeof(ipex));
  1235. format(string, sizeof(string), "[POT (%d GRAMS)] %s (IP:%s) has paid $%d to %s (IP:%s)", PotGram[playerid], GetPlayerNameEx(playerid), ip, PotPrice[playerid], GetPlayerNameEx(PotOffer[playerid]), ipex);
  1236. Log("logs/pay.log", string);
  1237.  
  1238. PotWarn[playerid][PotOffer[playerid]] += PotPrice[playerid];
  1239. if(PotWarn[playerid][PotOffer[playerid]] >= 25000 && (PlayerInfo[PotOffer[playerid]][pLevel] <= 3 || PlayerInfo[PotOffer[playerid]][pLevel] <= 3)) {
  1240. format(string, sizeof(string), "%s (IP:%s) has sold %s (IP:%s) $%d of pot in this session.", GetPlayerNameEx(PotOffer[playerid]), ipex, GetPlayerNameEx(playerid), ip, PotWarn[playerid][PotOffer[playerid]]);
  1241. Log("logs/pay.log", string);
  1242. ABroadCast(COLOR_YELLOW, string, 2);
  1243. }
  1244.  
  1245. GetPlayerName(PotOffer[playerid], giveplayer, sizeof(giveplayer));
  1246. GetPlayerName(playerid, sendername, sizeof(sendername));
  1247. format(string, sizeof(string), "* You bought %d gram for $%d from Drug Dealer %s.",PotGram[playerid],PotPrice[playerid],giveplayer);
  1248. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  1249. format(string, sizeof(string), "* %s has bought your %d gram, the $%d was added to your money.",sendername,PotGram[playerid],PotPrice[playerid]);
  1250. SendClientMessageEx(PotOffer[playerid], COLOR_LIGHTBLUE, string);
  1251. ExtortionTurfsWarsZone(PotOffer[playerid], 1, PotPrice[playerid]);
  1252. SetPVarInt(PotOffer[playerid], "Cash", GetPVarInt(PotOffer[playerid], "Cash")+PotPrice[playerid]);
  1253. PlayerInfo[PotOffer[playerid]][pDrugsSkill] ++;
  1254. GivePlayerCash(playerid, -PotPrice[playerid]);
  1255. PlayerInfo[playerid][pPot] += PotGram[playerid];
  1256. PlayerInfo[PotOffer[playerid]][pPot] -= PotGram[playerid];
  1257. if(PlayerInfo[PotOffer[playerid]][pDrugsSkill] == 50)
  1258. { SendClientMessageEx(PotOffer[playerid], COLOR_YELLOW, "* Your Drug Dealer Skill is now Level 2, you can buy more Grams and Cheaper."); }
  1259. else if(PlayerInfo[PotOffer[playerid]][pDrugsSkill] == 100)
  1260. { SendClientMessageEx(PotOffer[playerid], COLOR_YELLOW, "* Your Drug Dealer Skill is now Level 3, you can buy more Grams and Cheaper."); }
  1261. else if(PlayerInfo[PotOffer[playerid]][pDrugsSkill] == 200)
  1262. { SendClientMessageEx(PotOffer[playerid], COLOR_YELLOW, "* Your Drug Dealer Skill is now Level 4, you can buy more Grams and Cheaper."); }
  1263. else if(PlayerInfo[PotOffer[playerid]][pDrugsSkill] == 400)
  1264. { SendClientMessageEx(PotOffer[playerid], COLOR_YELLOW, "* Your Drug Dealer Skill is now Level 5, you can buy more Grams and Cheaper."); }
  1265. PotOffer[playerid] = 999;
  1266. PotPrice[playerid] = 0;
  1267. PotGram[playerid] = 0;
  1268. return 1;
  1269. }
  1270. return 1;
  1271. }
  1272. else {
  1273. SendClientMessageEx(playerid, COLOR_GREY, " You are fully loaded with Drugs, use them first!");
  1274. return 1;
  1275. }
  1276. }
  1277. else {
  1278. SendClientMessageEx(playerid, COLOR_GREY, " You can't afford those Pot!");
  1279. return 1;
  1280. }
  1281. }
  1282. else {
  1283. SendClientMessageEx(playerid, COLOR_GREY, " No-one offered you any Pot!");
  1284. return 1;
  1285. }
  1286. }
  1287. else if(strcmp(params,"crack",true) == 0) {
  1288. if(CrackOffer[playerid] < 999) {
  1289. if(GetPlayerCash(playerid) > CrackPrice[playerid]) {
  1290. if(PlayerInfo[playerid][pCrack] < 25) {
  1291. if(IsPlayerConnected(CrackOffer[playerid])) {
  1292. if(PlayerInfo[CrackOffer[playerid]][pCrack] < CrackGram[playerid])
  1293. {
  1294. SendClientMessageEx(playerid,COLOR_GREY, "That player does not have that amount of crack anymore!");
  1295. return 1;
  1296. }
  1297. new ip[32], ipex[32];
  1298. GetPlayerIp(playerid, ip, sizeof(ip));
  1299. GetPlayerIp(CrackOffer[playerid], ipex, sizeof(ipex));
  1300. format(string, sizeof(string), "[CRACK DEAL (%d GRAMS)] %s (IP:%s) has paid $%d to %s (IP:%s)", CrackGram[playerid], GetPlayerNameEx(playerid), ip, CrackPrice[playerid], GetPlayerNameEx(CrackOffer[playerid]), ipex);
  1301. Log("logs/pay.log", string);
  1302.  
  1303. CrackWarn[playerid][CrackOffer[playerid]] += CrackPrice[playerid];
  1304. if(CrackWarn[playerid][CrackOffer[playerid]] >= 25000 && (PlayerInfo[CrackOffer[playerid]][pLevel] <= 3 || PlayerInfo[CrackOffer[playerid]][pLevel] <= 3)) {
  1305. format(string, sizeof(string), "%s (IP:%s) has sold %s (IP:%s) $%d of crack in this session.", GetPlayerNameEx(CrackOffer[playerid]), ipex, GetPlayerNameEx(playerid), ip, CrackWarn[playerid][CrackOffer[playerid]]);
  1306. ABroadCast(COLOR_YELLOW, string, 2);
  1307. }
  1308.  
  1309. GivePlayerCash(playerid, -CrackPrice[playerid]);
  1310. GivePlayerCash(CrackOffer[playerid], CrackPrice[playerid]);
  1311. GetPlayerName(CrackOffer[playerid], giveplayer, sizeof(giveplayer));
  1312. GetPlayerName(playerid, sendername, sizeof(sendername));
  1313. format(string, sizeof(string), "* You bought %d gram for $%d from Drug Dealer %s.",CrackGram[playerid],CrackPrice[playerid],giveplayer);
  1314. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  1315. format(string, sizeof(string), "* %s has bought your %d gram, the $%d was added to your money.",sendername,CrackGram[playerid],CrackPrice[playerid]);
  1316. SendClientMessageEx(CrackOffer[playerid], COLOR_LIGHTBLUE, string);
  1317. ExtortionTurfsWarsZone(CrackOffer[playerid], 1, CrackPrice[playerid]);
  1318. //SetPVarInt(CrackOffer[playerid], "Cash", GetPVarInt(CrackOffer[playerid], "Cash")+CrackOffer[playerid]);
  1319. PlayerInfo[CrackOffer[playerid]][pDrugsSkill] ++;
  1320. PlayerInfo[playerid][pCrack] += CrackGram[playerid];
  1321. PlayerInfo[CrackOffer[playerid]][pCrack] -= CrackGram[playerid];
  1322. if(PlayerInfo[CrackOffer[playerid]][pDrugsSkill] == 50)
  1323. { SendClientMessageEx(CrackOffer[playerid], COLOR_YELLOW, "* Your Drug Dealer Skill is now Level 2, you can buy more Grams and Cheaper."); }
  1324. else if(PlayerInfo[CrackOffer[playerid]][pDrugsSkill] == 100)
  1325. { SendClientMessageEx(CrackOffer[playerid], COLOR_YELLOW, "* Your Drug Dealer Skill is now Level 3, you can buy more Grams and Cheaper."); }
  1326. else if(PlayerInfo[CrackOffer[playerid]][pDrugsSkill] == 200)
  1327. { SendClientMessageEx(CrackOffer[playerid], COLOR_YELLOW, "* Your Drug Dealer Skill is now Level 4, you can buy more Grams and Cheaper."); }
  1328. else if(PlayerInfo[CrackOffer[playerid]][pDrugsSkill] == 400)
  1329. { SendClientMessageEx(CrackOffer[playerid], COLOR_YELLOW, "* Your Drug Dealer Skill is now Level 5, you can buy more Grams and Cheaper."); }
  1330. CrackOffer[playerid] = 999;
  1331. CrackPrice[playerid] = 0;
  1332. CrackGram[playerid] = 0;
  1333. return 1;
  1334. }
  1335. return 1;
  1336. }
  1337. else {
  1338. SendClientMessageEx(playerid, COLOR_GREY, " You are fully loaded with Crack, use them first!");
  1339. return 1;
  1340. }
  1341. }
  1342. else {
  1343. SendClientMessageEx(playerid, COLOR_GREY, " You can't afford that Crack!");
  1344. return 1;
  1345. }
  1346. }
  1347. else {
  1348. SendClientMessageEx(playerid, COLOR_GREY, " No-one offered you any Crack!");
  1349. return 1;
  1350. }
  1351. }
  1352. else if(strcmp(params,"weapon",true) == 0) {
  1353. if(GunOffer[playerid] < 999) {
  1354. if(IsPlayerConnected(GunOffer[playerid])) {
  1355. if (ProxDetectorS(5.0, playerid, GunOffer[playerid])) {
  1356. if(GetPVarInt(playerid, "Hospital") == 1 || GetPVarInt(playerid, "Hospital") == 2 || GetPVarInt(playerid, "Hospital") == 3 || GetPVarInt(playerid, "Hospital") == 4 || GetPVarInt(playerid, "Hospital") == 5) {
  1357. SendClientMessageEx(playerid, COLOR_GREY, "You can't spawn a weapon whilst in Hospital.");
  1358. return 1;
  1359. }
  1360. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessageEx(playerid, COLOR_GRAD2, "Please exit the vehicle, before using this command.");
  1361. new weaponname[32];
  1362. GetWeaponName(GunId[playerid], weaponname, sizeof(weaponname));
  1363. format(string, sizeof(string), " You have given %s, a %s.", GetPlayerNameEx(playerid),weaponname);
  1364. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1365. SendClientMessageEx(GunOffer[playerid], COLOR_GRAD1, string);
  1366. format(string, sizeof(string), " You have recieved a %s from %s.", weaponname, GetPlayerNameEx(GunOffer[playerid]));
  1367. SendClientMessageEx(playerid, COLOR_GRAD1, string);
  1368. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1369. format(string, sizeof(string), "* %s created a Gun from Materials, and hands it to %s.", GetPlayerNameEx(GunOffer[playerid]), GetPlayerNameEx(playerid));
  1370. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1371. ExtortionTurfsWarsZone(GunOffer[playerid], 3, 1000);
  1372. GivePlayerValidWeapon(playerid,GunId[playerid],50000);
  1373. new ip[32], ipex[32];
  1374. GetPlayerIp(playerid, ip, sizeof(ip));
  1375. GetPlayerIp(GunOffer[playerid], ipex, sizeof(ipex));
  1376. format(string, sizeof(string), "[WEAPON DEAL] %s(IP:%s) has bought a %s from %s(IP:%s)", GetPlayerNameEx(playerid), ip, weaponname, GetPlayerNameEx(GunOffer[playerid]), ipex);
  1377. Log("logs/pay.log", string);
  1378. PlayerInfo[GunOffer[playerid]][pMats] -= GunMats[playerid];
  1379. if(GunId[playerid] > 15)
  1380. {
  1381. if(PlayerInfo[GunOffer[playerid]][pDonateRank] == 2 || PlayerInfo[GunOffer[playerid]][pDonateRank] == 3)
  1382. {
  1383. PlayerInfo[GunOffer[playerid]][pArmsSkill] += 2;
  1384. }
  1385. else
  1386. {
  1387. PlayerInfo[GunOffer[playerid]][pArmsSkill]++;
  1388. }
  1389. }
  1390. if(PlayerInfo[GunOffer[playerid]][pArmsSkill] == 50)
  1391. { SendClientMessageEx(GunOffer[playerid], COLOR_YELLOW, "* Your Arms Dealer Skill is now Level 2, more weapons are available to sell."); }
  1392. else if(PlayerInfo[GunOffer[playerid]][pArmsSkill] == 100)
  1393. { SendClientMessageEx(GunOffer[playerid], COLOR_YELLOW, "* Your Arms Dealer Skill is now Level 3, more weapons are available to sell."); }
  1394. else if(PlayerInfo[GunOffer[playerid]][pArmsSkill] == 200)
  1395. { SendClientMessageEx(GunOffer[playerid], COLOR_YELLOW, "* Your Arms Dealer Skill is now Level 4, more weapons are available to sell."); }
  1396. else if(PlayerInfo[GunOffer[playerid]][pArmsSkill] == 400)
  1397. { SendClientMessageEx(GunOffer[playerid], COLOR_YELLOW, "* Your Arms Dealer Skill is now Level 5, more weapons are available to sell."); }
  1398. GunOffer[playerid] = 999;
  1399. GunId[playerid] = 0;
  1400. GunMats[playerid] = 0;
  1401. return 1;
  1402. }
  1403. else {
  1404. SendClientMessageEx(playerid, COLOR_GRAD2, "You need to be the near the player that is selling you the weapon !");
  1405. return 1;
  1406. }
  1407. }
  1408. }
  1409. else {
  1410. SendClientMessageEx(playerid, COLOR_GREY, " No-one offered you a Weapon!");
  1411. return 1;
  1412. }
  1413. }
  1414. else if(strcmp(params,"craft",true) == 0) {
  1415. if(CraftOffer[playerid] < 999) {
  1416. if(IsPlayerConnected(CraftOffer[playerid])) {
  1417. if (ProxDetectorS(5.0, playerid, CraftOffer[playerid])) {
  1418. if(GetPVarInt(playerid, "Hospital") == 1 || GetPVarInt(playerid, "Hospital") == 2 || GetPVarInt(playerid, "Hospital") == 3 || GetPVarInt(playerid, "Hospital") == 4 || GetPVarInt(playerid, "Hospital") == 5) {
  1419. SendClientMessageEx(playerid, COLOR_GREY, "You can't spawn a weapon whilst in Hospital.");
  1420. return 1;
  1421. }
  1422. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessageEx(playerid, COLOR_GRAD2, "Please exit the vehicle, before using this command.");
  1423. new weaponname[50];
  1424. format(weaponname, 50, "%s", CraftName[playerid]);
  1425. switch(CraftId[playerid]) {
  1426. case 1:
  1427. {
  1428. PlayerInfo[playerid][pScrewdriver]++;
  1429. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "/sellgun");
  1430. }
  1431. case 2:
  1432. {
  1433. PlayerInfo[playerid][pSmslog]++;
  1434. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "/smslog");
  1435. }
  1436. case 3:
  1437. {
  1438. PlayerInfo[playerid][pWristwatch]++;
  1439. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "/wristwatch");
  1440. }
  1441. case 4:
  1442. {
  1443. PlayerInfo[playerid][pSurveillance]++;
  1444. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "/(p)lace(c)amera /(s)ee(c)amera /(d)estroy(c)amera");
  1445. }
  1446. case 5:
  1447. {
  1448. PlayerInfo[playerid][pTire]++;
  1449. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "/repair");
  1450. }
  1451. case 6:
  1452. {
  1453. PlayerInfo[playerid][pLock]=1;
  1454. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "/lock");
  1455. }
  1456. case 7:
  1457. {
  1458. PlayerInfo[playerid][pFirstaid]++;
  1459. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "/firstaid");
  1460. }
  1461. case 8:
  1462. {
  1463. GivePlayerValidWeapon(playerid, 43, 50);
  1464. }
  1465. case 9:
  1466. {
  1467. PlayerInfo[playerid][pRccam]++;
  1468. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "/rccam");
  1469. }
  1470. case 10:
  1471. {
  1472. PlayerInfo[playerid][pReceiver]++;
  1473. SetPVarInt(playerid, "pReceiverMLeft", 30);
  1474. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You will receive the next thirty non-encrpyted department radio messages.");
  1475. }
  1476. case 11:
  1477. {
  1478. PlayerInfo[playerid][pGPS]++;
  1479. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "/gps");
  1480. }
  1481. case 12:
  1482. {
  1483. PlayerInfo[playerid][pSweep]++;
  1484. PlayerInfo[playerid][pSweepLeft] = 3;
  1485. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "/sweep");
  1486. }
  1487. case 13:
  1488. {
  1489. GivePlayerValidWeapon(playerid, 46, 99999);
  1490. }
  1491. }
  1492. format(string, sizeof(string), " You have given %s, a %s.", GetPlayerNameEx(playerid),weaponname);
  1493. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1494. SendClientMessageEx(CraftOffer[playerid], COLOR_GRAD1, string);
  1495. format(string, sizeof(string), " You have recieved a %s from %s.", weaponname, GetPlayerNameEx(CraftOffer[playerid]));
  1496. SendClientMessageEx(playerid, COLOR_GRAD1, string);
  1497. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  1498. format(string, sizeof(string), "* %s created something from Materials, and hands it to %s.", GetPlayerNameEx(CraftOffer[playerid]), GetPlayerNameEx(playerid));
  1499. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1500. new ip[32], ipex[32];
  1501. GetPlayerIp(playerid, ip, sizeof(ip));
  1502. GetPlayerIp(CraftOffer[playerid], ipex, sizeof(ipex));
  1503. format(string, sizeof(string), "[CRAFTSMAN DEAL] %s (IP: %s) has bought a %s from %s (IP: %s)", GetPlayerNameEx(playerid), ip, weaponname, GetPlayerNameEx(CraftOffer[playerid]), ipex);
  1504. Log("logs/pay.log", string);
  1505. PlayerInfo[CraftOffer[playerid]][pMats] -= CraftMats[playerid];
  1506. PlayerInfo[CraftOffer[playerid]][pArmsSkill]++;
  1507. CraftOffer[playerid] = 999;
  1508. CraftId[playerid] = 0;
  1509. CraftMats[playerid] = 0;
  1510. return 1;
  1511. }
  1512. else {
  1513. SendClientMessageEx(playerid, COLOR_GRAD2, "You need to be the near the player that is selling you the weapon !");
  1514. return 1;
  1515. }
  1516. }
  1517. return 1;
  1518. }
  1519. else {
  1520. SendClientMessageEx(playerid, COLOR_GREY, " No-one offered you a Weapon!");
  1521. return 1;
  1522. }
  1523. }
  1524. else if(strcmp(params,"contract",true) == 0) {
  1525. if(HitOffer[playerid] < 999) {
  1526. if(HitToGet[playerid] < 999) {
  1527. if(IsPlayerConnected(HitToGet[playerid])) {
  1528. format(string, sizeof(string), "* %s has accepted the contract to kill %s.", GetPlayerNameEx(playerid),GetPlayerNameEx(HitToGet[playerid]));
  1529. SendClientMessageEx(HitOffer[playerid], COLOR_LIGHTBLUE, string);
  1530. format(string, sizeof(string), "* You have accepted the contract to kill %s, you will recieve $%d when completed.", GetPlayerNameEx(HitToGet[playerid]), PlayerInfo[HitToGet[playerid]][pHeadValue] / 4 * 2);
  1531. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  1532. format(string, sizeof(string), "%s has been assigned to the contract on %s, for $%d.", GetPlayerNameEx(playerid), GetPlayerNameEx(HitToGet[playerid]), PlayerInfo[HitToGet[playerid]][pHeadValue] / 4 * 2);
  1533. SendFamilyMessage(8, COLOR_YELLOW, string);
  1534. GoChase[playerid] = HitToGet[playerid];
  1535. GetChased[HitToGet[playerid]] = playerid;
  1536. GotHit[HitToGet[playerid]] = 1;
  1537. HitToGet[playerid] = 999;
  1538. HitOffer[playerid] = 999;
  1539. return 1;
  1540. }
  1541. else {
  1542. HitToGet[playerid] = 999;
  1543. HitOffer[playerid] = 999;
  1544. return 1;
  1545. }
  1546. }
  1547. }
  1548. else {
  1549. SendClientMessageEx(playerid, COLOR_GREY, " No-one offered you a contract!");
  1550. return 1;
  1551. }
  1552. }
  1553. else if(strcmp(params,"sex",true) == 0) {
  1554. if(SexOffer[playerid] < 999) {
  1555. if(GetPlayerCash(playerid) > SexPrice[playerid]) {
  1556. if (IsPlayerConnected(SexOffer[playerid])) {
  1557. new Car = GetPlayerVehicleID(playerid);
  1558. if(IsPlayerInAnyVehicle(playerid) && IsPlayerInVehicle(SexOffer[playerid], Car)) {
  1559. GetPlayerName(SexOffer[playerid], giveplayer, sizeof(giveplayer));
  1560. GetPlayerName(playerid, sendername, sizeof(sendername));
  1561. format(string, sizeof(string), "* You had sex with Whore %s, for $%d.", giveplayer, SexPrice[playerid]);
  1562. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  1563. format(string, sizeof(string), "* %s had sex with you. You have earned $%d.", sendername, SexPrice[playerid]);
  1564. SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, string);
  1565.  
  1566. new ip[32], ipex[32];
  1567. GetPlayerIp(playerid, ip, sizeof(ip));
  1568. GetPlayerIp(SexOffer[playerid], ipex, sizeof(ipex));
  1569. format(string, sizeof(string), "[SEX] %s (IP:%s) had sex with %s (IP:%s) for %d.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(SexOffer[playerid]), ipex, SexPrice[playerid]);
  1570. Log("logs/pay.log", string);
  1571.  
  1572. SexWarn[playerid][SexOffer[playerid]] += SexPrice[playerid];
  1573. if(SexWarn[playerid][SexOffer[playerid]] >= 25000 && (PlayerInfo[SexOffer[playerid]][pLevel] <= 3 || PlayerInfo[playerid][pLevel] <= 3)) {
  1574. format(string, sizeof(string), "%s (IP:%s) has guarded %s (IP:%s) $%d in this session.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(SexOffer[playerid]), ipex, SexWarn[playerid][SexOffer[playerid]]);
  1575. Log("logs/pay.log", string);
  1576. ABroadCast(COLOR_YELLOW, string, 2);
  1577. }
  1578.  
  1579. ExtortionTurfsWarsZone(SexOffer[playerid], 4, SexPrice[playerid]);
  1580. GivePlayerCash(SexOffer[playerid], SexPrice[playerid]);
  1581. GivePlayerCash(playerid, -SexPrice[playerid]);
  1582. PlayerInfo[SexOffer[playerid]][pSexSkill] ++;
  1583. if(PlayerInfo[SexOffer[playerid]][pSexSkill] == 50) {
  1584. SendClientMessageEx(SexOffer[playerid], COLOR_YELLOW, "* Your Sex Skill is now Level 2, you offer better Sex (health) and less chance on STI.");
  1585. }
  1586. else if(PlayerInfo[SexOffer[playerid]][pSexSkill] == 100) {
  1587. SendClientMessageEx(SexOffer[playerid], COLOR_YELLOW, "* Your Sex Skill is now Level 3, you offer better Sex (health) and less chance on STI.");
  1588. }
  1589. else if(PlayerInfo[SexOffer[playerid]][pSexSkill] == 200) {
  1590. SendClientMessageEx(SexOffer[playerid], COLOR_YELLOW, "* Your Sex Skill is now Level 4, you offer better Sex (health) and less chance on STI.");
  1591. }
  1592. else if(PlayerInfo[SexOffer[playerid]][pSexSkill] == 400) {
  1593. SendClientMessageEx(SexOffer[playerid], COLOR_YELLOW, "* Your Sex Skill is now Level 5, you offer better Sex (health) and less chance on STI.");
  1594. }
  1595.  
  1596. if(STDPlayer[playerid] == 0) {
  1597. if(Condom[playerid] < 1) {
  1598. new Float:health;
  1599. new level = PlayerInfo[SexOffer[playerid]][pSexSkill];
  1600. if(level >= 0 && level <= 50) {
  1601. GetPlayerHealth(playerid, health);
  1602. if(health < 100) {
  1603. if(health > 90) {
  1604. SetPlayerHealth(playerid, 100);
  1605. }
  1606. else {
  1607. SetPlayerHealth(playerid, health + 10.0);
  1608. }
  1609. }
  1610. new rand = random(sizeof(STD1));
  1611. STDPlayer[playerid] = STD1[rand];
  1612. STDPlayer[SexOffer[playerid]] = STD1[rand];
  1613. if(STD1[rand] == 0) {
  1614. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 10 Health + no STI while having Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You haven't got a STI while having Sex.");
  1615. }
  1616. else if(STD1[rand] == 1) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 10 Health + a Chlamydia because of the Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You got a Chlamydia because of the Sex."); }
  1617. else if(STD1[rand] == 2) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 10 Health + a Gonorrhea because of the Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You got a Gonorrhea because of the Sex."); }
  1618. else if(STD1[rand] == 3) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 10 Health + a Syphilis because of the Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You got a Syphilis because of the Sex."); }
  1619. }
  1620. else if(level >= 51 && level <= 100) {
  1621. GetPlayerHealth(playerid, health);
  1622. if(health < 100) {
  1623. if(health > 80) {
  1624. SetPlayerHealth(playerid, 100);
  1625. }
  1626. else {
  1627. SetPlayerHealth(playerid, health + 20.0);
  1628. }
  1629. }
  1630. new rand = random(sizeof(STD2));
  1631. STDPlayer[playerid] = STD2[rand];
  1632. STDPlayer[SexOffer[playerid]] = STD2[rand];
  1633. if(STD2[rand] == 0) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 20 Health + no STD while having Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You haven't got a STI while having Sex."); }
  1634. else if(STD2[rand] == 1) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 20 Health + a Chlamydia because of the Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You got a Chlamydia because of the Sex."); }
  1635. else if(STD2[rand] == 2) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 20 Health + a Gonorrhea because of the Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You got a Gonorrhea because of the Sex."); }
  1636. else if(STD2[rand] == 3) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 20 Health + a Syphilis because of the Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You got a Syphilis because of the Sex."); }
  1637. }
  1638. else if(level >= 101 && level <= 200) {
  1639. GetPlayerHealth(playerid, health);
  1640. if(health < 100) {
  1641. if(health > 70) {
  1642. SetPlayerHealth(playerid, 100);
  1643. }
  1644. else {
  1645. SetPlayerHealth(playerid, health + 30.0);
  1646. }
  1647. }
  1648. new rand = random(sizeof(STD3));
  1649. STDPlayer[playerid] = STD3[rand];
  1650. STDPlayer[SexOffer[playerid]] = STD3[rand];
  1651. if(STD3[rand] == 0) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 30 Health + no STI while having Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You haven't got a STI while having Sex."); }
  1652. else if(STD3[rand] == 1) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 30 Health + a Chlamydia because of the Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You got a Chlamydia because of the Sex."); }
  1653. else if(STD3[rand] == 2) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 30 Health + a Gonorrhea because of the Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You got a Gonorrhea because of the Sex."); }
  1654. else if(STD3[rand] == 3) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 30 Health + a Syphilis because of the Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You got a Syphilis because of the Sex."); }
  1655. }
  1656. else if(level >= 201 && level <= 400) {
  1657. GetPlayerHealth(playerid, health);
  1658. if(health < 100) {
  1659. if(health > 60) {
  1660. SetPlayerHealth(playerid, 100);
  1661. }
  1662. else {
  1663. SetPlayerHealth(playerid, health + 40.0);
  1664. }
  1665. }
  1666. new rand = random(sizeof(STD4));
  1667. STDPlayer[playerid] = STD4[rand];
  1668. STDPlayer[SexOffer[playerid]] = STD4[rand];
  1669. if(STD4[rand] == 0) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 40 Health + no STI while having Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You haven't got a STI while having Sex."); }
  1670. else if(STD4[rand] == 1) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 40 Health + a Chlamydia because of the Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You got a Chlamydia because of the Sex."); }
  1671. else if(STD4[rand] == 2) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 40 Health + a Gonorrhea because of the Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You got a Gonorrhea because of the Sex."); }
  1672. else if(STD4[rand] == 3) { SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You got 40 Health + a Syphilis because of the Sex."); SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* You got a Syphilis because of the Sex."); }
  1673. }
  1674. else if(level >= 401) {
  1675. GetPlayerHealth(playerid, health);
  1676. if(health > 50) {
  1677. SetPlayerHealth(playerid, 100);
  1678. }
  1679. else {
  1680. SetPlayerHealth(playerid, health + 50.0);
  1681. }
  1682. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* Your Sex Skill Level is so high you gave high health and No STD.");
  1683. SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* The Whore's Sex Skill Level is so high you got high health and No STD.");
  1684. }
  1685. }
  1686. else {
  1687. SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* The player used a Condom.");
  1688. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You used a Condom.");
  1689. Condom[playerid] --;
  1690. }
  1691. }
  1692. else {
  1693. SendClientMessageEx(SexOffer[playerid], COLOR_LIGHTBLUE, "* That player was already infected with a STI, can't get another one.");
  1694. return 1;
  1695. }
  1696. SexOffer[playerid] = 999;
  1697. return 1;
  1698. }
  1699. else {
  1700. SendClientMessageEx(playerid, COLOR_GREY, " You or the Whore are not both in a Car!");
  1701. return 1;
  1702. }
  1703. } //Connected or not
  1704. return 1;
  1705. }
  1706. else {
  1707. SendClientMessageEx(playerid, COLOR_GREY, " You can't afford the Sex!");
  1708. return 1;
  1709. }
  1710. }
  1711. else {
  1712. SendClientMessageEx(playerid, COLOR_GREY, " You Don't have any Sex Offered by a Whore!");
  1713. return 1;
  1714. }
  1715. }
  1716. else if(strcmp(params,"repair",true) == 0) {
  1717. if(RepairOffer[playerid] < 999) {
  1718. if(GetPlayerCash(playerid) > RepairPrice[playerid]) {
  1719. if(IsPlayerInAnyVehicle(playerid)) {
  1720. if(IsPlayerConnected(RepairOffer[playerid])) {
  1721. GetPlayerName(RepairOffer[playerid], giveplayer, sizeof(giveplayer));
  1722. GetPlayerName(playerid, sendername, sizeof(sendername));
  1723. RepairCar[playerid] = GetPlayerVehicleID(playerid);
  1724. RepairVehicle(RepairCar[playerid]);
  1725. PlayerInfo[RepairOffer[playerid]][pTire]--;
  1726.  
  1727. GivePlayerCash(RepairOffer[playerid], RepairPrice[playerid]);
  1728. GivePlayerCash(playerid, -RepairPrice[playerid]);
  1729. new ip[32], ipex[32];
  1730. GetPlayerIp(playerid, ip, sizeof(ip));
  1731. GetPlayerIp(RepairOffer[playerid], ipex, sizeof(ipex));
  1732. format(string, sizeof(string), "%s(IP:%s) has repaired the vehicle from %s(IP:%s) for $%d", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(RepairOffer[playerid]), ipex, RepairPrice[playerid]);
  1733. Log("logs/pay.log", string);
  1734. format(string, sizeof(string), "* %s has repaired %s's vehicle.", giveplayer, GetPlayerNameEx(playerid));
  1735. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1736. format(string, sizeof(string), "* You repaired your car for $%d by Car Mechanic %s.",RepairPrice[playerid],giveplayer);
  1737. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  1738.  
  1739. RepairWarn[playerid][RepairOffer[playerid]] += RepairPrice[playerid];
  1740. if(RepairWarn[playerid][RepairOffer[playerid]] >= 25000 && (PlayerInfo[RepairOffer[playerid]][pLevel] <= 3 || PlayerInfo[RepairOffer[playerid]][pLevel] <= 3)) {
  1741. format(string, sizeof(string), "%s (IP:%s) has repaired %s (IP:%s) $%d in this session.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(RepairOffer[playerid]), ipex, RepairWarn[playerid][RepairOffer[playerid]]);
  1742. Log("logs/pay.log", string);
  1743. ABroadCast(COLOR_YELLOW, string, 2);
  1744. }
  1745.  
  1746. format(string, sizeof(string), "* You fixed %s's car, the $%d has been added to your money on hand!",sendername,RepairPrice[playerid]);
  1747. SendClientMessageEx(RepairOffer[playerid], COLOR_LIGHTBLUE, string);
  1748. PlayerInfo[RepairOffer[playerid]][pMechSkill] ++;
  1749. RepairOffer[playerid] = 999;
  1750. RepairPrice[playerid] = 0;
  1751. return 1;
  1752. }
  1753. return 1;
  1754. }
  1755. return 1;
  1756. }
  1757. else {
  1758. SendClientMessageEx(playerid, COLOR_GREY, " You can't afford the Repair!");
  1759. return 1;
  1760. }
  1761. }
  1762. else {
  1763. SendClientMessageEx(playerid, COLOR_GREY, " No-one offered you to Repair your Car!");
  1764. return 1;
  1765. }
  1766. }
  1767. else if(strcmp(params,"refill",true) == 0) {
  1768. if(RefillOffer[playerid] < 999) {
  1769. if(GetPlayerCash(playerid) > RefillPrice[playerid]) {
  1770. if(IsPlayerInAnyVehicle(playerid)) {
  1771. if(IsPlayerConnected(RefillOffer[playerid])) {
  1772. new Float:fueltogive;
  1773. new level = PlayerInfo[RefillOffer[playerid]][pMechSkill];
  1774. if(level >= 0 && level < 50) { fueltogive = 10.0; }
  1775. else if(level >= 50 && level < 100) { fueltogive = 20.0; }
  1776. else if(level >= 100 && level < 200) { fueltogive = 30.0; }
  1777. else if(level >= 200 && level < 400) { fueltogive = 40.0; }
  1778. else if(level >= 400) { fueltogive = 50.0; }
  1779. GetPlayerName(RefillOffer[playerid], giveplayer, sizeof(giveplayer));
  1780. GetPlayerName(playerid, sendername, sizeof(sendername));
  1781. new vehicleid = GetPlayerVehicleID(playerid);
  1782. VehicleFuel[vehicleid] = floatadd(VehicleFuel[vehicleid], fueltogive);
  1783. if(VehicleFuel[vehicleid] > 100.0) VehicleFuel[vehicleid] = 100.0;
  1784. GivePlayerCash(RefillOffer[playerid], RefillPrice[playerid]);
  1785. GivePlayerCash(playerid, -RefillPrice[playerid]);
  1786. new ip[32], ipex[32];
  1787. GetPlayerIp(playerid, ip, sizeof(ip));
  1788. GetPlayerIp(RefillOffer[playerid], ipex, sizeof(ipex));
  1789. format(string, sizeof(string), "%s(IP:%s) has refilled the vehicle from %s(IP:%s) for $%d", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(RefillOffer[playerid]), ipex, RefillPrice[playerid]);
  1790. Log("logs/pay.log", string);
  1791. format(string, sizeof(string), "* %s has refilled %s's vehicle.", giveplayer, GetPlayerNameEx(playerid));
  1792. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1793. format(string, sizeof(string), "* You have added %.2f fuel to your car for $%d by Car Mechanic %s.",fueltogive,RefillPrice[playerid],giveplayer);
  1794. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  1795. format(string, sizeof(string), "* You added %.2f fuel to %s's car, the $%d has been added to your money on hand!",fueltogive,sendername,RefillPrice[playerid]);
  1796. SendClientMessageEx(RefillOffer[playerid], COLOR_LIGHTBLUE, string);
  1797. PlayerInfo[RefillOffer[playerid]][pMechSkill] ++;
  1798.  
  1799. RefillWarn[playerid][RefillOffer[playerid]] += RefillPrice[playerid];
  1800. if(RefillWarn[playerid][RefillOffer[playerid]] >= 30000 && (PlayerInfo[playerid][pLevel] <= 3 || PlayerInfo[RefillOffer[playerid]][pLevel] <= 3)) {
  1801. format(string, sizeof(string), "%s (IP:%s) has refueled %s (IP:%s) $%d in this session.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(RefillOffer[playerid]), ipex, RefillWarn[playerid][RefillOffer[playerid]]);
  1802. Log("logs/pay.log", string);
  1803. ABroadCast(COLOR_YELLOW, string, 2);
  1804. }
  1805.  
  1806. RefillOffer[playerid] = 999;
  1807. RefillPrice[playerid] = 0;
  1808. return 1;
  1809. }
  1810. return 1;
  1811. }
  1812. return 1;
  1813. }
  1814. else {
  1815. SendClientMessageEx(playerid, COLOR_GREY, " You can't afford the refill!");
  1816. return 1;
  1817. }
  1818. }
  1819. else {
  1820. SendClientMessageEx(playerid, COLOR_GREY, " No-one offered you to refill your Car!");
  1821. return 1;
  1822. }
  1823. }
  1824. else if(strcmp(params,"refuel",true) == 0) {
  1825. if(RefuelOffer[playerid] < 999) {
  1826. if(GetPlayerCash(playerid) > RefuelPrice[playerid]) {
  1827. if(IsPlayerInAnyVehicle(playerid)) {
  1828. if(IsPlayerConnected(RefuelOffer[playerid])) {
  1829. new fuel;
  1830. GetPlayerName(RefuelOffer[playerid], giveplayer, sizeof(giveplayer));
  1831. GetPlayerName(playerid, sendername, sizeof(sendername));
  1832. new vehicleid = GetPlayerVehicleID(playerid);
  1833. VehicleFuel[vehicleid] = floatadd(VehicleFuel[vehicleid], fuel);
  1834. if(VehicleFuel[vehicleid] > 100.0) VehicleFuel[vehicleid] = 100.0;
  1835. GivePlayerCash(RefillOffer[playerid], RefuelPrice[playerid]);
  1836. GivePlayerCash(playerid, -RefuelPrice[playerid]);
  1837. format(string, sizeof(string), "* %s has refueled %s's vehicle.", giveplayer, GetPlayerNameEx(playerid));
  1838. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1839. format(string, sizeof(string), "* You have added %d fuel to your car for $%d by Car Mechanic %s.",fuel,RefuelPrice[playerid],giveplayer);
  1840. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  1841. format(string, sizeof(string), "* You added %d fuel to %s's car, the $%d has been added to your money on hand!",fuel,sendername,RefuelPrice[playerid]);
  1842. SendClientMessageEx(RefillOffer[playerid], COLOR_LIGHTBLUE, string);
  1843.  
  1844. RefuelOffer[playerid] = 999;
  1845. RefuelPrice[playerid] = 0;
  1846. return 1;
  1847. }
  1848. return 1;
  1849. }
  1850. return 1;
  1851. }
  1852. else {
  1853. SendClientMessageEx(playerid, COLOR_GREY, " You can't afford the refuel!");
  1854. return 1;
  1855. }
  1856. }
  1857. else {
  1858. SendClientMessageEx(playerid, COLOR_GREY, " No-one offered you to refuel your Car!");
  1859. return 1;
  1860. }
  1861. }
  1862. else { return 1; }
  1863. //} //not connected
  1864. return 1;
  1865. }
Advertisement
Add Comment
Please, Sign In to add comment