openmultiplayer / openmultiplayer/open.mp

Add new natives SetConsoleVarAsString, SetConsoleVarAsInt, SetConsoleVarAsFloat, SetConsoleVarAsBool.

Open
#955 3 comments 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

There are such functions as GetConsoleVarAsString, GetConsoleVarAsInt, GetConsoleVarAsFloat, GetConsoleVarAsBool.

Sometimes there is a desire to rigidly set some settings in config.json at the game mode level, so as not to restore them every time.
Yes, you can just move config.json, but sometimes from version to version new items are added to it and you have to spend time on it (although not much, but still).

I suggest to add their analogs only in reverse, which would set var: SetConsoleVarAsString, SetConsoleVarAsInt, SetConsoleVarAsFloat, SetConsoleVarAsBool.

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 existing GetConsoleVarAsString, GetConsoleVarAsInt, GetConsoleVarAsFloat, and GetConsoleVarAsBool implementations and their native registrations. Review how those getters access console variables, then add corresponding setters and verify that each type can update the value used by the game mode.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.