Advertisement
Zonas

Untitled

Jun 28th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. #pragma semicolon 1
  2.  
  3. #define DEBUG
  4.  
  5. #define PLUGIN_AUTHOR ""
  6. #define PLUGIN_VERSION "0.00"
  7.  
  8. #include <sourcemod>
  9. #include <sdktools>
  10. #include <morecolors>
  11.  
  12. #pragma newdecls required
  13.  
  14. bool Enabled;
  15.  
  16. public Plugin myinfo =
  17. {
  18. name = "",
  19. author = PLUGIN_AUTHOR,
  20. description = "",
  21. version = PLUGIN_VERSION,
  22. url = ""
  23. };
  24.  
  25. public void OnPluginStart()
  26. {
  27. RegConsoleCmd("sm_test", Command_Test, "Spawns a bot");
  28. }
  29.  
  30. public Action Command_Test(int client, int args)
  31. {
  32. if (Enabled)
  33. {
  34. Enabled = false;
  35. ServerCommand("tf_bot_kick all");
  36. CPrintToChatAll("{fullred}[SVH] {darkgray}Test Bot Disabled");
  37. }
  38.  
  39. else
  40. {
  41. ServerCommand("mp_autoteambalance 0");
  42. ServerCommand("tf_bot_add 1 Pyro blue easy");
  43. ServerCommand("tf_bot_difficulty 0");
  44. ServerCommand("tf_bot_keep_class_after_death 1");
  45. ServerCommand("tf_bot_taunt_victim_chance 0");
  46. ServerCommand("tf_bot_join_after_player 0");
  47. Enabled = true;
  48. CPrintToChatAll("{fullred}[SVH] {darkgray}Test Bot Enabled");
  49. }
  50. return Plugin_Handled;
  51. }
  52.  
  53. public Action:OnPlayerRunCmd(client, &buttons, &impulse, Float:vel[3], Float:angles[3], &weapon)
  54. {
  55. if (!Enabled && !IsPlayerAlive(client) && IsClientBot(client)) return Plugin_Continue;
  56. new rocket = INVALID_ENT_REFERENCE;
  57. decl Float:fClientEyePosition[3];
  58. GetClientEyePosition(client, fClientEyePosition);
  59. }
  60.  
  61. stock bool:IsClientBot(client)
  62. {
  63. return client != 0 && IsClientInGame(client) && IsFakeClient(client) && !IsClientReplay(client) && !IsClientSourceTV(client);
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement