Skip to content

Boat Rescue ​

Boat Rescue—internally named swimfasterinit—is a standalone RedM water-rescue system. After a player is stranded in deep water, an NPC boatman can collect them, transport them toward a calculated safe shore, and record the rescue.

Current resource version: 2.2.3
Framework: Standalone
Dependencies: None
Database: Not required

Installation ​

  1. Copy the inner swimfasterinit directory into your resources folder. Keep this resource name unless you also update integrations that reference it.
  2. Review config.lua.
  3. Add the resource after your standard RedM resources:
ini
ensure swimfasterinit

Rescue flow ​

  1. The client detects continuous swimming in water deeper than Config.MinDepth.
  2. After Config.SwimTime, the rescue prompt appears.
  3. The player requests rescue or declines and continues swimming.
  4. The shore search probes terrain and attempts to find a safe mainland destination.
  5. When enabled and viable, a boat and crew member spawn and collect the player.
  6. The boat travels toward shore while stuck/beached recovery monitors it.
  7. The player can optionally doze off to skip the remainder of the ride.
  8. The player and optional mount arrive safely, and the server increments the rescue count.
  9. If a boat rescue cannot complete, the teleport fallback uses the selected safe location.

Commands ​

Default commandPurpose
/waterlandingsDisplays the local player's successful rescue count.
/swimfasterinitToggles the rescue system for the local player.

Both names are configurable in Config.Commands. Set a value to false/nil to avoid registering that command.

Core configuration ​

SettingDefaultDescription
Config.DebugfalseEnables diagnostic console output.
Config.SwimTime10000Continuous deep-water time in milliseconds before rescue is offered.
Config.MinDepth5.0Minimum water depth.
Config.CheckInterval250Base detection interval in milliseconds.
Config.IncludeMountstrueIncludes the player's mount in rescue handling.
Config.PersisttruePersists rescue count through player state handling.
Config.BroadcastToAllfalseBroadcasts configured rescue messages server-wide.
Config.ServerCooldown3000Minimum milliseconds between accepted rescue reports.

Prompts and notifications ​

Config.Prompt controls whether prompts are shown, their labels, RedM control hashes, and hold durations. The defaults use E to request rescue and G to stay in the water. Config.Notify controls the toast title, duration, texture dictionary, icon, and colour.

Config.Search controls radial growth, arc spacing, probe height, terrain slope tolerance, mainland depth, refinement passes, collision retries, per-frame probe work, and overall timeout. Large maximum radii and candidate counts can increase search work; adjust gradually and test in lakes, rivers, islands, and map-edge water.

Boat behaviour ​

Config.Boat controls:

  • Whether boat rescue is enabled and networked
  • Candidate boat and crew models
  • Crew names and dialogue pools
  • Maximum trip distance, speed, and arrival distance
  • Stuck/beached detection and assistance
  • Trip/model/despawn timeouts
  • Doze-off prompt and wake-up sequence

If all boat models fail or the destination exceeds MaxDistance, the safe-shore fallback can still complete the rescue.

Server export ​

GetWaterLandings ​

Returns the recorded rescue count for a server ID.

lua
local count = exports['swimfasterinit']:GetWaterLandings(source)

Troubleshooting ​

The prompt never appears ​

Confirm the player remains swimming for the full configured duration, the measured water is deep enough, prompts are enabled, and the system has not been toggled off.

The boat does not spawn ​

Check model names, shore-search success, Config.Boat.Enabled, maximum distance, and model timeout. Test with a stock default boat model before adding custom models.

The boat becomes stuck ​

Tune StuckTime, AssistSpeed, BeachedTime, StopShort, and ArriveDistance. Always test shallow riverbanks separately from open lakes.

Rescue counts do not persist ​

Confirm Config.Persist is enabled. This resource uses state handling rather than a database; persistence behaviour is tied to the server/player lifecycle and identifiers used by the resource.