rytrak.fr Documentation
  • 🛡️FiveM Assets Escrow
    • You lack the required entitlement
    • Failed to verify protected resource
    • Error parsing script / Failed to load script
  • ❓Store FAQ
    • Do you accept orders to create a custom script
    • Do you give decrypted scripts
    • What payment methods are accepted for the purchase of your scripts?
    • Do you offer discounts or special offers on your scripts?
    • Can I modify or customize your scripts to meet my needs
    • Are your scripts compatible with frameworks
    • Do you provide development assistance?
  • FiveM Scripts
    • 🚒Firefighter SCBA System
      • General Configuration
      • Adapt your EUP
      • General Exports
      • General Events
      • ❓FAQ
        • No such export IsFireNearby in resource SmartFires
      • Test it now
    • 👮‍♂️Advanced Police Grab Ped
      • General Configuration
      • General Exports
      • General Events
      • Compatibility with esx_policejob
      • Test it now
    • 🚿Advanced Pepper Spray
      • General Configuration
      • General Exports
      • Anticheat
      • Test it now
    • 📣Advanced Megaphone System
      • General Configuration
      • General Exports
      • Compatibility with pma-voice
      • Compatibility with mumble-voip
      • Compatibility with saltychat
      • ❓FAQ
        • I can't hear my voice through the megaphone
      • Test it now
    • 🚁Advanced Helicopter Bucket
      • General Configuration
      • Adapt our script with ToxicFire
      • General Exports
      • 🔐Test it now
    • 🔗Advanced Remote Restraint
      • General Configuration
      • General Exports
      • Test it now
    • 🚗Advanced Extrication System
      • General Configuration
      • General Exports
      • Adapt a vehicle to the roof system
      • List of vehicles compatible with the roof system
      • 🔐Test it now
    • 🔗Advanced Handcuffs System
      • General Configuration
      • General Exports
      • Make ESX compatible
      • Make QBCore compatible
      • Make OX-Inventory compatible
      • 🔐Test it now
    • ✈️Advanced Aerial Firefighting
      • General Configuration
      • Adapt our script with ToxicFire
      • General Exports
      • 🔐Test it now
    • 💣Advanced Tactical Gas System
      • General Configuration
      • Test it now
  • RedM Scripts
    • 🤠Advanced Sheriff Grab Ped
      • General Configuration
      • General Exports
  • Framework compatibility
    • Add a custom weapon on ESX
    • Add a custom weapon on QBCore
    • Add a custom weapon on OX Inventory
  • 🚀Test our resources for free with Zap-Hosting
Powered by GitBook
On this page
  • 1. Exports Overview
  • 2. Example Usage
  1. FiveM Scripts
  2. Advanced Police Grab Ped

General Exports

This page explains the available exports for the r_grab script and their usage. These exports allow you to interact with the script programmatically from other resources.

All exports are client side only.

1. Exports Overview

1.1 Grab a Player

exports['r_grab']:GrabPlayer(player)

Description: This export allows you to drag a specified player.

Parameters:

  • player: The server ID of the player you want to grab.


1.2 Put the Player in a Vehicle

exports['r_grab']:PutPlayerInVehicle()

Description: This export places the currently dragged player into the nearest vehicle.

Usage: Make sure the dragged player is near a vehicle before calling this function.


1.3 Remove the Player from a Vehicle

exports['r_grab']:RemovePlayerFromVehicle()

Description: This export removes the currently dragged player from the vehicle they are in.

Usage: Call this function to pull the dragged player out of a vehicle.


1.4 Check if the Player is Being Dragged

exports['r_grab']:IsGrabbed()

Description: This export checks if a player is currently being dragged.

Returns:

  • true: If the player is being dragged.

  • false: If the player is not being dragged.


2. Example Usage

Below is an example of how to use these exports in your script:

-- Grab a player by their server ID
exports['r_grab']:GrabPlayer(1)

-- Put the dragged player in the nearest vehicle
exports['r_grab']:PutPlayerInVehicle()

-- Remove the dragged player from the vehicle
exports['r_grab']:RemovePlayerFromVehicle()

-- Check if the local player is being dragged
if exports['r_grab']:IsGrabbed() then
    print("You are being dragged!")
else
    print("You are not being dragged.")
end
PreviousGeneral ConfigurationNextGeneral Events

Last updated 3 months ago

👮‍♂️