altv-issues
altv-issues copied to clipboard
taskSynchronizedScene not synced for other Players
Description of the problem
taskSynchronizedScene Native isnt synced.
See the follow Videos of the two Sites
https://www.youtube.com/watch?v=IkhLyxkTxZ0 https://www.youtube.com/watch?v=iLEitqkVAi0
Reproduction steps
Execute Following-Script Block. Or use simply native taskSynchronizedScene.
this.scene2 = game.createSynchronizedScene(
goToVector.x,
goToVector.y,
goToVector.z,
rot.x,
rot.y,
rot.z,
2
);
game.taskSynchronizedScene(
this.localPlayer.scriptID,
this.scene2,
'anim_casino_b@amb@casino@games@shared@player@',
'idle_cardgames',
2.0,
-2.0,
13,
16,
1148846080,
0
);
game.setSynchronizedScenePhase(this.scene2, 0.0);
Expected behaviour
Native should be synced and other players sees for example the animation
Additional context
No response
Operating system
Windows 10
Version
release/8.6
That's a major feature which is missing! Need that asap
I don't like the idea of natives being synced, if something should be synced it should be handled inside the alt API.
This is what will make scripting much easier if gets synced, no more will need for a workaround. Hopefully in version 13.
Fixed in dev/15.0-dev407
MedalTVGrandTheftAutoV20230803022922.webm I've tryed on 15.0 DEV447 with this code :
const coord = native.getOffsetFromEntityInWorldCoords(cabins[i].Entity, 0, 0, 0)
let uLocal_376 = native.createSynchronizedScene(coord.x, coord.y, coord.z, 0, 0, 0, 2)
native.taskSynchronizedScene(player, uLocal_376, "anim@mp_ferris_wheel", "enter_player_one", 8, -8, 131072, 0, 1148846080, 0)
native.setSynchronizedScenePhase(uLocal_376, 0.0)
And as you see in the video the animation seem to not be synced unless I made it wrongly...
MedalTVGrandTheftAutoV20230803022922.webm I've tryed on 15.0 DEV447 with this code :
const coord = native.getOffsetFromEntityInWorldCoords(cabins[i].Entity, 0, 0, 0) let uLocal_376 = native.createSynchronizedScene(coord.x, coord.y, coord.z, 0, 0, 0, 2) native.taskSynchronizedScene(player, uLocal_376, "anim@mp_ferris_wheel", "enter_player_one", 8, -8, 131072, 0, 1148846080, 0) native.setSynchronizedScenePhase(uLocal_376, 0.0)
And as you see in the video the animation seem to not be synced unless I made it wrongly...
I've tried with multiple animations flags like "2, 16" or "514, 16" without better results
As you can see in the typings, you need to return true in all the events
https://github.com/altmp/altv-types/blob/master/server/index.d.ts#L331
As you can see in the typings, you need to return true in all the events
https://github.com/altmp/altv-types/blob/master/server/index.d.ts#L331
Thanks @C0kkie but I'm making certainly something wrong ! I've tried with (on 15-RC2 or DEV457):
Server side:
alt.on('requestSyncedScene', (player, sceneId) => {
alt.log('requestSyncedScene', player.name, sceneId)
return true
})
alt.on('startSyncedScene', (player, sceneId, startPos, startRot, animDictHash, entityAnimPairs, ) => {
alt.log('startSyncedScene', player.name, sceneId)
return true
})
alt.on('stopSyncedScene', (player, sceneId) => {
return true
})
alt.on('updateSyncedScene', (player, startRate, sceneId) => {
return true
})
And the code above client side. And It's not working : I doesn't even get the log when the scene start or is request...
As you can see in the typings, you need to return true in all the events https://github.com/altmp/altv-types/blob/master/server/index.d.ts#L331
Thanks @C0kkie but I'm making certainly something wrong ! I've tried with (on 15-RC2 or DEV457):
Server side:
alt.on('requestSyncedScene', (player, sceneId) => { alt.log('requestSyncedScene', player.name, sceneId) return true }) alt.on('startSyncedScene', (player, sceneId, startPos, startRot, animDictHash, entityAnimPairs, ) => { alt.log('startSyncedScene', player.name, sceneId) return true }) alt.on('stopSyncedScene', (player, sceneId) => { return true }) alt.on('updateSyncedScene', (player, startRate, sceneId) => { return true })
And the code above client side. And It's not working : I doesn't even get the log when the scene start or is request...
I've tried another approach with networkCreateSynchronisedScene native on 15.0-DEV463 and it's working with one player.
With to player I get
As you can see in the typings, you need to return true in all the events https://github.com/altmp/altv-types/blob/master/server/index.d.ts#L331
Thanks @C0kkie but I'm making certainly something wrong ! I've tried with (on 15-RC2 or DEV457): Server side:
alt.on('requestSyncedScene', (player, sceneId) => { alt.log('requestSyncedScene', player.name, sceneId) return true }) alt.on('startSyncedScene', (player, sceneId, startPos, startRot, animDictHash, entityAnimPairs, ) => { alt.log('startSyncedScene', player.name, sceneId) return true }) alt.on('stopSyncedScene', (player, sceneId) => { return true }) alt.on('updateSyncedScene', (player, startRate, sceneId) => { return true })
And the code above client side. And It's not working : I doesn't even get the log when the scene start or is request...
I've tried another approach with networkCreateSynchronisedScene native on 15.0-DEV463 and it's working with one player.
With to player I've got this results :
With to player I get
As you can see in the typings, you need to return true in all the events https://github.com/altmp/altv-types/blob/master/server/index.d.ts#L331
Thanks @C0kkie but I'm making certainly something wrong ! I've tried with (on 15-RC2 or DEV457): Server side:
alt.on('requestSyncedScene', (player, sceneId) => { alt.log('requestSyncedScene', player.name, sceneId) return true }) alt.on('startSyncedScene', (player, sceneId, startPos, startRot, animDictHash, entityAnimPairs, ) => { alt.log('startSyncedScene', player.name, sceneId) return true }) alt.on('stopSyncedScene', (player, sceneId) => { return true }) alt.on('updateSyncedScene', (player, startRate, sceneId) => { return true })
And the code above client side. And It's not working : I doesn't even get the log when the scene start or is request...
I've tried another approach with networkCreateSynchronisedScene native on 15.0-DEV463 and it's working with one player.
With to player I've got this results :
MedalTVGrandTheftAutoV20230807224525.webm
Does it's because I have disabled netowner on the objects that I get this ?