https://github.com/nitro0fun/gnotifications
https://github.com/nitro0fun/gnotifications
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/nitro0fun/gnotifications
- Owner: NiTrO0FuN
- Created: 2023-06-03T14:03:39.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-03T14:21:37.000Z (almost 2 years ago)
- Last Synced: 2025-01-01T19:44:25.330Z (5 months ago)
- Language: Lua
- Homepage: https://steamcommunity.com/sharedfiles/filedetails/?id=2984363243
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Garry's mod addon that replaces notifications for DarkRP events.
---
## Easy to use serverside API to send a notification:
#### Send a notification to a particular player
```lua
GNotifications.sendNotification(ply, nType, message, playSound)
```| Parameter | Type | Description |
| :-------- | :------- | :------------------------- |
| `ply` | `Entity` | **Required**. Player to send notification to |
| `nType` | `Number` | **Required**. [Notification type](#notification-types) |
| `message` | `string` | **Required**. Notification content |
| `playSound` | `Number` | **Optional=1**. 0 to mute the sound |#### Broadcast a notification to all players
```lua
GNotifications.sendBroadcastNotification(nType, message, playSound)
```| Parameter | Type | Description |
| :-------- | :------- | :------------------------- |
| `nType` | `Number` | **Required**. [Notification type](#notification-types) |
| `message` | `string` | **Required**. Notification content |
| `playSound` | `Number` | **Optional=1**. 0 to mute the sound |### Notification types
```
GNotifications.TYPE_INFORMATION
GNotifications.TYPE_ERROR
GNotifications.TYPE_IMPORTANT
GNotifications.TYPE_VALIDATION
GNotifications.TYPE_NORMAL
```