Guest User

Untitled

a guest
Jan 26th, 2014
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 58.95 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. }
Advertisement
Add Comment
Please, Sign In to add comment