📅  最后修改于: 2023-12-03 15:00:46.298000             🧑  作者: Mango
Fivem pNotify是一个用于FiveM服务器的通知框架。它可以让服务端和客户端进行通知,包括浮动通知、警告框等。
start pNotify
TriggerClientEvent('pNotify:SendNotification', -1, {
text = 'This is a notification',
type = 'success',
layout = 'bottomRight',
timeout = 3000
})
TriggerClientEvent('pNotify:SendNotification', playerId, {
text = 'This is a notification',
type = 'success',
layout = 'bottomRight',
timeout = 3000
})
pNotify.success('This is a success notification', {
position = 'topRight',
timeout = 3000
})
pNotify.alert('This is an alert', 'This is the alert content')
TriggerClientEvent('pNotify:SendNotification', -1, {
text = 'This is a success notification',
type = 'success',
layout = 'bottomRight',
timeout = 3000,
progressBar = true
})
pNotify.success('This is a success notification',{
position = 'bottomRight',
timeout = 3000,
progressBar = true
})