You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I create a weapon object based on a weapon, I attach it to the back of the player
It seems like weapon objects attachment is poorly streamed
I use this function to create a weapon object export const createWeaponObject = ( weaponType: number, amountOfAmmo: number, newCoorsX: number, newCoorsY: number, newCoorsZ: number, createDefaultComponents: boolean, scale: number = 1, customModel: number = 0, registerAsNetworkObject: boolean = false, scriptHostObject: boolean = true, ): number => { return Citizen.invokeNative<number>( '0x9541D3CF0D398F36', weaponType, amountOfAmmo, newCoorsX, newCoorsY, newCoorsZ, createDefaultComponents, scale, customModel, registerAsNetworkObject, scriptHostObject, ); };
createWeaponObject(currentWeapon.Hash, currentWeapon.Ammo, x, y, z, true, 1, 0, true, true)
then I use this code to attach the created prop to a player
And on the client's I executed this code side it works just fine, but for other clients weapon components do not sync and the attached weapon object position gets updated only every 5 secods (roughly)
server version is 6798 (windows)
game version is 2944
The game prevents objects created by CREATE_WEAPON_OBJECT from synchronizing its attachment data when attached to a Ped (for reference: 0x1410C63BC/1604). Reference CREATE_OBJECT* instead.
When I create a weapon object based on a weapon, I attach it to the back of the player
It seems like weapon objects attachment is poorly streamed
I use this function to create a weapon object
export const createWeaponObject = ( weaponType: number, amountOfAmmo: number, newCoorsX: number, newCoorsY: number, newCoorsZ: number, createDefaultComponents: boolean, scale: number = 1, customModel: number = 0, registerAsNetworkObject: boolean = false, scriptHostObject: boolean = true, ): number => { return Citizen.invokeNative<number>( '0x9541D3CF0D398F36', weaponType, amountOfAmmo, newCoorsX, newCoorsY, newCoorsZ, createDefaultComponents, scale, customModel, registerAsNetworkObject, scriptHostObject, ); };
createWeaponObject(currentWeapon.Hash, currentWeapon.Ammo, x, y, z, true, 1, 0, true, true)
then I use this code to attach the created prop to a player
AttachEntityToEntity(prop, playerPed, GetPedBoneIndex(GetPlayerPed(-1), x, y, z, rx, ry, rz, false, false, false, false, 1, true);
And on the client's I executed this code side it works just fine, but for other clients weapon components do not sync and the attached weapon object position gets updated only every 5 secods (roughly)
server version is 6798 (windows)
game version is 2944
video: https://www.youtube.com/watch?v=EZyMeSWU4tM&ab_channel=RebusOID
The text was updated successfully, but these errors were encountered: