Guest User

Church v0.03

a guest
Mar 25th, 2013
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.31 KB | None | 0 0
  1. // [FS]Church System by iSnake made for Gta-Mp.Ro
  2. // Special Thanks to: www.sa-mp.com | Version: v0.02
  3.  
  4. #include <a_samp>
  5. #include <streamer>
  6. #define SPconfirmare 100
  7. #define SP1 101
  8. #define SP2 102
  9. #define SP3 103
  10. #define SP4 103
  11. #define SP5 103
  12. #define ALTAR 110
  13. #define Donatie 111
  14. #define COLOR_YELLOW 0xFFFF00AA
  15. #define COLOR_WHITE 0xFFFFFFAA
  16. #define COLOR_LIGHTBLUE 0x33CCFFAA
  17. #define COLOR_PURPLE 0xC2A2DAAA
  18. #pragma tabsize 0
  19.  
  20. forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
  21. forward IsAChurchCar(carid);
  22. forward TerminaRugaciune(playerid);
  23.  
  24. new church[8];
  25. new CP[MAX_PLAYERS];
  26. new MissionOn[MAX_PLAYERS];
  27. new string[256], pname[MAX_PLAYER_NAME];
  28.  
  29. enum pInfo
  30. {
  31. pPreot,
  32. pLumanare,
  33. pCompMis,
  34. };
  35. new PlayerInfo[MAX_PLAYERS][pInfo];
  36.  
  37.  
  38. public OnFilterScriptInit()
  39. {
  40. //Church
  41. CreateDynamicObject(5710,-2035.89600000,1092.05500000,21.41400000,0.00000000,0.00000000,0.00000000); //
  42. CreateDynamicObject(5710,-2021.33400000,1074.27900000,21.33000000,0.00000000,0.00000000,-89.38100000); //
  43. CreateDynamicObject(5710,-2023.42200000,1074.52700000,24.56700000,180.48200000,0.00000000,-87.66300000); //
  44. CreateDynamicObject(5710,-2010.78600000,1092.27600000,21.41800000,0.00000000,0.00000000,180.48200000); //
  45. CreateDynamicObject(10676,-2024.83400000,1101.62600000,9.60700000,0.00000000,0.00000000,0.00000000); //
  46. CreateDynamicObject(5710,-2003.88400000,1124.53300000,22.37200000,0.00000000,0.00000000,2.57800000); //
  47. CreateDynamicObject(5710,-2044.21500000,1124.10900000,22.37200000,0.00000000,0.00000000,179.62200000); //
  48. CreateDynamicObject(5710,-2024.95100000,1145.35300000,20.49700000,0.00000000,0.00000000,273.30100000); //
  49. CreateDynamicObject(10676,-2025.56500000,1132.25200000,31.49900000,180.48200000,0.00000000,1.71900000); //
  50. CreateDynamicObject(17950,-2025.18400000,1147.85000000,19.80200000,-6.01600000,0.00000000,-177.04400000); //
  51. CreateDynamicObject(10676,-2081.26400000,1094.22500000,18.98300000,0.00000000,0.00000000,89.38100000); //
  52. CreateDynamicObject(10676,-1965.05200000,1091.44800000,18.99800000,0.00000000,0.00000000,-88.52200000); //
  53. CreateDynamicObject(616,-2055.35300000,1090.20700000,-2.16400000,0.00000000,0.00000000,-7.73500000); //
  54. CreateDynamicObject(616,-1992.35600000,1092.40500000,-2.39900000,0.00000000,0.00000000,2.57800000); //
  55. CreateDynamicObject(617,-2039.20300000,1124.15100000,12.52100000,0.00000000,0.00000000,0.00000000); //
  56. CreateDynamicObject(617,-2009.59900000,1123.92700000,13.04600000,0.00000000,0.00000000,0.00000000); //
  57. CreateDynamicObject(3406,-2024.75600000,1139.86000000,14.99800000,0.00000000,0.00000000,91.96000000); //
  58. CreateDynamicObject(14535,-2002.93200000,1089.43000000,19.88100000,0.00000000,0.00000000,0.00000000); //
  59. CreateDynamicObject(2591,-2005.79200000,1087.07700000,18.07000000,0.00000000,0.00000000,0.00000000); //
  60. CreateDynamicObject(2591,-2007.45200000,1088.77500000,18.05900000,0.00000000,0.00000000,-91.10000000); //
  61. CreateDynamicObject(2591,-2010.35500000,1090.21200000,18.15900000,0.00000000,0.00000000,-274.16000000); //
  62. CreateDynamicObject(2639,-2026.60800000,1129.08600000,17.68000000,0.00000000,0.00000000,181.34100000); //
  63. CreateDynamicObject(2639,-2028.66400000,1129.04400000,17.68000000,0.00000000,0.00000000,181.34100000); //
  64. CreateDynamicObject(2639,-2032.26500000,1129.00300000,17.68000000,0.00000000,0.00000000,181.34100000); //
  65. CreateDynamicObject(2639,-2026.46000000,1125.21700000,17.68000000,0.00000000,0.00000000,181.34100000); //
  66. CreateDynamicObject(2639,-2028.50500000,1125.17100000,17.68000000,0.00000000,0.00000000,181.34100000); //
  67. CreateDynamicObject(2639,-2032.31600000,1125.07600000,17.68000000,0.00000000,0.00000000,181.34100000); //
  68. CreateDynamicObject(2639,-2026.40700000,1121.52700000,17.68000000,0.00000000,0.00000000,181.34100000); //
  69. CreateDynamicObject(2639,-2028.43900000,1121.47700000,17.68000000,0.00000000,0.00000000,181.34100000); //
  70. CreateDynamicObject(2639,-2032.26500000,1121.44600000,17.68000000,0.00000000,0.00000000,181.34100000); //
  71. CreateDynamicObject(2639,-2026.29900000,1117.46200000,17.68000000,0.00000000,0.00000000,181.34100000); //
  72. CreateDynamicObject(2639,-2028.30800000,1117.42000000,17.68000000,0.00000000,0.00000000,181.34100000); //
  73. CreateDynamicObject(2639,-2032.23400000,1117.27600000,17.68000000,0.00000000,0.00000000,181.34100000); //
  74. CreateDynamicObject(2639,-2026.13700000,1114.01000000,17.68000000,0.00000000,0.00000000,181.34100000); //
  75. CreateDynamicObject(2639,-2028.17400000,1113.97300000,17.68000000,0.00000000,0.00000000,181.34100000); //
  76. CreateDynamicObject(2639,-2032.39200000,1113.95200000,17.68000000,0.00000000,0.00000000,181.34100000); //
  77. CreateDynamicObject(2639,-2026.02900000,1110.29300000,17.68000000,0.00000000,0.00000000,181.34100000); //
  78. CreateDynamicObject(2639,-2028.03900000,1110.23300000,17.68000000,0.00000000,0.00000000,181.34100000); //
  79. CreateDynamicObject(2639,-2032.39500000,1110.15000000,17.68000000,0.00000000,0.00000000,181.34100000); //
  80. CreateDynamicObject(2639,-2025.82800000,1105.81900000,17.68000000,0.00000000,0.00000000,181.34100000); //
  81. CreateDynamicObject(2639,-2027.84500000,1105.76900000,17.68000000,0.00000000,0.00000000,181.34100000); //
  82. CreateDynamicObject(2639,-2032.47700000,1105.59700000,17.68000000,0.00000000,0.00000000,181.34100000); //
  83. CreateDynamicObject(2639,-2025.95000000,1102.41500000,17.68000000,0.00000000,0.00000000,181.34100000); //
  84. CreateDynamicObject(2639,-2020.60700000,1102.46200000,17.68000000,0.00000000,0.00000000,181.34100000); //
  85. CreateDynamicObject(2639,-2021.18200000,1106.07200000,17.68000000,0.00000000,0.00000000,181.34100000); //
  86. CreateDynamicObject(2639,-2019.06800000,1106.12800000,17.68000000,0.00000000,0.00000000,181.34100000); //
  87. CreateDynamicObject(2639,-2021.29300000,1110.42300000,17.68000000,0.00000000,0.00000000,181.34100000); //
  88. CreateDynamicObject(2639,-2019.17600000,1110.46200000,17.68000000,0.00000000,0.00000000,181.34100000); //
  89. CreateDynamicObject(2639,-2021.49400000,1114.05600000,17.68000000,0.00000000,0.00000000,181.34100000); //
  90. CreateDynamicObject(2639,-2019.41600000,1114.09900000,17.68000000,0.00000000,0.00000000,181.34100000); //
  91. CreateDynamicObject(2639,-2021.48800000,1117.37700000,17.68000000,0.00000000,0.00000000,181.34100000); //
  92. CreateDynamicObject(2639,-2019.35900000,1117.43900000,17.68000000,0.00000000,0.00000000,181.34100000); //
  93. CreateDynamicObject(2639,-2021.70100000,1121.65300000,17.68000000,0.00000000,0.00000000,181.34100000); //
  94. CreateDynamicObject(2639,-2019.67200000,1121.69800000,17.68000000,0.00000000,0.00000000,181.34100000); //
  95. CreateDynamicObject(2639,-2021.79500000,1125.26600000,17.68000000,0.00000000,0.00000000,181.34100000); //
  96. CreateDynamicObject(2639,-2019.71500000,1125.30900000,17.68000000,0.00000000,0.00000000,181.34100000); //
  97. CreateDynamicObject(2639,-2021.89000000,1129.22200000,17.68000000,0.00000000,0.00000000,181.34100000); //
  98. CreateDynamicObject(2639,-2019.83900000,1129.28400000,17.68000000,0.00000000,0.00000000,181.34100000); //
  99. CreateDynamicObject(949,-2025.62600000,1099.54600000,18.49100000,0.00000000,0.00000000,0.00000000); //
  100. CreateDynamicObject(949,-2021.00700000,1099.57900000,18.49600000,0.00000000,0.00000000,0.00000000); //
  101. CreateDynamicObject(3406,-2024.52600000,1133.21500000,14.99800000,0.00000000,0.00000000,91.96000000); //
  102. CreateDynamicObject(3406,-2024.28700000,1126.64700000,14.99800000,0.00000000,0.00000000,91.96000000); //
  103. CreateDynamicObject(3406,-2024.09200000,1120.09900000,14.99800000,0.00000000,0.00000000,91.96000000); //
  104. CreateDynamicObject(3406,-2023.87300000,1113.53000000,15.00300000,0.00000000,0.00000000,91.96000000); //
  105. CreateDynamicObject(3406,-2023.64600000,1107.07400000,14.99800000,0.00000000,0.00000000,91.96000000); //
  106. CreateDynamicObject(1841,-2013.75800000,1101.71900000,21.37100000,0.00000000,0.00000000,-42.11200000); //
  107. CreateDynamicObject(1841,-2033.50800000,1101.45600000,21.31300000,0.00000000,0.00000000,-140.08800000); //
  108. CreateDynamicObject(14527,-2024.35700000,1125.75500000,21.45800000,0.00000000,0.00000000,0.00000000); //
  109. CreateDynamicObject(14527,-2023.68200000,1110.28100000,21.21100000,0.00000000,0.00000000,0.00000000); //
  110. CreateDynamicObject(14527,-2023.95400000,1118.86300000,21.35900000,0.00000000,0.00000000,0.00000000); //
  111. CreateDynamicObject(2048,-2032.37100000,1100.03900000,21.71300000,0.00000000,0.00000000,91.10000000); //
  112. CreateDynamicObject(2048,-2014.37000000,1100.26400000,21.66400000,0.85900000,-0.85900000,270.72300000); //
  113. CreateDynamicObject(626,-2032.64500000,1086.68700000,19.91600000,0.00000000,0.00000000,0.00000000); //
  114. CreateDynamicObject(626,-2013.39600000,1086.47600000,19.92000000,0.00000000,0.00000000,0.00000000); //
  115. CreateDynamicObject(936,-2022.40000000,1095.25100000,17.52700000,0.00000000,0.00000000,0.00000000); //
  116. CreateDynamicObject(936,-2024.28100000,1095.26300000,17.52700000,0.00000000,0.00000000,0.00000000); //
  117. CreateDynamicObject(936,-2024.24700000,1094.20400000,17.52700000,0.00000000,0.00000000,-178.76300000); //
  118. CreateDynamicObject(936,-2022.37000000,1094.22300000,17.52700000,0.00000000,0.00000000,-179.62200000); //
  119. CreateDynamicObject(936,-2023.28200000,1093.58800000,17.27700000,0.00000000,0.00000000,-178.76300000); //
  120. CreateDynamicObject(936,-2023.26500000,1093.13700000,16.95200000,0.00000000,0.00000000,-178.76300000); //
  121. CreateDynamicObject(1743,-2023.65500000,1094.33400000,18.02000000,0.00000000,0.00000000,0.00000000); //
  122. CreateDynamicObject(1510,-2023.41000000,1095.18500000,19.01700000,0.00000000,0.00000000,0.00000000); //
  123. CreateDynamicObject(1667,-2023.04300000,1095.20300000,19.11900000,0.00000000,0.00000000,0.00000000); //
  124. CreateDynamicObject(1668,-2022.79300000,1095.30800000,19.19700000,0.00000000,0.00000000,31.79900000); //
  125. CreateDynamicObject(1720,-2025.53700000,1097.94300000,17.05100000,0.00000000,0.00000000,42.97200000); //
  126. CreateDynamicObject(1720,-2021.61400000,1097.96400000,17.05100000,0.00000000,0.00000000,-42.11200000); //
  127. CreateDynamicObject(1720,-2024.59600000,1086.20200000,17.05100000,0.00000000,0.00000000,-182.20100000); //
  128. CreateDynamicObject(1720,-2023.30100000,1086.16400000,17.05100000,0.00000000,0.00000000,-181.34100000); //
  129. CreateDynamicObject(1720,-2022.04400000,1086.13700000,17.05100000,0.00000000,0.00000000,-179.62200000); //
  130. CreateDynamicObject(2745,-2015.29000000,1099.67900000,19.08700000,0.00000000,0.00000000,-89.38100000); //
  131. CreateDynamicObject(2745,-2031.46500000,1099.43100000,19.07600000,0.00000000,0.00000000,91.10000000); //
  132. CreateDynamicObject(3462,-2023.00100000,1140.86400000,18.56600000,0.00000000,0.00000000,68.75500000); //
  133. CreateDynamicObject(3462,-2026.74000000,1141.00900000,18.56600000,0.00000000,0.00000000,118.60200000); //
  134. CreateDynamicObject(626,-2021.62700000,1141.99200000,19.10100000,0.00000000,0.00000000,0.00000000); //
  135. CreateDynamicObject(626,-2019.37300000,1142.11500000,19.10100000,0.00000000,0.00000000,0.00000000); //
  136. CreateDynamicObject(626,-2027.93000000,1141.72600000,19.10100000,0.00000000,0.00000000,0.00000000); //
  137. CreateDynamicObject(626,-2030.01000000,1141.71900000,19.10100000,0.00000000,0.00000000,0.00000000); //
  138. CreateDynamicObject(2639,-2020.26800000,1140.76600000,17.68000000,0.00000000,0.00000000,182.20100000); //
  139. CreateDynamicObject(2639,-2028.98300000,1140.26500000,17.68000000,0.00000000,0.00000000,182.20100000); //
  140. CreateDynamicObject(1720,-2015.52000000,1125.01600000,17.05100000,0.00000000,0.00000000,-60.16100000); //
  141. CreateDynamicObject(1720,-2015.69400000,1123.82200000,17.05100000,0.00000000,0.00000000,-85.94400000); //
  142. CreateDynamicObject(1720,-2015.42100000,1122.46300000,17.05100000,0.00000000,1.71900000,-139.22900000); //
  143. CreateDynamicObject(1491,-2016.19900000,1124.52600000,16.76500000,0.00000000,0.00000000,-86.80300000); //
  144. CreateDynamicObject(967,-2015.48700000,1123.76300000,17.01000000,0.00000000,0.00000000,93.67900000); //
  145. CreateDynamicObject(1497,-2016.28000000,1124.45600000,15.83100000,0.00000000,0.00000000,2.57800000); //
  146. CreateDynamicObject(15035,-2042.98000000,1096.35000000,17.84500000,0.00000000,0.00000000,90.24100000); //
  147. CreateDynamicObject(2591,-2038.59500000,1100.05500000,18.89400000,0.00000000,0.00000000,-179.62200000); //
  148. church[0] = AddStaticVehicle(442,-1983.1986,1128.9529,53.0033,182.5003,0,0); // Masina Job
  149. church[1] = AddStaticVehicle(442,-2039.7845,1117.2625,53.1153,94.2769,0,0); // carr
  150. church[2] = AddStaticVehicle(442,-2039.7811,1112.8698,53.1228,93.2788,0,0); // carr
  151. church[3] = AddStaticVehicle(442,-2038.9590,1124.0901,53.1159,169.1676,0,0); // carr
  152. church[4] = AddStaticVehicle(442,-2056.8899,1117.6361,53.1206,270.9573,1,1); // carr
  153. church[5] = AddStaticVehicle(442,-2056.9163,1113.3385,53.1187,269.0984,0,0); // carr
  154. church[6] = AddStaticVehicle(442,-2056.8811,1109.5646,53.1203,269.1783,0,0); // car
  155. church[7] = AddStaticVehicle(442,-2057.0657,1105.2684,53.1207,271.3093,0,0); // car
  156. Create3DTextLabel ("Scrie {F81414}/spovedeste {FFFFFF}ca sa te SPOVEDESTI", 0xFFFFFFFF, -2016.7358,1123.6798,18.0524, 40, 0);
  157. Create3DTextLabel ("Scrie {F81414}/vreaujob {FFFFFF}ca sa devii PREOT", 0xFFFFFFFF, -2023.1420,1094.6649,19.0025, 40, 0);
  158. Create3DTextLabel ("Scrie {F81414}/enter {FFFFFF}ca sa intrii in Casa Domnului", 0xFFFFFFFF, -1989.2682,1118.1591,54.4688, 40, 0);
  159. Create3DTextLabel ("Scrie {F81414}/exit {FFFFFF}ca sa iesi din Casa Domnului", 0xFFFFFFFF, -2024.7180,1142.7272,18.0688, 40, 0);
  160. Create3DTextLabel ("Scrie {F81414}/altar {FFFFFF}ca sa vezi ce poti face in altar", 0xFFFFFFFF, -2042.4249,1091.9927,18.8424, 40, 0);
  161. Create3DTextLabel ("Scrie {F81414}/cumparalumanari {FFFFFF}ca sa cumperi lumanari", 0xFFFFFFFF, -2029.2625,1139.0535,18.0524, 40, 0);
  162. AddStaticPickup(1274, 23, -2016.7358,1123.6798,18.0524); // Spovedit
  163. AddStaticPickup(1274, 23, -2023.1420,1094.6649,19.0025); // Preot
  164. AddStaticPickup(1274, 23, -1989.2682,1118.1591,54.4688); // Enter Church
  165. AddStaticPickup(1274, 23, -2024.7180,1142.7272,18.0688); // Exit Church
  166. AddStaticPickup(1274, 23, -2042.4249,1091.9927,18.8424); // Altar
  167. AddStaticPickup(1274, 23, -2029.2625,1139.0535,18.0524); // Cumpara Lumanari
  168.  
  169. print("\n--------------------------------------");
  170. print(" [FS]Church System by iSnake @ WwW.Gta-Mp.Ro");
  171. print("--------------------------------------\n");
  172. return 1;
  173. }
  174.  
  175. public OnFilterScriptExit()
  176. {
  177. print("\n==================[Church System v0.1]==========================");
  178. print(" UNLOADED ");
  179. print("==================[Church System v0.1]==========================\n");
  180. return 1;
  181. }
  182.  
  183. public OnPlayerRequestClass(playerid, classid)
  184. {
  185. return 1;
  186. }
  187.  
  188. public OnPlayerConnect(playerid)
  189. {
  190. PlayerInfo[playerid][pPreot] = 0;
  191. PlayerInfo[playerid][pLumanare] = 0;
  192. PlayerInfo[playerid][pCompMis] = 0;
  193. return 1;
  194. }
  195.  
  196. public OnPlayerDisconnect(playerid, reason)
  197. {
  198. return 1;
  199. }
  200.  
  201. public OnPlayerSpawn(playerid)
  202. {
  203. return 1;
  204. }
  205.  
  206. public OnPlayerDeath(playerid, killerid, reason)
  207. {
  208. if(MissionOn[playerid] == 1)
  209. {
  210. MissionOn[playerid] =0;
  211. DisablePlayerCheckpoint(playerid);
  212. CP[playerid] = 0;
  213. GameTextForPlayer(playerid,"~w~Misiune ~r~pierduta!",4000,3);
  214. SendClientMessage(playerid, COLOR_WHITE,"Ai murit si ai pierdut misiunea!");
  215. }
  216. return 1;
  217. }
  218.  
  219. public OnVehicleSpawn(vehicleid)
  220. {
  221. return 1;
  222. }
  223.  
  224. public OnVehicleDeath(vehicleid, killerid)
  225. {
  226. return 1;
  227. }
  228.  
  229. public OnPlayerText(playerid, text[])
  230. {
  231. return 1;
  232. }
  233.  
  234. public OnPlayerCommandText(playerid, cmdtext[])
  235. {
  236. new newcar = GetPlayerVehicleID(playerid);
  237.  
  238. if (strcmp("/spovedeste", cmdtext, true, 10) == 0)
  239. {
  240. if PlayerToPoint(5,playerid,-2016.7358,1123.6798,18.0524)
  241. *then
  242. {
  243. TogglePlayerControllable(playerid,0);
  244. SendClientMessage(playerid, COLOR_YELLOW, "[Biserica]: Esti blocat pana ce te spovedesti complet");
  245. ShowPlayerDialog(playerid, SPconfirmare, DIALOG_STYLE_MSGBOX, "{E8DA15}Spovedire","{FFFFFF}Esti sigur ca vrei sa incepi sa te spovedesti?", " Da ", " Nu ");
  246. }
  247. }
  248. if (strcmp("/altar", cmdtext, true, 10) == 0)
  249. {
  250. if PlayerToPoint(5,playerid,-2042.4249,1091.9927,18.8424)
  251. *then
  252. {
  253. ShowPlayerDialog(playerid, ALTAR, DIALOG_STYLE_LIST, "Preot: Ce doresti sa faci?", "Roaga-te\nAprinde lumanare\nImpartaseste-te\nDoneaza", "Select", "Cancel");
  254. SendClientMessage(playerid, COLOR_YELLOW, "[Biserica]: Alege ce vrei sa faci in continuare.");
  255. }
  256. }
  257. if (strcmp("/cumparalumanari", cmdtext, true, 10) == 0)
  258. {
  259. if PlayerToPoint(5,playerid,-2029.2625,1139.0535,18.0524)
  260. *then
  261. {
  262. SendClientMessage(playerid, COLOR_YELLOW, "Ingrijitoare: Ti-am vandut 10 lumanari pentru 5000$.");
  263. PlayerInfo[playerid][pLumanare] = 1;
  264. }
  265. }
  266. if (strcmp("/vreaujob", cmdtext, true, 10) == 0)
  267. {
  268. if PlayerToPoint(5,playerid,-2023.1420,1094.6649,19.0025)
  269. *then
  270. {
  271. SendClientMessage(playerid, COLOR_YELLOW, "[Biserica]: Acum esti preot si ai un contract de cateva ore!");
  272. PlayerInfo[playerid][pPreot] = 1;
  273. }
  274. }
  275. if (strcmp("/gotochurch", cmdtext, true, 9) == 0)
  276. {
  277. if(IsPlayerAdmin(playerid))
  278. {
  279. SetPlayerPos(playerid,-1974.2455,1117.1692,53.5124);
  280. return 1;
  281. }
  282. else return 0;
  283. }
  284. if(strcmp(cmdtext, "/exit", true) == 0)
  285. {
  286. if PlayerToPoint(5,playerid,-2024.7180,1142.7272,18.0688)
  287. *then
  288. {
  289. SetPlayerPos(playerid,-1989.2682,1118.1591,54.4688);
  290. SendClientMessage(playerid, COLOR_LIGHTBLUE, "[Biserica]: Ai iesit din casa domnului,te mai asteptam!");
  291. return 1;
  292. }
  293. }
  294. if(strcmp(cmdtext, "/enter", true) == 0)
  295. {
  296. if PlayerToPoint(5,playerid,-1989.2682,1118.1591,54.4688)
  297. *then
  298. {
  299. SetPlayerPos(playerid,-2024.7180,1142.7272,18.0688);
  300. SendClientMessage(playerid, COLOR_LIGHTBLUE, "[Biserica]: Ai intrat in casa domnului, inchina-te!");
  301. return 1;
  302. }
  303. }
  304. if (!strcmp("/incheiemisiune", cmdtext, true, 10))
  305. {
  306. if(MissionOn[playerid] == 1)
  307. {
  308. MissionOn[playerid] =0;
  309. DisablePlayerCheckpoint(playerid);
  310. CP[playerid] = 0;
  311. GameTextForPlayer(playerid,"~w~Misiune~r~amanata",4000,3);
  312. }
  313. else
  314. {
  315. SendClientMessage(playerid, COLOR_WHITE,"Nu ai misiune in progres!");
  316. }
  317. }
  318. if(strcmp(cmdtext, "/churchmission", true) == 0)
  319. {
  320. if(IsAChurchCar(newcar))
  321. {
  322. CP[playerid] = 1;
  323. MissionOn[playerid] = 1;
  324. SetPlayerCheckpoint(playerid, -1810.1211,1182.4489,25.6009, 2);
  325. GameTextForPlayer(playerid,"~w~Misiune ~p~inceputa!",4000,3);
  326. SendClientMessage(playerid, COLOR_YELLOW, "[Biserica]: Ai inceput misiunea, du-te la prime oprire marcata pe harta!");
  327. return 1;
  328. }
  329. }
  330. return 0;
  331. }
  332.  
  333. public OnPlayerExitVehicle(playerid, vehicleid)
  334. {
  335. if(GetVehicleModel(vehicleid) == 442)
  336. {
  337. if(MissionOn[playerid] == 1)
  338. {
  339. MissionOn[playerid] = 0;
  340. DisablePlayerCheckpoint(playerid);
  341. CP[playerid] = 0;
  342. GameTextForPlayer(playerid,"~w~Misiune ~r~pierduta!",4000,3);
  343. SendClientMessage(playerid, COLOR_WHITE,"Ai parasit masina bisericii - Misiune pierduta!");
  344. }
  345. }
  346. }
  347.  
  348. public OnPlayerStateChange(playerid, newstate, oldstate)
  349. {
  350. new newcar = GetPlayerVehicleID(playerid);
  351.  
  352. if(IsAChurchCar(newcar))
  353. {
  354. if(PlayerInfo[playerid][pPreot] == 0)
  355. {
  356. RemovePlayerFromVehicle(playerid);
  357. SendClientMessage(playerid, COLOR_WHITE, "××× Tu nu esti PREOT");
  358. }
  359. if(PlayerInfo[playerid][pPreot] == 1)
  360. {
  361. format(string,sizeof(string),"Poti face misiunea scriind {F81414}/churchmission");
  362. SendClientMessage(playerid, COLOR_WHITE, string);
  363. }
  364. }
  365. return 1;
  366. }
  367.  
  368. public OnPlayerEnterCheckpoint(playerid)
  369. {
  370. if(CP[playerid] == 1)
  371. {
  372. DisablePlayerCheckpoint(playerid);
  373. CP[playerid] = 2;
  374. SendClientMessage(playerid, COLOR_WHITE, "{a9c4e4}Aceasta a fost prima oprire. {ee5555}Du-te la punctul rosu ca sa continui!");
  375. SetPlayerCheckpoint(playerid, -1623.0514,1182.3478,7.1797, 2);
  376. }
  377. else if(CP[playerid] == 2)
  378. {
  379. DisablePlayerCheckpoint(playerid);
  380. CP[playerid] = 3;
  381. SetPlayerCheckpoint(playerid, -1604.0754,1011.5288,7.0391, 2);
  382. }
  383. else if(CP[playerid] == 3)
  384. {
  385. DisablePlayerCheckpoint(playerid);
  386. CP[playerid] = 4;
  387. SetPlayerCheckpoint(playerid, -1883.3397,935.1098,35.0156, 2);
  388. }
  389. else if(CP[playerid] == 4)
  390. {
  391. DisablePlayerCheckpoint(playerid);
  392. CP[playerid] = 5;
  393. SetPlayerCheckpoint(playerid, -1982.8187,1130.8285,53.2041, 2);
  394. }
  395. else if(CP[playerid] == 5)
  396. {
  397. DisablePlayerCheckpoint(playerid);
  398. CP[playerid] = 0;
  399. SendClientMessage(playerid, COLOR_WHITE, "{a9c4e4}Ai terminat misiunea. {ee5555}Esti un adevarat preot!");
  400. GivePlayerMoney(playerid, 30000);
  401. SendClientMessage(playerid, COLOR_YELLOW, "PREMIU: {a9c4e4}Ai primit 30.000$ + Binecuvantare de la bunul Dumnezeu");
  402. GameTextForPlayer(playerid,"~w~Misiune ~g~terminata!",4000,3);
  403. PlayerInfo[playerid][pCompMis]++;
  404. }
  405. return 1;
  406. }
  407.  
  408. public OnPlayerLeaveCheckpoint(playerid)
  409. {
  410. return 1;
  411. }
  412.  
  413. public OnPlayerEnterRaceCheckpoint(playerid)
  414. {
  415. return 1;
  416. }
  417.  
  418. public OnPlayerLeaveRaceCheckpoint(playerid)
  419. {
  420. return 1;
  421. }
  422.  
  423. public OnRconCommand(cmd[])
  424. {
  425. return 1;
  426. }
  427.  
  428. public OnPlayerRequestSpawn(playerid)
  429. {
  430. return 1;
  431. }
  432.  
  433. public OnObjectMoved(objectid)
  434. {
  435. return 1;
  436. }
  437.  
  438. public OnPlayerObjectMoved(playerid, objectid)
  439. {
  440. return 1;
  441. }
  442.  
  443. public OnPlayerPickUpPickup(playerid, pickupid)
  444. {
  445. return 1;
  446. }
  447.  
  448. public OnVehicleMod(playerid, vehicleid, componentid)
  449. {
  450. return 1;
  451. }
  452.  
  453. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  454. {
  455. return 1;
  456. }
  457.  
  458. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  459. {
  460. return 1;
  461. }
  462.  
  463. public OnPlayerSelectedMenuRow(playerid, row)
  464. {
  465. return 1;
  466. }
  467.  
  468. public OnPlayerExitedMenu(playerid)
  469. {
  470. return 1;
  471. }
  472.  
  473. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  474. {
  475. return 1;
  476. }
  477.  
  478. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  479. {
  480. return 1;
  481. }
  482.  
  483. public OnRconLoginAttempt(ip[], password[], success)
  484. {
  485. return 1;
  486. }
  487.  
  488. public OnPlayerUpdate(playerid)
  489. {
  490. return 1;
  491. }
  492.  
  493. public OnPlayerStreamIn(playerid, forplayerid)
  494. {
  495. return 1;
  496. }
  497.  
  498. public OnPlayerStreamOut(playerid, forplayerid)
  499. {
  500. return 1;
  501. }
  502.  
  503. public OnVehicleStreamIn(vehicleid, forplayerid)
  504. {
  505. return 1;
  506. }
  507.  
  508. public OnVehicleStreamOut(vehicleid, forplayerid)
  509. {
  510. return 1;
  511. }
  512.  
  513. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  514. {
  515. new sendername[MAX_PLAYER_NAME];
  516.  
  517. if(dialogid == SPconfirmare)
  518. {
  519. if(response)
  520. {
  521. GetPlayerName(playerid, sendername, sizeof(sendername));
  522. format(string, sizeof(string), "{E8DA15}Preot: {FFFFFF} %s, ma bucur ca ai ales calea cea buna", sendername);
  523. SendClientMessage(playerid, COLOR_WHITE, string);
  524. ShowPlayerDialog(playerid, SP1, DIALOG_STYLE_MSGBOX , "{E8DA15}Spovedire", " {FFFFFF}Cat de des pacatuiesti?", " Rar ", " Des ");
  525. }
  526. else
  527. {
  528. GetPlayerName(playerid, sendername, sizeof(sendername));
  529. format(string, sizeof(string), "{E8DA15}Preot: {FFFFFF} %s, imi pare rau , mintea ta e tulburata", sendername);
  530. SendClientMessage(playerid, COLOR_WHITE, string);
  531. TogglePlayerControllable(playerid,1);
  532. }
  533. }
  534. if(dialogid == SP1)
  535. {
  536. if(response)
  537. {
  538. SendClientMessage(playerid, COLOR_WHITE, "{E8DA15}Preot: {FFFFFF}Ai credinta, urmeaza intrebarea a doua!");
  539. ShowPlayerDialog(playerid, SP3, DIALOG_STYLE_INPUT , "Spovedire", " {FFFFFF}Cat de des vii la biserica? ", "Gata","");
  540.  
  541. }
  542. else
  543. {
  544.  
  545. SendClientMessage(playerid, COLOR_WHITE, "{E8DA15}Preot: {FFFFFF}Credinta ta lasa de dorit, o sa continuam!");
  546. ShowPlayerDialog(playerid, SP3, DIALOG_STYLE_INPUT , "Spovedire", " {FFFFFF}Cat de des vii la biserica? ", "Gata","");
  547. }
  548. }
  549. if(dialogid == SP3)
  550. {
  551. if(response)
  552. {
  553. SendClientMessage(playerid, COLOR_WHITE, "{E8DA15}Preot: {FFFFFF}Ma bucur sa aud asta, Dumnezeu sa te binecuvanteze!");
  554. ShowPlayerDialog(playerid, SP4, DIALOG_STYLE_INPUT , "Spovedire", " {FFFFFF}Iti iubesti aproapele? ", "Gata","");
  555.  
  556. }
  557. }
  558. if(dialogid == SP4)
  559. {
  560. if(response)
  561. {
  562. SendClientMessage(playerid, COLOR_WHITE, "{E8DA15}Preot: {FFFFFF}Aproapele trebuie sa fie mai presus de cat orice,tine minte asta! ");
  563. ShowPlayerDialog(playerid, SP5, DIALOG_STYLE_MSGBOX , "{E8DA15}Spovedire", " {FFFFFF}Iti iubesti aproapele?", " Da ", " Nu ");
  564.  
  565. }
  566. }
  567. if(dialogid == SP5)
  568. {
  569. if(response)
  570. {
  571. SendClientMessage(playerid, COLOR_WHITE, "{E8DA15}Preot: {FFFFFF}Ai grija in continuare! ");
  572. ShowPlayerDialog(playerid, SP2, DIALOG_STYLE_MSGBOX, "{E8DA15}Spovedire","{FFFFFF}Odata spovedit,vei urma sfaturile preotului?", " Da ", " Nu ");
  573.  
  574. }
  575. }
  576. if(dialogid == SP2)
  577. {
  578. if(response)
  579. {
  580. SendClientMessage(playerid, COLOR_WHITE, "{E8DA15}Preot: {FFFFFF}Te-am vindecat de pacate, ai mare grija in tot ceea ce faci!");
  581. TogglePlayerControllable(playerid,1);
  582. }
  583. else
  584. {
  585.  
  586. SendClientMessage(playerid, COLOR_WHITE, "{E8DA15}Preot: {FFFFFF}Nu te pot vindeca de pacate!");
  587. TogglePlayerControllable(playerid,1);
  588. }
  589. }
  590. if(dialogid == ALTAR)
  591. {
  592. if(response)
  593. {
  594. if(listitem == 0)
  595. {
  596. SendClientMessage(playerid, COLOR_PURPLE, "* Asteapta pana ce termini de spus rugaciunea...");
  597. GetPlayerName(playerid, pname, sizeof(pname));
  598. format(string, sizeof(string), "[BISERICA]: %s se roaga pentru apropiatii sai.", pname);
  599. SendClientMessageToAll(COLOR_PURPLE, string);
  600. SetTimer("TerminaRugaciune", 4000, 0);
  601. }
  602. if(listitem == 1)
  603. {
  604. if(PlayerInfo[playerid][pLumanare] == 1)
  605. {
  606. SendClientMessage(playerid, COLOR_PURPLE, "* Ai aprins o lumanare si ai pomenit in gand rudele decedate.");
  607. PlayerInfo[playerid][pLumanare] = 0;
  608. }
  609. else return SendClientMessage( playerid, COLOR_LIGHTBLUE, "{00B3FA}Ai nevoie {FFB300}de lumanari{00B3FA} pentru a face asta!" );
  610. }
  611. if(listitem == 2)
  612. {
  613. if(PlayerInfo[playerid][pCompMis] >= 1)
  614. {
  615. SendClientMessage(playerid, COLOR_YELLOW, "* Ai primit Sfanta Taina a Impartasaniei.");
  616. }
  617. else return SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Esti pacatos, Dumnezeu te va pedepsii!"); SetPlayerHealth(playerid, 0); SendClientMessage(playerid, COLOR_PURPLE, "[BISERICA]: Ca sa iti speli pacatele ,trebuie sa faci o misiune pentru noi!");
  618. }
  619. if(listitem == 3)
  620. {
  621. ShowPlayerDialog(playerid, Donatie, DIALOG_STYLE_MSGBOX , "{E8DA15}Doneaza", " {FFFFFF}Cutia milei:\nNu acceptam decat\n{F81414}Sume de 50.000$\n{FFFFFF}Donezi?", " Da ", " Nu ");
  622. }
  623. }
  624. }
  625. if(dialogid == Donatie)
  626. {
  627. if(response)
  628. {
  629. SendClientMessage(playerid, COLOR_WHITE, "{E8DA15}Cutia milei: {FFFFFF}Multumim pentru donatie! ");
  630. GivePlayerMoney(playerid, -50000);
  631.  
  632. }
  633. }
  634. return 1;
  635. }
  636. public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  637. {
  638. if(IsPlayerConnected(playerid))
  639. {
  640. new Float:oldposx, Float:oldposy, Float:oldposz;
  641. new Float:tempposx, Float:tempposy, Float:tempposz;
  642. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  643. tempposx = (oldposx -x);
  644. tempposy = (oldposy -y);
  645. tempposz = (oldposz -z);
  646. if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  647. {
  648. return 1;
  649. }
  650. }
  651. return 0;
  652. }
  653. public TerminaRugaciune(playerid)
  654. {
  655. format(string, sizeof(string), "* Ai terminat de spus rugaciunea si ai fost binecuvantat...");
  656. SendClientMessage(playerid, COLOR_YELLOW, string);
  657. SetPlayerHealth(playerid, 100);
  658. SetPlayerArmour(playerid, 100);
  659. return 1;
  660. }
  661. public IsAChurchCar(carid)
  662. {
  663. for(new i = 0; i < sizeof(church); i++)
  664. {
  665. if(carid == church[i]) return 1;
  666. }
  667. return 0;
  668. }
Advertisement
Add Comment
Please, Sign In to add comment