It is not possible to set native properties (invincible, ragdoll, freeze position, etc) for Ped permanently.
It resets after stream out/stream in again this ped.
Also, local ped do not call OnGameEntityCreate event to set properties manually.
It doesn't allow you to set "Dumb" (static) mode for ped.
Reproduction steps
Create any streaming ped, for example: var ped = Alt.CreateLocalPed((uint)PedModel.FreemodeMale01, 0, new Position(10, 10, 76), new Rotation(0, 0, 0), true, 100);
Wait, until ScriptId will be > 0 (await)
Change any property for ped, for example: ped.Frozen = true and/or Alt.Natives.SetEntityInvincible(ped.ScriptId, true)
Get closer to ped to sync it
Aim at ped to trigger running anim to ensure, that ped is frozen (it's really so at this step)
Move out of the streaming area / change dimension to 1.
Return back to ped
Now ped is not frozen - aim again and Ped will run away
Expected behaviour
Cache and return back all params, that was set for ped after player see (stream in) Ped second time or, at least, trigger OnGameEntityCreate event for ped
Additional context
Tested on C# module (client and server)
Operating system
Windows 10
Version
16.0.0-dev.267
Crashdump ID
No response
Confirmation of issue's presence
[X] By submitting this ticket, I affirm that I have verified the presence of this issue on the latest developer version available at the time of writing this ticket.
Description of the problem
It is not possible to set native properties (invincible, ragdoll, freeze position, etc) for Ped permanently. It resets after stream out/stream in again this ped. Also, local ped do not call OnGameEntityCreate event to set properties manually. It doesn't allow you to set "Dumb" (static) mode for ped.
Reproduction steps
var ped = Alt.CreateLocalPed((uint)PedModel.FreemodeMale01, 0, new Position(10, 10, 76), new Rotation(0, 0, 0), true, 100);
ped.Frozen = true
and/orAlt.Natives.SetEntityInvincible(ped.ScriptId, true)
Expected behaviour
Cache and return back all params, that was set for ped after player see (stream in) Ped second time or, at least, trigger
OnGameEntityCreate
event for pedAdditional context
Tested on C# module (client and server)
Operating system
Windows 10
Version
16.0.0-dev.267
Crashdump ID
No response
Confirmation of issue's presence