Gap Camera for FiveM
This script allows players on FiveM servers to use an item called a “Gap Camera” to attach a camera to their vehicle, record footage, and then automatically upload it to a Discord server. It’s compatible with both vMenu and QBcore/Esx servers, with slight differences in usage for each framework.
Buy Here https://quantascripts.tebex.io/package/6545619
Features:
- Gap Camera Item: An in-game item that can be attached to a vehicle to start recording.
- Recording and Uploading: Once the camera is attached, the game records footage from the camera’s perspective (essentially a “Gap Cam” view) and uploads it to a designated Discord channel.
- Easy Integration with vMenu and QBcore: Works smoothly with both vMenu and QBcore setups, allowing server admins to choose the best fit for their server.
- Discord Integration: After recording, the footage is automatically uploaded to a pre-configured Discord channel.
How It Works:
For vMenu Users:
- Activation:
Players use a simple/stick
command to equip the camera. This could either be typed in the chat or bound to a key. Once the command is activated, the camera attaches to the vehicle. - Recording:
The camera automatically starts recording once it’s attached to the vehicle. The script records footage from the player’s viewpoint, focused on the vehicle and surroundings, in real-time. - Features
Passengers can also record and upload footage and view camera.
- Upload to Discord:
After recording for a set duration of 30 seconds, the footage is automatically uploaded to the server’s configured Discord webhook. The upload includes:
- Video URL (if using an external storage method like a cloud service)
- Timestamp of when the recording started.
- Deactivation:
The recording stops either after a set time limit or when the player removes the camera from the vehicle using the/remc
.
For QBcore Users:
- Item Usage:
The “Gap Camera” is an item in the player’s inventory. Players can use it by selecting it and applying it to the vehicle. Upon using the item, the camera automatically attaches to the car. - Recording:
Like in vMenu, once the camera is attached, it begins recording from the car’s perspective. The player’s in-game camera view acts as a Gap Camera. - Upload to Discord:
Similar to the vMenu setup, the recorded footage is uploaded to Discord, including metadata such as:
- Video file or link
- Timestamp
- Deactivation:
Players can remove the camera by using the /remc command outside the car.
Technical Features and Customization:
- Configuration: Server admins can easily configure the Discord webhook URL, time duration of recordings, and other settings.
- Video Storage:
- This script uses discord webhook.
- Discord Webhook Settings:
Admins can set up a Discord webhook to automatically send the uploaded video to a specific channel. The script supports rich embeds, so metadata such as vehicle details, player name, and timestamp can be displayed alongside the video. - Customizable Recording Time:
The length of the recording can be adjusted, either to a set time (e.g., 5 minutes) or until the camera is manually removed.
Installation Instructions:
- For vMenu:
- Place the script folder in the
resources
directory. - Add the resource to
server.cfg
with ensure render , ensure carcam. - Configure the Discord webhook in the
config.lua
file. - Players can use the
/stick
command to activate the camera. - Also in the vmenu server you must change the config value CamConfig.Framework == ‘vmenu’
- For QBcore:
- Place the script in the
resources
folder. - Add the resource to
server.cfg
with ensure render , ensure carcam - Configure the Discord webhook and other settings in the
config.lua
file. Or you can do /webhook “webhook_link” - Players can use the “Gap Camera” item from their inventory to attach it to the car.
- For qbcore, you open qbcore/shared/items.lua and you add that code that i put under the qbcore section in items.lua
- For Esx Servers: **for esx the file needs to be executed on the database. (**open the file with your database editor and execute the query)
Potential Use Cases:
- RP Events: Record and share exciting moments from roleplay events, chases, or accidents.
- Server Documentation: Capture in-game incidents or accidents for server logs or moderation purposes.
- YouTube/Twitch Content: Players can create content from the footage they capture using the camera.
Keybindings Section:
This script provides players with both keybindings and slash commands to interact with the Gap Camera. By default, the script includes a keybinding for quick access, but players can easily change the keybinding through the FiveM settings. Below is an explanation of the default bindings and how to customize them.
Default Keybindings:
- Default Key for Activating the Camera (Attach/Detach):
/stick
(Slash Command): By default, players can type/stick /remc
in the chat to attach or detach the camera from the vehicle. This command will add or remove the camera, depending on its current state.
- Default Key for Opening/Closing the Camera View:
C
Key: Once the camera is attached to the vehicle, pressing theC
key will open or closethe camera’s live feed (i.e., it will switch between the player’s standard view and the Gap Camera’s perspective). This allows players to view the camera footage in real-time while driving.- Open: When you press
C
, you enter the camera view and can see the footage from the camera attached to the vehicle. - Close: Pressing
C
again will exit the camera view and return to the player’s normal in-game perspective.
- Open: When you press
How to Change Keybindings:
Players can change the default keybinding (C
) and assign a custom key via the FiveM settings menu. This allows for full flexibility, especially if the default key conflicts with other keybindings.
Steps to Change Keybinding in FiveM:
- Open FiveM Settings:
- Press
Esc
to open the game menu. - Select Settings from the menu.
- Navigate to Keybindings:
- In the settings menu, go to the Keybinds tab (or Controls, depending on your version).
- Look for the action associated with the Gap Camera or Toggle Camera View in the list of keybindings (the name may vary slightly depending on the configuration).
- Assign a New Key:
- Click on the action (e.g., “Activate Gap Camera View”).
- Press the key you want to bind to this action.
- Save Settings:
- Once you’ve selected your new keybinding, make sure to save the settings before exiting.
Additional Information on Keybindings:
- The
C
key is used to toggle the camera view on or off when the camera is attached to the vehicle. It does not attach the camera to the car, but instead opens or closes the live feed from the camera once it is already in place. - The
/stick /remc
slash command is used to attach or detach the camera to/from the vehicle. This command is independent of theC
keybinding. - Players can also customize the keybinding for the camera view (e.g., the
C
key) and slash command (/stick
) independently, so each player can set their preferred method of interacting with the Gap Camera. - If you encounter any issues with conflicting keybindings, simply choose another available key in the FiveM settings.
Final Notes:
C
will toggle the camera view (open/close) once the camera is attached to the vehicle./stick or /remc
will attach or detach the camera from the vehicle.- Keybindings are customizable via the FiveM settings for flexibility.
This setup ensures that players can easily toggle the camera view using the C
key, while still allowing them to attach or remove the camera via the slash command. The script provides a seamless and customizable experience for all players on your server.
Details / Information
Vmenu
Qbcore
ESX
Support - Yes
If you have any issues please join our discord or email us. We will get it resolved quickly.
Credit - Made By Alex
Code is accessible | No |
Subscription-based | No |
Lines (approximately) | 980 |
Requirements & dependencies | None |
Support | Yes |
Assets are accessible | No |
Join Our Discord - QuantaScripts