Advertisement
Guest User

TrooperY

a guest
May 3rd, 2009
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.11 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #define blue 0x00FFFFAA
  4. new need[MAX_PLAYERS];
  5. new Float:peehealth;
  6. new peeorshit[MAX_PLAYERS] = 1; //1 = Pee,2 = Shit
  7. forward needtimer(playerid); //Timer
  8. forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
  9.  
  10. public OnFilterScriptInit()
  11. {
  12. print("\n--------------------------------------");
  13. print(" ---Need For Pee : Most Wanted--- by Trooper");
  14. print("--------------------------------------\n");
  15. return 1;
  16. }
  17.  
  18. public OnFilterScriptExit()
  19. {
  20. return 1;
  21. }
  22.  
  23. public OnPlayerConnect(playerid)
  24. {
  25. need[playerid] = 0;
  26. peeorshit[playerid] = 1;
  27. SetTimerEx("needtimer",1200000,0,"i",playerid); //1200000 = 20 Minuten
  28. return 1;
  29. }
  30.  
  31. public OnPlayerDeath(playerid, killerid, reason)
  32. {
  33. return 1;
  34. }
  35.  
  36. public OnPlayerCommandText(playerid, cmdtext[])
  37. {
  38. if (strcmp("/piss", cmdtext, true, 5) == 0 && need[playerid] >= 1 && peeorshit[playerid] > 1.5)
  39. {
  40. need[playerid] = 0;
  41. ApplyAnimation(playerid, "PAULNMAC", "Piss_in", 3.0, 0, 0, 0, 0, 0); // Pissing
  42. SendClientMessage(playerid,blue,"What a feeling...");
  43. return 1;
  44. }
  45. if (strcmp("/shit", cmdtext, true, 5) == 0 && need[playerid]>= 1 && peeorshit[playerid] <= 1.5)
  46. {
  47. if(PlayerToPoint(1.5,playerid,366.7872,-57.3001,1001.5101) || PlayerToPoint(1.5,playerid,371.0143,-57.3006,1001.5190))
  48. {
  49. need[playerid] = 0;
  50. ApplyAnimation(playerid, "PAULNMAC", "Piss_in", 3.0, 0, 0, 0, 0, 0); // Pissing
  51. SendClientMessage(playerid,blue,"What a feeling...");
  52. }
  53. else
  54. {
  55. SendClientMessage(playerid,blue,"You need to go on the Burgershot-toilet !");
  56. }
  57. return 1;
  58. }
  59. return 0;
  60. }
  61.  
  62. public needtimer(playerid)
  63. {
  64. need[playerid] = need[playerid] + 1;
  65. if(need[playerid] == 2)
  66. {
  67. peeorshit[playerid] = random(2);
  68. if(peeorshit[playerid] <= 1.5)
  69. {
  70. SendClientMessage(playerid,blue,"You need to go for Big Boys");
  71. }
  72. else
  73. {
  74. SendClientMessage(playerid,blue,"You need to go for Little Tigers");
  75. }
  76. }
  77. if(need[playerid] == 4)
  78. {
  79. SendClientMessage(playerid,blue,"Your Trousers got wet....");
  80. GetPlayerHealth(playerid,peehealth);
  81. SetPlayerHealth(playerid,peehealth - 5);
  82. }
  83. if(need[playerid] == 6 && peeorshit[playerid] <= 1.5)
  84. {
  85. SendClientMessage(playerid,blue,"Your Ass busted");
  86. SetPlayerHealth(playerid,5);
  87. // need[playerid] = 0;
  88. }
  89. else if(need[playerid] == 6)
  90. {
  91. SendClientMessage(playerid,blue,"Your Pee busted");
  92. SetPlayerHealth(playerid,5);
  93. // need[playerid] = 0;
  94. }
  95. SetTimerEx("needtimer",1200000,0,"i",playerid); //1200000 = 20 Minuten
  96. return 1;
  97. }
  98.  
  99. public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  100. {
  101. if(IsPlayerConnected(playerid))
  102. {
  103. new Float:oldposx, Float:oldposy, Float:oldposz;
  104. new Float:tempposx, Float:tempposy, Float:tempposz;
  105. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  106. tempposx = (oldposx -x);
  107. tempposy = (oldposy -y);
  108. tempposz = (oldposz -z);
  109. if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  110. {
  111. return 1;
  112. }
  113. }
  114. return 0;
  115. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement