AWAY FROM US - Documentation
  • 📄คู่มือการใช้งาน ( Document )
  • 🌍การใช้งานเว็บไซต์
    • วิธีการสมัครสมาชิก
    • ลืมรหัสผ่านทำยังไง ?
    • เปลี่ยน IP ที่ผูกยังไง ?
    • สถานะของทรัพยากรณ์ดูยังไง ?
  • ☄️AFUCore
    • ⚙️Configuration (ตั้งค่า)
      • Events ของอาชีพ
      • เฟรมเวิร์ค (Framework)
      • คลังไอเทม (Inventory)
      • การแจ้งเตือน (Notifications)
      • ผู้เล่น (Players)
      • อาวุธ (Weapons)
      • ดีบัค (Debug)
      • ทึกฐานข้อมูล (Queries)
    • Client
      • PlayerData
        • ข้อมูลผู้เล่น (PlayerData)
      • Functions
        • ระบบบัญชี (Accounts)
        • ระบบไอเทม (Item System)
        • ระบบอาชีพ (Job System)
        • ระบบการแจ้งเตือน (Notification System)
      • Game
    • Common
      • Faker
      • Math
      • Logger
      • String
      • Table System
      • Config
      • Timeout
    • Shared
    • Server
      • Command
      • OneSync
      • Item
      • Job
      • Player
      • xPlayer
  • 📂ทรัพยากรณ์
    • 📄วิธีการใส่ License
    • 🛍️AFU Enhanced Shop
      • คู่มือการตั้งค่า
    • 💞AFU.Status
      • exports ที่มีให้ใช้
    • 📧AFU.Mailbox
    • 🔮AFU.Gasha
      • Config.lua
      • Config.OpenZone.lua
      • ปัญหาที่พบบ่อยใน AFU.Gasha
  • ⚠️ข้อตกลงการให้บริการ
    • Terms & Conditions
    • ❓ปัญหาที่พบบ่อย
Powered by GitBook
On this page
  • ภาพรวม
  • ที่อยู่ไฟล์
  • ฟังก์ชัน
  • ShowAdvancedNotification
  • ShowHelpNotification
  • ShowFloatingHelpNotification
  • ShowNotification
  • ShowToolTip
  1. AFUCore
  2. Client
  3. Functions

ระบบการแจ้งเตือน (Notification System)

ภาพรวม

ฟังก์ชันสำหรับแสดงการแจ้งเตือนรูปแบบต่างๆ

ที่อยู่ไฟล์

source/client/services/notifications.lua

ฟังก์ชัน

ShowAdvancedNotification

แสดงการแจ้งเตือนขั้นสูงพร้อมไอคอน

พารามิเตอร์
ประเภท
คำอธิบาย

sender

string

ชื่อผู้ส่ง

subject

string

หัวข้อข้อความ

msg

string

เนื้อหาข้อความ

textureDict

string

ชื่อของไฟล์รูปภาพ

iconType

string

ชนิดของไอคอน

flash

boolean

ให้ข้อความกระพริบหรือไม่

saveToBrief

boolean

บันทึกข้อความไว้ในสรุปหรือไม่

hudColorIndex

number

รหัสสีของข้อความ

-- ตัวอย่างการใช้งาน
AFUCore.ShowAdvancedNotification(
    'SYSTEM',                -- sender
    'แจ้งเตือน',             -- subject
    'คุณได้รับ $100',        -- msg
    'CHAR_BANK_MAZE',       -- textureDict
    'CHAR_BANK_MAZE',       -- iconType
    true,                   -- flash
    true,                   -- saveToBrief
    29                      -- hudColorIndex (สีเขียว)
)

ShowHelpNotification

แสดงข้อความช่วยเหลือ

พารามิเตอร์
ประเภท
คำอธิบาย

msg

string

ข้อความที่ต้องการแสดง

thisFrame

boolean

แสดงเฉพาะเฟรมนี้หรือไม่

beep

boolean

ส่งเสียงเตือนหรือไม่

duration

number

ระยะเวลาแสดง (มิลลิวินาที)

-- ตัวอย่างการใช้งาน
AFUCore.ShowHelpNotification(
    'กด ~INPUT_CONTEXT~ เพื่อเก็บไอเทม',  -- msg
    false,                                -- thisFrame
    true,                                 -- beep
    5000                                 -- duration (5 วินาที)
)

ShowFloatingHelpNotification

แสดงข้อความช่วยเหลือลอยที่ตำแหน่งที่กำหนด

พารามิเตอร์
ประเภท
คำอธิบาย

msg

string

ข้อความที่ต้องการแสดง

coords

vector3

พิกัดที่จะแสดงข้อความ

-- ตัวอย่างการใช้งาน
local coords = vector3(100.0, 100.0, 30.0)
AFUCore.ShowFloatingHelpNotification(
    'กด E เพื่อเก็บไอเทม',
    coords
)

ShowNotification

แสดงการแจ้งเตือนทั่วไป

พารามิเตอร์
ประเภท
คำอธิบาย

message

string

ข้อความที่ต้องการแสดง

notifyType

string

ประเภทการแจ้งเตือน (success, info, error, warning)

length

number

ระยะเวลาแสดง (มิลลิวินาที)

title

string

หัวข้อการแจ้งเตือน

position

string

ตำแหน่งที่แสดง (top-left, top-right, bottom-left, bottom-right)

imageExt

string

นามสกุลไฟล์รูปภาพ

rawHtmlOptions

table

ตัวเลือกการแสดงผล HTML

-- ตัวอย่างการใช้งาน
AFUCore.ShowNotification(
    'คุณได้รับ $100',       -- message
    'success',              -- notifyType
    5000,                  -- length
    'แจ้งเตือน',            -- title
    'top-right',           -- position
    'png',                 -- imageExt
    {                      -- rawHtmlOptions
        title = true,
        description = false
    }
)

ShowToolTip

แสดงทูลทิปที่ตำแหน่งที่กำหนด

พารามิเตอร์
ประเภท
คำอธิบาย

key

string

คีย์อ้างอิงของทูลทิป

msg

string

ข้อความที่ต้องการแสดง

coords

vector3

พิกัดที่จะแสดงทูลทิป

-- ตัวอย่างการใช้งาน
local coords = vector3(100.0, 100.0, 30.0)
AFUCore.ShowToolTip(
    'shop_tooltip',           -- key
    'กด E เพื่อเปิดร้านค้า',   -- msg
    coords                    -- coords
)
Previousระบบอาชีพ (Job System)NextGame
☄️