Funkcje


Notifications:CreateNotification

Wyświetla zwykłe powiadomienie w prawym górnym rogu ekranu.

Syntax
--- target: number
--- text:string
--- data: NotificationData
local notificationId = Notifications:CreateNotification(target, text, data)
--- notificationId: number
Example
local notificationId = Notifications:CreateNotification(2, 'Nie posiadasz telefonu.', {
    type = 'error',
    time = 5000
})
Types
NotificationType = 'info' | 'error' | 'success' | 'warning'

NotificiationData = {
    type: NotificationType,
    time: number -- time in ms
}

Notifications:CreateBigNotification

Tworzy duże powiadomienie w prawym górnym rogu ekranu.

Syntax
--- target: number,
--- header: string
--- text: string
--- data: BigNotificationData
local notificationId = Notifications:CreateBigNotification(target, header, text, data)
--- notificationId: number
Example
local notificationId = Notification:CreateBigNotification(2, 'Kradzież', 'Skradziono pojazd!', {
    type = 'sheriff',
    time = 5000,
    dispatch = {
        code = '10-73',
        location = 'Paleto Bay',
        car = 'adder',
        plate = 'BTL 6969',
        gender = 'Male'
    }
})
Types
NotificationType = 'info' | 'error' | 'success' | 'warning'

NotificationDispatchData = {
    code: string,
    location: string,
    car: string,
    plate: string,
    gender: string
}

BigNotificationData = {
    type: NotificationType | 'police' | 'medical' | 'sheriff',
    time: number, -- in ms
    dispatch: NotificationDispatchData
}