SY_Notify
V 2.2
CREATE TABLE IF NOT EXISTS ` sy_notify ` (
` identifier ` varchar ( 65 ) DEFAULT NULL ,
` position ` longtext DEFAULT NULL ,
UNIQUE KEY ` identifier ` ( ` identifier ` ) USING HASH
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
ensure SY_Notify
要顯示通知,您應該像下面這樣調用它:
exports [ ' SY_Notify ' ]: Alert ( " Title " , " Message " , Time , ' type ' )
TriggerClientEvent ( ' SY_Notify:Alert ' , source , " Title " , " Message " , Time , ' type ' )
若要設定通知顯示時間,請使用:
[1 second]
[2 seconds]
[5 seconds]
[10 seconds]
若要變更通知類型,請使用下列類型的通知:
如果您需要將此通知新增為 ESX 舊版中的預設通知,請在 @es_extended/client/function.lua 中新增給定程式碼
function ESX . ShowNotification ( message , type , length )
if GetResourceState ( " esx_notify " ) ~= " missing " then
exports [ " esx_notify " ]: Notify ( type , length , message )
else
print ( " [^1ERROR^7] ^5ESX Notify^7 is Missing! " )
end
end
替換為
function ESX . ShowNotification ( message , type , length )
if GetResourceState ( " SY_Notify " ) ~= " missing " then
exports [ ' SY_Notify ' ]: Alert ( " NOTIFICATION " , message , length , type )
else
print ( " [^1ERROR^7] ^5SY_NOTIFY^7 is Missing! " )
end
end