-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
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
Update NetworkAddEntityToSynchronisedScene.md #829
Changes from 2 commits
da8777b
0039676
fffecad
4b034e4
090b6cd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,16 +5,42 @@ ns: NETWORK | |
|
||
```c | ||
// 0xF2404D68CBC855FA 0x10DD636C | ||
void NETWORK_ADD_ENTITY_TO_SYNCHRONISED_SCENE(Entity entity, int netScene, char* animDict, char* animName, float speed, float speedMulitiplier, int flag); | ||
void NETWORK_ADD_ENTITY_TO_SYNCHRONISED_SCENE(Entity entity, int netScene, char* animDict, char* animName, float blendInSpeed, float blendOutSpeed, float flag); | ||
``` | ||
|
||
|
||
## Parameters | ||
* **entity**: | ||
* **netScene**: | ||
* **animDict**: | ||
* **animName**: | ||
* **speed**: | ||
* **speedMulitiplier**: | ||
* **flag**: | ||
### Parameters | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Things such as |
||
* **entity**: The Entity that the animation is gonna play on (Recomended that the entity is serversided for best syncing). | ||
* **netScene**: scene id. | ||
* **animDict**: The animDict of the animation that you want to play (remember you have to load with RequestAnimDict() before executing this native) | ||
* **animName**: The name of the animation that the entity is gonna play. | ||
* **blendInSpeed**: a float (normal speed is 8.0f). | ||
* **blendOutSpeed**: a float (normal speed is -8.0f). | ||
* **flag**: A float 1000.0f (Also doesn't seem to affect anything). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From my research of this native method, If If You can find more about the ieee-754 specification here. |
||
|
||
### Animation Dictionaries | ||
* **Animation List**: https://alexguirre.github.io/animations-list/ | ||
* **Other Option**: More likely to find your desired animation by just searching OpenIV | ||
* Most can be found here: (Gta V path)\update\x64\dlcpacks\(Desired folder like mpheist)\dlc.rpf\x64\anim\ingame\[email protected]\ | ||
* Most usefull ones start with anim@scripted@... | ||
|
||
### Animations | ||
* **Animation List**: https://alexguirre.github.io/animations-list/ | ||
* **Other Option**: You are much more likely to find the animation by opening [CodeWalker's](https://pl.gta5-mods.com/tools/codewalker-gtav-interactive-3d-map) Ped Viewer and putting the AnimDict into the search bar. | ||
|
||
### Used With | ||
4mmonium marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* **NetworkAddPedToSynchronisedScene**: https://docs.fivem.net/natives/?_0x742A637471BCECD9. | ||
* **NetworkAddEntityToSynchronisedScene**: https://docs.fivem.net/natives/?_0xF2404D68CBC855FA. | ||
* **NetworkCreateSynchronisedScene**: https://docs.fivem.net/natives/?_0x7CD6BC4C2BBDD526. | ||
|
||
### Example | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't need triple hashes, only custom headers do, you can use double hashes here 🙂 |
||
```lua | ||
ped = PlayerPedId() | ||
pedCoords = GetEntityCoords(ped) | ||
animDict = 'anim@scripted@heist@ig9_control_tower@male@' | ||
loadAnimDict(animDict) --Not a fivem native a function that you have to create yourself | ||
|
||
scene = NetworkCreateSynchronisedScene(GetEntityCoords(Object), GetEntityRotation(Object), 2, true, false, 100065353216, 0, 1065353216) | ||
Object = GetClosestObjectOfType(pedCoords.x,pedCoords.y,pedCoords.z, 2.5, GetHashKey('h4_prop_h4_elecbox_01a'), 0, 0, 0) | ||
NetworkAddEntityToSynchronisedScene(Object, scene, animDict, 'exit_electric_box', 1.0, -1.0, 1000.0) | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot find any evidence of the flag being a
float
value, I will explain down below in the## Parameters section