Advertisement
Guest User

Untitled

a guest
Jan 25th, 2020
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. if(strcmp(cmd, "/dance", true) == 0)
  2. {
  3. tmp = strtoknew(cmdtext, idx);
  4. if(!strlen(tmp) || strlen(tmp) > 2)
  5. {
  6. SCM(playerid,COLOR_GRAD1,"Benutzung: /dance [1-4]");
  7. return 1;
  8. }
  9. dancestyle = strval(tmp);
  10. if(dancestyle < 1 || dancestyle > 4)
  11. {
  12. SCM(playerid,COLOR_GRAD1,"Benutzung: /dance [1-4]");
  13. return 1;
  14. }
  15. if(dancestyle == 1)
  16. {
  17. SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
  18. MakeAnimation[playerid] = 1;
  19. }
  20. else if(dancestyle == 2)
  21. {
  22. SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE2);
  23. MakeAnimation[playerid] = 1;
  24. }
  25. else if(dancestyle == 3)
  26. {
  27. SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE3);
  28. MakeAnimation[playerid] = 1;
  29. }
  30. else if(dancestyle == 4)
  31. {
  32. SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE4);
  33. MakeAnimation[playerid] = 1;
  34. }
  35. return 1;
  36. }
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43. // Onplayerkeystatechange
  44.  
  45. if(newkeys & KEY_SPRINT)
  46. {
  47. if(MakeAnimation[playerid] == 1)
  48. {
  49. ClearAnimations(playerid);
  50. MakeAnimation[playerid] = 0;
  51. TextDrawHideForPlayer(playerid,txtAnimHelper);
  52. SetPlayerSpecialAction(playerid,SPECIAL_ACTION_NONE);
  53. return 1;
  54. }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement