Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add startup arguments to resource #3147

Open
1 task done
CrosRoad95 opened this issue Aug 7, 2023 · 1 comment
Open
1 task done

Add startup arguments to resource #3147

CrosRoad95 opened this issue Aug 7, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@CrosRoad95
Copy link
Contributor

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

This is just extra feature that may be useful

Describe the solution you'd like

add startup arguments to resource:

startResource(getResourceFromName("foo"), {"test"})

foo resource:

addEventHandler ( "onResourceStart", root, function(startedResource, arguments)
  if(arguments[1] == "test")then
    runTests()
  end
end)

also add it to mtaserver.conf <resource src="db" startup="1" protected="1" arguments="..."/ - it may be pretty good place to store as resource can be set as protected, and arguments ( connection string ) will be availiable only when resource starts where you create dbConnection.

Describe alternatives you've considered

/

Additional context

/

Security Policy

  • I have read and understood the Security Policy and this issue is not about a cheat or security vulnerability.
@CrosRoad95 CrosRoad95 added the enhancement New feature or request label Aug 7, 2023
@botder
Copy link
Member

botder commented Aug 7, 2023

An alternative would be to export a runTests function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants