RedM Natives

_GET_EASING_CURVE_VALUE

TYPE_LINEAR, TYPE_QUADRATIC_IN, TYPE_QUADRATIC_OUT, TYPE_QUADRATIC_INOUT, TYPE_CUBIC_IN, TYPE_CUBIC_OUT, TYPE_CUBIC_INOUT, TYPE_QUARTIC_IN, TYPE_QUARTIC_OUT, TYPE_QUARTIC_INOUT, TYPE_QUINTIC_IN, TYPE_QUINTIC_OUT, TYPE_QUINTIC_INOUT, TYPE…

Hash0xEF50E344A8F93784
Runtime nameGetEasingCurveValue
NamespaceMISC
SideClient
NameCommunity guess
Docs
Since build1207

Signature

float _GET_EASING_CURVE_VALUE(float t, float b, float d, int easingCurveType);

Parameters

NameTypeDescription
tfloat—
bfloat—
dfloat—
easingCurveTypeint—

Returns float

Description

https://easings.net/

enum class eEasingCurveType
{
	TYPE_LINEAR,
	TYPE_QUADRATIC_IN,
	TYPE_QUADRATIC_OUT,
	TYPE_QUADRATIC_INOUT,
	TYPE_CUBIC_IN,
	TYPE_CUBIC_OUT,
	TYPE_CUBIC_INOUT,
	TYPE_QUARTIC_IN,
	TYPE_QUARTIC_OUT,
	TYPE_QUARTIC_INOUT,
	TYPE_QUINTIC_IN,
	TYPE_QUINTIC_OUT,
	TYPE_QUINTIC_INOUT,
	TYPE_EXPONENTIAL_IN,
	TYPE_EXPONENTIAL_OUT,
	TYPE_EXPONENTIAL_INOUT,
	TYPE_SINE_IN,
	TYPE_SINE_OUT,
	TYPE_SINE_INOUT,
	TYPE_CIRCULAR_IN,
	TYPE_CIRCULAR_OUT,
	TYPE_CIRCULAR_INOUT,
	TYPE_BOUNCE_IN,
	TYPE_BOUNCE_OUT,
	TYPE_BOUNCE_INOUT,
	TYPE_CUSTOM
};

Usage

Lua
local retval = GetEasingCurveValue(t, b, d, easingCurveType)

-- always works, by hash
local retval = Citizen.InvokeNative(0xEF50E344A8F93784, t, b, d, easingCurveType, Citizen.ResultAsFloat())
JavaScript and C#
JavaScript
const retval = GetEasingCurveValue(t, b, d, easingCurveType);

// by hash
const retval = Citizen.invokeNative('0xEF50E344A8F93784', t + 0.0000001, b + 0.0000001, d + 0.0000001, easingCurveType, Citizen.returnResultAnyway(), Citizen.resultAsFloat());
C#
float retval = Function.Call<float>((Hash)0xEF50E344A8F93784, t, b, d, easingCurveType);
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.
  • The name is a community guess and may change. If the named call is missing in your client build, use InvokeNative with the hash — it always works.

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.