Scaleform Issues

Hello,

Since a few weeks back, players on our server started reporting issues with various aspects of the server using Scaleform graphics. I’ve been debugging for a while now and I’m now fairly positive the code is hanging while waiting for the scaleform movies to load.

For some reason, any scaleform seems to hang. Even using the FiveM example code to display the example scaleform graphic hangs when attempting to load the scaleform movie. See code example below that I’ve been using to test:

RegisterCommand("testsf", function(source)
    local scaleformHandle = RequestScaleformMovie("mp_big_message_freemode") -- The scaleform you want to use
    while not HasScaleformMovieLoaded(scaleformHandle) do -- Ensure the scaleform is actually loaded before using
      Citizen.Wait(0)
      -- HANGS HERE! NEVER BREAKS OUT.
    end
  
    BeginScaleformMovieMethod(scaleformHandle, "SHOW_SHARD_WASTED_MP_MESSAGE") -- The function you want to call from the AS file
    PushScaleformMovieMethodParameterString("Big Text") -- bigTxt
    PushScaleformMovieMethodParameterString("Smaller Text") -- msgText
    PushScaleformMovieMethodParameterInt(5) -- colId
    EndScaleformMovieMethod() -- Finish off the scaleform, it returns no data, so doesnt need "EndScaleformMovieMethodReturn"
  
    while true do -- Draw the scaleform every frame
      Citizen.Wait(0)
      DrawScaleformMovieFullscreen(scaleformHandle, 255, 255, 255, 255) -- Draw the scaleform fullscreen
    end
end)

It hangs where the comment is. We’re currently on server build 7326 and game build 2802. Any help in solving the issue is appreciated.

Just copy pasted your code, seems to work? Apart from the fact that the scaleform will be displayed infinitely.

Server build 7290, game build 1604.
Could be something to do with server artifacts, maybe try and revert back to latest recommended (7290) and see if the issue persists.

Runs correctly on my end as well (client ver 7333/beta, server ver 7290, gamebuild 3095)

What artifact version are you running?