[LUA] Edit Textures for Ropes

Morning folks,

Been looking into the rope natives to hopefully be able to use them for the purpose of a police tape system, however, I’ve been unable to figure out the attaching of said ropes to objects and entities.

I had the rope spawning and attaching to me as the player, but when attempting to attach the rope to a nearby object (A bollard/traffic cone), it’s no play.

Was also hoping I’d be able to attach each side of the rope to an individual object, of course replicating police tape. Any examples and assistance would be greatly appreciated, I’m at a loss at this point. I have the natives to do it, I’m just not sure how to put it together so to speak :smiley:

Then, my final question to this would be, where is the texture located for the ropes? In order for me to be able to retexture it to look like a police tape too?

Thanks all for reading! :slightly_smiling_face:

EDIT:

I’ve done all I wanted to do, apart from two things…

  1. (probably not even possible) apply some form of physics to the ropes.
  2. Change the textures of the ropes.

I have quite literally looked EVERYWHERE in the game files for these damn textures, to no avail at all. Could someone lend a hand?

Bump :slight_smile:

1 Like

Ok, so i’ve figured out the attaching rope between two entities, but now I have tackle the texturing. I’ve found a rope.ytd file in the game files which i’ve edited and tried to stream, but to no avail at all. This just didn’t want to work. Anyone got any suggestions?

1 Like

what happens when you stream it? Rope does not change or it crashes?

2 Likes

Simply doesn’t change at all

I have an example of rope code somewhere on the forums ( I probably lost it ) but the ropes will not act like you would think. Getting the ropes to show up is easy but for some reason they have no physics (they float in the air). Unless you have figured that out because I have no idea.

1 Like

Yeah, haven’t quite gotten that far yet. All I want to do at this stage is texture the damn things :roll_eyes::joy:

Yeah. Have fun with that. I think I talked to Alexguirre about it before (asked him if it was something I could do on FiveM) because I seen that crime tape mod and he was hesitant on it.

gl.

1 Like

Haha yay, super confident now :sleepy::sweat::disappointed_relieved:

Fingers crossed I can figure it out! Or someone can help me

1 Like

Alright, so to keep you all posted in my adventures, so far i’ve found the following things…

  • That there’s a ropedata.xml file containing texture data (Could possibly utilize this to add textures, change thickness and so much more by the looks of it).

  • That there’s embedded textures in the .ydr files for the ropes (Unsure as to whether this is going to work or not, but worth a shot)

Latest update from my research:

I’m absolutely screwed. I’ve changed every single texture I can find relating to a damn rope, including those embedded in the files, but to no avail

That’s a shame. Have you got a screenshot of what you’ve got already? Does the police tape mod reveal anything that’s changed? Could well be something FiveM doesn’t stream I guess.

Is your script just a point to point line of tight rope? Or does it have some slack in it?

https://www.ausgamer.net/files/file/147-police-tape/ This is the mod I’m referring to which no doubt you’ve seen.

@JasonO That mod required some memory editing to make work which is not allowed on the API side of FiveM. Much more than just a retexture of the rope unfortunately.

Oleg for adding cloth physics support to zmodeler 3

alexguirre for RageNativeUI

alexguirre and "Unknown Modder" for help with fragment resizing memory editing

LtFlash for the 3D Marker class (modified by PNWParksFan)

Khorio for help with blocking peds and vehicles from crossing a line

MulleDK and the RPH team for RagePluginHook 

PNWParksFan - everything else

Yeah, a lot of that is entirely impossible. There’s a fair amount of unrealistic slack with zero physics, but that’s just how the rope natives work in FiveM.

I see. I did expect it had already been considered.
It sounds like aside from it not looking like police tape you’re not far off completing what you’re trying to achieve.

1 Like

Aye not at all. I’ve got everything figured out apart from the re-texturing and the physics which are impossible to change from what I’ve seen.

I know this is a very old thread now, but I desperately need to edit those darn textures!

try replacing the texture of the rope using DirectDrawUI?