FiveM Towercranes
This is a somewhat realistic implementation of towercranes in FiveM.
As an operator you are tasked with moving payloads of various shapes and sizes from one location to another. Each delivery will present many unique challenges, requiring careful control and awareness. Fortunately as an operator you are given tools to assist you such as a hook camera, reactive payload marker and cabin screen displaying important data about the crane you’re operating. Upon delivering a payload you should consider how accurate the location of delivery is to where you’ve placed the payload.
Features
-
Ray-Cast for Realistic Movement & Entity Detection
-
25 Unique Payloads
-
Full Controller Support
-
Completely Key Mapped
-
Highly Configurable
-
Radio Inside Crane
-
Instructional Buttons
-
Networked with State Bags
-
Working Screen Inside Cabin
-
Sounds
Resource Facts
Code is accessible - Yes (non-escrow version)
Subscription-based - No
Lines - ~1300 + Config
Requirements - Generic 2D/3D GFX Renderer | ESX, QBCore or Standalone.
Support - Yes
Showcase Video
Tebex Purchase
Installation
-
Place the
crane
folder in your serverresources
folder. -
Download the config.lua (17.3 KB) and place inside
crane
folder. -
Add
ensure crane
to your server configuration file. -
Download the Generic DUI 2D/3D GFX Renderer from here and place the
generic_texture_renderer.gfx
file instream/gfx
.
A replacement minimap.gfx
is provided inside stream/gfx
to patch the obstruction warning size. You can remove this at any time if needed.
Future Plans/Ideas
-
Impact manoeuvrability of crane due to wind speed and direction.
-
Concurrent payloads.
HTML Configuration
Inside the files
folder there is a crane.html
and delivery.html
document. These documents are rendered as webpages onto the screen inside the crane cabin. To accommodate the data regarding the crane which is being operated there are templates. Templates are strings inside curly braces which are replaced with their values as can be found in the table below. These templates are used inside their respective HTML document to represent data about a given crane.
Note: All numerical values are rounded to 1 decimal place.
crane.html
| Parameter | Template |
| ---------------------------------------- | ------------------------ |
| Boom Heading (°) | ``{boom_heading}`` |
| Car Extension (%) | ``{car_extension}`` |
| Hook Extension (%) | ``{hook_extension}`` |
| Payload Name | ``{payload_name}`` |
| Payload Destination X Coordinate | ``{payload_coords_x}`` |
| Payload Destination Y Coordinate | ``{payload_coords_y}`` |
| Payload Destination Z Coordinate | ``{payload_coords_z}`` |
| Distance Between Payload and Destination | ``{payload_dst}`` |
delivery.html
| Parameter | Template |
| ---------------------------------- | ----------------------- |
| Payload Delivery Accuracy (%) | ``{acurracy}`` |
| Delivery Accuracy Hex Colour | ``{accuracy_hex}`` |
| Amound Paid to Player for Delivery | ``{pay}`` |
Default Controls
The table below contains the default key mappings and their corresponding use. Players can change these keybinds individually within the keybinds section in their settings. Keyboard and controller are assigned their own control to allow on-the-fly switching between the two input modes without conflicting controls.
| Use | Keyboard | Dualshock/Xbox |
| ---------------- | ------------ | -------------- |
| Enter/Exit Cabin | Enter | Triangle/Y |
| Boom Left | A | Left Bumber |
| Boom Right | D | Right Bumber |
| Car Outward | W | D-Pad Up |
| Car Inward | S | D-Pad Down |
| Hook Up | E | Left Trigger |
| Hook Down | C | Right Trigger |
| Hook Camera | Spacebar | Cross/A |
| Attach Payload | Left Control | Sqaure/X |
Player Payment
Upon delivery confirmation the operator responsible will be payed a figure which increases exponentially according to the accuracy of the delivery. The formula below describes this payment model. If you wish to edit this formula, you can do so in the config.
Note: Non-standalone versions already have player payment implemented.
If you are using the standalone version, a server event called Crane:PayOperator
is triggered passing two parameters:
-
source
- Server ID of the operator responsible for the delivery. -
pay
- Amount to be paid.
Resource CPU Time (Resmon)
Performance is something that has changed throughout the development of this resource however finding an intermediary between performance and “realism” has been a challenge from day 1. In particular, how updates are relayed between clients is expensive even with the tools available purely because of the nature of this resource. Thankfully, only operators will experience less than optimal performance as they are doing all the heavy work, therefore passers-by will remain relatively unaffected. The table below contains average CPU timings for this resource.
| Range | CPU Time (ms) |
| -------------------------------------------- | ------------- |
| Outwith Render Distance | 0.01 |
| Within Render Distance (not operated) | 0.01 |
| Within Render Distance (operated internally) | 0.10-0.19 |
| Within Render Distance (operated externally) | 0.08-0.11 |
FAQs
Why is resource X not implemented/used?
- It is frankly impossible to keep everyone happy and make their vision a reality. Therefore I try to keep the resource as standalone as possible even with ESX/QBCore integrations. I’m open to suggestions however I will not add a feature or resource integration because it makes more sense for you and not everyone else.
Why charge more for non-Escrow version?
- I’ve spent 200+ hours developing and perfecting this resource, and I’d strongly dislike to see somebody purchase this resource then leak it elsewhere. With that said I’ve made the config very customisable which should satisfy any want to have an un-encrypted version in the first place.