class Physics
package fivem.client.natives
Static methods
staticDoesRopeBelongToThisScript(ropeId:Int):Bool
Return if the rope was generated or not by the script where the native is called.
staticSetEntityProofUnk(entity:Dynamic, toggle:Bool):Dynamic
staticSetLaunchControlEnabled(toggle:Bool):Dynamic
Related to the lower-end of a vehicles fTractionCurve, e.g., from standing starts and acceleration from low/zero speeds.
NativeDB Introduced: v1604staticactivatePhysics(entity:Dynamic):Dynamic
staticaddRope(x:Float, y:Float, z:Float, rotX:Float, rotY:Float, rotZ:Float, maxLength:Float, ropeType:Int, initLength:Float, minLength:Float, lengthChangeRate:Float, onlyPPU:Bool, collisionOn:Bool, lockFromFront:Bool, timeMultiplier:Float, breakable:Bool, unkPtr:Dynamic):Int
Creates a rope at the specific position, that extends in the specified direction when not attached to any entities.
__
Rope does NOT interact with anything you attach it to, in some cases it make interact with the world AFTER it breaks (seems to occur if you set the type to -1).
Rope will sometimes contract and fall to the ground like you'd expect it to, but since it doesn't interact with the world the effect is just jaring.
There are 8 different rope types in the base game. Full rope data can be found in ropedata.xml.
enum ePhysicsRopeType {
RopeThin = 0, // Verticies: 1, Radius: 0.03, Textures: rope & rope_n
RopeWire6 = 1, // Verticies: 4, Radius: 0.015, Textures: steel_cable & steel_cable_n
RopeWire32 = 2, // Verticies: 32, Radius: 0.025, Textures: steel_cable & steel_cable_n
RopeMesh = 3, // Verticies: 6, Radius: 0.03, Textures: rope & rope_n
RopeThinWire32 = 4, // Verticies: 32, Radius: 0.01, Textures: rope & rope_n
RopeReins = 5, // Verticies: 32, Radius: 0.005, Textures: rope & rope_n
RopeThin4 = 6, // Verticies: 4, Radius: 0.03, Textures: rope & rope_n
RopeWire64 = 7 // Verticies: 64, Radius: 0.025, Textures: steel_cable & steel_cable_n
}staticapplyImpulseToCloth(posX:Float, posY:Float, posZ:Float, vecX:Float, vecY:Float, vecZ:Float, impulse:Float):Dynamic
staticattachEntitiesToRope(ropeId:Int, ent1:Dynamic, ent2:Dynamic, ent1_x:Float, ent1_y:Float, ent1_z:Float, ent2_x:Float, ent2_y:Float, ent2_z:Float, length:Float, p10:Bool, p11:Bool, boneName1:String, boneName2:String):Dynamic
Attaches entity 1 to entity 2. staticattachRopeToEntity(ropeId:Int, entity:Dynamic, x:Float, y:Float, z:Float, p5:Bool):Dynamic
The position supplied can be anywhere, and the entity should anchor relative to that point from it's origin. staticbreakEntityGlass(entity:Dynamic, p1:Float, p2:Float, p3:Float, p4:Float, p5:Float, p6:Float, p7:Float, p8:Float, p9:Dynamic, p10:Bool):Dynamic
staticdeleteChildRope(ropeId:Int):Dynamic
staticdeleteRope(ropeId:Dynamic):Dynamic
Deletes the rope with the specified handle.
You should check if the rope exists before trying to delete it, see DOES_ROPE_EXIST.
For an example on how to use this native please refer to ADD_ROPE
staticdetachRopeFromEntity(ropeId:Int, entity:Dynamic):Dynamic
staticdoesRopeExist(ropeId:Dynamic):Bool
For an example on how to use this native please refer to ADD_ROPE
staticgetCgoffset(entity:Dynamic):Dynamic
staticgetRopeLastVertexCoord(ropeId:Int):Dynamic
staticgetRopeVertexCoord(ropeId:Int, vertex:Int):Dynamic
staticgetRopeVertexCount(ropeId:Int):Int
staticloadRopeData(ropeId:Int, rope_preset:String):Dynamic
Rope presets can be found in the gamefiles. One example is "ropeFamily3", it is NOT a hash but rather a string.