SET_VISUAL_SETTING_FLOAT
Overrides a floating point value from visualsettings.dat temporarily.
Signature
void SET_VISUAL_SETTING_FLOAT(char* name, float value);Parameters
| Name | Type | Description |
|---|---|---|
name | char* | The name of the value to set, such as |
value | float | The value to write. |
Returns void
Description
Overrides a floating point value from visualsettings.dat temporarily.
Usage
SetVisualSettingFloat(name, value)
-- always works, by hash
Citizen.InvokeNative(0xd1d31681, name, value)JavaScript and C#
SetVisualSettingFloat(name, value);
// by hash
Citizen.invokeNative('0xd1d31681', name, value + 0.0000001);Function.Call((Hash)0xd1d31681, name, value);- Float parameters: Lua integers (
10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason.
See also
GET_VISUAL_SETTING_FLOATA getter for SET_VISUAL_SETTING_FLOAT.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.