Advertisement
Guest User

AHouse.pwn

a guest
Nov 27th, 2016
549
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.75 KB | None | 0 0
  1. /**************************************************************************/
  2. // Admin House
  3. /*************************************************************************/
  4. /**************************************************************************/
  5. // Version 1.0 | Build 1
  6. /*************************************************************************/
  7. /**
  8. * Copyright (c) 2015-2016 San Andreas Playground
  9. *
  10. * This program is free software: you can redistribute it and/or modify it under the terms of the
  11. * GNU General Public License as published by the Free Software Foundation, either version 3 of the
  12. * License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
  15. * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. * General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License along with this program.
  19. * If not, see <http://www.gnu.org/licenses/>.
  20. */
  21.  
  22. /*AUTHOR ********************
  23. @Yaa - SA-MP Lead Scripter
  24. ***************************/
  25.  
  26. // Includes ========================================================================================
  27.  
  28. #include <a_samp>
  29. #include <zcmd>
  30. #include <streamer>
  31.  
  32. // Defines ========================================================================================
  33.  
  34. #define SERVERNAME "San Andreas Playground"
  35.  
  36. #define R "{F81414}"
  37. #define O "{FFAF00}"
  38. #define YE "{FFFF00}"
  39. #define GRI "{C0C0C0}"
  40. #define COLOR_GREEN 0x33AA33AA
  41.  
  42. #if !defined isnull
  43. #define isnull(%1) ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
  44. #endif
  45.  
  46. // Variables & Forwards ============================================================================
  47.  
  48. new Gate;
  49. new AHCP[4];
  50. new Material[2];
  51. new Pick[9];
  52. new PropTycoon[MAX_PLAYERS];
  53. new AudioDJ[MAX_PLAYERS];
  54.  
  55. forward GateTimer();
  56. forward PropTimer(playerid);
  57. forward OnDJUpdate(playerid);
  58.  
  59. // Script =========================================================================================
  60.  
  61. public OnFilterScriptInit()
  62. {
  63. print("****************************************");
  64. print("----------------------------------------");
  65. print(" ADMIN HOUSE BY Yaa ");
  66. print("----------------------------------------");
  67. print("****************************************");
  68. print("----------------------------------------");
  69. print(" VERSION : 1.0 ");
  70. print("----------------------------------------");
  71. print("****************************************");
  72. print("----------------------------------------");
  73. print(" LOADED ! ");
  74. print("----------------------------------------");
  75. print("****************************************");
  76.  
  77. SetTimer("PropTimer", 180000, true);
  78. SetTimer("OnDJUpdate", 1000, true);
  79.  
  80. AHCP[0] = CreateDynamicCP(2286.8909, 607.1381, 10.8203, 4.0, -1, -1,-1, 100.0);
  81. AHCP[1] = CreateDynamicCP(2295.1748, 598.6633, 10.8871, 4.0, -1, -1,-1, 100.0);
  82. AHCP[2] = CreateDynamicCP(2303.3950, 568.3408, 11.4777, 5.0, -1, -1,-1, 100.0);
  83. AHCP[3] = CreateDynamicCP(969.3793, -48.8615, 1001.1172, 2.0, -1, -1,-1, 100.0);
  84.  
  85. Create3DTextLabel(""R"[Open The Gate]", 0xF67E0FF, 2295.1748, 598.6633, 10.8871 + 0.75, 50.0, 0, 0);
  86. Create3DTextLabel(""R"[Open The Gate]", 0xF67E0FF, 2286.8909, 607.1381, 10.8203 + 0.75, 50.0, 0, 0);
  87. Create3DTextLabel(""R"[Some Drunk ?]", 0xF67E0FF, 2303.3950, 568.3408, 11.4777 + 0.75, 50.0, 0, 0);
  88. Create3DTextLabel(""R"[Some Drunk ?]", 0xF67E0FF, 969.3793, -48.8615, 1001.1172 + 0.75, 50.0, 0, 0);
  89.  
  90. Pick[0] = CreatePickup(1318, 2, 2272.5313, 566.2311, 12.8723, -1); // In House/
  91. Pick[1] = CreatePickup(1273, 2, 2268.5154, 566.3914, 12.8710, -1); // prop/
  92.  
  93. Pick[2] = CreatePickup(356, 2, 954.9329, -50.7714, 1001.1172, -1); // M4/
  94. Pick[3] = CreatePickup(362, 2, 951.6969, -50.7847, 1001.1172, -1); // Mini/
  95.  
  96. Pick[4] = CreatePickup(372, 2, 944.2313, -50.7664, 1001.1172, -1); // Tec9/
  97. Pick[5] = CreatePickup(1240, 2, 959.2720, -53.5876, 1001.1172, -1); // HP/
  98.  
  99. Pick[6] = CreatePickup(351, 2, 948.1009, -50.6544, 1001.1172, -1); // C-Shotgun/
  100. Pick[7] = CreatePickup(1318, 2, 965.3690, -53.2936, 1001.1246, -1); // Out House/
  101.  
  102. Pick[8] = CreatePickup(1242, 2, 959.1024, -48.3749, 1001.1172, -1); // Arm/
  103.  
  104. Create3DTextLabel(""R"[Wanna go out ?]", 0xF67E0FF, 965.3690, -53.2936, 1001.1246 + 0.75, 50.0, 0, 0);
  105. Create3DTextLabel(""R"[Admin House]", 0xF67E0FF, 2272.5313, 566.2311, 12.8723 + 0.75, 50.0, 0, 0);
  106. Create3DTextLabel(""R"[AHouse Property]", 0xF67E0FF, 2268.5154, 566.3914, 12.8710 + 0.75, 50.0, 0, 0);
  107.  
  108. CreateObject(18769, 2287.41406, 593.49615, 9.22306, 0.00000, 0.00000, 0.00000);
  109. CreateObject(18769, 2267.57739, 593.50885, 9.24390, 0.00000, 0.00000, 0.00000);
  110. CreateObject(18769, 2247.56006, 593.48297, 9.24390, 0.00000, 0.00000, 0.00000);
  111. CreateObject(18769, 2247.48901, 573.59161, 9.24390, 0.00000, 0.00000, 0.00000);
  112. CreateObject(18769, 2247.39697, 553.69458, 9.24390, 0.00000, 0.00000, 0.00000);
  113. CreateObject(18769, 2267.21021, 573.76227, 9.24390, 0.00000, 0.00000, 0.00000);
  114. CreateObject(18769, 2287.31323, 573.77570, 9.24390, 0.00000, 0.00000, 0.00000);
  115. CreateObject(18769, 2307.18140, 593.51007, 9.24390, 0.00000, 0.00000, 0.00000);
  116. CreateObject(18769, 2326.93140, 593.50330, 9.24390, 0.00000, 0.00000, 0.00000);
  117. CreateObject(18769, 2346.85229, 593.44965, 9.24390, 0.00000, 0.00000, -1.02000);
  118. CreateObject(18769, 2307.12476, 573.60931, 9.24390, 0.00000, 0.00000, 0.00000);
  119. CreateObject(18769, 2326.62305, 573.94702, 9.24390, 0.00000, 0.00000, 0.00000);
  120. CreateObject(18769, 2346.43091, 573.81006, 9.24390, 0.00000, 0.00000, 0.00000);
  121. CreateObject(18769, 2366.22363, 573.83649, 9.24390, 0.00000, 0.00000, 0.00000);
  122. CreateObject(18769, 2366.30713, 593.55310, 9.24390, 0.00000, 0.00000, 0.00000);
  123. CreateObject(18769, 2386.45483, 593.62506, 9.24390, 0.00000, 0.00000, 0.00000);
  124. CreateObject(18769, 2386.43335, 573.99255, 9.24390, 0.00000, 0.00000, 0.00000);
  125. CreateObject(18769, 2267.35059, 553.82764, 9.24390, 0.00000, 0.00000, 0.00000);
  126. CreateObject(18769, 2287.25928, 553.79565, 9.24390, 0.00000, 0.00000, 0.00000);
  127. CreateObject(18769, 2306.69409, 553.71844, 9.24390, 0.00000, 0.00000, 0.00000);
  128. CreateObject(18769, 2326.36157, 553.96759, 9.24390, 0.00000, 0.00000, 0.00000);
  129. CreateObject(18769, 2346.28320, 554.27759, 9.24390, 0.00000, 0.00000, 0.00000);
  130. CreateObject(18769, 2366.20044, 554.42090, 9.24390, 0.00000, 0.00000, 0.00000);
  131. CreateObject(18769, 2386.36060, 554.46118, 9.24390, 0.00000, 0.00000, 0.00000);
  132. CreateObject(16133, 2289.04785, 545.26080, -12.52072, 0.00000, 0.00000, -97.14001);
  133. CreateObject(16133, 2290.14087, 537.65320, -11.46871, 0.00000, 0.00000, -97.14001);
  134. CreateObject(16133, 2289.13818, 530.48547, -13.93207, 0.00000, 0.00000, -97.14001);
  135. CreateObject(16133, 2288.45386, 523.84082, -10.47248, 0.00000, 0.00000, -97.14001);
  136. CreateObject(16133, 2356.84961, 540.39856, -11.46871, 0.00000, 0.00000, -97.14001);
  137. CreateObject(16133, 2355.92285, 538.98883, -11.46871, 0.00000, 0.00000, -97.14001);
  138. CreateObject(16133, 2356.88354, 532.86493, -11.46871, 0.00000, 0.00000, -97.14001);
  139. CreateObject(16133, 2357.36182, 525.33746, -11.46871, 0.00000, 0.00000, -97.14001);
  140. CreateObject(19129, 2237.46753, 593.40411, 11.82611, -89.22000, -8.94001, -99.18001);
  141. CreateObject(19129, 2237.26758, 573.43958, 11.82611, -89.22000, -8.94001, -99.18001);
  142. CreateObject(19129, 2237.11548, 553.55188, 11.82611, -89.22000, -8.94001, -99.18001);
  143. CreateObject(19129, 2247.51001, 603.15607, 11.82611, -89.22000, -8.94001, -188.87987);
  144. CreateObject(19129, 2267.45361, 603.17096, 11.82611, -89.22000, -8.94001, -188.87987);
  145. CreateObject(19129, 2307.23340, 603.47516, 11.82611, -89.22000, -8.94001, -188.87987);
  146. CreateObject(19129, 2327.14648, 603.44525, 11.82611, -89.22000, -8.94001, -188.87987);
  147. CreateObject(19129, 2347.05151, 603.46289, 11.82611, -89.22000, -8.94001, -188.87987);
  148. CreateObject(19129, 2366.83154, 603.44446, 11.82611, -89.22000, -8.94001, -188.87987);
  149. CreateObject(19129, 2386.62305, 603.41333, 11.82611, -89.22000, -8.94001, -188.87987);
  150. CreateObject(19129, 2396.50635, 593.49481, 11.82611, -89.27999, 76.98002, -193.07974);
  151. CreateObject(19129, 2396.61450, 573.66620, 12.00707, -89.27999, 76.98002, -193.07974);
  152. CreateObject(19129, 2396.83203, 553.79407, 12.14508, -89.27999, 76.98002, -192.47961);
  153. CreateObject(5708, 2284.14307, 527.44922, 20.62795, 0.00000, 0.00000, 88.86001);
  154. CreateObject(3235, 2308.19531, 567.01825, 18.56862, 0.00000, 0.00000, 0.00000);
  155. CreateObject(3235, 2308.22192, 565.69470, 21.92703, 0.00000, 0.00000, 0.00000);
  156. CreateObject(19129, 2387.21436, 543.72546, 12.24355, -89.27999, 76.98002, -283.43958);
  157. CreateObject(19129, 2367.45435, 543.71558, 12.24355, -89.27999, 76.98002, -283.43958);
  158. CreateObject(19129, 2347.49219, 543.43817, 12.24355, -89.27999, 76.98002, -283.43958);
  159. CreateObject(19129, 2327.48340, 543.25854, 12.24355, -89.27999, 76.98002, -283.43958);
  160. CreateObject(3381, 2279.76636, 662.49042, 19.40916, 0.00000, 0.00000, 0.00000);
  161. CreateObject(18750, 2288.80493, 554.87823, 45.83255, 81.06000, -1.86000, -177.95999);
  162. CreateObject(2774, 2303.48608, 565.25372, 22.18055, -90.42004, -49.50004, -141.05998);
  163. CreateObject(4726, 2373.70825, 559.63513, 8.98374, 0.00000, 0.00000, 0.00000);
  164. CreateObject(19608, 2311.21655, 567.95654, 10.57095, 0.00000, 0.00000, -181.44000);
  165. CreateObject(2357, 2311.50684, 568.39404, 10.60618, 0.00000, 0.00000, 0.00000);
  166. CreateObject(14820, 2311.60669, 568.09222, 11.01249, 0.00000, 0.00000, 0.00000);
  167. CreateObject(16151, 2302.43262, 566.70648, 10.66941, 0.00000, 0.00000, -91.31998);
  168. CreateObject(19525, 2312.74634, 568.62579, 10.96932, 0.00000, 0.00000, 0.00000);
  169. CreateObject(19128, 2312.42139, 572.08673, 10.59662, 0.00000, 0.00000, 0.00000);
  170. CreateObject(19128, 2308.47168, 572.11829, 10.59662, 0.00000, 0.00000, 0.00000);
  171. CreateObject(19128, 2308.51733, 576.04498, 10.66716, 0.54000, 0.00000, -1.14000);
  172. CreateObject(19128, 2312.45605, 576.05646, 10.66716, 0.54000, 0.00000, -1.14000);
  173. CreateObject(19126, 2297.21143, 604.73682, 11.38630, 0.00000, 0.00000, 0.00000);
  174. CreateObject(19125, 2277.68774, 605.59125, 11.52202, 0.00000, 0.00000, 0.00000);
  175. CreateObject(3749, 2287.30615, 601.69061, 15.73635, 0.00000, 0.00000, 0.00000);
  176.  
  177. AddStaticVehicle(400,2392.8188,596.7346,11.0004,267.3526,113,1); //
  178. AddStaticVehicle(411,2392.3850,592.0210,10.6350,268.1196,64,1); //
  179. AddStaticVehicle(411,2392.4087,585.2180,10.6350,268.5349,64,1); //
  180. AddStaticVehicle(411,2378.4189,599.4998,10.6350,3.5713,64,1); //
  181. AddStaticVehicle(411,2370.0293,599.9122,10.6351,0.1222,64,1); //
  182. AddStaticVehicle(411,2335.4807,577.0782,10.6350,92.4285,64,1); //
  183. AddStaticVehicle(411,2340.9902,558.7956,10.6351,311.3929,64,1); //
  184. AddStaticVehicle(411,2286.2559,570.4310,11.1275,1.4054,64,1); //
  185. AddStaticVehicle(411,2255.9441,569.6462,11.1232,357.0736,64,1); //
  186.  
  187. Material[0] = CreateObject(7912, 2270.11206, 569.69958, 18.64508, 0.00000, 0.00000, -180.84007);
  188. Material[1] = CreateObject(7912, 2268.12622, 603.17303, 17.93111, 0.00000, 0.00000, -180.84007);
  189. Gate = CreateObject(19313, 2286.55200, 603.00012, 12.55811, 0.00000, 0.00000, 0.00000);
  190. CreateObject(19893, 2294.58667, 599.31744, 11.05213, 0.00000, 0.00000, 0.00000);
  191. SetObjectMaterialText(Material[0], ""R""SERVERNAME" \n"O"Admin House \n"YE" Have Fun !", 0, OBJECT_MATERIAL_SIZE_512x128, "Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
  192. SetObjectMaterialText(Material[1], ""R""SERVERNAME" \n"O"Admin House \n"YE" STAFF Only !", 0, OBJECT_MATERIAL_SIZE_512x128, "Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
  193.  
  194. return 1;
  195. }
  196.  
  197. public OnPlayerConnect(playerid)
  198. {
  199.  
  200. AudioDJ[playerid] = 0;
  201. PropTycoon[playerid] = 0;
  202.  
  203. RemoveBuildingForPlayer(playerid, 8969, 2071.6250, 702.8906, 22.0078, 0.25);
  204. RemoveBuildingForPlayer(playerid, 3459, 2257.3750, 623.4297, 17.2969, 0.25);
  205. RemoveBuildingForPlayer(playerid, 1350, 2277.2578, 627.6719, 9.8125, 0.25);
  206. RemoveBuildingForPlayer(playerid, 1350, 2297.5000, 638.7891, 9.7422, 0.25);
  207. RemoveBuildingForPlayer(playerid, 1350, 2281.8125, 643.3359, 9.7891, 0.25);
  208. RemoveBuildingForPlayer(playerid, 1294, 2283.2656, 653.8125, 14.3047, 0.25);
  209. RemoveBuildingForPlayer(playerid, 1294, 2291.5625, 692.0938, 14.3047, 0.25);
  210. RemoveBuildingForPlayer(playerid, 1350, 2293.0156, 703.1172, 9.7969, 0.25);
  211. RemoveBuildingForPlayer(playerid, 3459, 2346.6484, 623.4297, 17.2969, 0.25);
  212. RemoveBuildingForPlayer(playerid, 3459, 2411.7656, 623.4297, 17.2969, 0.25);
  213. RemoveBuildingForPlayer(playerid, 8596, 2490.4297, 703.1953, 21.9453, 0.25);
  214.  
  215. return 1;
  216. }
  217.  
  218. public OnPlayerEnterDynamicCP(playerid, checkpointid)
  219. {
  220. if(checkpointid == AHCP[0])
  221. {
  222. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, ""R"Error: "GRI"We are not able to open gate, You Need admin powers !");
  223. MoveObject(Gate, 2286.55200, 603.00012, 6.92593, 2.00);
  224. SendClientMessage(playerid, COLOR_GREEN, "Welcome Back Administrator !");
  225. SetTimer("GateTimer", 5000, false);
  226. }
  227. else if(checkpointid == AHCP[1])
  228. {
  229. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, ""R"Error: "GRI"We are not able to open gate, You Need admin powers !");
  230. MoveObject(Gate, 2286.55200, 603.00012, 6.92593, 2.00);
  231. SendClientMessage(playerid, COLOR_GREEN, "See You later Administrator ! ");
  232. SetTimer("GateTimer", 5000, false);
  233. }
  234. else if(checkpointid == AHCP[2])
  235. {
  236. if(GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid, -1, ""R"Error: "GRI"You need at last 200 $ for buy a drunk !");
  237. ShowPlayerDialog(playerid, 2505, DIALOG_STYLE_LIST,"Drunks List","Sprunk \nCola \nBeer \nVoodka \nWhisky "R"(Danger!)","Give Up !","Exit");
  238. }
  239. else if(checkpointid == AHCP[3])
  240. {
  241. if(GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid, -1, ""R"Error: "GRI"You need at last 200 $ for buy a drunk !");
  242. ShowPlayerDialog(playerid, 2505, DIALOG_STYLE_LIST,"Drunks List","Sprunk \nCola \nBeer \nVoodka \nWhisky "R"(Danger!)","Give Up !","Exit");
  243. }
  244. return 1;
  245. }
  246.  
  247. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  248. {
  249. if(dialogid == 6475)
  250. {
  251. if(response)
  252. {
  253. if(GetPlayerMoney(playerid) < 5000000) return SendClientMessage(playerid, -1, ""R"Error: "GRI"You need 5 000 000 $ For buy this property !");
  254. GivePlayerMoney(playerid, -5000000);
  255. SendClientMessage(playerid, -1, ""R"[Admin House]: "GRI" Enjoy With You Property ! You are the Property Tycoon Now !");
  256. PropTycoon[playerid] = 1;
  257. }
  258. }
  259.  
  260. if(dialogid == 2505)
  261. {
  262. if(response)
  263. {
  264. if(listitem == 0)
  265. {
  266. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  267. SetPlayerDrunkLevel(playerid, 1000);
  268. GivePlayerMoney(playerid, -200);
  269. }
  270. if(listitem == 1)
  271. {
  272. if(GetPlayerMoney(playerid) < 600) return SendClientMessage(playerid, -1, ""R"Error: "GRI"You need 300 $ For buy a Cola");
  273. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
  274. SetPlayerDrunkLevel(playerid, 2000);
  275. GivePlayerMoney(playerid, -300);
  276. }
  277. if(listitem == 2)
  278. {
  279. if(GetPlayerMoney(playerid) < 600) return SendClientMessage(playerid, -1, ""R"Error: "GRI"You need 700 $ For buy a Beer");
  280. ApplyAnimation(playerid,"PED","WALK_DRUNK",4.1,1,1,1,1,1);
  281. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
  282. SetPlayerDrunkLevel(playerid, 3000);
  283. GivePlayerMoney(playerid, -700);
  284. }
  285. if(listitem == 3)
  286. {
  287. if(GetPlayerMoney(playerid) < 600) return SendClientMessage(playerid, -1, ""R"Error: "GRI"You need 1200 $ For buy a Voodka");
  288. ApplyAnimation(playerid,"PED","WALK_DRUNK",4.1,1,1,1,1,1);
  289. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  290. SetPlayerDrunkLevel(playerid, 4000);
  291. GivePlayerMoney(playerid, -1200);
  292. }
  293. if(listitem == 4)
  294. {
  295. if(GetPlayerMoney(playerid) < 600) return SendClientMessage(playerid, -1, ""R"Error: "GRI"You need 1700 $ For buy a Whisky");
  296. ApplyAnimation(playerid,"PED","WALK_DRUNK",4.1,1,1,1,1,1);
  297. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
  298. SetPlayerDrunkLevel(playerid, 5000);
  299. GivePlayerMoney(playerid, -1700);
  300. }
  301. }
  302. }
  303. return 1;
  304. }
  305.  
  306. public OnPlayerPickUpPickup(playerid, pickupid)
  307. {
  308. if(Pick[0] == pickupid)
  309. {
  310. SetPlayerInterior(playerid, 3);
  311. SetPlayerPos(playerid, 961.4197, -53.0666, 1001.1172);
  312. }
  313. else if(Pick[1] == pickupid)
  314. {
  315. ShowPlayerDialog(playerid, 6475, DIALOG_STYLE_MSGBOX, "Admin House", "Do You want buy this property with 5 000 000 $ ? \n Earning : 500 000 $ Every 3 mins for this session !", "Select", "Cancel");
  316. }
  317. else if(Pick[2] == pickupid)
  318. {
  319. GivePlayerWeapon(playerid, 31, 9000);
  320. }
  321. else if(Pick[3] == pickupid)
  322. {
  323. GivePlayerWeapon(playerid, 38, 900000);
  324. }
  325. else if(Pick[4] == pickupid)
  326. {
  327. GivePlayerWeapon(playerid, 32, 9000);
  328. }
  329. else if(Pick[5] == pickupid)
  330. {
  331. SetPlayerHealth(playerid, 100);
  332. }
  333. else if(Pick[6] == pickupid)
  334. {
  335. GivePlayerWeapon(playerid, 27, 9000);
  336. }
  337. else if(Pick[7] == pickupid)
  338. {
  339. SetPlayerInterior(playerid, 0);
  340. SetPlayerPos(playerid, 2272.5313 + 1.0, 566.2311 + 1.0, 12.8723);
  341. }
  342. else if(Pick[8] == pickupid)
  343. {
  344. SetPlayerArmour(playerid, 100);
  345. }
  346. return 1;
  347. }
  348.  
  349. public OnDJUpdate(playerid)
  350. {
  351. if (!IsPlayerInRangeOfPoint(playerid, 20.0, 2311.5251,567.3978,11.6178) && AudioDJ[playerid] == 0) return 1;
  352. if (IsPlayerInRangeOfPoint(playerid, 20.0, 2311.5251,567.3978,11.6178) && AudioDJ[playerid] == 1) return 1;
  353. if (IsPlayerInRangeOfPoint(playerid, 20.0, 2311.5251,567.3978,11.6178) && AudioDJ[playerid] == 0)
  354. {
  355. PlayAudioStreamForPlayer(playerid, "http://play.sa-mp.nl:8000/stream/1/");
  356. AudioDJ[playerid] = 1;
  357. }
  358. if (!IsPlayerInRangeOfPoint(playerid, 20.0, 2311.5251,567.3978,11.6178) && AudioDJ[playerid] == 1)
  359. {
  360. StopAudioStreamForPlayer(playerid);
  361. AudioDJ[playerid] = 0;
  362. }
  363. return 1;
  364. }
  365.  
  366. public GateTimer()
  367. {
  368. MoveObject(Gate, 2286.55200, 603.00012, 12.55811, 2.00);
  369. return 1;
  370. }
  371.  
  372. public PropTimer(playerid)
  373. {
  374. for(new i = 0; i < MAX_PLAYERS; i++)
  375. {
  376. if(PropTycoon[i] == 1)
  377. {
  378. new sZ[100];
  379. format(sZ, sizeof(sZ), "**%s is Now the Propertys Tycoon !, He Eearn 500 00 $ every 3 mins ! ", GetName(i));
  380. GivePlayerMoney(i, 500000);
  381. SendClientMessageToAll(COLOR_GREEN, sZ);
  382. }
  383. }
  384. return 1;
  385. }
  386.  
  387. stock GetName(playerid)
  388. {
  389. new szName[MAX_PLAYER_NAME];
  390. GetPlayerName(playerid, szName, sizeof(szName));
  391. return szName;
  392. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement