openmultiplayer / openmultiplayer/open.mp

Differences in calling OnGamemodeExit using gmx and exit commands

Open
#932 0 comments 0 reactions 1 assignee View on GitHub

@AmyrAhmady is already working on this.

Since Jun 30, 2024.

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

Description

Describe the bug
When I restart the rcon server with the gmx command, when OnGamemodeExit is called, the vehicles are still valid and can be manipulated, for example their data can be saved. However, when I use the rcon exit command, the vehicles are no longer valid and therefore cannot be worked with.

Maybe it is not just about vehicles.

To Reproduce
Steps to reproduce the behavior:

  1. Create any valid vehicle in OnGamemodeInit() callback and save its ID to any variable
  2. Add printf("%i",IsValidVehicle(variable)); under OnGamemodeExit callback
  3. See different states when gmx is used and when exit is used.

Expected behavior
Keep valid vehicles in both cases so we can manipulate with them.

Screenshots and/or logs
https://i.ibb.co/JprhZqz/image.png
https://i.ibb.co/58hkmyg/image.png

version omp 1.2.0.2735
https://github.com/openmultiplayer/open.mp/actions/runs/9136915959

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.