Installation
It's a simple download and unpack, just like every other resource.
The moment you start the script for the first time, the FXServer will install some dependencies. Afterwards the script might need to install database related dependencies depending on your database server.
All of this is being done automatically.
The script might asks you to restart a few times, do as requested when prompted.
At last you should see some green text like <resource name> started successfully. Have fun!. Once you see that the script is up and running! From here on out the script won't ask you to restart it (unless you change the config or delete dependencies in any way).
Note
You can ignore the rest of the documentation if you want and just start the script and go use it. But you might want to keep reading to understand how to install the default garages, setup the phone app and such.
Phone app setup
We made our phone app in a way so you can iframe it into anything. This keeps it dynamic and all options open for any type of implementation.
We don't own all phone scripts so we can't document installation instruction for all of them here.
However we created installation instructions for framework specific phones, known open source phones and phones of customers that lent their CFX key to us so we can create these instructions.
- Open up
@qb-phone/html/index.html. - Scroll down to the line that has
<div class="garage-app">. - Delete everything inbetween this div.
- Add this inbetween the div:
<iframe src="nui://rn-garages/dist/nui/index.html?phone=qb&show=true" style="width: 100%;height: 100%;"></iframe>
You should add this iframe to the html of your phone. That should be it. If not contact us on Discord, we wouldn't mind taking a look for you. <3
<iframe src="nui://rn-garages/dist/nui/index.html?show=true" style="width: 100%;height: 100%;"></iframe>
Query arguments
There are some query arguments you can pass to the iframe src to make it behave different.
phone
This applies working CSS presets for the given phone system. Like padding, margin certain color changes etc.
So it fits perfectly in your phone.
Default: none
Options
| Valid options | Resource |
|---|---|
| qb | qb-phone |
Example
<iframe src="nui://rn-garages/dist/nui/index.html?phone=qb" style="width: 100%;height: 100%;"></iframe>
show
Whenever or not to show the app.
Default: false
This is false by default because otherwise the ui will draw over the game at the start of this resource, so you will have to manually set this to true when iframing it.
Example
<iframe src="nui://rn-garages/dist/nui/index.html?show=true" style="width: 100%;height: 100%;"></iframe>