Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
      4. Frontier Pursuits
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

a1994114a

A mod to Pause the game screen?

Recommended Posts

a1994114a

Hi, all. I'm thinking if there's a mod that pause the game screen without going back to the menu? Since I'm not good at English, I really want something like that to pause the game while showing the game screen and subtitles at the same so that I can figure out what my characters are saying and understand the conversation. Any help?

Share this post


Link to post
Share on other sites
maro_hannover

If Someone Don't Understand You i will tell what you want

 

I want a mod that pauses the game without returning to the menu. so i will still see the characters and everything and when i pause i don't lose memory when having big map mods. Absoloutley Like GTA V.

Share this post


Link to post
Share on other sites
Jitnaught

 

If Someone Don't Understand You i will tell what you want

 

I want a mod that pauses the game without returning to the menu. so i will still see the characters and everything and when i pause i don't lose memory when having big map mods. Absoloutley Like GTA V.

I think that made less sense.

 

This could be kinda possible. You could freeze all the peds and cars in the world when you pause, but subtitles and things like that wouldn't stay there.

I don't believe it is 100% possible (at least not with natives).

Share this post


Link to post
Share on other sites
InfamousSabre

If nothing else works to keep the subtitles on-screen, maybe try capturing a screenshot, freezing everything you can, then displaying the screenshot over everything until you decide to unfreeze.

Now how one would go about capturing this screenshot, I'm not sure. Honestly never tried.

Share this post


Link to post
Share on other sites
leftas

I doubt this will work.

using System;using System.Collections.Generic;using GTA;using System.Diagnostics;using System.Runtime.InteropServices;using System.Windows.Forms;namespace DelayDeadDelete{    public class Main : Script    {        public Main()        {                        KeyDown += Main_KeyDown;        }        bool stopped;        void Main_KeyDown(object sender, GTA.KeyEventArgs e)        {            if(e.Key == Keys.P)            {                if(stopped)                {                    Process gta = Process.GetCurrentProcess();                    ResumeProcess(gta.Id);                }                else                {                    Process gta = Process.GetCurrentProcess();                    SuspendProcess(gta.Id);                }                stopped = !stopped;            }        }                [Flags]        public enum ThreadAccess : int        {            TERMINATE = (0x0001),            SUSPEND_RESUME = (0x0002),            GET_CONTEXT = (0x0008),            SET_CONTEXT = (0x0010),            SET_INFORMATION = (0x0020),            QUERY_INFORMATION = (0x0040),            SET_THREAD_TOKEN = (0x0080),            IMPERSONATE = (0x0100),            DIRECT_IMPERSONATION = (0x0200)        }        [DllImport("kernel32.dll")]        static extern IntPtr OpenThread(ThreadAccess dwDesiredAccess, bool bInheritHandle, uint dwThreadId);        [DllImport("kernel32.dll")]        static extern uint SuspendThread(IntPtr hThread);        [DllImport("kernel32.dll")]        static extern int ResumeThread(IntPtr hThread);        [DllImport("kernel32.dll", SetLastError = true)]        [return: MarshalAs(UnmanagedType.Bool)]        static extern bool CloseHandle(IntPtr hObject);        private static void SuspendProcess(int pid)        {            var process = Process.GetProcessById(pid);            if (process.ProcessName == string.Empty)                return;            foreach (ProcessThread pT in process.Threads)            {                IntPtr pOpenThread = OpenThread(ThreadAccess.SUSPEND_RESUME, false, (uint)pT.Id);                if (pOpenThread == IntPtr.Zero)                {                    continue;                }                SuspendThread(pOpenThread);                CloseHandle(pOpenThread);            }        }        public static void ResumeProcess(int pid)        {            var process = Process.GetProcessById(pid);            if (process.ProcessName == string.Empty)                return;            foreach (ProcessThread pT in process.Threads)            {                IntPtr pOpenThread = OpenThread(ThreadAccess.SUSPEND_RESUME, false, (uint)pT.Id);                if (pOpenThread == IntPtr.Zero)                {                    continue;                }                var suspendCount = 0;                do                {                    suspendCount = ResumeThread(pOpenThread);                } while (suspendCount > 0);                CloseHandle(pOpenThread);            }        }    }}

second(this may work, and may not). Set interval to your liking, I don't recommend less that 100 because you can double click it.

using System;using System.Collections.Generic;using GTA;using System.Diagnostics;using System.Runtime.InteropServices;using System.Windows.Forms;namespace DelayDeadDelete{    public class Main : Script    {        public Main()        {            Tick += Main_Tick;            Interval = 200;        }        void Main_Tick(object sender, EventArgs e)        {            string keyBuffer = string.Empty;            foreach (System.Int32 i in Enum.GetValues(typeof(Keys)))            {                int x = GetAsyncKeyState(i);                if ((x == 1) || (x == Int16.MinValue)) //Use constants (0x8000 and -32768 is Int16.MaxValue)                {                    keyBuffer = Enum.GetName(typeof(Keys), i) + " ";//this is WinAPI listener of the keys                }            }            if(keyBuffer == "P")            {                if (stopped)                {                    Process gta = Process.GetCurrentProcess();                    ResumeProcess(gta.Id);                }                else                {                    Process gta = Process.GetCurrentProcess();                    SuspendProcess(gta.Id);                }                stopped = !stopped;            }            }        bool stopped;                       [Flags]        public enum ThreadAccess : int        {            TERMINATE = (0x0001),            SUSPEND_RESUME = (0x0002),            GET_CONTEXT = (0x0008),            SET_CONTEXT = (0x0010),            SET_INFORMATION = (0x0020),            QUERY_INFORMATION = (0x0040),            SET_THREAD_TOKEN = (0x0080),            IMPERSONATE = (0x0100),            DIRECT_IMPERSONATION = (0x0200)        }        [DllImport("kernel32.dll")]        static extern IntPtr OpenThread(ThreadAccess dwDesiredAccess, bool bInheritHandle, uint dwThreadId);        [DllImport("kernel32.dll")]        static extern uint SuspendThread(IntPtr hThread);        [DllImport("kernel32.dll")]        static extern int ResumeThread(IntPtr hThread);        [DllImport("kernel32.dll", SetLastError = true)]        [return: MarshalAs(UnmanagedType.Bool)]        static extern bool CloseHandle(IntPtr hObject);        // this is import of libraries        [DllImport("User32.dll")]        private static extern short GetAsyncKeyState(System.Windows.Forms.Keys vKey); // Keys enumeration        [DllImport("User32.dll")]        private static extern short GetAsyncKeyState(System.Int32 vKey);        private static void SuspendProcess(int pid)        {            var process = Process.GetProcessById(pid);            if (process.ProcessName == string.Empty)                return;            foreach (ProcessThread pT in process.Threads)            {                IntPtr pOpenThread = OpenThread(ThreadAccess.SUSPEND_RESUME, false, (uint)pT.Id);                if (pOpenThread == IntPtr.Zero)                {                    continue;                }                SuspendThread(pOpenThread);                CloseHandle(pOpenThread);            }        }        public static void ResumeProcess(int pid)        {            var process = Process.GetProcessById(pid);            if (process.ProcessName == string.Empty)                return;            foreach (ProcessThread pT in process.Threads)            {                IntPtr pOpenThread = OpenThread(ThreadAccess.SUSPEND_RESUME, false, (uint)pT.Id);                if (pOpenThread == IntPtr.Zero)                {                    continue;                }                var suspendCount = 0;                do                {                    suspendCount = ResumeThread(pOpenThread);                } while (suspendCount > 0);                CloseHandle(pOpenThread);            }        }    }}

Best regards,
Paul.

Share this post


Link to post
Share on other sites
a1994114a

Check this out :) (Subtitles are freezed too.)

Nice! I've tried it.This is exactly what I needed! But it seems if I pause while a character say into the middle of a line of words and I unpause it, it won't let the character finish that line, instead, it directly jumps into the beginning of next line?

Edited by a1994114a

Share this post


Link to post
Share on other sites
DaBOSS54320

I know what you could do. If you are using .net, Game.TimeScale = 0 should pause everything. Then Game.TimeScale = 1f to put it back. Or anything in between, which may be even more useful so that way you can just slow down time while you read the subtitles without completely pausing the game.

Share this post


Link to post
Share on other sites
Skorpro

Which topic is relevant? Never mind ;)

Here is a proper version. It repeats the conversation now!

Share this post


Link to post
Share on other sites
a1994114a

Which topic is relevant? Never mind ;)

 

Here is a proper version. It repeats the conversation now!

Great, that comes in handy! I like your coding! While the only thing now is that it doesn't pause the game when it's playing movies? I can see characters arms legs freezing but they can still move around and the conversations doesn't stop? Is that upgradable? I can't catch up the movie with my poor English plz help again......

Edited by a1994114a

Share this post


Link to post
Share on other sites
Skorpro
Great, that comes in handy! I like your coding! While the only thing now is that it doesn't pause the game when it's playing movies? I can see characters arms legs freezing but they can still move around and the conversations doesn't stop? Is that upgradable? I can't catch up the movie with my poor English plz help again......

Thanks :) But I'm sorry AFAIK it's impossible to pause the cutscenes. The only idea is to press <ESC> after the movie/cutscene and switch to the INFO tab to read the text.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.