@citizenfx/server 2.0.13686-1 → 2.0.13759-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/natives_server.d.ts +55 -32
- package/package.json +1 -1
package/natives_server.d.ts
CHANGED
|
@@ -177,35 +177,31 @@ declare function SetPedDecoration(ped: number, collection: string | number, over
|
|
|
177
177
|
declare function AddStateBagChangeHandler(keyFilter: string, bagFilter: string, handler: Function): number;
|
|
178
178
|
|
|
179
179
|
/**
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
* ForceNoRot = 4,
|
|
189
|
-
* ForceRotPlusForce = 5
|
|
180
|
+
* cpp
|
|
181
|
+
* enum eApplyForceTypes {
|
|
182
|
+
* APPLY_TYPE_FORCE = 0,
|
|
183
|
+
* APPLY_TYPE_IMPULSE = 1,
|
|
184
|
+
* APPLY_TYPE_EXTERNAL_FORCE = 2,
|
|
185
|
+
* APPLY_TYPE_EXTERNAL_IMPULSE = 3,
|
|
186
|
+
* APPLY_TYPE_TORQUE = 4,
|
|
187
|
+
* APPLY_TYPE_ANGULAR_IMPULSE = 5
|
|
190
188
|
* }
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
* @param
|
|
194
|
-
* @param
|
|
195
|
-
* @param
|
|
196
|
-
* @param
|
|
197
|
-
* @param
|
|
198
|
-
* @param
|
|
199
|
-
* @param
|
|
200
|
-
* @param
|
|
201
|
-
* @param
|
|
202
|
-
* @param
|
|
203
|
-
* @param
|
|
204
|
-
* @param
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
*/
|
|
208
|
-
declare function ApplyForceToEntity(entity: number, forceType: number, x: number, y: number, z: number, offX: number, offY: number, offZ: number, boneIndex: number, isDirectionRel: boolean, ignoreUpVec: boolean, isForceRel: boolean, p12: boolean, p13: boolean): void;
|
|
189
|
+
* @param entity The entity handle
|
|
190
|
+
* @param forceType The force type
|
|
191
|
+
* @param x The x component of the force to apply
|
|
192
|
+
* @param y The y component of the force to apply
|
|
193
|
+
* @param z The z component of the force to apply
|
|
194
|
+
* @param offX Offset from center of entity (X)
|
|
195
|
+
* @param offY Offset from center of entity (Y)
|
|
196
|
+
* @param offZ Offset from center of entity (Z)
|
|
197
|
+
* @param nComponent Component of the entity to apply the force too. Only matters for breakable or articulated (ragdoll) physics. 0 means the root or parent component
|
|
198
|
+
* @param bLocalForce Specifies whether the force vector passed in is in local or world coordinates. `true` means the force will get automatically transformed into world space before being applied
|
|
199
|
+
* @param bLocalOffset Specifies whether the offset passed in is in local or world coordinates
|
|
200
|
+
* @param bScaleByMass Specifies whether to scale the force by mass
|
|
201
|
+
* @param bPlayAudio Specifies whether to play audio events related to the force being applied. The audio will depend on the entity type. Currently vehicles are the only entity types supported, and will play a suspension squeal depending on the magnitude of the force
|
|
202
|
+
* @param bScaleByTimeWarp Specifies whether to scale the force by time warp. Default is `true`
|
|
203
|
+
*/
|
|
204
|
+
declare function ApplyForceToEntity(entity: number, forceType: number, x: number, y: number, z: number, offX: number, offY: number, offZ: number, nComponent: number, bLocalForce: boolean, bLocalOffset: boolean, bScaleByMass: boolean, bPlayAudio: boolean, bScaleByTimeWarp: boolean): void;
|
|
209
205
|
|
|
210
206
|
/**
|
|
211
207
|
* Returns whether or not the specified player has enough information to start a commerce session for.
|
|
@@ -2953,11 +2949,26 @@ declare function SetPedResetFlag(ped: number, flagId: number, doReset: boolean):
|
|
|
2953
2949
|
* **0**: CTaskNMRelax
|
|
2954
2950
|
* **1**: CTaskNMScriptControl: Hardcoded not to work in networked environments.
|
|
2955
2951
|
* **Else**: CTaskNMBalance
|
|
2956
|
-
* @param
|
|
2952
|
+
* @param ped The ped to ragdoll.
|
|
2953
|
+
* @param minTime Time(ms) Ped is in ragdoll mode; only applies to ragdoll types 0 and not 1.
|
|
2954
|
+
* @param bAbortIfInjured unused
|
|
2955
|
+
* @param bAbortIfDead unused
|
|
2957
2956
|
*/
|
|
2958
|
-
declare function SetPedToRagdoll(ped: number,
|
|
2957
|
+
declare function SetPedToRagdoll(ped: number, minTime: number, maxTime: number, ragdollType: number, bAbortIfInjured: boolean, bAbortIfDead: boolean, bForceScriptControl: boolean): void;
|
|
2959
2958
|
|
|
2960
2959
|
/**
|
|
2960
|
+
* cpp
|
|
2961
|
+
* enum eNMFallType {
|
|
2962
|
+
* TYPE_FROM_HIGH = 0,
|
|
2963
|
+
* TYPE_OVER_WALL = 1,
|
|
2964
|
+
* TYPE_DOWN_STAIRS = 2,
|
|
2965
|
+
* TYPE_DIE_TYPES = 3,
|
|
2966
|
+
* TYPE_DIE_FROM_HIGH = 4,
|
|
2967
|
+
* TYPE_DIE_OVER_WALL = 5,
|
|
2968
|
+
* TYPE_DIE_DOWN_STAIRS = 6
|
|
2969
|
+
* }
|
|
2970
|
+
* ```
|
|
2971
|
+
* ```
|
|
2961
2972
|
* Return variable is never used in R*'s scripts.
|
|
2962
2973
|
* Not sure what p2 does. It seems like it would be a time judging by it's usage in R*'s scripts, but didn't seem to affect anything in my testings.
|
|
2963
2974
|
* x, y, and z are coordinates, most likely to where the ped will fall.
|
|
@@ -2965,8 +2976,20 @@ declare function SetPedToRagdoll(ped: number, time1: number, time2: number, ragd
|
|
|
2965
2976
|
* p8 to p13 are always 0f in R*'s scripts.
|
|
2966
2977
|
* (Simplified) Example of the usage of the function from R*'s scripts:
|
|
2967
2978
|
* ped::set_ped_to_ragdoll_with_fall(ped, 1500, 2000, 1, -entity::get_entity_forward_vector(ped), 1f, 0f, 0f, 0f, 0f, 0f, 0f);
|
|
2968
|
-
|
|
2969
|
-
|
|
2979
|
+
* @param ped The ped to ragdoll.
|
|
2980
|
+
* @param nFallType The type of fall.
|
|
2981
|
+
* @param dirX The x direction of the fall.
|
|
2982
|
+
* @param dirY The y direction of the fall.
|
|
2983
|
+
* @param dirZ The z direction of the fall.
|
|
2984
|
+
* @param fGroundHeight The ground height (z).
|
|
2985
|
+
* @param grab1X unused
|
|
2986
|
+
* @param grab1Y unused
|
|
2987
|
+
* @param grab1Z unused
|
|
2988
|
+
* @param grab2X unused
|
|
2989
|
+
* @param grab2Y unused
|
|
2990
|
+
* @param grab2Z unused
|
|
2991
|
+
*/
|
|
2992
|
+
declare function SetPedToRagdollWithFall(ped: number, minTime: number, maxTime: number, nFallType: number, dirX: number, dirY: number, dirZ: number, fGroundHeight: number, grab1X: number, grab1Y: number, grab1Z: number, grab2X: number, grab2Y: number, grab2Z: number): void;
|
|
2970
2993
|
|
|
2971
2994
|
/**
|
|
2972
2995
|
* Flags:
|