> For the complete documentation index, see [llms.txt](https://viceworks.gitbook.io/vice-works-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://viceworks.gitbook.io/vice-works-docs/resources/characters/client-scenes-less-than-scene-greater-than.lua.md).

# client/scenes/\<scene>.lua

In this section, if you want to create your own scenario, there should be 3 necessary functions and the sample structure should be as follows.

```lua
local Scene = {}

function Scene:new()
    local scene = {
        name = "default",
        title = "Default",
        character = {
            firstName = "",
            lastname = ""
        },
        characters = {},
        data = {
            -- you can add your own data like pedEntity, vehicleEntity etc..
        }
    }

    setmetatable(scene, self)
    self.__index = self
    return scene
end

function Scene:preLoad()
    -- Here you can set your entity coords, request ipls or prepare your environment.
end

function Scene:initCam()
    -- Here you can create your camera and adjust the camera
end

function Scene:cleanUp()
    -- and this is the part we delete created peds, vehicles or cameras
end


SCENES["example"] = Scene:new() -- If you do not add this part, your scene will not work and make sure that the key value is unique.
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://viceworks.gitbook.io/vice-works-docs/resources/characters/client-scenes-less-than-scene-greater-than.lua.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
