Advertisement
Guest User

Untitled

a guest
Apr 29th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.79 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3. #include <YSI/y_timers>
  4.  
  5. // TalkStyle
  6.     new pTalkStyle[MAX_PLAYERS];
  7.     new Timer: pStopTalking[MAX_PLAYERS];
  8.  
  9. // TalkStyleTimer
  10. timer StopTalking[1000](playerid)
  11. {
  12.     ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
  13.     return 1;
  14. }
  15.  
  16. main()
  17. {
  18.     print(" prompted ");
  19. }
  20.  
  21. public OnGameModeInit()
  22. {
  23.     SetGameModeText("Blank Script");
  24.     AddPlayerClass(299, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  25.     return 1;
  26. }
  27.  
  28. public OnGameModeExit()
  29. {
  30.     return 1;
  31. }
  32.  
  33. public OnPlayerRequestClass(playerid, classid)
  34. {
  35.     SpawnPlayer(playerid);
  36.     return 1;
  37. }
  38.  
  39. public OnPlayerConnect(playerid)
  40. {
  41.     return 1;
  42. }
  43.  
  44. public OnPlayerDisconnect(playerid, reason)
  45. {
  46.     stop pStopTalking[playerid];
  47.     return 1;
  48. }
  49.  
  50. public OnPlayerText(playerid, text[])
  51. {
  52.     stop pStopTalking[playerid];
  53.     new talkingtime = strlen(text) * 80;
  54.     switch(pTalkStyle[playerid]) {
  55.         case 1: {
  56.             ApplyAnimation(playerid, "PED", "IDLE_CHAT", 4.1, 1, 1, 1, 1, 1);
  57.             pStopTalking[playerid] = defer StopTalking[talkingtime](playerid);
  58.         }
  59.         case 2: {
  60.             ApplyAnimation(playerid, "GHANDS", "gsign4", 4.1, 1, 1, 1, 1, 1);
  61.             pStopTalking[playerid] = defer StopTalking[talkingtime](playerid);
  62.         }
  63.         case 3: {
  64.             ApplyAnimation(playerid, "GHANDS", "gsign5", 4.1, 1, 1, 1, 1, 1);
  65.             pStopTalking[playerid] = defer StopTalking[talkingtime](playerid);
  66.         }
  67.         default: {
  68.             // Do nothing
  69.         }
  70.     }
  71.     return 1;
  72. }
  73.  
  74. command(settalkingstyle, playerid, params[]) {
  75.     new
  76.         val = strval(params);
  77.  
  78.     if(val <= 0 || val > 3)
  79.         return SendClientMessage(playerid, -1, " /settalkingstyle [1-3] ");
  80.  
  81.     pTalkStyle[playerid] = val;
  82.     new string[64];
  83.     format(string, sizeof(string), " Postavili ste chat style %d!", val);
  84.     SendClientMessage(playerid, -1, string);
  85.    
  86.     return 1;
  87. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement