[Standalone] Hide In Trunk System

Improved Hide in trunk system utilising qtarget.

This script allows a player to “hide” in a trunk of a vehicle by walking up to the back of the vehicle and interacting with the vehicle via qtarget or alternatively via chat commands.
I wrote this script for use on my own roleplay server so it has several features you may not find in other trunk scripts.

  • Ability to remove a player from the trunk.
  • The option to allow only one player to hide in the trunk.
  • Getting in and out of the trunk requires the vehicle to be unlocked, or you can lockpick your way out if your server has that feature.
  • Ability to set different camera offsets depending on vehicle category.

[Config preview]

--Edit notification event/function here.
function Notify(msg)
   --print(msg)
   ESX.ShowNotification(msg)
end

Config = {}

Config.qtarget = true --if not using or you are using another target system. set to false.

Config.AllowCommandUse = true

Config.GetInLockedVehicles = false --stop players getting in and out of locked trunks

Config.LimitPeople = true 

Config.MaxDistance = 2.5 --max distance player can be from trunk to get in

Config.Outtrunklabel = "Get Out trunk"

Config.Outtrunkicon = "fas fa-box-circle-check"

Config.Intrunklabel = "Get In trunk"

Config.Intrunkicon = "fas fa-box-circle-check"

Config.CamOffsets = {
   ['Compacts'] = {
      x = 0.0, y = -2.85, z = 0.25 --Compacts
   },
   ['Sedans'] = {
      x = 0.0, y = -2.95, z = 0.25 --Sedans
   },
   ['SUVs'] = {
      x = 0.0, y = -3.5, z = 0.25 --SUVs
   },
   ['Coupes'] = {
      x = 0.0, y = -2.85, z = 0.25 --Coupes
   },
   ['Muscle'] = {
      x = 0.0, y = -2.85, z = 0.25 --Muscle
   },
   ['Sports Classics'] = {
      x = 0.0, y = -2.85, z = 0.25 --Sports classics
   },
   ['Sports'] = {
      x = 0.0, y = -2.85, z = 0.25 --Sports
   },
   ['Super'] = {
      x = 0.0, y = -2.85, z = 0.25 --Super
   },
   ['Off-road'] = {
      x = 0.0, y = -2.85, z = 0.25 --Off-road
   },
   ['Industrial'] = {
      x = 0.0, y = -2.85, z = 0.25 --Industrial
   },
   ['Utility'] = {
      x = 0.0, y = -2.85, z = 0.25 --Utility
   },
   ['Vans'] = {
      x = 0.0, y = -2.85, z = 0.25 --Vans
   },
   ['Service'] = {
      x = 0.0, y = -2.85, z = 0.25 --Service
   },
   ['Emergency'] = {
      x = 0.0, y = -2.85, z = 0.25 --Emergency
   },
   ['Military'] = {
      x = 0.0, y = -2.85, z = 0.25 --Military
   },
   ['Commercial'] = {
      x = 0.0, y = -2.85, z = 0.25 --Commercial
   }
}

Script is protected using tebex escrow system.

[Showcase]

Preview

[Purchase]
Escrow £6.00
Open source £20.00

Other scripts:
Hide In Trunk
Recycler

10 Likes

nice ideias :smiley: good price as well .

maybe a feature like the police manage to force the player out of the trunk. that will be awesome :slight_smile:

3 Likes

Hide in Trunk is already a free script, no need to pay when you can just modify this standalone one for ESX.

7 Likes

What kind of stupid logic is that? There is pretty much a free version of every script. Mine has features I haven’t seen elsewhere, simple

2 Likes

i agree.

first thinking was the same about the free one, but after i realyze the diference.

and is a low price!

1 Like

Exactly. I appreciate the suggestions above also I will be adding ability for player to be removed from the trunk by police etc

2 Likes

Way better than the free one, had a few issues but after helping me out works perfect! Worth the money. :smile:

2 Likes

Can you see the player inside if you open the trunk?

1 Like

Yes you can.

2 Likes

nice modify in the script and very good idea :heart:

2 Likes

Update V1.1.0

  • Script is now completely standalone, no frameworks required.
  • Ability to pull a player from the trunk.
2 Likes

Please send a copy of your resource to moderators group for approval

1 Like

Can you be more specific? You want me to send you a non escrow version or what?

1 Like

Hello, it’s possible to carry players within handcuffs or zipties and put them into the trunk?

1 Like

i am going to add the feature. the problem is compatibility with everyone’s different methods of cuffing/ziptie players. since i’m trying to keep the script standalone i will use statebags. and i’ll put out a guide on how to add that into whatever method you already use for cuffing etc

1 Like

UPDATE V1.2.0
I’ve made the command and targeting stuff open source within the script so people can make it compatible with whatever targeting system or menu they decide to use

1 Like

Have you added the ability to put players in trunks?

Players that are alive, all the events are already there. but dead players is not gonna be something i’ll add. reason being that the player just ragdolls when he’s dead, you can’t force a dead player in to any animation, so putting them in the trunk physically wouldn’t work without reviving them, then putting them in the trunk, then killing them when they get out, just seems backwards.

1 Like

You are right, but some scripts do get around this by that exact method and it does work quit well. And honestly I reeeeeeallly think it would round out your script perfectly. I would be glad to add it myself but it is encrypted lol :3

Calm Down :wave:

I was just assisting people and redirecting them to a free version of this script.

1 Like