ItsMods

Full Version: Resize Plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Basically a plugin that sets the window style to resize
tl;dr it mw3 server console go resize yay

Made it (in 5 minutes) because people were complaining @ http://www.itsmods.com/forum/Thread-hey-...nsole.html

CSHARP Code
  1. public class ServerResizer : CPlugin
  2. {
  3. #region Signatures
  4. [DllImport("user32.dll")]
  5. static extern int SetWindowLong(IntPtr hWnd, int nIndex, long dwNewLong);
  6. #endregion
  7.  
  8. public unsafe override void OnServerLoad()
  9. {
  10. try
  11. {
  12. ServerPrint("MW3ServerResize by jariz");
  13. SetWindowLong(*(IntPtr*)0x5933A50, -16, 0x94CF0000L);
  14. }
  15. catch (Exception z) { ServerPrint("Failed: " + z.ToString()); }
  16. }
  17. }
Why not just add resizability to the Window but instead force another size maybe nobody wants and use static offsets?
ok well, improve it if you've got a problem with it. Troll
also static pointers work fine. i use it for playermanager as well and it works perfectly. If you're going to search for the window you'll have problems when for example other servers are running on the same computer
Okay @SuperNovaAO
Made it resizable instead of fullscreen
thanks