Garry's Mod Wiki

ents.CreateClientRope

  Entity ents.CreateClientRope( Entity ent1, number ent1attach, Entity ent2, Entity ent2attach, table extra = nil )

Recently Added

This was recently added in version (2025.05.23). It might only be available on the Dev Branch right now.

Description

Creates a clientside only rope, similar to those used by the DOG model from Half-Life 2.

Arguments

1 Entity ent1
The first entity to attach the rope to.
2 number ent1attach
The attachment ID on the first entity to attach the rope to.
3 Entity ent2
The second entity to attach the rope to.
4 Entity ent2attach
The attachment ID on the second entity to attach the rope to.
5 table extra = nil
Extra optional settings for the rope. Possible values are:
  • slack - How much extra rope to add to the length (default: 0)
  • width - Width of the rope (default: 2)
  • segments - How many segments the rope should have (default: 8)
  • material - Which material should the rope have (default: "cable/cable")
  • nogravity - If set, the rope should have no gravity. (default: 0)

Returns

1 Entity
Created entity (C_RopeKeyframe).