Shells Tab

The script already includes 12 pre made shells that belongs to K4mb1 different packages.

Here you can add a new shell or edit an existing one.

You can change the toggle cursor, ped model and ped animation keys in client/editable/controls.lua

Main Controls

  • Toggle shell: Spawn the interior using the asset name from Shell Model field.

  • Teleport to shell: Teleport the player inside shell.

  • Teleport outside: Teleport the player to his old coords before entering the shell.

  • Weather: Toggle the weather and time to previsualize how the shell will look in a normal enviroment, only compatible with av_weather or adding your own code in client/editable/_weather.lua

  • Toggle Menu: Sets menu transparency to low and enables the character movement, press H to enable cursor again.

New Shell

  • You can create a new shell by just filling the fields Label and Shell model.

  • Label: use a name you can easily identify, in this example I will be using the k4mb1_bunkersilo_shell from his sub package, I'll use "Silo" as label.

  • Shell Model: Use a valid shell model, add the name and click the Verify Asset button, this will let you know if the shell exists in your server by using the IsModelValid native.

  • Z Index: Use this option to control the vertical distance of the shell from the ground. Note that taller shells, like drug labs, may need to be positioned deeper.

Door Offsets

To retrieve the door offsets we need to spawn our shell by using the House Icon (Toggle Shell).

This option will spawn the shell and it will teleport us inside.

If teleport fails and your character starts falling thru the ground, click the Cursor Icon (Toggle cursor) and use a NoClip from your admin menu or txadmin to get inside the shell.

  • Once you are inside the shell click the Cursor Icon (Toggle Shell) to enable character movement, walk to the position where the door will be placed.

  • You can use H to show the menu and enable cursor again, click the Pin Icon in the right section of Door Offsets, this will grab your character current offsets and use them for the door.

  • Now you can click the Door Icon (Teleport to shell) to test the door coords.

  • If your door Z offsets are too high you can lower them to make the character teleport smoother.

Peds

You can add Peds to the shell to make it feel more alive.

The total number of Peds spawned is determined by the property current production level:

  • Level 0: 1 ped

  • Level 1: 2 peds

  • Level 2: 3 peds

  • Level 3: 4 peds

  • Ped Model: When pressing M you can cycle thru all available ped models, you can add more in server/editable/_shells.lua > Config.ShellPeds

  • Animation: Press K to cycle thru all available animations, you can add/remove animations in server/editable/_shells.lua > Config.ShellAnimations

  • Rotate: Use your left/right arrow keys to rotate the ped.

  • Once you are happy with the result press E to confirm.

Zones

You can create interaction zones inside shell, every interaction zone can trigger a specific client event.

In server/editable/_shells.lua > Config.ShellEvents you can add/remove the available events.

  • When creating a new zone, you need to place the marker against an object and press E to confirm the coords for the zone.

Save Changes

To save your new shell, double click the 'Save Changes' button.

Make your shell available for products

Once you have created a new shell config, you need to assign it to a Category, go to server/editable/_shells.lua > Config.ShellModels and add the shell to the desired category.

For this example we are adding the Silo shell to Warehouse.

  • value: The shell model.

  • label: A label so we can identify this shell in our Market Tab.

  • preview: A thumbnail to preview the interior, don't use Discord or Imgur as image hosting.

Custom Events

If using custom events for zones, make sure to add a parameter to receive all provided data from the zone when player presses the interact key (E by default).

data is a table that includes the following:

  • propertyIdentifier:string The property unique identifier

  • identifier:string The zone unique identifier

  • type?:string Property type (drugs, laundromat, etc.)

  • interiorType:string The interior type (labs, warehouse, office)

  • gang:string The gang that owns the property

RegisterNetEvent('av_gangs:myEvent', function(data)
    -- print(json.encode(data,{indent = true}))
    -- Your code:
end)

Last updated