SetResourceDefaultSetting
From Multi Theft Auto: Wiki
Function has been disabled. | |
Reason/Note: This function doesn't work actually. See issues for more information. |
This function is used to set a default setting for a specified resource.
Syntax
bool setResourceDefaultSetting ( resource theResource, string settingName, string/int/float settingValue )
Required Arguments
- theResource: the resource where the setting is located
- settingName: the name of the default setting
- settingValue: the new value of the setting
Returns
Returns true if the default setting was successfully set, false otherwise.
Example
This example checks to see if the server has the freeroam server then sets "spawnmaponstart" to "false".
addEventHandler("onResourceStart",resourceRoot,function() local freeroamRes = getResourceFromName("Freeroam") if(freeroamRes)then setResourceDefaultSetting(freeroamRes,"spawnmaponstart","false") end end)
Issues
Issue ID | Description |
---|---|
#5254 | Does not work functions setResourceDefaultSetting and removeResourceDefaultSetting |
See Also
- addResourceConfig
- addResourceMap
- call
- callRemote
- copyResource
- createResource
- deleteResource
- fetchRemote
- getResourceACLRequests
- getResourceConfig
- getResourceDynamicElementRoot
- getResourceExportedFunctions
- getResourceFromName
- getResourceInfo
- getResourceLastStartTime
- getResourceLoadFailureReason
- getResourceLoadTime
- getResourceMapRootElement
- getResourceName
- getResourceOrganizationalPath
- getResourceRootElement
- getResourceState
- getResources
- getThisResource
- isResourceArchived
- refreshResources
- removeResourceFile
- renameResource
- restartResource
- setResourceInfo
- startResource
- stopResource
- updateResourceACLRequest
- getRemoteRequests
- getRemoteRequestInfo
- abortRemoteRequest