natives icon indicating copy to clipboard operation
natives copied to clipboard

Update SetIkTarget

Open matehun00 opened this issue 1 year ago • 4 comments

Add a lot of info to the docs of SetIkTarget If anyone wants to add js and c# examples, feel free to comment it down below and I'll add it I will not add more commits to this PR (unless something needs fixing)

Most of the credit goes to @kypos on discord

matehun00 avatar Jul 21 '24 15:07 matehun00

For the js example it's

SetIkTarget(PlayerPedId(), 4, 0, 0, -1849.0, -1231.0, 13.0, 0, 0, 10000);

and c# it's

using static CitizenFX.Core.Native.API;
// ...

SetIkTarget(PlayerPedId(), 4, 0, 0, -1849.0f, -1231.0f, 13.0f, 0, 0, 10000);

spacevx avatar Jul 21 '24 16:07 spacevx

For the js example it's

SetIkTarget(PlayerPedId(), 4, 0, 0, -1849.0, -1231.0, 13.0, 0, 0, 10000);

and c# it's

using static CitizenFX.Core.Native.API;
// ...

SetIkTarget(PlayerPedId(), 4, 0, 0, -1849.0, -1231.0, 13.0, 0, 0, 10000);

C# example needs to annotate its float values -1849.0f

AvarianKnight avatar Jul 21 '24 16:07 AvarianKnight

Also not sure on the preferred way to do enums is, most use enum eCamelCase and its enum variables are UpperCamelCase (though this varies from native to native, making it hard to tell what should be done)

AvarianKnight avatar Jul 22 '24 19:07 AvarianKnight

Also not sure on the preferred way to do enums is, most use enum eCamelCase and its enum variables are UpperCamelCase (though this varies from native to native, making it hard to tell what should be done)

Mostly the former, eCamelCase that is.

colistro123 avatar Jul 26 '24 18:07 colistro123