Update readme.md

This commit is contained in:
xorzo
2022-07-05 13:51:08 +02:00
committed by GitHub
parent 4e701fe315
commit a98ab1d7eb
+35 -10
View File
@@ -1,13 +1,38 @@
## How to change style and time
* ESX.ShowNotification("Text Here", "error", 3000) -- Error Notification
* ESX.ShowNotification("Text Here", "success", 3000) -- Success Notification
* ESX.ShowNotification("Text Here", "info", 3000) -- Info
<h1 align="center">ESX Notify</h1>
* By doing ESX.ShowNotification("Text Here") it will be default/info
<h3>Change style and time</h3>
```lua
---usage: message/type/length
ESX.ShowNotification("message here", "error", 3000)
ESX.ShowNotification("message here", "success", 3000)
ESX.ShowNotification("message here", "info", 3000)
# Exports
* exports["esx_notify"]:Notify("info", 3000, "Text Here")
ESX.ShowNotification("text here") -- Default will time and type will be info/3000
```
# Events
* TriggerEvent("ESX:Notify", "info", 3000, "Text Here")
<h3>Export Usage</h3>
```lua
exports["esx_notify"]:Notify("info", 3000, "message here")
```
<h3>Event Usage</h3>
```lua
TriggerEvent("ESX:Notify", "info", 3000, "message here")
```
<h3>Color Code Usage</h3>
- ~r~ = Red
- ~b~ = Blue
- ~g~ = Green
- ~y~ = Yellow
- ~p~ = Purple
- ~c~ = Grey
- ~m~ = Dark Grey
- ~u~ = Black
- ~o~ = Orange
```lua
ESX.ShowNotification("I i ~r~love~s~ donuts", "success", 3000)
```
<img src="https://imgur.com/gsNwFO3.png" alt="image">