You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
then in "foo" resource in resource start event you can read those arguments:
And option to set startup arguments for client only in "onResourceStart" event.
addEventHandler ( "onResourceStart", root, function(resource, arguments)
if(resource==getThisResource())thensetClientStartupArguments({ foo="foo"}) -- oksetClientStartupArguments({ foo="foo"}) -- argument already set, throw errorelsesetClientStartupArguments({ foo="foo"}) -- not okey because other resource is starting, throw errorendend)
setClientStartupArguments({ foo="foo"}) -- can not use outside onResourceStart event
Possibly arguments should be only available in resource that own given resource, so i can not read startup arguments of other resources.
Also, another good use case would be mysql resource. Mta could support option to provide startup arguments from mtasercer.conf:
Is your feature request related to a problem? Please describe.
Add option to provide startup arguments for resources, client and server side.
It is very common pattern to send configuration, ccache of certain things to client when resource start, example: https://github.com/Patrick2562/mtasa-pAttach/blob/master/src/server.lua#L21
Describe the solution you'd like
then in "foo" resource in resource start event you can read those arguments:
And option to set startup arguments for client only in "onResourceStart" event.
clientside:
serverside:
Possibly arguments should be only available in resource that own given resource, so i can not read startup arguments of other resources.
Also, another good use case would be mysql resource. Mta could support option to provide startup arguments from mtasercer.conf:
Describe alternatives you've considered
No response
Additional context
Would be very handy in slipe-server :)
Security Policy
The text was updated successfully, but these errors were encountered: