Guest User

Untitled

a guest
Jan 20th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.04 KB | None | 0 0
  1. CMD:rrl(playerid, params[])
  2. {
  3. new id, string[128];
  4. if(sscanf(params, "u", id))
  5. {
  6. SendClientMessage(playerid, WHITE, "SYNTAX: /rrl [playerid]");
  7. }
  8. else
  9. {
  10. if(IsPlayerConnected(id))
  11. {
  12. if(GetDistanceBetweenPlayers(playerid, id) < 5)
  13. {
  14. if(Player[playerid][PrisonID] >= 0 && Player[playerid][PrisonDuration] >= 0 || Player[playerid][Cuffed] >= 0 || Player[playerid][Tazed] >= 0 || Player[playerid][Tied] >= 0)
  15. {
  16. if(Player[id][PrisonID] >= 0 && Player[id][PrisonDuration] >= 0 || Player[id][Cuffed] >= 0 || Player[id][Tazed] >= 0 || Player[id][Tied] >= 0)
  17. {
  18. format(string, sizeof(string), "You have challenged %s for a game of Russian Roulette!", GetName(id));
  19. SendClientMessage(playerid, BLUE, string);
  20.  
  21. format(string, sizeof(string), "%s has challenged you for a game of Russian Roulette, /arrl to accept, or /drrl to decline!", GetName(playerid));
  22. SendClientMessage(playerid, BLUE, string);
  23.  
  24. Player[playerid][SRRR] = 1;
  25. Player[id][HRRR] = 1;
  26. }
  27. else
  28. {
  29. SendClientMessage(playerid, WHITE, "You can't do this as the player is prisoned, cuffed, tazed or tied!");
  30. }
  31. }
  32. else
  33. {
  34. SendClientMessage(playerid, WHITE, "You can't do this as you're prisoned, cuffed, tazed or tied!");
  35. }
  36. }
  37. else
  38. {
  39. SendClientMessage(playerid, WHITE, "You are to far away to do this!");
  40. }
  41. }
  42. else
  43. {
  44. SendClientMessage(playerid, WHITE, "This player is not connected!");
  45. }
  46. }
  47. return 1;
  48. }
  49.  
  50.  
  51. CMD:arrl(playerid, params[])
  52. {
  53. new string[128], id;
  54. if(sscanf(params, "u", id))
  55. {
  56. SendClientMessage(playerid, WHITE, "SYNTAX: /arrl [playerid]");
  57. }
  58. else
  59. {
  60. if(GetDistanceBetweenPlayers(playerid, id) < 5)
  61. {
  62. if(Player[id][HRRR] == 1)
  63. {
  64. if(Player[playerid][SRRR] == 1)
  65. {
  66. format(string, sizeof(string), "%s has accepted your game request of Russian Roulette, good luck.", GetName(id));
  67. SendClientMessage(playerid, BLUE, string);
  68.  
  69. format(string, sizeof(string), "You have accepted a game of Russian Roulette by %s, good luck.", GetName(playerid));
  70. SendClientMessage(playerid, BLUE, string);
  71.  
  72. format(string, sizeof(string), "*%s and %s are now playing a game of Russian Roulette!", GetName(id), GetName(playerid));
  73. NearByMessage(playerid, NICESKY, string);
  74.  
  75. Player[id][HRRR] = 0;
  76. Player[playerid][SRRR] = 0;
  77. Player[id][InRRL] = 1;
  78. Player[playerid][InRRL] = 1;
  79. }
  80. else
  81. {
  82. SendClientMessage(playerid, WHITE, "This player hasn't sent you a Russian Roulette request!");
  83. }
  84. }
  85. else
  86. {
  87. SendClientMessage(playerid, WHITE, "You do not have a Russian Roulette request!");
  88. }
  89. }
  90. else
  91. {
  92. SendClientMessage(playerid, WHITE, "You are to far away from the player!");
  93. }
  94. }
  95. return 1;
  96. }
  97.  
  98. CMD:drrl(playerid, params[])
  99. {
  100. new string[128], id;
  101. if(sscanf(params, "u", id))
  102. {
  103. SendClientMessage(playerid, WHITE, "SYNTAX: /drrl [playerid]");
  104. }
  105. else
  106. {
  107. if(GetDistanceBetweenPlayers(playerid, id) < 5)
  108. {
  109. if(Player[id][HRRR] == 1)
  110. {
  111. if(Player[playerid][SRRR] == 1)
  112. {
  113. format(string, sizeof(string), "%s has declined your game request of Russian Roulette!", GetName(id));
  114. SendClientMessage(playerid, BLUE, string);
  115.  
  116. format(string, sizeof(string), "You have declined a game of Russian Roulette by %s!", GetName(playerid));
  117. SendClientMessage(playerid, BLUE, string);
  118.  
  119. Player[id][HRRR] = 0;
  120. Player[playerid][SRRR] = 0;
  121. }
  122. else
  123. {
  124. SendClientMessage(playerid, WHITE, "This player hasn't sent you a Russian Roulette request!");
  125. }
  126. }
  127. else
  128. {
  129. SendClientMessage(playerid, WHITE, "You do not have a Russian Roulette request!");
  130. }
  131. }
  132. else
  133. {
  134. SendClientMessage(playerid, WHITE, "You are to far away from the player!");
  135. }
  136. }
  137. return 1;
  138. }
  139.  
  140. CMD:usegun(playerid, params[])
  141. {
  142. new string[128], id;
  143. new rand = random(6);
  144. switch(rand)
  145. {
  146. case 0, 1, 2, 3:
  147. {
  148. if(Player[playerid][InRRL] == 1)
  149. {
  150. format(string, sizeof(string), "%s pulls the trigger, their was no bullet in that chamber!", GetName(playerid));
  151. NearByMessage(playerid, NICESKY, string);
  152. }
  153. else
  154. {
  155. SendClientMessage(playerid, WHITE, "You are not in a game of Russian Roulette!");
  156. }
  157. }
  158. case 4, 5, 6:
  159. {
  160. if(Player[playerid][InRRL] == 1)
  161. {
  162.  
  163. format(string, sizeof(string), "%s pulls the trigger, the bullet goes through their head and kills them!", GetName(playerid));
  164. NearByMessage(playerid, NICESKY, string);
  165. SetPlayerHealth(playerid, 0);
  166. Player[id][InRRL] = 0;
  167. Player[playerid][InRRL] = 0;
  168. }
  169. else
  170. {
  171. SendClientMessage(playerid, WHITE, "You are not in a game of Russian Roulette!");
  172. }
  173. }
  174. }
  175. return 1;
  176. }
Add Comment
Please, Sign In to add comment