From f935db8e8be82d803933e4217676b1c1f495222f Mon Sep 17 00:00:00 2001 From: ElPumpo Date: Sun, 16 Dec 2018 00:03:04 +0100 Subject: [PATCH] Use new scaleform native names --- client/modules/scaleform.lua | 57 ++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 26 deletions(-) diff --git a/client/modules/scaleform.lua b/client/modules/scaleform.lua index eca6ba16..20a9c6e8 100644 --- a/client/modules/scaleform.lua +++ b/client/modules/scaleform.lua @@ -1,10 +1,10 @@ ESX.Scaleform.ShowFreemodeMessage = function(title, msg, sec) local scaleform = ESX.Scaleform.Utils.RequestScaleformMovie('MP_BIG_MESSAGE_FREEMODE') - PushScaleformMovieFunction(scaleform, 'SHOW_SHARD_WASTED_MP_MESSAGE') - PushScaleformMovieFunctionParameterString(title) - PushScaleformMovieFunctionParameterString(msg) - PopScaleformMovieFunctionVoid() + BeginScaleformMovieMethod(scaleform, 'SHOW_SHARD_WASTED_MP_MESSAGE') + PushScaleformMovieMethodParameterString(title) + PushScaleformMovieMethodParameterString(msg) + EndScaleformMovieMethod() while sec > 0 do Citizen.Wait(1) @@ -19,21 +19,23 @@ end ESX.Scaleform.ShowBreakingNews = function(title, msg, bottom, sec) local scaleform = ESX.Scaleform.Utils.RequestScaleformMovie('BREAKING_NEWS') - PushScaleformMovieFunction(scaleform, 'SET_TEXT') - PushScaleformMovieFunctionParameterString(msg) - PushScaleformMovieFunctionParameterString(bottom) - PopScaleformMovieFunctionVoid() + BeginScaleformMovieMethod(scaleform, 'SET_TEXT') + PushScaleformMovieMethodParameterString(msg) + PushScaleformMovieMethodParameterString(bottom) + EndScaleformMovieMethod() - PushScaleformMovieFunction(scaleform, 'SET_SCROLL_TEXT') - PushScaleformMovieFunctionParameterInt(0) -- top ticker - PushScaleformMovieFunctionParameterInt(0) -- Since this is the first string, start at 0 - PushScaleformMovieFunctionParameterString(title) - PopScaleformMovieFunctionVoid() + BeginScaleformMovieMethod(scaleform, 'SET_SCROLL_TEXT') + PushScaleformMovieMethodParameterInt(0) -- top ticker + PushScaleformMovieMethodParameterInt(0) -- Since this is the first string, start at 0 + PushScaleformMovieMethodParameterString(title) - PushScaleformMovieFunction(scaleform, 'DISPLAY_SCROLL_TEXT') - PushScaleformMovieFunctionParameterInt(0) -- Top ticker - PushScaleformMovieFunctionParameterInt(0) -- Index of string - PopScaleformMovieFunctionVoid() + EndScaleformMovieMethod() + + BeginScaleformMovieMethod(scaleform, 'DISPLAY_SCROLL_TEXT') + PushScaleformMovieMethodParameterInt(0) -- Top ticker + PushScaleformMovieMethodParameterInt(0) -- Index of string + + EndScaleformMovieMethod() while sec > 0 do Citizen.Wait(1) @@ -48,13 +50,15 @@ end ESX.Scaleform.ShowPopupWarning = function(title, msg, bottom, sec) local scaleform = ESX.Scaleform.Utils.RequestScaleformMovie('POPUP_WARNING') - PushScaleformMovieFunction(scaleform, 'SHOW_POPUP_WARNING') - PushScaleformMovieFunctionParameterFloat(500.0) -- black background - PushScaleformMovieFunctionParameterString(title) - PushScaleformMovieFunctionParameterString(msg) - PushScaleformMovieFunctionParameterString(bottom) - PushScaleformMovieFunctionParameterBool(true) - PopScaleformMovieFunctionVoid() + BeginScaleformMovieMethod(scaleform, 'SHOW_POPUP_WARNING') + + PushScaleformMovieMethodParameterFloat(500.0) -- black background + PushScaleformMovieMethodParameterString(title) + PushScaleformMovieMethodParameterString(msg) + PushScaleformMovieMethodParameterString(bottom) + PushScaleformMovieMethodParameterBool(true) + + EndScaleformMovieMethod() while sec > 0 do Citizen.Wait(1) @@ -69,8 +73,9 @@ end ESX.Scaleform.ShowTrafficMovie = function(sec) local scaleform = ESX.Scaleform.Utils.RequestScaleformMovie('TRAFFIC_CAM') - PushScaleformMovieFunction(scaleform, 'PLAY_CAM_MOVIE') - PopScaleformMovieFunctionVoid() + BeginScaleformMovieMethod(scaleform, 'PLAY_CAM_MOVIE') + + EndScaleformMovieMethod() while sec > 0 do Citizen.Wait(1)