Skip to content

Commit

Permalink
Update BaseScaleform.cs
Browse files Browse the repository at this point in the history
Corrected invalid native call for RageMP and changed native invoker calls to their respective class functions, for better reference to the RageMP wiki

LemonUIbyLemon#91
  • Loading branch information
TheOfficialDroid committed Aug 31, 2022
1 parent a94e31a commit 9016986
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions LemonUI/Scaleform/BaseScaleform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public bool IsLoaded
#if FIVEM
return API.HasScaleformMovieLoaded(Handle);
#elif RAGEMP
return Invoker.Invoke<bool>(Natives.HasScaleformMovieLoaded, Handle);
return RAGE.Game.Graphics.HasScaleformMovieLoaded(Handle);
#elif RPH
return NativeFunction.CallByHash<bool>(0x85F01B8D5B90570E, Handle);
#elif SHVDN3
Expand All @@ -83,7 +83,7 @@ public BaseScaleform(string sc)
#if FIVEM
Handle = API.RequestScaleformMovie(Name);
#elif RAGEMP
Handle = Invoker.Invoke<int>(Natives.RequestScaleformMovie, Name);
Handle = RAGE.Game.Graphics.RequestScaleformMovie(Name);
#elif RPH
Handle = NativeFunction.CallByHash<int>(0x11FE353CF9733E6F, Name);
#elif SHVDN3
Expand Down Expand Up @@ -114,7 +114,7 @@ private void CallFunctionBase(string function, params object[] parameters)
#if FIVEM
API.ScaleformMovieMethodAddParamInt(objInt);
#elif RAGEMP
Invoker.Invoke(0xC3D0841A0CC546A6, objInt);
RAGE.Game.Graphics.PushScaleformMovieFunctionParameterInt(objInt);
#elif RPH
NativeFunction.CallByHash<int>(0xC3D0841A0CC546A6, objInt);
#elif SHVDN3
Expand All @@ -128,9 +128,7 @@ private void CallFunctionBase(string function, params object[] parameters)
API.AddTextComponentSubstringPlayerName(objString);
API.EndTextCommandScaleformString();
#elif RAGEMP
Invoker.Invoke(Natives.BeginTextCommandScaleformString, "STRING");
Invoker.Invoke(Natives.AddTextComponentSubstringPlayerName, objString);
Invoker.Invoke(Natives.EndTextCommandScaleformString);
RAGE.Game.Graphics.PushScaleformMovieFunctionParameterString(objString);
#elif RPH

NativeFunction.CallByHash<int>(0x80338406F3475E55, "STRING");
Expand All @@ -147,7 +145,7 @@ private void CallFunctionBase(string function, params object[] parameters)
#if FIVEM
API.ScaleformMovieMethodAddParamFloat(objFloat);
#elif RAGEMP
Invoker.Invoke(0xD69736AAE04DB51A, objFloat);
RAGE.Game.Graphics.PushScaleformMovieFunctionParameterFloat(objFloat);
#elif RPH
NativeFunction.CallByHash<int>(0xD69736AAE04DB51A, objFloat);
#elif SHVDN3
Expand All @@ -159,7 +157,7 @@ private void CallFunctionBase(string function, params object[] parameters)
#if FIVEM
API.ScaleformMovieMethodAddParamFloat((float)objDouble);
#elif RAGEMP
Invoker.Invoke(0xD69736AAE04DB51A, (float)objDouble);
RAGE.Game.Graphics.PushScaleformMovieFunctionParameterFloat((float)objDouble);
#elif RPH
NativeFunction.CallByHash<int>(0xD69736AAE04DB51A, (float)objDouble);
#elif SHVDN3
Expand All @@ -171,7 +169,7 @@ private void CallFunctionBase(string function, params object[] parameters)
#if FIVEM
API.ScaleformMovieMethodAddParamBool(objBool);
#elif RAGEMP
Invoker.Invoke(0xC58424BA936EB458, objBool);
Graphics.PushScaleformMovieFunctionParameterBool(objBool);
#elif RPH
NativeFunction.CallByHash<int>(0xC58424BA936EB458, objBool);
#elif SHVDN3
Expand Down Expand Up @@ -266,7 +264,7 @@ public void CallFunction(string function, params object[] parameters)
#if FIVEM
API.EndScaleformMovieMethod();
#elif RAGEMP
Invoker.Invoke(0xC6796A8FFA375E53);
Graphics.PopScaleformMovieFunctionVoid();
#elif RPH
NativeFunction.CallByHash<int>(0xC6796A8FFA375E53);
#elif SHVDN3
Expand Down Expand Up @@ -312,7 +310,7 @@ public int CallFunctionReturn(string function, params object[] parameters)
#if FIVEM
return API.EndScaleformMovieMethodReturnValue();
#elif RAGEMP
return Invoker.Invoke<int>(0xC50AA39A577AF886);
return Graphics.PopScaleformMovieFunction();
#elif RPH
return NativeFunction.CallByHash<int>(0xC50AA39A577AF886);
#elif SHVDN3
Expand All @@ -336,7 +334,7 @@ public virtual void DrawFullScreen()
#if FIVEM
API.DrawScaleformMovieFullscreen(Handle, 255, 255, 255, 255, 0);
#elif RAGEMP
Invoker.Invoke(Natives.DrawScaleformMovieFullscreen, 255, 255, 255, 255, 0);
Graphics.DrawScaleformMovieFullscreen(Handle, 255, 255, 255, 255, 0);
#elif RPH
NativeFunction.CallByHash<int>(0x0DF606929C105BE1, Handle, 255, 255, 255, 255, 0);
#elif SHVDN3
Expand All @@ -360,7 +358,7 @@ public void Dispose()
#if FIVEM
API.SetScaleformMovieAsNoLongerNeeded(ref id);
#elif RAGEMP
Invoker.Invoke(Natives.SetScaleformMovieAsNoLongerNeeded, id);
Graphics.SetScaleformMovieAsNoLongerNeeded(ref id);
#elif RPH
NativeFunction.CallByHash<int>(0x1D132D614DD86811, new NativeArgument(id));
#elif SHVDN3
Expand Down

0 comments on commit 9016986

Please sign in to comment.