Guest User

Untitled

a guest
Aug 13th, 2019
94
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public PlVers:__version =
  2. {
  3. version = 5,
  4. filevers = "1.3.1",
  5. date = "11/02/2013",
  6. time = "11:02:37"
  7. };
  8. new Float:NULL_VECTOR[3];
  9. new String:NULL_STRING[4];
  10. public Extension:__ext_core =
  11. {
  12. name = "Core",
  13. file = "core",
  14. autoload = 0,
  15. required = 0,
  16. };
  17. new MaxClients;
  18. public Extension:__ext_sdktools =
  19. {
  20. name = "SDKTools",
  21. file = "sdktools.ext",
  22. autoload = 1,
  23. required = 1,
  24. };
  25. public Plugin:myinfo =
  26. {
  27. name = "Scary Gman Screamer Face",
  28. description = "Scares players shitless",
  29. author = "msleeper",
  30. version = "1.0",
  31. url = "http://www.msleeper.com/"
  32. };
  33. public __ext_core_SetNTVOptional()
  34. {
  35. MarkNativeAsOptional("GetFeatureStatus");
  36. MarkNativeAsOptional("RequireFeature");
  37. MarkNativeAsOptional("AddCommandListener");
  38. MarkNativeAsOptional("RemoveCommandListener");
  39. VerifyCoreVersion();
  40. return 0;
  41. }
  42.  
  43. EmitSoundToClient(client, String:sample[], entity, channel, level, flags, Float:volume, pitch, speakerentity, Float:origin[3], Float:dir[3], bool:updatePos, Float:soundtime)
  44. {
  45. new clients[1];
  46. clients[0] = client;
  47. new var1;
  48. if (entity == -2)
  49. {
  50. var1 = client;
  51. }
  52. else
  53. {
  54. var1 = entity;
  55. }
  56. entity = var1;
  57. EmitSound(clients, 1, sample, entity, channel, level, flags, volume, pitch, speakerentity, origin, dir, updatePos, soundtime);
  58. return 0;
  59. }
  60.  
  61. public OnPluginStart()
  62. {
  63. RegAdminCmd("sm_screamer", Command_Screamer, 32, "sm_screamer <#userid|name>", "", 0);
  64. return 0;
  65. }
  66.  
  67. public OnMapStart()
  68. {
  69. PrecacheSound("npc/stalker/go_alert2a.wav", true);
  70. return 0;
  71. }
  72.  
  73. public Action:Command_Screamer(client, args)
  74. {
  75. if (args < 1)
  76. {
  77. ReplyToCommand(client, "[SM] Usage: sm_screamer <client>");
  78. return Action:3;
  79. }
  80. decl String:player[64];
  81. GetCmdArg(1, player, 64);
  82. new String:target_name[64];
  83. new target_list[64];
  84. new target_count;
  85. new bool:tn_is_ml;
  86. if (0 >= (target_count = ProcessTargetString(player, client, target_list, 64, 36, target_name, 64, tn_is_ml)))
  87. {
  88. ReplyToCommand(client, "[SM] No matching client");
  89. return Action:3;
  90. }
  91. new i;
  92. while (i < target_count)
  93. {
  94. Screamer(client, target_list[i]);
  95. i++;
  96. }
  97. return Action:3;
  98. }
  99.  
  100. Screamer(client, target)
  101. {
  102. new Handle:cvarCheats = FindConVar("sv_cheats");
  103. new var1;
  104. if (target > 0 && target <= MaxClients)
  105. {
  106. new var2;
  107. if (IsClientConnected(target) && IsClientInGame(target))
  108. {
  109. EmitSoundToClient(target, "npc/stalker/go_alert2a.wav", -2, 0, 75, 0, 1.0, 100, -1, NULL_VECTOR, NULL_VECTOR, true, 0.0);
  110. SendConVarValue(target, cvarCheats, "1");
  111. ClientCommand(target, "r_screenoverlay models/gman/gman_facehirez");
  112. SendConVarValue(target, cvarCheats, "0");
  113. CreateTimer(0.4, Timer_Screamer, target, 2);
  114. }
  115. }
  116. return 0;
  117. }
  118.  
  119. public Action:Timer_Screamer(Handle:timer, any:client)
  120. {
  121. new Handle:cvarCheats = FindConVar("sv_cheats");
  122. new var1;
  123. if (IsClientConnected(client) && IsClientInGame(client))
  124. {
  125. SendConVarValue(client, cvarCheats, "1");
  126. ClientCommand(client, "r_screenoverlay off");
  127. SendConVarValue(client, cvarCheats, "0");
  128. }
  129. return Action:0;
  130. }
RAW Paste Data