Advertisement
FanHamMer

Untitled

Aug 24th, 2015
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1. // СПЕШИАЛ ДЛЯ КОРЖИК-ЖОРЖИК, ВИТХ ЛОВЕ(СЕРДЕЧКО)
  2. // БИДЛА КОДЖ, В СУТДИИ
  3.  
  4. #include <a_samp>
  5.  
  6. #define DIALOG_CHATSTYLE_CHOOSE 1
  7.  
  8. new StopTalkVar[MAX_PLAYERS];
  9.  
  10. public OnPlayerDisconnect(playerid, reason)
  11. {
  12. DeletePVar(playerid, "ChatStyle");
  13. return true;
  14. }
  15.  
  16. public OnPlayerCommandText(playerid, cmdtext[])
  17. {
  18. if (strcmp("/chatstyle", cmdtext, true, 10) == 0)
  19. {
  20. ShowPlayerDialog(playerid, DIALOG_CHATSTYLE_CHOOSE, DIALOG_STYLE_LIST, "{FF9900}Стиль общения", "Стандартный\nСтиль общения №1\nСтиль общения №2\nСтиль общения №3\nСтиль общения №4\nСтиль общения №5\nСтиль общения №6\nСтиль общения №7\nСтиль общения №8", "Choose", "Cancel");
  21. return true;
  22. }
  23. return false;
  24. }
  25.  
  26. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  27. {
  28. if(dialogid == DIALOG_CHATSTYLE_CHOOSE)
  29. {
  30. if !response *then return true;
  31. SetPVarInt(playerid, "ChatStyle", listitem);
  32. switch(listitem)
  33. {
  34. case 0..8: SendClientMessage(playerid, -1, "Вы изменили свой стиль общения.");
  35. }
  36. }
  37. return true;
  38. }
  39.  
  40. public OnPlayerText(playerid, text[])
  41. {
  42. switch(GetPVarInt(playerid, "ChatStyle"))
  43. {
  44. case 1: ApplyAnimation(playerid, "MISC", "Idle_Chat_02", 4.1, 0, 1, 1, 1, 1);
  45. case 2: ApplyAnimation(playerid, "GANGS", "prtial_gngtlkA", 4.1, 0, 1, 1, 1, 1);
  46. case 3: ApplyAnimation(playerid, "GANGS", "prtial_gngtlkCt", 4.1, 0, 1, 1, 1, 1);
  47. case 4: ApplyAnimation(playerid, "GANGS", "prtial_gngtlkD", 4.1, 0, 1, 1, 1, 1);
  48. case 5: ApplyAnimation(playerid, "GANGS", "prtial_gngtlkE", 4.1, 0, 1, 1, 1, 1);
  49. case 6: ApplyAnimation(playerid, "GANGS", "prtial_gngtlkF", 4.1, 0, 1, 1, 1, 1);
  50. case 7: ApplyAnimation(playerid, "GANGS", "prtial_gngtlkG", 4.1, 0, 1, 1, 1, 1);
  51. case 8: ApplyAnimation(playerid, "GANGS", "prtial_gngtlkH", 4.1, 0, 1, 1, 1, 1);
  52. default: ApplyAnimation(playerid, "PED", "IDLE_CHAT", 4.1, 0, 1, 1, 1, 1);
  53. }
  54. StopTalkVar[playerid] = SetTimerEx("StopTalk", strlen(text) * 100, false, "d", playerid);
  55. return true;
  56. }
  57.  
  58. forward StopTalk(playerid);
  59. public StopTalk(playerid)
  60. {
  61. ApplyAnimation(playerid, "CARRY", "crry_prtial", 2.0, 0, 0, 0, 0, 0);
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement