RegisterRopeData
Docslocal retval = RegisterRopeData(numSections, radius, diffuseTextureName, normalMapName, distanceMappingScale, uvScaleX, uvScaleY, specularFresnel, specularFalloff, specularIntensity, bumpiness, color)Description
Registers a custom rope data with the game. For guidance on what these values should be use common:/data/ropedata.xml as a reference.
Returns a rope type which can be passed into ADD_ROPE to use a custom rope design.
Once a rope data is registered it can be used indefinitely and you should take caution not too register too many as to exceed the games limit.
Parameters
| Name | Type | Description |
|---|---|---|
numSections | int | — |
radius | float | — |
diffuseTextureName | char* | — |
normalMapName | char* | — |
distanceMappingScale | float | — |
uvScaleX | float | — |
uvScaleY | float | — |
specularFresnel | float | — |
specularFalloff | float | — |
specularIntensity | float | — |
bumpiness | float | — |
color | int | — |
Returns
intReturns an integer value.
Examples
Official
-- Create a thick steel cable rope above the players head
local ropeType = RegisterRopeData(6, 0.15, "steel_cable", "steel_cable_n", 1.0, 1.0, 8.775, 0.97, 30.0, 0.25, 1.775, 0x00FFFF00)
if ropeType ~= -1 then
local coords = GetEntityCoords(PlayerPedId()) + vector3(0.0, 0.0, 5.0)
AddRope(coords.x, coords.y, coords.z, 0.0, 0.0, 0.0, 25.0, ropeType, 10.0, 0.0, 1.0, false, false, false, 1.0, false, 0)
RopeLoadTextures()
end