Advertisement
B2SX

[CSGO] Block Buttons

Jan 18th, 2018
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.76 KB | None | 0 0
  1. #include <sourcemod>
  2. #include <cstrike>
  3.  
  4. #pragma tabsize 0
  5. bool BlockButtons;
  6.  
  7. public Plugin myinfo =
  8. {
  9.     name = "[CSGO] Block Buttons",
  10.     author = "BaroNN",
  11.     description = "",
  12.     version = "1.0",
  13.     url = "http://steamcommunity.com/id/BaRoNN-Main"
  14. }
  15.  
  16. public void OnPluginStart()
  17. {
  18.     RegAdminCmd("sm_blockbuttons", Command_Block, ADMFLAG_GENERIC);
  19. }
  20.  
  21. public Action Command_Block(int client, int args)
  22. {
  23.     BlockButtons = !BlockButtons;
  24.     PrintToChatAll("[SM] %N %s \x10Block Pressing Buttons", client, BlockButtons ? ("\x04Enabled"):("\x02Disabled"));
  25. }
  26.  
  27. public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3], float angles[3], int &weapon)
  28. {
  29.     if (BlockButtons)
  30.     {
  31.         if (buttons & IN_USE)buttons &= ~IN_USE;
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement