SHARE
TWEET

Untitled

a guest Aug 31st, 2011 170 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <sourcemod>
  2.  
  3. #define FCVAR_DEVELOPMENTONLY (1<<1)
  4.  
  5. public OnPluginStart()
  6. {
  7.         decl Handle:hCommand, String:szName[64], bool:bIsCommand, flags, Handle:hConVar;
  8.         hCommand = FindFirstConCommand(szName, sizeof(szName), bIsCommand, flags);
  9.         if ( hCommand == INVALID_HANDLE )
  10.                 SetFailState("Failed getting first ConVar");
  11.  
  12.         do
  13.         {
  14.                 if ( bIsCommand )
  15.                         continue;
  16.                
  17.                 if ((flags & FCVAR_DEVELOPMENTONLY) != FCVAR_DEVELOPMENTONLY)
  18.                         continue;
  19.                
  20.                 hConVar = FindConVar(szName);
  21.                 if ( hConVar == INVALID_HANDLE )
  22.                         continue;
  23.                
  24.                 SetConVarFlags(hConVar, (flags &~ FCVAR_DEVELOPMENTONLY));
  25.         } while ( FindNextConCommand(hCommand, szName, sizeof(szName), bIsCommand, flags));
  26.  
  27.         CloseHandle(hCommand);
  28. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top