anims.pwn 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. #include <a_samp>
  2. // All Animations and Special Actions 1.5 by OKStyle
  3. #define MAX_ANIMATION_INDEX 1812
  4. #define USE_SEX_FIX_ANIM 0
  5. #define USE_CUSTOM_ANIM 0
  6. #define DLG_ANIMATIONS 0
  7. public OnPlayerSpawn(playerid)
  8. {
  9. if(GetPVarInt(playerid, !"Animations_Preloaded")) return 1;
  10. for(new i = 1, animlib[32], tmplib[32] = !"NULL", animname[32]; i <= MAX_ANIMATION_INDEX; i++) // Preload Animlibs
  11. {
  12. GetAnimationName(i, animlib, sizeof(animlib), animname, sizeof(animname));
  13. if(!strcmp(tmplib, animlib)) continue;
  14. tmplib = animlib;
  15. ApplyAnimation(playerid, animlib, !"null", 4.1, 0, 1, 1, 1, 1, 1);
  16. }
  17. ApplyAnimation(playerid, !"BLOWJOBZ", !"null", 4.1, 0, 1, 1, 1, 1, 1);
  18. ApplyAnimation(playerid, !"SNM", !"null", 4.1, 0, 1, 1, 1, 1, 1);
  19. #if USE_SEX_FIX_ANIM == 1
  20. ApplyAnimation(playerid, !"SEX_Fix", !"null", 4.1, 0, 1, 1, 1, 1, 1);
  21. #endif
  22. #if USE_CUSTOM_ANIM == 1
  23. ApplyAnimation(playerid, !"SEX", !"null", 4.1, 0, 1, 1, 1, 1, 1); // change SEX for your custom animlib (parkour etc.)
  24. #endif
  25. SetPVarInt(playerid, !"Animations_Preloaded", 1);
  26. return 1;
  27. }
  28. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  29. {
  30. if(newkeys & KEY_LOOK_BEHIND)
  31. {
  32. ShowPlayerDialog(playerid, DLG_ANIMATIONS, DIALOG_STYLE_MSGBOX, !"Animations",
  33. !"All Animations and Special Actions v1.5 by OKStyle\n\
  34. Made: 13.08.2008 & Updated 09.01.2019\n\
  35. Thanks: PatrickW, 009, Wooz1e, Ym[0]n, Daniel_Cortez,\n\
  36. SoNikMells, Southclaw, VEGETA99999, D3V1LL0P3R\n\n\
  37. List of all animations and special actions: press key \"H\"",
  38. !"Cancel", !"");
  39. return 1;
  40. }
  41. else if(newkeys & KEY_CTRL_BACK)
  42. {
  43. new animdlg[1280];
  44. for(new i = 1, animlib[32], animname[32]; i <= MAX_ANIMATION_INDEX; i++)
  45. {
  46. GetAnimationName(i, animlib, sizeof(animlib), animname, sizeof(animname));
  47. if(strfind(animdlg, animlib) == -1)
  48. {
  49. strcat(animdlg, animlib);
  50. strcat(animdlg, !"\n");
  51. }
  52. }
  53. strcat(animdlg, !"BLOWJOBZ\nSNM\nSEX\nSPECIAL ACTIONS");
  54. #if USE_CUSTOM_ANIM == 1
  55. strcat(animdlg, !"SEX"); // change SEX for your custom animlib
  56. #endif
  57. ShowPlayerDialog(playerid, DLG_ANIMATIONS + 1, DIALOG_STYLE_LIST, !"Animations", animdlg, !"Select", !"Cancel");
  58. return 1;
  59. }
  60. return 1;
  61. }
  62. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  63. {
  64. switch(dialogid)
  65. {
  66. case DLG_ANIMATIONS: return 1;
  67. case DLG_ANIMATIONS + 1:
  68. {
  69. if(!response) return 1;
  70. new animdlg[512];
  71. if(!strcmp(inputtext, !"SPECIAL ACTIONS")) // Special Actions
  72. {
  73. static const specact[20][] = {
  74. !"SPECIAL_ACTION_NONE", !"SPECIAL_ACTION_DUCK", !"SPECIAL_ACTION_USEJETPACK", !"SPECIAL_ACTION_ENTER_VEHICLE", !"SPECIAL_ACTION_EXIT_VEHICLE",
  75. !"SPECIAL_ACTION_DANCE1", !"SPECIAL_ACTION_DANCE2", !"SPECIAL_ACTION_DANCE3", !"SPECIAL_ACTION_DANCE4", !"SPECIAL_ACTION_HANDSUP",
  76. !"SPECIAL_ACTION_USECELLPHONE", !"SPECIAL_ACTION_SITTING", !"SPECIAL_ACTION_STOPUSECELLPHONE", !"SPECIAL_ACTION_DRINK_BEER", !"SPECIAL_ACTION_SMOKE_CIGGY",
  77. !"SPECIAL_ACTION_DRINK_WINE", !"SPECIAL_ACTION_DRINK_SPRUNK", !"SPECIAL_ACTION_CUFFED", !"SPECIAL_ACTION_CARRY", !"SPECIAL_ACTION_PISSING"
  78. };
  79. strcat(animdlg, !"Action Name\n");
  80. for(new i; i < sizeof(specact); i++)
  81. {
  82. strcat(animdlg, specact[i]);
  83. strcat(animdlg, !"\n");
  84. }
  85. }
  86. else if(!strcmp(inputtext, !"BLOWJOBZ")) // Haven't index
  87. {
  88. static const animbj[18][17] = {
  89. !"BJ_Car_End_P", !"BJ_Car_End_W", !"BJ_Car_Loop_P", !"BJ_Car_Loop_W", !"BJ_Car_Start_P", !"BJ_Car_Start_W",
  90. !"BJ_Couch_End_P", !"BJ_Couch_End_W", !"BJ_Couch_Loop_P", !"BJ_Couch_Loop_W", !"BJ_Couch_Start_P",
  91. !"BJ_Couch_Start_W", !"BJ_Stand_End_P", !"BJ_Stand_End_W,", !"BJ_Stand_Loop_P", !"BJ_Stand_Loop_W",
  92. !"BJ_Stand_Start_P", !"BJ_Stand_Start_W"
  93. };
  94. strcat(animdlg, !"Name\n");
  95. for(new i; i < sizeof(animbj); i++)
  96. {
  97. strcat(animdlg, animbj[i]);
  98. strcat(animdlg, !"\n");
  99. }
  100. }
  101. else if(!strcmp(inputtext, !"SNM")) // Haven't index
  102. {
  103. static const animsnm[22][22] = {
  104. !"SnM_Caned_Idle_P", !"SnM_Caned_Idle_W", !"SnM_Caned_P", !"SnM_Caned_W", !"SnM_Cane_Idle_P",
  105. !"SnM_Cane_Idle_W", !"SnM_Cane_P", !"SnM_Cane_W", !"SpankedP", !"SpankedW", !"Spanked_IdleP",
  106. !"Spanked_IdleW", !"SpankingP", !"SpankingW", !"Spanking_endP", !"Spanking_endW", !"Spanking_IdleP",
  107. !"Spanking_IdleW", !"Spanking_SittingIdleP", !"Spanking_SittingIdleW", !"Spanking_SittingP",
  108. !"Spanking_SittingW"
  109. };
  110. strcat(animdlg, !"Name\n");
  111. for(new i; i < sizeof(animsnm); i++)
  112. {
  113. strcat(animdlg, animsnm[i]);
  114. strcat(animdlg, !"\n");
  115. }
  116. }
  117. #if USE_SEX_FIX_ANIM == 1
  118. else if(!strcmp(inputtext, !"SEX")) // Blocked in SA-MP
  119. {
  120. static const animsexfix[20][13] = {
  121. !"SEX_1to2_P", !"SEX_1to2_W", !"SEX_1_Cum_P", !"SEX_1_Cum_W", !"SEX_1_Fail_P",
  122. !"SEX_1_Fail_W", !"SEX_1_P", !"SEX_1_W", "SEX_2to3_P", !"SEX_2to3_W",
  123. !"SEX_2_Fail_P", !"SEX_2_Fail_W", !"SEX_2_P", !"SEX_2_W", !"SEX_3to1_P",
  124. !"SEX_3to1_W", !"SEX_3_Fail_P", !"SEX_3_Fail_W", !"SEX_3_P", !"SEX_3_W"
  125. };
  126. strcat(animdlg, !"Name\n");
  127. for(new i; i < sizeof(animsexfix); i++)
  128. {
  129. strcat(animdlg, animsexfix[i]);
  130. strcat(animdlg, !"\n");
  131. }
  132. }
  133. #endif
  134. #if USE_CUSTOM_ANIM == 1
  135. else if(!strcmp(inputtext, !"SEX")) // change SEX for your custom animlib
  136. {
  137. static const animsex[20][13] = { // change animations to your custom animnames
  138. !"SEX_1to2_P", !"SEX_1to2_W", !"SEX_1_Cum_P", !"SEX_1_Cum_W", !"SEX_1_Fail_P",
  139. !"SEX_1_Fail_W", !"SEX_1_P", !"SEX_1_W", "SEX_2to3_P", !"SEX_2to3_W",
  140. !"SEX_2_Fail_P", !"SEX_2_Fail_W", !"SEX_2_P", !"SEX_2_W", !"SEX_3to1_P",
  141. !"SEX_3to1_W", !"SEX_3_Fail_P", !"SEX_3_Fail_W", !"SEX_3_P", !"SEX_3_W"
  142. };
  143. strcat(animdlg, !"Name\n");
  144. for(new i; i < sizeof(animsex); i++)
  145. {
  146. strcat(animdlg, animsex[i]);
  147. strcat(animdlg, !"\n");
  148. }
  149. }
  150. #endif
  151. else // Have index
  152. {
  153. strcat(animdlg, !"Index\tName\n");
  154. for(new i = 1, animlib[32], animname[32]; i <= MAX_ANIMATION_INDEX; i++)
  155. {
  156. GetAnimationName(i, animlib, sizeof(animlib), animname, sizeof(animname));
  157. if(!strcmp(animlib, inputtext))
  158. {
  159. format(animname, sizeof(animname), "%d\t%s\n", i, animname);
  160. strcat(animdlg, animname);
  161. }
  162. }
  163. }
  164. ShowPlayerDialog(playerid, DLG_ANIMATIONS + 2, DIALOG_STYLE_TABLIST_HEADERS, !"Animations", animdlg, !"Select", !"Cancel");
  165. return 1;
  166. }
  167. case DLG_ANIMATIONS + 2:
  168. {
  169. if(!response) return 1;
  170. if(strfind(inputtext, !"SPECIAL_ACTION_") != -1)
  171. {
  172. if(8 < listitem < 13) return SetPlayerSpecialAction(playerid, listitem + 1);
  173. else if(13 <= listitem < 19) return SetPlayerSpecialAction(playerid, listitem + 7);
  174. else if(listitem == 19) return SetPlayerSpecialAction(playerid, 68);
  175. else SetPlayerSpecialAction(playerid, listitem);
  176. return 1;
  177. }
  178. else if(strfind(inputtext, !"BJ_") != -1) return ApplyAnimation(playerid, !"BLOWJOBZ", inputtext, 4.1, 0, 1, 1, 1, 1, 1);
  179. else if(strfind(inputtext, !"SNM_") != -1 || strfind(inputtext, !"Spank") != -1) return ApplyAnimation(playerid, !"SNM", inputtext, 4.1, 0, 1, 1, 1, 1, 1);
  180. #if USE_SEX_FIX_ANIM == 1
  181. else if(strfind(inputtext, !"SEX_") != -1) return ApplyAnimation(playerid, !"SEX_Fix", inputtext, 4.1, 0, 1, 1, 1, 1, 1);
  182. #endif
  183. #if USE_CUSTOM_ANIM == 1
  184. else if(strfind(inputtext, !"SEX") != -1) return ApplyAnimation(playerid, !"SEX", inputtext, 4.1, 0, 1, 1, 1, 1, 1); // Change SEX to your custom animlib
  185. #endif
  186. else
  187. {
  188. new animlib[32], animname[32];
  189. GetAnimationName(strval(inputtext), animlib, sizeof(animlib), animname, sizeof(animname));
  190. ApplyAnimation(playerid, animlib, animname, 4.1, 0, 1, 1, 1, 1, 1);
  191. }
  192. return 1;
  193. }
  194. }
  195. return 0;
  196. }