GenZeeDocs

Installation

Install and set up iFold.

1. Download

After you buy iFold, sign in to Keymaster with the Cfx.re account you checked out with and download ifold from your granted assets. Unzip it into your server's resources folder so you have resources/ifold/.

2. Start it

In server.cfg, after your framework, inventory, voice resource and oxmysql:

ensure ifold

The database schema in ifold/sql/ is applied on first start (Config.DB.autoMigrate). To apply it by hand, run the files in order with HeidiSQL. Applied files are recorded in ifold_schema_migrations, so a file is never run twice.

3. Add the phone item

The phone is a usable item. With ox_inventory, add this to ox_inventory/data/items.lua:

['phone'] = {
    label = 'Phone',
    weight = 190,
    stack = false,
    consume = 0,
    client = { export = 'ifold.usePhone' },
},

The item for Universal Inventory, qb-inventory, Qbox, qs-inventory and the rest, plus the non-unique mode, is on the Inventories page.

4. Configure

Everything under ifold/config/ is plain Lua and stays editable after escrow. The defaults work with an auto-detected framework, inventory and voice system, so you can start the server first and adjust later. Restart ifold after changing a file.

5. Photo storage

Photos, videos and voice memos are uploaded to storage you provide. The quickest is Fivemanage: create a Media token and add it to server.cfg above ensure ifold:

set FIVEMANAGE_MEDIA_API_KEY "your_token"

Then run ifold:media test in the server console. S3, Cloudflare R2 and your own storage are set up in ifold/config/config.media.lua.

6. First start

On a good start the console prints, in this order:

  1. bridge ready: framework=… inventory=… voice=… housing=… from the bridge loader, followed by the optional capabilities it discovered.
  2. The config check. Warnings are printed in yellow and the phone starts anyway; a fatal issue (a reversed Config.Fold.flexRange, a number display format that does not match the number length, duplicate company jobs, a partially configured upload provider) is printed in red and the resource stops before touching the database.
  3. The schema migrations that were applied.
  4. ifold ready, then where photos are stored, or a warning that no storage is set up.

The client prints its own config scope (keys, prop, fold) in F8.

Coming from lb-phone

Scripts that call exports['lb-phone'] by name need a resource with that name. Your purchase includes a small download, ifold-lb-phone-forwarder.zip, with an lb-phone resource that passes every call on to iFold. Remove the old lb-phone, unzip the forwarder into resources, and start it after iFold:

ensure ifold
ensure lb-phone

Then bring your players' data across with the migration command.

Controls

KeyAction
MTake out / put away
F9Fold / unfold
F10Press: Open to Flex (half folded) and back. Hold and scroll: set the hinge angle
F11Place the phone on the surface in front of you (Nightstand) / pick it back up
Hold AltLook around with the phone in hand. With the phone resting in Nightstand: get the cursor to tap it
EscClose the top sheet, alert, menu or passcode pad (a text field lets go first); otherwise leave the app for Home; with nothing open (Home Screen, Lock Screen) put the phone away

With the phone in hand the mouse moves the phone's cursor, not the camera, while W A S D still walk (Config.Controls.keepInput). Set Config.Controls.lockCamera = false to let the mouse turn the camera as well.

The phone does not open on top of another script's screen. While a menu, an inventory or a settings window has the cursor (or the pause menu is up), the take-out key does nothing and an incoming call keeps ringing in the pocket. Set Config.Controls.yieldToOtherUI = false to open it over other screens anyway.

Every binding is registered through RegisterKeyMapping with an ifold_ prefix, so players can remap them in FiveM Settings under Key Bindings. Defaults live in ifold/config/config.keys.lua.

On this page