Advertisement
Guest User

Untitled

a guest
Aug 11th, 2015
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.61 KB | None | 0 0
  1. COMMAND:accept(playerid, params[])
  2. {
  3. new type[128],string[128],sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME], Float:x, Float:y, Float:z;
  4. if(sscanf(params, "s[128]", type)) SendClientMessage(playerid, COLOR_GREY, "USAGE: /accept {FFFFFF}[death,shake1-6,repair,refill,taxi,mech,drag,blind]");
  5. else
  6. {
  7. if (GetPVarInt(playerid, "PlayerLogged") == 0) return SendClientMessage(playerid, COLOR_WHITE, "You must be logged in to use this.");
  8. if(GetPVarInt(playerid, "Mute") == 1) return SendClientMessage(playerid, COLOR_LIGHTRED, "You are currently muted !");
  9. if(strcmp(type, "death", true) == 0)
  10. {
  11. if (GetPVarInt(playerid, "Dead") != 2) return SendClientMessage(playerid, COLOR_WHITE, "You have not even died yet.");
  12. if(GetPVarInt(playerid, "DeathTime") > GetCount()) return SendClientMessage(playerid, COLOR_WHITE, "You must wait before accepting death.");
  13. if(GetPVarInt(playerid, "JailTime") >= 1) return SendClientMessage(playerid, COLOR_WHITE, "You cannot accept death inside the prison, you must wait for a gaurd or prisoner to RP with you!");
  14. format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid));
  15. GiveNameSpace(sendername);
  16. format(string, sizeof(string), "%s has accepted death.",sendername);
  17. ProxDetector(20.0, playerid, string, COLOR_WHITE);
  18. DeletePVar(playerid,"DeathTime");
  19. SetPVarInt(playerid, "Drag", 501);
  20. SetPVarInt(playerid, "Cuffed", 0);
  21. SetPVarInt(playerid, "CuffedTime", 0);
  22. SetPVarInt(playerid, "InvWeapon", 0); SetPVarInt(playerid, "InvAmmo", 0);
  23. SetPVarInt(playerid, "DuffleBag", 0);
  24. ResetPlayerWeaponsEx(playerid);
  25. SetPVarInt(playerid, "FadeToDeath", 1);
  26. FadeTime[playerid]=0;
  27. FadeScreen(playerid, 1);
  28. ClearChatbox(playerid,50);
  29. DeletePVar(playerid,"Blinded"), TextDrawHideForPlayer(playerid,BlindDraw);
  30. }
  31. else if(strcmp(type, "trunk", true) == 0)
  32. {
  33. if(GetPVarInt(playerid, "TrunkOffer") != 501)
  34. {
  35. if(IsPlayerConnected(GetPVarInt(playerid, "TrunkOffer")))
  36. {
  37. if(PlayerToPlayer(playerid,GetPVarInt(playerid, "TrunkOffer"),5.0))
  38. {
  39. format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid));
  40. format(giveplayer, sizeof(giveplayer), "%s", PlayerNameEx(GetPVarInt(playerid, "TrunkOffer")));
  41. GiveNameSpace(sendername);
  42. GiveNameSpace(giveplayer);
  43. format(string, sizeof(string), "You accepted %s's offer.", giveplayer);
  44. SendClientMessage(playerid, COLOR_WHITE, string);
  45. format(string, sizeof(string), "%s has accepted your offer.", sendername);
  46. SendClientMessage(GetPVarInt(playerid, "TrunkOffer"), COLOR_LIGHTBLUE, string);
  47. format(string, sizeof(string), "*** %s places %s inside the trunk.", giveplayer, sendername);
  48. ProxDetector(30.0, GetPVarInt(playerid, "TrunkOffer"), string, COLOR_PURPLE);
  49. SendClientMessage(playerid,COLOR_WHITE,"You are inside the trunk, type (/exittrunk) if the trunk is open.");
  50. SendClientMessage(playerid,COLOR_LIGHTRED,"WARNING: If your stuck spectating reconnect from the server.");
  51. TogglePlayerSpectatingEx(playerid, 1);
  52. PlayerSpectateVehicle(playerid, GetPVarInt(playerid, "TrunkOfferID"));
  53. SetPVarInt(playerid,"InTrunk", GetPVarInt(playerid, "TrunkOfferID"));
  54. SetPVarInt(playerid, "TrunkOffer", 501);
  55. DeletePVar(playerid,"TrunkOfferID");
  56. }
  57. else SendClientMessage(playerid, COLOR_GREY, "You must be around the person who offered the trunk put-in."), SetPVarInt(playerid, "TrunkOffer", 501);
  58. }
  59. else SendClientMessage(playerid, COLOR_GREY, "The person who offered a trunk put-in is offline."), SetPVarInt(playerid, "TrunkOffer", 501);
  60. }
  61. else SendClientMessage(playerid, COLOR_GREY, "You havent been offered for a trunk put-in.");
  62. }
  63. else if(strcmp(type, "drag", true) == 0)
  64. {
  65. if(GetPVarInt(playerid, "DragOffer") != 501)
  66. {
  67. if(IsPlayerConnected(GetPVarInt(playerid, "DragOffer")))
  68. {
  69. if(PlayerToPlayer(playerid,GetPVarInt(playerid, "DragOffer"),5.0) && GetPVarInt(playerid, "Dead") != 0)
  70. {
  71. format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid));
  72. format(giveplayer, sizeof(giveplayer), "%s", PlayerNameEx(GetPVarInt(playerid, "DragOffer")));
  73. GiveNameSpace(sendername);
  74. GiveNameSpace(giveplayer);
  75. format(string, sizeof(string), "You accepted %s's drag offer.", giveplayer);
  76. SendClientMessage(playerid, COLOR_WHITE, string);
  77. format(string, sizeof(string), "%s has accepted your drag offer.", sendername);
  78. SendClientMessage(GetPVarInt(playerid, "DragOffer"), COLOR_LIGHTBLUE, string);
  79. format(string, sizeof(string), "*** %s starts to drag %s.", giveplayer, sendername);
  80. ProxDetector(30.0, GetPVarInt(playerid, "DragOffer"), string, COLOR_PURPLE);
  81. TogglePlayerControllableEx(playerid,false);
  82. SetPVarInt(playerid, "Drag", GetPVarInt(playerid, "DragOffer"));
  83. SetPVarInt(playerid, "DragOffer", 501);
  84. }
  85. else SendClientMessage(playerid, COLOR_GREY, "You must be around the person who offered the drag."), SetPVarInt(playerid, "DragOffer", 501);
  86. }
  87. else SendClientMessage(playerid, COLOR_GREY, "The person who offered a drag is offline."), SetPVarInt(playerid, "DragOffer", 501);
  88. }
  89. else SendClientMessage(playerid, COLOR_GREY, "You havent been offered for a drag.");
  90. }
  91. else if(strcmp(type, "shake1", true) == 0)
  92. {
  93. if(GetPVarInt(playerid, "ShakeOffer") != 501)
  94. {
  95. if(IsPlayerConnected(GetPVarInt(playerid, "ShakeOffer")))
  96. {
  97. if(PlayerToPlayer(playerid,GetPVarInt(playerid, "ShakeOffer"),8.0))
  98. {
  99. SetPlayerToFacePlayer(playerid, GetPVarInt(playerid, "ShakeOffer"));
  100. format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid));
  101. format(giveplayer, sizeof(giveplayer), "%s", PlayerNameEx(GetPVarInt(playerid, "ShakeOffer")));
  102. GiveNameSpace(sendername);
  103. GiveNameSpace(giveplayer);
  104. format(string, sizeof(string), "You accepted %s's handshake.", giveplayer);
  105. SendClientMessage(playerid, COLOR_WHITE, string);
  106. format(string, sizeof(string), "%s has accepted your handshake.", sendername);
  107. SendClientMessage(GetPVarInt(playerid, "ShakeOffer"), COLOR_LIGHTBLUE, string);
  108. ApplyAnimation(playerid,"GANGS","hndshkaa",4.0,0,0,0,0,0);
  109. ApplyAnimation(GetPVarInt(playerid, "ShakeOffer"),"GANGS","hndshkaa",4.0,0,0,0,0,0);
  110. SetPVarInt(playerid, "ShakeOffer", 501);
  111. }
  112. else SendClientMessage(playerid, COLOR_GREY, "You must be around the person who offered the shake.");
  113. }
  114. else SendClientMessage(playerid, COLOR_GREY, "The person who offered a shake is offline."), SetPVarInt(playerid, "ShakeOffer", 501);
  115. }
  116. else SendClientMessage(playerid, COLOR_GREY, "You havent been offered for a shake.");
  117. }
  118. else if(strcmp(type, "shake2", true) == 0)
  119. {
  120. if(GetPVarInt(playerid, "ShakeOffer") != 501)
  121. {
  122. if(IsPlayerConnected(GetPVarInt(playerid, "ShakeOffer")))
  123. {
  124. if(PlayerToPlayer(playerid,GetPVarInt(playerid, "ShakeOffer"),8.0))
  125. {
  126. SetPlayerToFacePlayer(playerid, GetPVarInt(playerid, "ShakeOffer"));
  127. format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid));
  128. format(giveplayer, sizeof(giveplayer), "%s", PlayerNameEx(GetPVarInt(playerid, "ShakeOffer")));
  129. GiveNameSpace(sendername);
  130. GiveNameSpace(giveplayer);
  131. format(string, sizeof(string), "You accepted %s's handshake.", giveplayer);
  132. SendClientMessage(playerid, COLOR_WHITE, string);
  133. format(string, sizeof(string), "%s has accepted your handshake.", sendername);
  134. SendClientMessage(GetPVarInt(playerid, "ShakeOffer"), COLOR_LIGHTBLUE, string);
  135. ApplyAnimation(playerid,"GANGS","hndshkba",4.0,0,0,0,0,0);
  136. ApplyAnimation(GetPVarInt(playerid, "ShakeOffer"),"GANGS","hndshkba",4.0,0,0,0,0,0);
  137. SetPVarInt(playerid, "ShakeOffer", 501);
  138. }
  139. else SendClientMessage(playerid, COLOR_GREY, "You must be around the person who offered the shake.");
  140. }
  141. else SendClientMessage(playerid, COLOR_GREY, "The person who offered a shake is offline."), SetPVarInt(playerid, "ShakeOffer", 501);
  142. }
  143. else SendClientMessage(playerid, COLOR_GREY, "You havent been offered for a shake.");
  144. }
  145. else if(strcmp(type, "shake3", true) == 0)
  146. {
  147. if(GetPVarInt(playerid, "ShakeOffer") != 501)
  148. {
  149. if(IsPlayerConnected(GetPVarInt(playerid, "ShakeOffer")))
  150. {
  151. if(PlayerToPlayer(playerid,GetPVarInt(playerid, "ShakeOffer"),8.0))
  152. {
  153. SetPlayerToFacePlayer(playerid, GetPVarInt(playerid, "ShakeOffer"));
  154. format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid));
  155. format(giveplayer, sizeof(giveplayer), "%s", PlayerNameEx(GetPVarInt(playerid, "ShakeOffer")));
  156. GiveNameSpace(sendername);
  157. GiveNameSpace(giveplayer);
  158. format(string, sizeof(string), "You accepted %s's handshake.", giveplayer);
  159. SendClientMessage(playerid, COLOR_WHITE, string);
  160. format(string, sizeof(string), "%s has accepted your handshake.", sendername);
  161. SendClientMessage(GetPVarInt(playerid, "ShakeOffer"), COLOR_LIGHTBLUE, string);
  162. ApplyAnimation(playerid,"GANGS","hndshkca",4.0,0,0,0,0,0);
  163. ApplyAnimation(GetPVarInt(playerid, "ShakeOffer"),"GANGS","hndshkca",4.0,0,0,0,0,0);
  164. SetPVarInt(playerid, "ShakeOffer", 501);
  165. }
  166. else SendClientMessage(playerid, COLOR_GREY, "You must be around the person who offered the shake.");
  167. }
  168. else SendClientMessage(playerid, COLOR_GREY, "The person who offered a shake is offline."), SetPVarInt(playerid, "ShakeOffer", 501);
  169. }
  170. else SendClientMessage(playerid, COLOR_GREY, "You havent been offered for a shake.");
  171. }
  172. else if(strcmp(type, "shake4", true) == 0)
  173. {
  174. if(GetPVarInt(playerid, "ShakeOffer") != 501)
  175. {
  176. if(IsPlayerConnected(GetPVarInt(playerid, "ShakeOffer")))
  177. {
  178. if(PlayerToPlayer(playerid,GetPVarInt(playerid, "ShakeOffer"),8.0))
  179. {
  180. SetPlayerToFacePlayer(playerid, GetPVarInt(playerid, "ShakeOffer"));
  181. format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid));
  182. format(giveplayer, sizeof(giveplayer), "%s", PlayerNameEx(GetPVarInt(playerid, "ShakeOffer")));
  183. GiveNameSpace(sendername);
  184. GiveNameSpace(giveplayer);
  185. format(string, sizeof(string), "You accepted %s's handshake.", giveplayer);
  186. SendClientMessage(playerid, COLOR_WHITE, string);
  187. format(string, sizeof(string), "%s has accepted your handshake.", sendername);
  188. SendClientMessage(GetPVarInt(playerid, "ShakeOffer"), COLOR_LIGHTBLUE, string);
  189. ApplyAnimation(playerid,"GANGS","hndshkcb",4.0,0,0,0,0,0);
  190. ApplyAnimation(GetPVarInt(playerid, "ShakeOffer"),"GANGS","hndshkcb",4.0,0,0,0,0,0);
  191. SetPVarInt(playerid, "ShakeOffer", 501);
  192. }
  193. else SendClientMessage(playerid, COLOR_GREY, "You must be around the person who offered the shake.");
  194. }
  195. else SendClientMessage(playerid, COLOR_GREY, "The person who offered a shake is offline."), SetPVarInt(playerid, "ShakeOffer", 501);
  196. }
  197. else SendClientMessage(playerid, COLOR_GREY, "You havent been offered for a shake.");
  198. }
  199. else if(strcmp(type, "shake5", true) == 0)
  200. {
  201. if(GetPVarInt(playerid, "ShakeOffer") != 501)
  202. {
  203. if(IsPlayerConnected(GetPVarInt(playerid, "ShakeOffer")))
  204. {
  205. if(PlayerToPlayer(playerid,GetPVarInt(playerid, "ShakeOffer"),8.0))
  206. {
  207. SetPlayerToFacePlayer(playerid, GetPVarInt(playerid, "ShakeOffer"));
  208. format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid));
  209. format(giveplayer, sizeof(giveplayer), "%s", PlayerNameEx(GetPVarInt(playerid, "ShakeOffer")));
  210. GiveNameSpace(sendername);
  211. GiveNameSpace(giveplayer);
  212. format(string, sizeof(string), "You accepted %s's handshake.", giveplayer);
  213. SendClientMessage(playerid, COLOR_WHITE, string);
  214. format(string, sizeof(string), "%s has accepted your handshake.", sendername);
  215. SendClientMessage(GetPVarInt(playerid, "ShakeOffer"), COLOR_LIGHTBLUE, string);
  216. ApplyAnimation(playerid,"GANGS","hndshkda",4.0,0,0,0,0,0);
  217. ApplyAnimation(GetPVarInt(playerid, "ShakeOffer"),"GANGS","hndshkda",4.0,0,0,0,0,0);
  218. SetPVarInt(playerid, "ShakeOffer", 501);
  219. }
  220. else SendClientMessage(playerid, COLOR_GREY, "You must be around the person who offered the shake.");
  221. }
  222. else SendClientMessage(playerid, COLOR_GREY, "The person who offered a shake is offline."), SetPVarInt(playerid, "ShakeOffer", 501);
  223. }
  224. else SendClientMessage(playerid, COLOR_GREY, "You havent been offered for a shake.");
  225. }
  226. else if(strcmp(type, "shake6", true) == 0)
  227. {
  228. if(GetPVarInt(playerid, "ShakeOffer") != 501)
  229. {
  230. if(IsPlayerConnected(GetPVarInt(playerid, "ShakeOffer")))
  231. {
  232. if(PlayerToPlayer(playerid,GetPVarInt(playerid, "ShakeOffer"),8.0))
  233. {
  234. SetPlayerToFacePlayer(playerid, GetPVarInt(playerid, "ShakeOffer"));
  235. format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid));
  236. format(giveplayer, sizeof(giveplayer), "%s", PlayerNameEx(GetPVarInt(playerid, "ShakeOffer")));
  237. GiveNameSpace(sendername);
  238. GiveNameSpace(giveplayer);
  239. format(string, sizeof(string), "You accepted %s's handshake.", giveplayer);
  240. SendClientMessage(playerid, COLOR_WHITE, string);
  241. format(string, sizeof(string), "%s has accepted your handshake.", sendername);
  242. SendClientMessage(GetPVarInt(playerid, "ShakeOffer"), COLOR_LIGHTBLUE, string);
  243. ApplyAnimation(playerid,"GANGS","hndshkea",4.0,0,0,0,0,0);
  244. ApplyAnimation(GetPVarInt(playerid, "ShakeOffer"),"GANGS","hndshkea",4.0,0,0,0,0,0);
  245. SetPVarInt(playerid, "ShakeOffer", 501);
  246. }
  247. else SendClientMessage(playerid, COLOR_GREY, "You must be around the person who offered the shake.");
  248. }
  249. else SendClientMessage(playerid, COLOR_GREY, "The person who offered a shake is offline."), SetPVarInt(playerid, "ShakeOffer", 501);
  250. }
  251. else SendClientMessage(playerid, COLOR_GREY, "You havent been offered for a shake.");
  252. }
  253. else if(strcmp(type, "shake7", true) == 0)
  254. {
  255. if(GetPVarInt(playerid, "ShakeOffer") != 501)
  256. {
  257. if(IsPlayerConnected(GetPVarInt(playerid, "ShakeOffer")))
  258. {
  259. if(PlayerToPlayer(playerid,GetPVarInt(playerid, "ShakeOffer"),8.0))
  260. {
  261. SetPlayerToFacePlayer(playerid, GetPVarInt(playerid, "ShakeOffer"));
  262. format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid));
  263. format(giveplayer, sizeof(giveplayer), "%s", PlayerNameEx(GetPVarInt(playerid, "ShakeOffer")));
  264. GiveNameSpace(sendername);
  265. GiveNameSpace(giveplayer);
  266. format(string, sizeof(string), "You accepted %s's handshake.", giveplayer);
  267. SendClientMessage(playerid, COLOR_WHITE, string);
  268. format(string, sizeof(string), "%s has accepted your handshake.", sendername);
  269. SendClientMessage(GetPVarInt(playerid, "ShakeOffer"), COLOR_LIGHTBLUE, string);
  270. ApplyAnimation(playerid,"GANGS","hndshkfa",4.0,0,0,0,0,0);
  271. ApplyAnimation(GetPVarInt(playerid, "ShakeOffer"),"GANGS","hndshkfa",4.0,0,0,0,0,0);
  272. SetPVarInt(playerid, "ShakeOffer", 501);
  273. }
  274. else SendClientMessage(playerid, COLOR_GREY, "You must be around the person who offered the shake.");
  275. }
  276. else SendClientMessage(playerid, COLOR_GREY, "The person who offered a shake is offline."), SetPVarInt(playerid, "ShakeOffer", 501);
  277. }
  278. else SendClientMessage(playerid, COLOR_GREY, "You havent been offered for a shake.");
  279. }
  280. else if(strcmp(type, "shake8", true) == 0)
  281. {
  282. if(GetPVarInt(playerid, "ShakeOffer") != 501)
  283. {
  284. if(IsPlayerConnected(GetPVarInt(playerid, "ShakeOffer")))
  285. {
  286. if(PlayerToPlayer(playerid,GetPVarInt(playerid, "ShakeOffer"),8.0))
  287. {
  288. SetPlayerToFacePlayer(playerid, GetPVarInt(playerid, "ShakeOffer"));
  289. format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid));
  290. format(giveplayer, sizeof(giveplayer), "%s", PlayerNameEx(GetPVarInt(playerid, "ShakeOffer")));
  291. GiveNameSpace(sendername);
  292. GiveNameSpace(giveplayer);
  293. format(string, sizeof(string), "You accepted %s's handshake.", giveplayer);
  294. SendClientMessage(playerid, COLOR_WHITE, string);
  295. format(string, sizeof(string), "%s has accepted your handshake.", sendername);
  296. SendClientMessage(GetPVarInt(playerid, "ShakeOffer"), COLOR_LIGHTBLUE, string);
  297. ApplyAnimation(playerid,"GANGS","prtial_hndshk_biz_01",4.0,0,0,0,0,0);
  298. ApplyAnimation(GetPVarInt(playerid, "ShakeOffer"),"GANGS","prtial_hndshk_biz_01",4.0,0,0,0,0,0);
  299. SetPVarInt(playerid, "ShakeOffer", 501);
  300. }
  301. else SendClientMessage(playerid, COLOR_GREY, "You must be around the person who offered the shake.");
  302. }
  303. else SendClientMessage(playerid, COLOR_GREY, "The person who offered a shake is offline."), SetPVarInt(playerid, "ShakeOffer", 501);
  304. }
  305. else SendClientMessage(playerid, COLOR_GREY, "You havent been offered for a shake.");
  306. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement