ItsMods

Full Version: Help for my plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello , this is my first try to make a plugin for mw3, i have use the plugin maker v2.

I have try to makre possible to unlock the FPS capped at 91.
but my plugin wont work and i dont know why.
This is my code :

CSHARP Code
  1. using Addon;
  2. using System.Collections.Generic;
  3.  
  4. namespace myplugin_test
  5. {
  6. public class myplugin_test : CPlugin
  7. {
  8.  
  9. public override void OnServerLoad()
  10. {
  11. ServerPrint("\n Cap max fps Loaded \n AUTHOR: Ninja970");
  12. }
  13.  
  14. public override ChatType OnSay(string Message, ServerClient Client)
  15. {
  16. List<string> lines = new List<string>();
  17. if (Message.StartsWith("!commaxfpson"))
  18. {
  19.  
  20. if (Message.Substring(13) == "1")
  21. {
  22. SetClientDvar(Client.ClientNum, "com_maxfps \"180\"");
  23. TellClient(Client.ClientNum, "^3FPS Capped ON!", true);
  24. }
  25. else if (Message.Substring(13) == "0")
  26. {
  27. SetClientDvar(Client.ClientNum, "com_maxfps \"91\"");
  28. TellClient(Client.ClientNum, "^3FPS Capped OFF!", true);
  29. return ChatType.ChatContinue;
  30. }
  31.  
  32. }
  33. }


-- Moved to general discussion - @JariZ
use [code] tags
As I stated mutliple times you can not raise com_maxfps higher than 100.