> For the complete documentation index, see [llms.txt](https://piotreq-scripts.gitbook.io/piotreq-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://piotreq-scripts.gitbook.io/piotreq-scripts/assets-and-guides/phone/messages.md).

# MESSAGES

1. Send Message

{% tabs %}
{% tab title="Server Side" %}

* sender `string | number`
* receiver `string | number`
* content `string`
* notify? `table`

```lua
exports['piotreq_phone']:SendMessage({
    sender = 'Lester', -- number
    receiver = 'piotreq', -- number
    content = 'Hello',
    notify = { -- optional, remove arg if you dont want to show notify
       title = 'Lester', -- title of notify
       time = 'Now', -- string | os.date
       text = 'Hello', -- message content
       type = 'default', -- types are in css, you can add new
       timeout = 4000 -- optional, default is 4000
    }
})
```

{% endtab %}
{% endtabs %}

2. Send Location

{% tabs %}
{% tab title="Server Side" %}

* sender `string | number`
* receiver `string | number`
* coords `table | vector3`

```lua
exports['piotreq_phone']:SendLocation({
    sender = 'Lester', -- number
    receiver = 'piotreq', -- number
    coords = vector3(100.0, 50.0, 20.0), -- vec3 | table x,y,z
    notify = { -- optional, remove arg if you dont want to show notify
       title = 'Lester', -- title of notify
       time = 'Now', -- string | os.date
       text = 'Location GPS', -- message content
       type = 'default', -- types are in css, you can add new
       timeout = 4000 -- optional, default is 4000
    }
})
```

{% endtab %}
{% endtabs %}

3. Send Photo

{% tabs %}
{% tab title="Server Side" %}

* sender `string | number`
* receiver `string | number`
* url `string`

```lua
exports['piotreq_phone']:SendPhoto({
    sender = 'Lester', -- number
    receiver = 'piotreq', -- number
    url = 'https://imgur.com/sigma.gif', -- example url, change it
    notify = { -- optional, remove arg if you dont want to show notify
       title = 'Lester', -- title of notify
       time = 'Now', -- string | os.date
       text = 'Attachment', -- message content
       type = 'default', -- types are in css, you can add new
       timeout = 4000 -- optional, default is 4000
    }
})
```

{% endtab %}
{% endtabs %}
