Open
Description
What happened?
When I try to execute CreateScenarioPointHash on a server with OneSync, the animation works correctly for the player who executes it, but for the viewers, the player gets stuck as shown in the attached image.
Expected result
The animation will be displayed correctly for all players
Reproduction steps
Being in two instances, it will only work correctly for the client that runs the code; for the others, the player will remain stuck.
Importancy
Slight inconvenience
Area(s)
RedM, OneSync
Specific version(s)
b1491
Additional information
RegisterCommand("runCreateScenario", function(_, args)
createScenario( 'world_human_gravedig' )
end)
function createScenario( anim )
local ped = PlayerPedId()
local scenarioHash = GetHashKey( anim )
while HasScenarioTypeLoaded( scenarioHash ) == 0 do
RequestScenarioType( scenarioHash, 15 ,0, 0 )
Wait(100)
end
local coords = GetEntityCoords( ped )
local scenario = CreateScenarioPointHash( scenarioHash, coords.x ,coords.y, coords.z - 0.95, GetEntityHeading(ped), 1, 1, true);
Citizen.InvokeNative( 0x5AF19B6CC2115D34, scenario, 23, true );
Citizen.InvokeNative( 0x5AF19B6CC2115D34, scenario, 25, true );
TaskUseScenarioPoint( ped, scenario, 0, 0, true, false, 0, false, -1082130432, false)
end