Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions [esx_addons]/esx_custom_props/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# ESX Custom Props

A centralized resource for all custom props used across ESX resources.

## Purpose
This resource manages all custom props to avoid conflicts and provide a single location for prop management.

## Current Props
- **Handcuffs** - Used by police job for handcuffing mechanics

## Adding New Props
1. Place `.ydr` and `.ytyp` files in the `stream/` folder
2. Add the `.ytyp` file to the `files` section in `fxmanifest.lua`
3. Add a `data_file 'DLC_ITYP_REQUEST'` entry for the `.ytyp` file
4. Update this README with the new prop information

## Dependencies
Any resource using these props should add `esx_custom_props` as a dependency in their `fxmanifest.lua`.
12 changes: 12 additions & 0 deletions [esx_addons]/esx_custom_props/fxmanifest.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
fx_version 'adamant'

game 'gta5'

description 'ESX Custom Props - Centralized resource for all custom props'
version '1.0.0'

files {
'stream/*.ytyp'
}

data_file 'DLC_ITYP_REQUEST' 'stream/handcuffs.ytyp'
Binary file not shown.
Binary file added [esx_addons]/esx_custom_props/stream/handcuffs.ytyp
Binary file not shown.
3 changes: 2 additions & 1 deletion [esx_addons]/esx_policejob/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ client_scripts {
dependencies {
'es_extended',
'esx_billing',
'esx_vehicleshop'
'esx_vehicleshop',
'esx_custom_props'
}
28 changes: 28 additions & 0 deletions [esx_addons]/esx_policejob/stream/readme/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Custom Handcuff Prop

## Files
- `handcuffs.ydr` - 3D model file
- `handcuffs.ytyp` - Type definition file

## Installation

The prop is automatically loaded when you start `esx_policejob`. The required configuration is already included in `fxmanifest.lua`.

## Usage Example

Spawn the handcuff prop in your script:

```lua
local handcuffModel = 'handcuffs'
RequestModel(handcuffModel)
while not HasModelLoaded(handcuffModel) do
Wait(0)
end

local handcuffProp = CreateObject(GetHashKey(handcuffModel), x, y, z, true, true, true)
-- Attach to player or place in world
AttachEntityToEntity(handcuffProp, playerPed, GetPedBoneIndex(playerPed, 60309), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, true, true, false, true, 1, true)
```

## Model Name
`handcuffs`
Loading