craftsman.pwn 39 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031
  1. /*
  2. /$$ /$$ /$$$$$$ /$$$$$$$ /$$$$$$$
  3. | $$$ | $$ /$$__ $$ | $$__ $$| $$__ $$
  4. | $$$$| $$| $$ \__/ | $$ \ $$| $$ \ $$
  5. | $$ $$ $$| $$ /$$$$ /$$$$$$| $$$$$$$/| $$$$$$$/
  6. | $$ $$$$| $$|_ $$|______/| $$__ $$| $$____/
  7. | $$\ $$$| $$ \ $$ | $$ \ $$| $$
  8. | $$ \ $$| $$$$$$/ | $$ | $$| $$
  9. |__/ \__/ \______/ |__/ |__/|__/
  10. Craftsman System
  11. Next Generation Gaming, LLC
  12. (created by Next Generation Gaming Development Team)
  13. * Copyright (c) 2016, Next Generation Gaming, LLC
  14. *
  15. * All rights reserved.
  16. *
  17. * Redistribution and use in source and binary forms, with or without modification,
  18. * are not permitted in any case.
  19. *
  20. *
  21. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  24. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  25. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  26. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  27. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  28. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  29. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  30. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  31. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32. */
  33. CMD:pc(playerid, params[])
  34. {
  35. if(PlayerInfo[playerid][pSurveillance] > 0)
  36. {
  37. if(GetPVarInt(playerid, "cameraactive") == 1)
  38. {
  39. SendClientMessageEx(playerid, COLOR_GRAD1, "Wait for your other camera to expire.");
  40. return 1;
  41. }
  42. new string[128];
  43. PlayerInfo[playerid][pSurveillance]--;
  44. SendClientMessageEx(playerid, COLOR_GRAD1, "You placed your camera, go hide and use /sc. Batteries expire in 2 minutes.");
  45. new Float:X, Float:Y, Float:Z;
  46. GetPlayerPos(playerid, X, Y, Z);
  47. SetPVarInt(playerid, "cameraactive", 1);
  48. DestroyDynamic3DTextLabel(Camera3D[playerid]);
  49. Camera3D[playerid] = CreateDynamic3DTextLabel("** A small camera. **",0x008080FF,X,Y,Z,4.0,.worldid = GetPlayerVirtualWorld(playerid));
  50. SetPVarFloat(playerid, "cameraX", X);
  51. SetPVarFloat(playerid, "cameraY", Y);
  52. SetPVarFloat(playerid, "cameraZ", Z);
  53. SetPVarInt(playerid, "cameravw", GetPlayerVirtualWorld(playerid));
  54. SetPVarInt(playerid, "cameraint", GetPlayerInterior(playerid));
  55. SetPVarInt(playerid, "cameraexpire", SetTimerEx("cameraexpire", 120000, 0, "d", playerid));
  56. format(string, sizeof(string), "* %s places something on the ground.", GetPlayerNameEx(playerid));
  57. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  58. }
  59. else
  60. {
  61. SendClientMessageEx(playerid, COLOR_GRAD1, "You don't have a surveillance camera!");
  62. }
  63. return 1;
  64. }
  65. CMD:sc(playerid, params[])
  66. {
  67. if(GetPVarInt(playerid, "cameraactive") == 1)
  68. {
  69. new string[128];
  70. if(GetPVarInt(playerid, "camerasc") == 1)
  71. {
  72. SetCameraBehindPlayer(playerid); //view cam off
  73. SetPlayerPos(playerid, GetPVarFloat(playerid, "cameraX2"), GetPVarFloat(playerid, "cameraY2"), GetPVarFloat(playerid, "cameraZ2"));
  74. SetPlayerVirtualWorld(playerid, GetPVarInt(playerid, "cameravw2"));
  75. SetPlayerInterior(playerid, GetPVarInt(playerid, "cameraint2"));
  76. TogglePlayerControllable(playerid,1);
  77. DeletePVar(playerid, "camerasc");
  78. KillTimer(GetPVarInt(playerid, "cameraexpire"));
  79. }
  80. else
  81. {
  82. format(string, sizeof(string), "* %s stares into a small screen.", GetPlayerNameEx(playerid));
  83. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  84. format(string, sizeof(string), "The camera will expire in a maximum of 2 minutes. (( %s ))", GetPlayerNameEx(playerid));
  85. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  86. new Float:X, Float:Y, Float:Z;
  87. GetPlayerPos(playerid, X, Y, Z);
  88. SetPVarFloat(playerid, "cameraX2", X);
  89. SetPVarFloat(playerid, "cameraY2", Y);
  90. SetPVarFloat(playerid, "cameraZ2", Z);
  91. SetPVarInt(playerid, "cameravw2", GetPlayerVirtualWorld(playerid));
  92. SetPVarInt(playerid, "cameraint2", GetPlayerInterior(playerid));
  93. TogglePlayerControllable(playerid,0);
  94. SetPlayerPos(playerid, GetPVarFloat(playerid, "cameraX"), GetPVarFloat(playerid, "cameraY"), GetPVarFloat(playerid, "cameraZ") - 30.0);
  95. SetPlayerCameraPos(playerid, GetPVarFloat(playerid, "cameraX"), GetPVarFloat(playerid, "cameraY"), GetPVarFloat(playerid, "cameraZ") + 20.0); //viewcam on
  96. SetPlayerCameraLookAt(playerid, GetPVarFloat(playerid, "cameraX"), GetPVarFloat(playerid, "cameraY"), GetPVarFloat(playerid, "cameraZ"));
  97. SetPlayerVirtualWorld(playerid, GetPVarInt(playerid, "cameravw"));
  98. SetPlayerInterior(playerid, GetPVarInt(playerid, "cameraint"));
  99. SetPVarInt(playerid, "camerasc", 1);
  100. }
  101. }
  102. else
  103. {
  104. SendClientMessageEx(playerid, COLOR_GRAD1, "You have no active camera!");
  105. }
  106. return 1;
  107. }
  108. CMD:dc(playerid, params[])
  109. {
  110. if(GetPVarInt(playerid, "cameraactive") == 1)
  111. {
  112. if(!IsPlayerInRangeOfPoint(playerid, 5.0, GetPVarFloat(playerid, "cameraX"), GetPVarFloat(playerid, "cameraY"), GetPVarFloat(playerid, "cameraZ"))) {
  113. SendClientMessageEx(playerid, COLOR_WHITE, "You are not near your camera.");
  114. return 1;
  115. }
  116. if(GetPVarInt(playerid, "camerasc") == 1)
  117. {
  118. SetCameraBehindPlayer(playerid);
  119. SetPlayerPos(playerid, GetPVarFloat(playerid, "cameraX2"), GetPVarFloat(playerid, "cameraY2"), GetPVarFloat(playerid, "cameraZ2"));
  120. SetPlayerVirtualWorld(playerid, GetPVarInt(playerid, "cameravw2"));
  121. SetPlayerInterior(playerid, GetPVarInt(playerid, "cameraint2"));
  122. TogglePlayerControllable(playerid,1);
  123. }
  124. DestroyDynamic3DTextLabel(Camera3D[playerid]);
  125. SendClientMessageEx(playerid, COLOR_GRAD1, "Camera Destroyed!");
  126. KillTimer(GetPVarInt(playerid, "cameraexpire"));
  127. DeletePVar(playerid, "cameraexpire");
  128. DeletePVar(playerid, "cameraactive");
  129. DeletePVar(playerid, "camerasc");
  130. }
  131. else
  132. {
  133. SendClientMessageEx(playerid, COLOR_GRAD1, "There is nothing to destroy!");
  134. }
  135. return 1;
  136. }
  137. CMD:rccam(playerid, params[])
  138. {
  139. if(PlayerInfo[playerid][pRccam] > 0)
  140. {
  141. new string[128];
  142. if(GetPVarInt(playerid, "rccam") == 0)
  143. {
  144. if(GetPVarType(playerid, "IsInArena")) return SendClientMessageEx(playerid, COLOR_WHITE, "You can't do this right now.");
  145. if(GetPVarInt(playerid, "WatchingTV")) return SendClientMessageEx(playerid, COLOR_WHITE, "You can't do this right now.");
  146. if(GetPVarInt(playerid, "Injured") == 1 || PlayerInfo[playerid][pHospital] > 0 || IsPlayerInAnyVehicle(playerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "You can't do this right now.");
  147. if(PlayerInfo[playerid][pVW] != 0 || PlayerInfo[playerid][pInt] != 0) return SendClientMessageEx(playerid, COLOR_WHITE, "You can't do this right now.");
  148. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessageEx(playerid, COLOR_GRAD1, "You must be on foot to place an RCCam!");
  149. if(PlayerInfo[playerid][pJailTime] > 0) return SendClientMessageEx(playerid, COLOR_WHITE, "You cannot use this while in prison.");
  150. PlayerInfo[playerid][pRccam]--;
  151. SetPVarInt(playerid, "rccam", 1);
  152. new Float:X, Float:Y, Float:Z;
  153. GetPlayerPos(playerid, X, Y, Z);
  154. SetPVarFloat(playerid, "rcX", X);
  155. SetPVarFloat(playerid, "rcY", Y);
  156. SetPVarFloat(playerid, "rcZ", Z);
  157. if(GetPVarInt(playerid, "rcveh") != 0)
  158. {
  159. DestroyVehicle(GetPVarInt(playerid, "rcveh"));
  160. }
  161. SetPVarInt(playerid, "rcveh", AddStaticVehicle(594, X, Y, Z, 0, 0, 0));
  162. IsPlayerEntering{playerid} = true;
  163. PutPlayerInVehicle(playerid, GetPVarInt(playerid, "rcveh"), 0);
  164. SetPVarInt(playerid, "rccamtimer", SetTimerEx("rccam", 60000, 0, "d", playerid));
  165. format(string, sizeof(string), "* %s places something on the ground.", GetPlayerNameEx(playerid));
  166. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  167. }
  168. else
  169. {
  170. DestroyVehicle(GetPVarInt(playerid, "rcveh"));
  171. SetPlayerPos(playerid, GetPVarFloat(playerid, "rcX"), GetPVarFloat(playerid, "rcY"), GetPVarFloat(playerid, "rcZ"));
  172. DeletePVar(playerid, "rccam");
  173. KillTimer(GetPVarInt(playerid, "rccamtimer"));
  174. }
  175. }
  176. else
  177. {
  178. if(GetPVarInt(playerid, "rccam") == 1)
  179. {
  180. DestroyVehicle(GetPVarInt(playerid, "rcveh"));
  181. SetPlayerPos(playerid, GetPVarFloat(playerid, "rcX"), GetPVarFloat(playerid, "rcY"), GetPVarFloat(playerid, "rcZ"));
  182. DeletePVar(playerid, "rccam");
  183. KillTimer(GetPVarInt(playerid, "rccamtimer"));
  184. return 1;
  185. }
  186. SendClientMessageEx(playerid, COLOR_GRAD1, "You don't have an RC Cam!");
  187. }
  188. return 1;
  189. }
  190. CMD:firstaid(playerid, params[])
  191. {
  192. if(HungerPlayerInfo[playerid][hgInEvent] != 0) return SendClientMessageEx(playerid, COLOR_GREY, " You cannot do this while being in the Hunger Games Event!");
  193. if(GetPVarType(playerid, "IsInArena"))
  194. {
  195. SendClientMessageEx(playerid, COLOR_WHITE, "You can't do this while being in an arena!");
  196. return 1;
  197. }
  198. if(GetPVarInt(playerid, "Injured") == 1)
  199. {
  200. SendClientMessageEx(playerid, COLOR_WHITE, "You can't do this right now.");
  201. return 1;
  202. }
  203. if(PlayerInfo[playerid][pFirstaid] > 0)
  204. {
  205. if(GetPVarInt(playerid, "usingfirstaid") == 0)
  206. {
  207. new string[128];
  208. PlayerInfo[playerid][pFirstaid]--;
  209. SetPVarInt(playerid, "firstaid5", SetTimerEx("firstaid5", 5000, 1, "d", playerid));
  210. SetPVarInt(playerid, "firstaidexpire", SetTimerEx("firstaidexpire",10*60000, 0, "d", playerid));
  211. SetPVarInt(playerid, "usingfirstaid", 1);
  212. format(string, sizeof(string), "* %s uses a first aid kit.", GetPlayerNameEx(playerid));
  213. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  214. }
  215. else
  216. {
  217. SendClientMessageEx(playerid, COLOR_GRAD1, "You're already using first aid!");
  218. }
  219. }
  220. else
  221. {
  222. SendClientMessageEx(playerid, COLOR_GRAD1, "You don't have a first aid kit!");
  223. }
  224. return 1;
  225. }
  226. CMD:sweep(playerid, params[])
  227. {
  228. if(PlayerInfo[playerid][pSweep] > 0)
  229. {
  230. if(PlayerInfo[playerid][pSweepLeft] > 0)
  231. {
  232. new string[128], giveplayerid;
  233. if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /sweep [player]");
  234. if(!ProxDetectorS(4.0, playerid, giveplayerid)) return SendClientMessageEx(playerid, COLOR_GRAD1, "You need to be close to the person.");
  235. PlayerInfo[playerid][pSweepLeft]--;
  236. format(string, sizeof(string), "* %s sweeps a large wand around %s's body...", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  237. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  238. if(PlayerInfo[giveplayerid][pBugged] != INVALID_GROUP_ID)
  239. {
  240. format(string, sizeof(string), "* A small spark is seen as the bug on %s shorts out.", GetPlayerNameEx(giveplayerid));
  241. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  242. format(string, sizeof(string), "(bug) %s: *static*", GetPlayerNameEx(giveplayerid));
  243. SendBugMessage(giveplayerid, PlayerInfo[giveplayerid][pBugged], string);
  244. PlayerInfo[giveplayerid][pBugged] = INVALID_GROUP_ID;
  245. }
  246. else
  247. {
  248. ProxDetector(30.0, playerid, "Nothing happens.", COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  249. }
  250. }
  251. else
  252. {
  253. SendClientMessageEx(playerid, COLOR_GRAD1, "Your Bug Sweeper has ran out of batteries!");
  254. PlayerInfo[playerid][pSweep]--;
  255. PlayerInfo[playerid][pSweepLeft] = 3;
  256. }
  257. }
  258. else
  259. {
  260. SendClientMessageEx(playerid, COLOR_GRAD1, "You don't have a bug sweep!");
  261. }
  262. return 1;
  263. }
  264. CMD:gps(playerid, params[])
  265. {
  266. if(PlayerInfo[playerid][pGPS] > 0)
  267. {
  268. new string[128];
  269. if(GetPVarInt(playerid, "gpsonoff") == 0)
  270. {
  271. format(string, sizeof(string), "* %s turns on their GPS.", GetPlayerNameEx(playerid));
  272. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  273. SetPVarInt(playerid, "gpsonoff", 1);
  274. PlayerTextDrawSetString(playerid, GPS[playerid], "Loading...");
  275. PlayerTextDrawShow(playerid, GPS[playerid]);
  276. }
  277. else
  278. {
  279. format(string, sizeof(string), "* %s turns off their GPS.", GetPlayerNameEx(playerid));
  280. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  281. DeletePVar(playerid, "gpsonoff");
  282. PlayerTextDrawHide(playerid, GPS[playerid]);
  283. }
  284. }
  285. else
  286. {
  287. SendClientMessageEx(playerid, COLOR_GRAD1, "You don't have a GPS!");
  288. }
  289. return 1;
  290. }
  291. CMD:ww(playerid, params[])
  292. {
  293. return cmd_wristwatch(playerid, params);
  294. }
  295. CMD:wristwatch(playerid, params[])
  296. {
  297. if(PlayerInfo[playerid][pWristwatch] > 0)
  298. {
  299. new string[128];
  300. if(GetPVarInt(playerid, "wristwatchonoff") == 0)
  301. {
  302. SetPVarInt(playerid, "wristwatchonoff", 1);
  303. TextDrawShowForPlayer(playerid, WristWatch);
  304. format(string, sizeof(string), "* %s turns on their wristwatch.", GetPlayerNameEx(playerid));
  305. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  306. }
  307. else
  308. {
  309. KillTimer(GetPVarInt(playerid, "wristwatchtimer"));
  310. TextDrawHideForPlayer(playerid, WristWatch);
  311. DeletePVar(playerid, "wristwatchonoff");
  312. format(string, sizeof(string), "* %s turns off their wristwatch.", GetPlayerNameEx(playerid));
  313. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  314. }
  315. }
  316. else
  317. {
  318. SendClientMessageEx(playerid, COLOR_GRAD1, "You don't have a wristwatch!");
  319. }
  320. return 1;
  321. }
  322. CMD:receiver(playerid, params[])
  323. {
  324. if(PlayerInfo[playerid][pReceiver] > 0)
  325. {
  326. if(!GetPVarType(playerid, "pReceiverOn"))
  327. {
  328. SendClientMessageEx(playerid, COLOR_YELLOW, "You've turned on your receiver.");
  329. SetPVarInt(playerid, "pReceiverOn", 1);
  330. }
  331. else
  332. {
  333. SendClientMessageEx(playerid, COLOR_YELLOW, "You've turned off your receiver.");
  334. DeletePVar(playerid, "pReceiverOn");
  335. }
  336. }
  337. else
  338. {
  339. SendClientMessageEx(playerid, COLOR_GRAD1, "You don't have a receiver.");
  340. }
  341. return 1;
  342. }
  343. CMD:smslog(playerid, params[])
  344. {
  345. if(PlayerInfo[playerid][pSmslog] > 0) GetSMSLog(playerid);
  346. else return SendClientMessageEx(playerid, COLOR_YELLOW, " You don't have a SMS log!");
  347. return 1;
  348. }
  349. CMD:craft(playerid, params[])
  350. {
  351. if(GetPVarType(playerid, "IsInArena")) return SendClientMessageEx(playerid, COLOR_WHITE, "You can't do this right now, you are in an arena!");
  352. if(HungerPlayerInfo[playerid][hgInEvent] != 0) return SendClientMessageEx(playerid, COLOR_GREY, " You cannot do this while being in the Hunger Games Event!");
  353. if (PlayerInfo[playerid][pJob] != 18 && PlayerInfo[playerid][pJob2] != 18 && PlayerInfo[playerid][pJob3] != 18)
  354. {
  355. SendClientMessageEx(playerid,COLOR_GREY," You are not a Craftsman!");
  356. return 1;
  357. }
  358. if (PlayerInfo[playerid][pJailTime] > 0)
  359. {
  360. SendClientMessageEx(playerid,COLOR_GREY," You can not make things while in jail or prison!");
  361. return 1;
  362. }
  363. new string[128];
  364. if (GetPVarInt(playerid, "ArmsTimer") > 0)
  365. {
  366. format(string, sizeof(string), " You must wait %d seconds before crafting again.", GetPVarInt(playerid, "ArmsTimer"));
  367. SendClientMessageEx(playerid,COLOR_GREY,string);
  368. return 1;
  369. }
  370. if(PlayerInfo[playerid][pHospital] > 0)
  371. {
  372. SendClientMessageEx(playerid, COLOR_GREY, "You can't craft while in the Hospital.");
  373. return 1;
  374. }
  375. new giveplayerid, choice[32], weapon, price;
  376. if(sscanf(params, "us[32]", giveplayerid, choice))
  377. {
  378. SendClientMessageEx(playerid, COLOR_GREEN, "________________________________________________");
  379. SendClientMessageEx(playerid, COLOR_YELLOW, "<< Available crafts >>");
  380. SendClientMessageEx(playerid, COLOR_GRAD1, "screwdriver(1,000) smslog(2,000)");
  381. SendClientMessageEx(playerid, COLOR_GRAD2, "wristwatch(500) surveillance(8,000)");
  382. SendClientMessageEx(playerid, COLOR_GRAD1, "tire(250) lock(500)");
  383. SendClientMessageEx(playerid, COLOR_GRAD2, "firstaid(1,000) camera(250)");
  384. SendClientMessageEx(playerid, COLOR_GRAD1, "rccam(8,000) receiver(5,000)");
  385. SendClientMessageEx(playerid, COLOR_GRAD2, "gps(1,000) bugsweep(10,000)");
  386. //SendClientMessageEx(playerid, COLOR_GRAD1, "parachute(50) bag(6000)");
  387. SendClientMessageEx(playerid, COLOR_GRAD1, "parachute(50) mailbox(15,000)");
  388. SendClientMessageEx(playerid, COLOR_GRAD2, "metaldetector(12,500) syringe(500)");
  389. SendClientMessageEx(playerid, COLOR_GRAD1, "closet(3,000) toolbox(12,000)");
  390. SendClientMessageEx(playerid, COLOR_GRAD2, "crowbar(7,000) flowers(25)");
  391. SendClientMessageEx(playerid, COLOR_GRAD1, "knuckles(100) baseballbat(100)");
  392. SendClientMessageEx(playerid, COLOR_GRAD2, "cane (100) shovel(100)");
  393. SendClientMessageEx(playerid, COLOR_GRAD1, "poolcue (100) katana(300)");
  394. SendClientMessageEx(playerid, COLOR_GRAD2, "dildo (300) spraycan(2000)");
  395. SendClientMessageEx(playerid, COLOR_GRAD2, "rimkit (400000)");
  396. SendClientMessageEx(playerid, COLOR_GREEN, "________________________________________________");
  397. SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /craft [player] [craftname]");
  398. return 1;
  399. }
  400. if(IsPlayerConnected(giveplayerid))
  401. {
  402. if(HungerPlayerInfo[giveplayerid][hgInEvent] != 0) return SendClientMessageEx(playerid, COLOR_GREY, " This person is not able to receive anything at the moment.");
  403. if(isnull(choice))
  404. {
  405. SendClientMessageEx(playerid, COLOR_GREEN, "________________________________________________");
  406. SendClientMessageEx(playerid, COLOR_YELLOW, "<< Available crafts >>");
  407. SendClientMessageEx(playerid, COLOR_GRAD1, "screwdriver(1,000) smslog(2,000)");
  408. SendClientMessageEx(playerid, COLOR_GRAD2, "wristwatch(500) surveillance(8,000)");
  409. SendClientMessageEx(playerid, COLOR_GRAD1, "tire(250) lock(500)");
  410. SendClientMessageEx(playerid, COLOR_GRAD2, "firstaid(1,000) camera(250)");
  411. SendClientMessageEx(playerid, COLOR_GRAD1, "rccam(8,000) receiver(5,000)");
  412. SendClientMessageEx(playerid, COLOR_GRAD2, "gps(1,000) bugsweep(10,000)");
  413. //SendClientMessageEx(playerid, COLOR_GRAD1, "parachute(50) bag(6000)");
  414. SendClientMessageEx(playerid, COLOR_GRAD1, "parachute(50) mailbox(15,000)");
  415. SendClientMessageEx(playerid, COLOR_GRAD2, "metaldetector(12,500) syringe(500)");
  416. SendClientMessageEx(playerid, COLOR_GRAD1, "closet(3,000) toolbox(12,000)");
  417. SendClientMessageEx(playerid, COLOR_GRAD2, "crowbar(7,000) flowers(25)");
  418. SendClientMessageEx(playerid, COLOR_GRAD1, "knuckles(100) baseballbat(100)");
  419. SendClientMessageEx(playerid, COLOR_GRAD2, "cane (100) shovel(100)");
  420. SendClientMessageEx(playerid, COLOR_GRAD1, "poolcue (100) katana(300)");
  421. SendClientMessageEx(playerid, COLOR_GRAD2, "dildo (300) spraycan(2000)");
  422. SendClientMessageEx(playerid, COLOR_GRAD2, "rimkit (400000)");
  423. SendClientMessageEx(playerid, COLOR_GREEN, "________________________________________________");
  424. SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /craft [player] [craftname]");
  425. return 1;
  426. }
  427. /*if(strcmp(choice,"bag",true) == 0)
  428. {
  429. if(PlayerInfo[playerid][pMats] >= 6000)
  430. {
  431. price = 6000;
  432. weapon = 14;
  433. }
  434. else
  435. {
  436. SendClientMessageEx(playerid,COLOR_GREY," Not enough Materials for that!");
  437. return 1;
  438. }
  439. }*/
  440. if(strcmp(choice, "screwdriver", true) == 0)
  441. {
  442. if(PlayerInfo[playerid][pMats] >= 1000)
  443. {
  444. price = 1000;
  445. weapon = 1;
  446. }
  447. else
  448. {
  449. SendClientMessageEx(playerid,COLOR_GREY," Not enough Materials for that!");
  450. return 1;
  451. }
  452. }
  453. else if(strcmp(choice, "smslog", true) == 0)
  454. {
  455. if(PlayerInfo[playerid][pMats] >= 2000)
  456. {
  457. price = 2000;
  458. weapon = 2;
  459. }
  460. else
  461. {
  462. SendClientMessageEx(playerid,COLOR_GREY," Not enough Materials for that!");
  463. return 1;
  464. }
  465. }
  466. else if(strcmp(choice, "wristwatch", true) == 0)
  467. {
  468. if(PlayerInfo[playerid][pMats] >= 500)
  469. {
  470. price = 500;
  471. weapon = 3;
  472. }
  473. else
  474. {
  475. SendClientMessageEx(playerid,COLOR_GREY," Not enough Materials for that!");
  476. return 1;
  477. }
  478. }
  479. else if(strcmp(choice, "surveillance", true) == 0)
  480. {
  481. if(PlayerInfo[playerid][pMats] >= 8000)
  482. {
  483. price = 8000;
  484. weapon = 4;
  485. }
  486. else
  487. {
  488. SendClientMessageEx(playerid,COLOR_GREY," Not enough Materials for that!");
  489. return 1;
  490. }
  491. }
  492. else if(strcmp(choice, "tire", true) == 0)
  493. {
  494. if(PlayerInfo[playerid][pMats] >= 250)
  495. {
  496. price = 250;
  497. weapon = 5;
  498. }
  499. else
  500. {
  501. SendClientMessageEx(playerid,COLOR_GREY," Not enough Materials for that!");
  502. return 1;
  503. }
  504. }
  505. else if(strcmp(choice, "lock", true) == 0)
  506. {
  507. if(PlayerInfo[playerid][pMats] >= 500)
  508. {
  509. price = 500;
  510. weapon = 6;
  511. }
  512. else
  513. {
  514. SendClientMessageEx(playerid,COLOR_GREY," Not enough Materials for that!");
  515. return 1;
  516. }
  517. }
  518. else if(strcmp(choice, "firstaid", true) == 0)
  519. {
  520. if(PlayerInfo[playerid][pMats] >= 1000)
  521. {
  522. price = 1000;
  523. weapon = 7;
  524. }
  525. else
  526. {
  527. SendClientMessageEx(playerid,COLOR_GREY," Not enough Materials for that!");
  528. return 1;
  529. }
  530. }
  531. else if(strcmp(choice,"camera",true) == 0)
  532. {
  533. if(PlayerInfo[playerid][pMats] >= 250)
  534. {
  535. price = 250;
  536. weapon = 8;
  537. }
  538. else
  539. {
  540. SendClientMessageEx(playerid,COLOR_GREY," Not enough Materials for that!");
  541. return 1;
  542. }
  543. }
  544. else if(strcmp(choice,"rccam",true) == 0)
  545. {
  546. if(PlayerInfo[playerid][pMats] >= 8000)
  547. {
  548. price = 8000;
  549. weapon = 9;
  550. }
  551. else
  552. {
  553. SendClientMessageEx(playerid,COLOR_GREY," Not enough Materials for that!");
  554. return 1;
  555. }
  556. }
  557. else if(strcmp(choice,"receiver",true) == 0)
  558. {
  559. if(PlayerInfo[playerid][pMats] >= 5000)
  560. {
  561. price = 5000;
  562. weapon = 10;
  563. }
  564. else
  565. {
  566. SendClientMessageEx(playerid,COLOR_GREY," Not enough Materials for that!");
  567. return 1;
  568. }
  569. }
  570. else if(strcmp(choice,"gps",true) == 0)
  571. {
  572. if(PlayerInfo[playerid][pMats] >= 1000)
  573. {
  574. price = 1000;
  575. weapon = 11;
  576. }
  577. else
  578. {
  579. SendClientMessageEx(playerid,COLOR_GREY," Not enough Materials for that!");
  580. return 1;
  581. }
  582. }
  583. else if(strcmp(choice,"bugsweep",true) == 0)
  584. {
  585. if(PlayerInfo[playerid][pMats] >= 10000)
  586. {
  587. price = 10000;
  588. weapon = 12;
  589. }
  590. else
  591. {
  592. SendClientMessageEx(playerid,COLOR_GREY," Not enough Materials for that!");
  593. return 1;
  594. }
  595. }
  596. else if(strcmp(choice,"parachute",true) == 0)
  597. {
  598. if(PlayerInfo[playerid][pMats] >= 50)
  599. {
  600. price = 50;
  601. weapon = 13;
  602. }
  603. else
  604. {
  605. SendClientMessageEx(playerid,COLOR_GREY," Not enough Materials for that!");
  606. return 1;
  607. }
  608. }
  609. else if(strcmp(choice,"metaldetector",true) == 0)
  610. {
  611. /*if(PlayerInfo[playerid][pMats] >= 12500)
  612. {
  613. price = 12500;
  614. weapon = 14;
  615. }
  616. else
  617. {
  618. SendClientMessageEx(playerid,COLOR_GREY," Not enough Materials for that!");
  619. return 1;
  620. }*/
  621. return SendClientMessageEx(playerid, COLOR_WHITE, "You cannot craft this right now!");
  622. }
  623. else if(strcmp(choice,"mailbox",true) == 0)
  624. {
  625. if(PlayerInfo[playerid][pMats] >= 15000)
  626. {
  627. price = 15000;
  628. weapon = 15;
  629. }
  630. else
  631. {
  632. SendClientMessageEx(playerid,COLOR_GREY," Not enough Materials for that!");
  633. return 1;
  634. }
  635. }
  636. else if(strcmp(choice,"syringe",true) == 0)
  637. {
  638. if(PlayerInfo[playerid][pMats] >= 500)
  639. {
  640. price = 500;
  641. weapon = 16;
  642. }
  643. else
  644. {
  645. SendClientMessageEx(playerid,COLOR_GREY," Not enough Materials for that!");
  646. return 1;
  647. }
  648. }
  649. else if(strcmp(choice,"closet",true) == 0)
  650. {
  651. if(PlayerInfo[playerid][pMats] >= 3000)
  652. {
  653. price = 3000;
  654. weapon = 17;
  655. }
  656. else
  657. {
  658. SendClientMessageEx(playerid,COLOR_GREY," Not enough Materials for that!");
  659. return 1;
  660. }
  661. }
  662. else if(strcmp(choice,"toolbox",true) == 0)
  663. {
  664. if(PlayerInfo[playerid][pMats] >= 12000)
  665. {
  666. price = 12000;
  667. weapon = 18;
  668. }
  669. else
  670. {
  671. SendClientMessageEx(playerid,COLOR_GREY," Not enough Materials for that!");
  672. return 1;
  673. }
  674. }
  675. else if(strcmp(choice,"crowbar",true) == 0)
  676. {
  677. if(PlayerInfo[playerid][pMats] >= 7000)
  678. {
  679. price = 7000;
  680. weapon = 19;
  681. }
  682. else
  683. {
  684. SendClientMessageEx(playerid,COLOR_GREY," Not enough Materials for that!");
  685. return 1;
  686. }
  687. }
  688. /*
  689. // added post ammo release
  690. flowers (25)
  691. knuckles (100)
  692. baseballbat (100)
  693. cane (100)
  694. shovel (100)
  695. poolcue (100)
  696. katana (300)
  697. dildo (300)
  698. */
  699. else if(strcmp(choice, "flowers", true) == 0) {
  700. if(PlayerInfo[playerid][pMats] >= 25) {
  701. price = 25;
  702. weapon = 20;
  703. }
  704. else return SendClientMessageEx(playerid, COLOR_GREY, " Not enough materials for that!");
  705. }
  706. else if(strcmp(choice, "knuckles", true) == 0) {
  707. if(PlayerInfo[playerid][pMats] >= 100) {
  708. price = 100;
  709. weapon = 21;
  710. }
  711. else return SendClientMessageEx(playerid, COLOR_GREY, " Not enough materials for that!");
  712. }
  713. else if(strcmp(choice, "baseballbat", true) == 0) {
  714. if(PlayerInfo[playerid][pMats] >= 100) {
  715. price = 100;
  716. weapon = 22;
  717. }
  718. else return SendClientMessageEx(playerid, COLOR_GREY, " Not enough materials for that!");
  719. }
  720. else if(strcmp(choice, "cane", true) == 0) {
  721. if(PlayerInfo[playerid][pMats] >= 100) {
  722. price = 100;
  723. weapon = 23;
  724. }
  725. else return SendClientMessageEx(playerid, COLOR_GREY, " Not enough materials for that!");
  726. }
  727. else if(strcmp(choice, "shovel", true) == 0) {
  728. if(PlayerInfo[playerid][pMats] >= 100) {
  729. price = 100;
  730. weapon = 24;
  731. }
  732. else return SendClientMessageEx(playerid, COLOR_GREY, " Not enough materials for that!");
  733. }
  734. else if(strcmp(choice, "poolcue", true) == 0) {
  735. if(PlayerInfo[playerid][pMats] >= 100) {
  736. price = 100;
  737. weapon = 25;
  738. }
  739. else return SendClientMessageEx(playerid, COLOR_GREY, " Not enough materials for that!");
  740. }
  741. else if(strcmp(choice, "katana", true) == 0) {
  742. if(PlayerInfo[playerid][pMats] >= 300) {
  743. price = 300;
  744. weapon = 26;
  745. }
  746. else return SendClientMessageEx(playerid, COLOR_GREY, " Not enough materials for that!");
  747. }
  748. else if(strcmp(choice, "dildo", true) == 0) {
  749. if(PlayerInfo[playerid][pMats] >= 300) {
  750. price = 300;
  751. weapon = 27;
  752. }
  753. else return SendClientMessageEx(playerid, COLOR_GREY, " Not enough materials for that!");
  754. }
  755. else if(strcmp(choice, "spraycan", true) == 0) {
  756. if(PlayerInfo[playerid][pMats] >= 2000) {
  757. price = 2000;
  758. weapon = 28;
  759. }
  760. else return SendClientMessageEx(playerid, COLOR_GREY, " Not enough materials for that!");
  761. }
  762. else if(strcmp(choice, "rimkit", true) == 0) {
  763. if(PlayerInfo[playerid][pMats] >= 400000) {
  764. price = 400000;
  765. weapon = 29;
  766. }
  767. else return SendClientMessageEx(playerid, COLOR_GREY, " Not enough materials for that!");
  768. }
  769. else { SendClientMessageEx(playerid,COLOR_GREY," Invalid Craft name!"); return 1; }
  770. if (ProxDetectorS(5.0, playerid, giveplayerid))
  771. {
  772. if(weapon == 17)
  773. {
  774. if(PlayerInfo[giveplayerid][pPhousekey] == INVALID_HOUSE_ID && PlayerInfo[giveplayerid][pPhousekey2] == INVALID_HOUSE_ID && PlayerInfo[giveplayerid][pPhousekey3] == INVALID_HOUSE_ID)
  775. {
  776. if(giveplayerid == playerid) return SendClientMessageEx(playerid, COLOR_GREY, "You don't own a house!");
  777. else
  778. {
  779. SendClientMessageEx(playerid, COLOR_GREY, "They don't own a house!");
  780. SendClientMessageEx(giveplayerid, COLOR_GREY, "You don't own a house!");
  781. }
  782. }
  783. }
  784. if(giveplayerid == playerid)
  785. {
  786. if(weapon != 16 && weapon != 17)
  787. {
  788. PlayerInfo[playerid][pMats] -= price;
  789. }
  790. switch(weapon)
  791. {
  792. case 1:
  793. {
  794. PlayerInfo[playerid][pScrewdriver]++;
  795. SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, "/sellgun");
  796. }
  797. case 2:
  798. {
  799. PlayerInfo[playerid][pSmslog]++;
  800. SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, "/smslog");
  801. }
  802. case 3:
  803. {
  804. PlayerInfo[playerid][pWristwatch]++;
  805. SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, "/wristwatch");
  806. }
  807. case 4:
  808. {
  809. PlayerInfo[playerid][pSurveillance]++;
  810. SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, "/(p)lace(c)amera /(s)ee(c)amera /(d)estroy(c)amera");
  811. }
  812. case 5:
  813. {
  814. PlayerInfo[playerid][pTire]++;
  815. SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, "/repair");
  816. }
  817. case 6:
  818. {
  819. PlayerInfo[playerid][pLock]=1;
  820. SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, "/lock");
  821. }
  822. case 7:
  823. {
  824. PlayerInfo[playerid][pFirstaid]++;
  825. SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, "/firstaid");
  826. }
  827. case 8:
  828. {
  829. GivePlayerValidWeapon(playerid, 43);
  830. }
  831. case 9:
  832. {
  833. PlayerInfo[playerid][pRccam]++;
  834. SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, "/rccam");
  835. }
  836. case 10:
  837. {
  838. PlayerInfo[playerid][pReceiver]++;
  839. SetPVarInt(playerid, "pReceiverMLeft", 4);
  840. SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, "You will receive the next four department radio messages.");
  841. }
  842. case 11:
  843. {
  844. PlayerInfo[playerid][pGPS] = 1;
  845. SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, "/gps");
  846. }
  847. case 12:
  848. {
  849. PlayerInfo[playerid][pSweep]++;
  850. PlayerInfo[playerid][pSweepLeft] = 3;
  851. SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, "/sweep");
  852. }
  853. case 13:
  854. {
  855. GivePlayerValidWeapon(playerid, 46);
  856. }
  857. case 14:
  858. {
  859. if(PlayerInfo[playerid][pTreasureSkill] >=0 && PlayerInfo[playerid][pTreasureSkill] <= 24) PlayerInfo[playerid][pMetalDetector] += 25;
  860. else if(PlayerInfo[playerid][pTreasureSkill] >=25 && PlayerInfo[playerid][pTreasureSkill] <= 149) PlayerInfo[playerid][pMetalDetector] += 50;
  861. else if(PlayerInfo[playerid][pTreasureSkill] >=150 && PlayerInfo[playerid][pTreasureSkill] <= 299) PlayerInfo[playerid][pMetalDetector] += 75;
  862. else if(PlayerInfo[playerid][pTreasureSkill] >=300 && PlayerInfo[playerid][pTreasureSkill] <= 599) PlayerInfo[playerid][pMetalDetector] += 100;
  863. else if(PlayerInfo[playerid][pTreasureSkill] >=600) PlayerInfo[playerid][pMetalDetector] += 125;
  864. SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, "/search");
  865. }
  866. case 15:
  867. {
  868. PlayerInfo[playerid][pMailbox]++;
  869. SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, "Type /placemailbox where you want mailbox to be at.");
  870. }
  871. case 16:
  872. {
  873. if(PlayerInfo[playerid][pSyringes] < 3)
  874. {
  875. PlayerInfo[playerid][pMats] -= price;
  876. PlayerInfo[playerid][pSyringes]++;
  877. SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, "/usedrug heroin");
  878. }
  879. else
  880. {
  881. return SendClientMessageEx(playerid, COLOR_GREY, "You can't hold anymore syringes.");
  882. }
  883. }
  884. case 17:
  885. {
  886. if(GetPlayerVirtualWorld(playerid) == HouseInfo[PlayerInfo[playerid][pPhousekey]][hIntVW] && GetPlayerInterior(playerid) == HouseInfo[PlayerInfo[playerid][pPhousekey]][hIntIW])
  887. {
  888. if(IsPlayerInRangeOfPoint(playerid, 50.0, HouseInfo[PlayerInfo[playerid][pPhousekey]][hInteriorX], HouseInfo[PlayerInfo[playerid][pPhousekey]][hInteriorY], HouseInfo[PlayerInfo[playerid][pPhousekey]][hInteriorZ]))
  889. {
  890. GetPlayerPos(playerid, HouseInfo[PlayerInfo[playerid][pPhousekey]][hClosetX], HouseInfo[PlayerInfo[playerid][pPhousekey]][hClosetY], HouseInfo[PlayerInfo[playerid][pPhousekey]][hClosetZ]);
  891. if(IsValidDynamic3DTextLabel(HouseInfo[PlayerInfo[playerid][pPhousekey]][hClosetTextID])) DestroyDynamic3DTextLabel(Text3D:HouseInfo[PlayerInfo[playerid][pPhousekey]][hClosetTextID]);
  892. HouseInfo[PlayerInfo[playerid][pPhousekey]][hClosetTextID] = CreateDynamic3DTextLabel("Closet\n/closet to use", 0xFFFFFF88, HouseInfo[PlayerInfo[playerid][pPhousekey]][hClosetX], HouseInfo[PlayerInfo[playerid][pPhousekey]][hClosetY], HouseInfo[PlayerInfo[playerid][pPhousekey]][hClosetZ]+0.5,10.0, .testlos = 1, .worldid = HouseInfo[PlayerInfo[playerid][pPhousekey]][hIntVW], .interiorid = HouseInfo[PlayerInfo[playerid][pPhousekey]][hIntIW], .streamdistance = 10.0);
  893. SaveHouse(PlayerInfo[playerid][pPhousekey]);
  894. PlayerInfo[playerid][pMats] -= price;
  895. SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, "/closet(add/remove)");
  896. szMiscArray[0] = 0;
  897. format(szMiscArray, sizeof(szMiscArray), "%s(%d) has placed a closet for their house (House ID: %d) at X: %f | Y: %f | Z: %f", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), PlayerInfo[playerid][pPhousekey], HouseInfo[PlayerInfo[playerid][pPhousekey3]][hClosetX], HouseInfo[PlayerInfo[playerid][pPhousekey3]][hClosetY], HouseInfo[PlayerInfo[playerid][pPhousekey3]][hClosetZ]);
  898. Log("logs/house.log", szMiscArray);
  899. }
  900. else return SendClientMessageEx(playerid, COLOR_GREY, "You aren't inside of your house!");
  901. }
  902. else if(GetPlayerVirtualWorld(playerid) == HouseInfo[PlayerInfo[playerid][pPhousekey2]][hIntVW] && GetPlayerInterior(playerid) == HouseInfo[PlayerInfo[playerid][pPhousekey2]][hIntIW])
  903. {
  904. if(IsPlayerInRangeOfPoint(playerid, 50.0, HouseInfo[PlayerInfo[playerid][pPhousekey2]][hInteriorX], HouseInfo[PlayerInfo[playerid][pPhousekey2]][hInteriorY], HouseInfo[PlayerInfo[playerid][pPhousekey2]][hInteriorZ]))
  905. {
  906. GetPlayerPos(playerid, HouseInfo[PlayerInfo[playerid][pPhousekey2]][hClosetX], HouseInfo[PlayerInfo[playerid][pPhousekey2]][hClosetY], HouseInfo[PlayerInfo[playerid][pPhousekey2]][hClosetZ]);
  907. if(IsValidDynamic3DTextLabel(HouseInfo[PlayerInfo[playerid][pPhousekey2]][hClosetTextID])) DestroyDynamic3DTextLabel(Text3D:HouseInfo[PlayerInfo[playerid][pPhousekey2]][hClosetTextID]);
  908. HouseInfo[PlayerInfo[playerid][pPhousekey2]][hClosetTextID] = CreateDynamic3DTextLabel("Closet\n/closet to use", 0xFFFFFF88, HouseInfo[PlayerInfo[playerid][pPhousekey2]][hClosetX], HouseInfo[PlayerInfo[playerid][pPhousekey2]][hClosetY], HouseInfo[PlayerInfo[playerid][pPhousekey2]][hClosetZ]+0.5,10.0, .testlos = 1, .worldid = HouseInfo[PlayerInfo[playerid][pPhousekey2]][hIntVW], .interiorid = HouseInfo[PlayerInfo[playerid][pPhousekey2]][hIntIW], .streamdistance = 10.0);
  909. SaveHouse(PlayerInfo[playerid][pPhousekey2]);
  910. PlayerInfo[playerid][pMats] -= price;
  911. SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, "/closet(add/remove)");
  912. szMiscArray[0] = 0;
  913. format(szMiscArray, sizeof(szMiscArray), "%s(%d) has placed a closet for their house (House ID: %d) at X: %f | Y: %f | Z: %f", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), PlayerInfo[playerid][pPhousekey2], HouseInfo[PlayerInfo[playerid][pPhousekey3]][hClosetX], HouseInfo[PlayerInfo[playerid][pPhousekey3]][hClosetY], HouseInfo[PlayerInfo[playerid][pPhousekey3]][hClosetZ]);
  914. Log("logs/house.log", szMiscArray);
  915. }
  916. else return SendClientMessageEx(playerid, COLOR_GREY, "You aren't inside of your house!");
  917. }
  918. else if(GetPlayerVirtualWorld(playerid) == HouseInfo[PlayerInfo[playerid][pPhousekey3]][hIntVW] && GetPlayerInterior(playerid) == HouseInfo[PlayerInfo[playerid][pPhousekey3]][hIntIW])
  919. {
  920. if(IsPlayerInRangeOfPoint(playerid, 50.0, HouseInfo[PlayerInfo[playerid][pPhousekey3]][hInteriorX], HouseInfo[PlayerInfo[playerid][pPhousekey3]][hInteriorY], HouseInfo[PlayerInfo[playerid][pPhousekey3]][hInteriorZ]))
  921. {
  922. GetPlayerPos(playerid, HouseInfo[PlayerInfo[playerid][pPhousekey3]][hClosetX], HouseInfo[PlayerInfo[playerid][pPhousekey3]][hClosetY], HouseInfo[PlayerInfo[playerid][pPhousekey3]][hClosetZ]);
  923. if(IsValidDynamic3DTextLabel(HouseInfo[PlayerInfo[playerid][pPhousekey3]][hClosetTextID])) DestroyDynamic3DTextLabel(Text3D:HouseInfo[PlayerInfo[playerid][pPhousekey3]][hClosetTextID]);
  924. HouseInfo[PlayerInfo[playerid][pPhousekey3]][hClosetTextID] = CreateDynamic3DTextLabel("Closet\n/closet to use", 0xFFFFFF88, HouseInfo[PlayerInfo[playerid][pPhousekey3]][hClosetX], HouseInfo[PlayerInfo[playerid][pPhousekey3]][hClosetY], HouseInfo[PlayerInfo[playerid][pPhousekey3]][hClosetZ]+0.5,10.0, .testlos = 1, .worldid = HouseInfo[PlayerInfo[playerid][pPhousekey3]][hIntVW], .interiorid = HouseInfo[PlayerInfo[playerid][pPhousekey3]][hIntIW], .streamdistance = 10.0);
  925. SaveHouse(PlayerInfo[playerid][pPhousekey3]);
  926. PlayerInfo[playerid][pMats] -= price;
  927. SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, "/closet(add/remove)");
  928. szMiscArray[0] = 0;
  929. format(szMiscArray, sizeof(szMiscArray), "%s(%d) has placed a closet for their house (House ID: %d) at X: %f | Y: %f | Z: %f", GetPlayerNameEx(playerid), GetPlayerSQLId(playerid), PlayerInfo[playerid][pPhousekey3], HouseInfo[PlayerInfo[playerid][pPhousekey3]][hClosetX], HouseInfo[PlayerInfo[playerid][pPhousekey3]][hClosetY], HouseInfo[PlayerInfo[playerid][pPhousekey3]][hClosetZ]);
  930. Log("logs/house.log", szMiscArray);
  931. }
  932. else return SendClientMessageEx(playerid, COLOR_GREY, "You aren't inside of your house!");
  933. }
  934. else return SendClientMessageEx(playerid, COLOR_GREY, "You aren't inside of your house!");
  935. }
  936. case 18:
  937. {
  938. PlayerInfo[playerid][pToolBox] += 15;
  939. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Type /pickveh(icle) in any car to attempt to lock pick it.");
  940. }
  941. case 19:
  942. {
  943. PlayerInfo[playerid][pCrowBar] += 25;
  944. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Type /cracktrunk in any car that you already lock picked to attempt to open the trunk.");
  945. }
  946. case 20: GivePlayerValidWeapon(playerid, WEAPON_FLOWER);
  947. case 21: GivePlayerValidWeapon(playerid, WEAPON_BRASSKNUCKLE);
  948. case 22: GivePlayerValidWeapon(playerid, WEAPON_BAT);
  949. case 23: GivePlayerValidWeapon(playerid, WEAPON_CANE);
  950. case 24: GivePlayerValidWeapon(playerid, WEAPON_SHOVEL);
  951. case 25: GivePlayerValidWeapon(playerid, WEAPON_POOLSTICK);
  952. case 26: GivePlayerValidWeapon(playerid, WEAPON_KATANA);
  953. case 27: GivePlayerValidWeapon(playerid, WEAPON_DILDO);
  954. case 28: GivePlayerValidWeapon(playerid, WEAPON_SPRAYCAN);
  955. case 29: {
  956. PlayerInfo[playerid][pRimMod]++;
  957. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "Type /userimkit as a mechanic in any car to modify your rims.");
  958. }
  959. }
  960. format(string, sizeof(string), " You have given yourself a %s.", choice);
  961. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  962. SendClientMessageEx(playerid, COLOR_GRAD1, string);
  963. PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
  964. switch( PlayerInfo[playerid][pSex] )
  965. {
  966. case 1: format(string, sizeof(string), "* %s created something from Materials, and hands it to himself.", GetPlayerNameEx(playerid));
  967. case 2: format(string, sizeof(string), "* %s created something from Materials, and hands it to herself.", GetPlayerNameEx(playerid));
  968. }
  969. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  970. return 1;
  971. }
  972. format(string, sizeof(string), "* You offered %s to buy a %s.", GetPlayerNameEx(giveplayerid), choice);
  973. SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
  974. format(string, sizeof(string), "* Craftsman %s wants to sell you a %s, (type /accept craft) to buy.", GetPlayerNameEx(playerid), choice);
  975. SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
  976. CraftOffer[giveplayerid] = playerid;
  977. CraftId[giveplayerid] = weapon;
  978. CraftMats[giveplayerid] = price;
  979. format(CraftName[giveplayerid], 50, "%s", choice);
  980. if(PlayerInfo[playerid][pAdmin] < 3)
  981. {
  982. SetPVarInt(playerid, "ArmsTimer", 10); SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_ARMSTIMER);
  983. }
  984. return 1;
  985. }
  986. else
  987. {
  988. SendClientMessageEx(playerid, COLOR_GREY, "That person isn't near you.");
  989. return 1;
  990. }
  991. }
  992. else
  993. {
  994. SendClientMessageEx(playerid, COLOR_GRAD1, "Invalid player specified.");
  995. return 1;
  996. }
  997. }