Advertisement
Guest User

PISS SYSTEM BY VIN

a guest
Feb 10th, 2014
916
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.99 KB | None | 0 0
  1. /*
  2. ____________________________________________________________________
  3. |||||||||||||||||||||| * ||||||| || || |||||||||||||||||||||||| ||
  4. || || || || || * || |||||| || || || ||
  5. ||||||| || ||||||||| * ||||||| || ||||||| || |||||| ||
  6. || || || || * || || || || || ||
  7. |||||||||||||||||||||| * |||||||||||||||||||||| || |||||| ||
  8. ____________________________________________________________________*/
  9. #define FILTERSCRIPT
  10. #include <a_samp>
  11. #include <progress>
  12. #include <zcmd>
  13. #include <YSI\y_ini>
  14. //__________DEFINE
  15. #define PATH "/PISS/%s.ini"
  16. // PRESSED(keys)
  17. #define PRESSED(%0) \
  18. (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
  19. //ENUM
  20. enum pPiss
  21. {
  22. pPissLevel
  23. }
  24. //+++++++++++++NEW
  25. new PInfo[MAX_PLAYERS][pPiss];
  26. new Bar:PissBar[MAX_PLAYERS];
  27. new Pissing[MAX_PLAYERS];
  28. new Text[MAX_PLAYERS];
  29. new Text:PissNow;
  30. //+++++++++FORWARD
  31. forward PissTimer(playerid);
  32. forward PissFinish(playerid);
  33. forward PissUpdate(playerid);
  34. forward Drink(playerid);
  35. public OnFilterScriptInit()
  36. {
  37. SetTimer("PissTimer",300000, true);
  38. /*------------------------------------------------------------------------*/
  39. PissNow = TextDrawCreate(583.000000, 424.000000, "PissNow");
  40. TextDrawBackgroundColor(PissNow, 255);
  41. TextDrawFont(PissNow, 2);
  42. TextDrawLetterSize(PissNow, 0.300000, 1.100000);
  43. TextDrawColor(PissNow, 16777215);
  44. TextDrawSetOutline(PissNow, 1);
  45. TextDrawSetProportional(PissNow, 1);
  46. //===================
  47. new WC = CreateObject(19370, 1358.3272, -1665.1929, 14.0957, 0.0000, 0.0000, -0.2113);
  48. SetObjectMaterialText(WC, "WC", 0, 50, "Arial", 24, 0, -1, -16777216, 1);
  49. new GB = CreateObject(19353, 1355.6741, -1665.1467, 14.1092, 0.0000, 0.0000, -89.9654);
  50. SetObjectMaterialText(GB, "Girl<>Boy", 0, 50, "Arial", 24, 0, -32256, -16777216, 1);
  51. new dolar = CreateObject(19353, 1352.9499, -1666.6531, 13.9394, 0.0000, 0.0000, -0.9748);
  52. SetObjectMaterialText(dolar, "5$ For 1Slot", 0, 50, "Arial", 24, 0, -16468988, -16777216, 1);
  53. //====================
  54. CreateObject(19450, 1353.00854, -1663.42078, 14.15168, 0.00000, 0.00000, -1.20000);
  55. CreateObject(19370, 1354.44739, -1668.22412, 14.05156, 0.00000, 0.00000, -90.77999);
  56. CreateObject(19370, 1354.46790, -1663.14026, 14.05156, 0.00000, 0.00000, -90.77999);
  57. CreateObject(19370, 1356.71472, -1663.15613, 14.05156, 0.00000, 0.00000, -90.77999);
  58. CreateObject(19370, 1356.75903, -1668.25342, 14.05156, 0.00000, 0.00000, -91.26000);
  59. CreateObject(19370, 1358.27466, -1664.68274, 14.05156, 0.00000, 0.00000, -180.05994);
  60. CreateObject(1523, 1358.31006, -1666.65405, 12.60579, 0.00000, 0.00000, -89.70004);
  61. CreateObject(19370, 1358.28491, -1665.20593, 14.05156, 0.00000, 0.00000, -180.05994);
  62. CreateObject(2525, 1355.08582, -1664.11438, 12.59281, 0.00000, 0.00000, -89.81999);
  63. CreateObject(19370, 1355.68384, -1663.51428, 14.05156, 0.00000, 0.00000, -179.87996);
  64. CreateObject(2525, 1356.24744, -1664.15344, 12.59281, 0.00000, 0.00000, 90.66001);
  65. CreateObject(19370, 1355.68176, -1665.13403, 14.01786, 0.00000, 0.00000, -90.30001);
  66. CreateObject(2523, 1355.94922, -1667.65686, 12.64153, 0.00000, 0.00000, 180.17992);
  67. CreateObject(2523, 1355.24255, -1667.65479, 12.64153, 0.00000, 0.00000, 180.17992);
  68. CreateObject(2523, 1356.62012, -1667.68640, 12.64153, 0.00000, 0.00000, 180.17992);
  69. CreateObject(2741, 1354.91602, -1668.08069, 14.52495, 0.00000, 0.00000, 0.00000);
  70. CreateObject(2741, 1355.54224, -1668.06628, 14.52495, 0.00000, 0.00000, 0.00000);
  71. CreateObject(2741, 1356.16870, -1668.09680, 14.52495, 0.00000, 0.00000, 0.00000);
  72. CreateObject(1523, 1358.25659, -1665.16895, 12.60876, 0.00000, 0.00000, 178.68002);
  73. CreateObject(1523, 1352.93274, -1665.15906, 12.60876, 0.00000, 0.00000, -1.62001);
  74. CreateObject(19450, 1354.61035, -1663.42969, 15.82979, 0.96000, 89.88005, -0.48000);
  75. CreateObject(19450, 1356.66125, -1663.47192, 15.82979, 0.96000, 89.88005, -0.48000);
  76.  
  77. return 1;
  78. }
  79. public OnPlayerUpdate(playerid)
  80. {
  81. return 1;
  82. }
  83. public OnPlayerConnect(playerid)
  84. {
  85. if(fexist(UserPath(playerid)))
  86. {
  87. INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  88. }
  89. else
  90. {
  91. new INI:File = INI_Open(UserPath(playerid));
  92. INI_SetTag(File,"data Piss");
  93. INI_WriteInt(File,"PissLevel",0);
  94. INI_Close(File);
  95. PInfo[playerid][pPissLevel] = 0;
  96. }
  97. PissBar[playerid] = CreateProgressBar(585.00, 439.00, 52.50, 5.50, 869072810, 8);
  98. SetProgressBarValue(PissBar[playerid], PInfo[playerid][pPissLevel]);
  99. return 1;
  100. }
  101. public OnPlayerSpawn(playerid)
  102. {
  103. ShowProgressBarForPlayer(playerid, PissBar[playerid]);
  104. Text[playerid] = 0;
  105. }
  106. public OnPlayerDisconnect(playerid, reason)
  107. {
  108. KillTimer(PissTimer(playerid));
  109. new INI:File = INI_Open(UserPath(playerid));
  110. INI_SetTag(File,"data Piss");
  111. INI_WriteInt(File,"PissLevel",PInfo[playerid][pPissLevel]);
  112. INI_Close(File);
  113. return 1;
  114. }
  115. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  116. {
  117. if (PRESSED(KEY_SECONDARY_ATTACK))
  118. {
  119. if(zonedrink(playerid))
  120. {
  121. SetTimerEx("Drink", 15000, false, "i", playerid);
  122. }
  123. }
  124. return 1;
  125. }
  126. CMD:pisssystem(playerid,params[])
  127. {
  128. ShowPlayerDialog(playerid,54352,0,"CREADIT And Command","Create By VinPure\n YLess For Y_ini\n ZCMD By Zeex\nProgress Bar By Toribio\nCMD:\n/pee\n/hand","Close","");
  129. return 1;
  130. }
  131. CMD:pee(playerid,params[])
  132. {
  133. if(PInfo[playerid][pPissLevel] != 0)
  134. {
  135. if(IsPlayerInRangeOfPoint(playerid, 2.0, 1357.2632,-1664.1940,13.6113))
  136. {
  137. Pissing[playerid] = 1;
  138. SendClientMessage(playerid,-3,"[PISSSYTEM]you urinate prescribed place and pay $ 5 fee");
  139. GivePlayerMoney(playerid,-5);
  140. TogglePlayerControllable(playerid, 0);
  141. SetPlayerSpecialAction(playerid, 68);
  142. SetPlayerDrunkLevel(playerid,0);
  143. GameTextForPlayer(playerid, "~w~Pee....", 5000, 1);
  144. SetTimerEx("PissFinish", 12000, false, "i", playerid);
  145. }
  146. else if(IsPlayerInRangeOfPoint(playerid, 2.0,1354.0018,-1664.0780,13.6114))
  147. {
  148. Pissing[playerid] = 1;
  149. SendClientMessage(playerid,-3,"[PISSSYTEM]you urinate prescribed place and pay $ 5 fee");
  150. GivePlayerMoney(playerid,-5);
  151. SetPlayerDrunkLevel(playerid,0);
  152. TogglePlayerControllable(playerid, 0);
  153. SetPlayerSpecialAction(playerid, 68);
  154. GameTextForPlayer(playerid, "~w~Pee....", 5000, 1);
  155. SetTimerEx("PissFinish", 12000, false, "i", playerid);
  156. }
  157. else
  158. {
  159. Pissing[playerid] = 1;
  160. SendClientMessage(playerid,-3,"[PISSSYTEM]You urinating in the street and was fined $5000");
  161. GivePlayerMoney(playerid, -5000);
  162. SetPlayerDrunkLevel(playerid,0);
  163. TogglePlayerControllable(playerid, 0);
  164. SetPlayerSpecialAction(playerid, 68);
  165. GameTextForPlayer(playerid, "~w~Pee....", 5000, 1);
  166. SetTimerEx("PissFinish", 5000, false, "i", playerid);
  167. }
  168. }
  169. else
  170. {
  171. SendClientMessage(playerid, -1, "[PISSSYTEM]You do not want to urinate!");
  172. return 1;
  173. }
  174. return 1;
  175. }
  176. CMD:t(playerid,params[])
  177. {
  178. SetPlayerPos(playerid,1356.1147,-1667.2771,13.6090);
  179. return 1;
  180. }
  181. CMD:hand(playerid,params[])
  182. {
  183. if(IsPlayerInRangeOfPoint(playerid, 2.0,1356.1147,-1667.2771,13.6090))
  184. {
  185. ApplyAnimation(playerid, "DEALER", "DEALER_DEAL", 4.0, 1, 1, 1, 1, 1);
  186. }
  187. else if(IsPlayerInRangeOfPoint(playerid, 2.0,1355.4749,-1667.2499,13.6091))
  188. {
  189. ApplyAnimation(playerid, "DEALER", "DEALER_DEAL", 4.0, 1, 1, 1, 1, 1);
  190. }
  191. else if(IsPlayerInRangeOfPoint(playerid, 2.0,1354.7985,-1667.2500,13.6091))
  192. {
  193. ApplyAnimation(playerid, "DEALER", "DEALER_DEAL", 4.0, 1, 1, 1, 1, 1);
  194. }
  195. else
  196. {
  197. SendClientMessage(playerid,-1,"No In Zone");
  198. return 1;
  199. }
  200. return 1;
  201. }
  202. public OnPlayerDeath(playerid, killerid, reason)
  203. {
  204. Pissexit(playerid);
  205. return 1;
  206. }
  207. public Drink(playerid)
  208. {
  209. PInfo[playerid][pPissLevel] += 1;
  210. SetProgressBarValue(PissBar[playerid], PInfo[playerid][pPissLevel]);
  211. UpdateProgressBar(PissBar[playerid], playerid);
  212. return 1;
  213. }
  214. public PissFinish(playerid)
  215. {
  216. TextDrawHideForPlayer(playerid, PissNow);
  217. SetPlayerSpecialAction(playerid,0);
  218. PInfo[playerid][pPissLevel] = 0;
  219. SetProgressBarValue(PissBar[playerid],PInfo[playerid][pPissLevel]);
  220. UpdateProgressBar(PissBar[playerid], playerid);
  221. TogglePlayerControllable(playerid, 1);
  222. Pissing[playerid] = 0;
  223. SendClientMessage(playerid, -1, "[PISSSYTEM]You have finished urinating and now you have to feel comfortable!");
  224. return 1;
  225. }
  226. public PissTimer(playerid)
  227. {
  228. for(new i=0;i<MAX_PLAYERS;i++)
  229. {
  230. if(IsPlayerConnected(i))
  231. {
  232. if(PInfo[i][pPissLevel] == 8)
  233. {
  234. SendClientMessage(i, -1, "[PISSSYTEM]You Die For Not Go Piss!");
  235. SetPlayerHealth(playerid,0.0);
  236. Pissing[playerid] = 0;
  237. return 1;
  238. }
  239. if(PInfo[i][pPissLevel] == 7)
  240. {
  241. SendClientMessage(i, -1, "[PISSSYTEM]You're feeling the urge to urinate!");
  242. SendClientMessage(i,-1,"If You Not Piss ,,--> YOU DEAD");
  243. PInfo[i][pPissLevel] = 8;
  244. SetPlayerDrunkLevel(playerid,10000);
  245. SetTimerEx("PissUpdate",500, false, "i", playerid);
  246. SetProgressBarValue(PissBar[i], PInfo[i][pPissLevel]);
  247. UpdateProgressBar(PissBar[i], i);
  248. }
  249. else
  250. {
  251. PInfo[i][pPissLevel] += 1;
  252. SetProgressBarValue(PissBar[i], PInfo[i][pPissLevel]);
  253. UpdateProgressBar(PissBar[i], i);
  254. }
  255. }
  256. }
  257. return 1;
  258. }
  259. public PissUpdate(playerid)
  260. {
  261. if(Text[playerid] == 0)
  262. {
  263. if(PInfo[playerid][pPissLevel] >= 7)
  264. {
  265. if(Pissing[playerid] == 0)
  266. {
  267. TextDrawShowForPlayer(playerid, PissNow);
  268. Text[playerid] = 1;
  269. }
  270. }
  271. }
  272. else if(Text[playerid] == 1)
  273. {
  274. if(PInfo[playerid][pPissLevel] >= 7)
  275. {
  276. if(Pissing[playerid] == 0)
  277. {
  278.  
  279. TextDrawHideForPlayer(playerid, PissNow);
  280. Text[playerid] = 0;
  281. }
  282. }
  283. }
  284. SetTimerEx("PissUpdate",500, false, "i", playerid);
  285. return 1;
  286. }
  287. //data
  288. forward LoadUser_data(playerid,name[],value[]);
  289. public LoadUser_data(playerid,name[],value[])
  290. {
  291. INI_Int("PissLevel",PInfo[playerid][pPissLevel]);
  292.  
  293. return 1;
  294. }
  295. stock UserPath(playerid)
  296. {
  297. new string[128],playername[MAX_PLAYER_NAME];
  298. GetPlayerName(playerid,playername,sizeof(playername));
  299. format(string,sizeof(string),PATH,playername);
  300. return string;
  301. }
  302. stock zonedrink(playerid)
  303. {
  304. if(IsPlayerInRangeOfPoint(playerid, 1.0,2326.0071,-1645.9478,14.8270))
  305. {
  306. return 1;
  307. }
  308. else if(IsPlayerInRangeOfPoint(playerid, 1.0,2060.1467,-1898.4554,13.5538))
  309. {
  310. return 1;
  311. }
  312. else if(IsPlayerInRangeOfPoint(playerid, 1.0,1929.5487,-1772.4331,13.5469))
  313. {
  314. return 1;
  315. }
  316. else if(IsPlayerInRangeOfPoint(playerid, 1.0,-16.1549,-90.8489,1003.5469))
  317. {
  318. return 1;
  319. }
  320. else if(IsPlayerInRangeOfPoint(playerid, 1.0,-17.6376,-90.9706,1003.5469))
  321. {
  322. return 1;
  323. }
  324. return 0;
  325. }
  326. stock Pissexit(playerid)
  327. {
  328. PInfo[playerid][pPissLevel] = 0;
  329. SetPlayerDrunkLevel(playerid,0);
  330. TextDrawHideForPlayer(playerid, PissNow);
  331. PInfo[playerid][pPissLevel] = 0;
  332. SetProgressBarValue(PissBar[playerid], PInfo[playerid][pPissLevel]);
  333. UpdateProgressBar(PissBar[playerid], playerid);
  334. return 1;
  335. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement