We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Networked peds play dead/ragdoll animation, slide in it over the floor and change owner upon being shot.
For ped to behave same as it is being shot by its current owner/to behave same when once set
RegisterCommand("test_ped", function() local ped = PlayerPedId() local coords = GetEntityCoords(ped) local new_data = { model = `U_M_Y_Zombie_01`, zombie = 0, spawn_coords = vector4(coords.x, coords.y, coords.z, GetEntityHeading(ped)), times_killed = 1, } RequestModel(`U_M_Y_Zombie_01`) while not HasModelLoaded(`U_M_Y_Zombie_01`) do print("Waiting for model to load") Wait(0) end new_data.zombie = CreatePed(26, `U_M_Y_Zombie_01`, new_data.spawn_coords.x, new_data.spawn_coords.y, new_data.spawn_coords.z, new_data.spawn_coords.w, true, true) while not DoesEntityExist(new_data.zombie) do print("Waiting for ped to spawn") Wait(0) end new_data.network_id = PedToNet(new_data.zombie) while not NetworkDoesNetworkIdExist(new_data.network_id) do print("Waiting for network id to exist") Wait(0) end SetNetworkIdCanMigrate(new_data.network_id, false) SetEntityInvincible(new_data.zombie, false) SetEntityMaxHealth(new_data.zombie, 10000) SetPedMaxHealth(new_data.zombie, 10000) SetEntityHealth(new_data.zombie, 10000) SetPedArmour(new_data.zombie, 10000) SetEntityInvincible(new_data.zombie, false) SetPedSeeingRange(new_data.zombie, 150.0) SetPedHearingRange(new_data.zombie, 150.0) SetPedAccuracy(new_data.zombie, 100.0) SetPedVisualFieldMaxAngle(new_data.zombie, 360.0) SetPedVisualFieldPeripheralRange(new_data.zombie, 360.0) SetPedSuffersCriticalHits(new_data.zombie, false) SetBlockingOfNonTemporaryEvents(new_data.zombie, true) SetPedCanRagdoll(new_data.zombie, false) SetPedCanRagdollFromPlayerImpact(new_data.zombie, false) SetPedRagdollOnCollision(new_data.zombie, false) NetworkDisableProximityMigration(new_data.network_id) SetPedConfigFlag(new_data.zombie, 147, true) SetPedConfigFlag(new_data.zombie, 148, true) SetPedConfigFlag(new_data.zombie, 430, true) SetPedConfigFlag(new_data.zombie, 2, true) SetPedConfigFlag(new_data.zombie, 403, true) SetPedConfigFlag(new_data.zombie, 231, false) SetPedConfigFlag(new_data.zombie, 232, false) SetPedConfigFlag(new_data.zombie, 233, false) SetPedConfigFlag(new_data.zombie, 234, false) SetPedConfigFlag(new_data.zombie, 289, false) TaskCombatPed(new_data.zombie, ped, 0, 16) local last_owner = 0 while DoesEntityExist(new_data.zombie) do local owner = GetPlayerServerId(NetworkGetEntityOwner(new_data.zombie)) if owner ~= last_owner then last_owner = owner new_data.owner = owner print("Owner changed to: " .. owner, "Can ped ragdoll?", CanPedRagdoll(new_data.zombie)) end TaskCombatPed(new_data.zombie, ped, 0, 16) Wait(0) end end, false)
Unknown
FiveM, OneSync, Natives
Fivem/tested from 9875 to 11895,
Video 1: https://streamable.com/ifsuf8 Video 2: https://streamable.com/udsm63
The text was updated successfully, but these errors were encountered:
Any suggestions or ideas how to fix this?
Sorry, something went wrong.
No branches or pull requests
What happened?
Networked peds play dead/ragdoll animation, slide in it over the floor and change owner upon being shot.
Expected result
For ped to behave same as it is being shot by its current owner/to behave same when once set
Reproduction steps
Importancy
Unknown
Area(s)
FiveM, OneSync, Natives
Specific version(s)
Fivem/tested from 9875 to 11895,
Additional information
Video 1: https://streamable.com/ifsuf8
Video 2: https://streamable.com/udsm63
The text was updated successfully, but these errors were encountered: