openmultiplayer / openmultiplayer/open.mp

Timer component: pause/resume

Open
#996 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
641
Forks
208
PR merge metrics
No merged PRs in 30d

Description

Is your feature request related to a problem? Please describe.
N/A

Describe the solution you'd like
Allow to pause and resume timers at any point. E.g. you set a timer for 5000 milliseconds. After 2000 milliseconds have passed, pause() is called on it. When resume() is called at any later point in time, the timer should continue with the 3000 milliseconds it had left when it was paused.

Describe alternatives you've considered
Can be done in Pawn by storing the remaining time using GetTimerRemaining, killing the timer and then setting it again with whatever time was left at a later point, but it seems trivial to just add it to the component and removes the need to create an extra global in Pawn.

Additional context
N/A

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the timer component and its existing pause-related or remaining-time behavior, then trace how timers are created, stopped, and exposed to Pawn. Implement pause() and resume() so a paused timer retains its remaining duration, and verify that resuming continues from that duration rather than restarting the full interval.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.