Export Functions (Server-side)
ส่งออกฟังก์ชันเพื่อให้สามารถเรียกใช้จากทรัพยากรอื่นได้ทางฝั่ง Server
executeCommand
เรียกใช้งาน คำสั่งต่างๆ ของทรัพยากรนี้
- Usage
- Example
exports.azael_playpass:executeCommand(subCommandKey, args)
local success, response = exports.azael_playpass:executeCommand('getUser', { '443334508020891658' })
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print(json.encode(response, { indent = true }))
คุณสามารถระบุตัวระบุได้ทั้งแบบที่มีหรือไม่มีคำนำหน้า เช่น discord:443334508020891658
หรือ 443334508020891658
Arguments
- subCommandKey:
string
- คีย์ของ คำสั่งย่อย (ดูคีย์ได้ที่ Subcommand List)
- args:
table<{ [index]: any }>
|nil
- ข้อมูลที่คำสั่งต้องการ
Returns
- success:
boolean
- สถานะการใช้งานคำสั่ง
- response:
table<{ [key]: any }>
- ข้อมูลตอบกลับของคำสั่ง
รายละเอียดข้อมูลตอบกลับของคำสั่ง
ข้อมูลตอบกลับเมื่อใช้คำสั่งสำเร็จ คุณสามารถดูรายละเอียดได้ที่ respHandler
ข้อมูลตอบกลับเมื่อใช้คำสั่งล้มเหลว
Field | Type | Description |
---|---|---|
type | string | ประเภทของข้อผิดพลาด |
message | string | ข้อความของข้อผิดพลาด |
Subcommand List
Key | Label |
---|---|
getUser | รับข้อมูลผู้ใช้ |
addUser | เพิ่มข้อมูลผู้ใช้ |
deleteUser | ลบข้อมูลผู้ใช้ |
getBanInfo | รับข้อมูลแบนผู้ใช้ |
banUser | แบนผู้ใช้ (ชั่วคราว/ถาวร) |
unbanUser | ยกเลิกแบนผู้ใช้ |
setUserRole | กำหนดบทบาทผู้ใช้ |
reactivateUser | ยกเลิกระงับผู้ใช้ (ไม่เล่นนานเกินกำหนด) |
setNewIdentifier | กำหนดตัวระบุใหม่ให้ผู้ใช้ |
resetBindIdentifier | รีเซ็ตตัวระบุที่ผูกไว้ของผู้ใช้ |
resetHwids | รีเซ็ต HWIDs ผู้ใช้ |
getPoints | รับข้อมูลคิวพอยท์ผู้ใช้ |
addPoints | เพิ่มคิวพอยท์ผู้ใช้ |
setPermanentPoints | กำหนดคิวพ้อยท์ถาวรผู้ใช้ |
deleteTemporaryPoints | ลบคิวพ้อยท์ชั่วคราวผู้ใช้ |
purgePoints | ลบคิวพ้อยท์ทั้งหมดของผู้ใช้ |
getAirtime | รับแอร์ไทม์คงเหลือผู้ใช้ |
setAirtime | กำหนดแอร์ไทม์ผู้ใช้ |
addAirtime | เพิ่มแอร์ไทม์ผู้ใช้ |
removeAirtime | ลบแอร์ไทม์ผู้ใช้ |
getQueueInfo | รับข้อมูลระบบคิว |
getUser
รับข้อมูลผู้ใช้งาน
- Usage
- Example
exports.azael_playpass:getUser(identifier)
local success, response = exports.azael_playpass:getUser('443334508020891658')
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print(json.encode(response, { indent = true }))
คุณสามารถระบุตัวระบุได้ทั้งแบบที่มีหรือไม่มีคำนำหน้า เช่น discord:443334508020891658
หรือ 443334508020891658
Arguments
- identifier:
string
- ตัวระบุหลัก ของผู้ใช้
Returns
- success:
boolean
- สถานะการเรียกใช้
- response:
table<{ [key]: any }>
- ข้อมูลผู้ใช้งาน หากการเรียกใช้สำเร็จ
- ข้อมูลข้อผิดพลาด หากการเรียกใช้ล้มเหลว
addUser
เพิ่ มข้อมูลผู้ใช้
- Usage
- Example
exports.azael_playpass:addUser(identifier, boundId|nil)
local success, response = exports.azael_playpass:addUser('discord:443334508020891658', 'steam:11000013d071520')
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print(json.encode(response, { indent = true }))
คุณสามารถระบุตัวระบุได้ทั้งแบบที่มีหรือไม่มีคำนำหน้า เช่น discord:443334508020891658
หรือ 443334508020891658
Arguments
- identifier:
string
- ตัวระบุหลัก ของผู้ใช้
- boundId:
string
|nil
- ตัวระบุที่จะถูกผูก เอาไว้กับ ตัวระบุหลัก ของผู้ใช้
- ⚠️ ไม่จำเ ป็นที่จะต้องระบุในส่วนนี้ เนื่องจากระบบจะอัปเดตไปยังฐานข้อมูลโดยอัตโนมัติเมื่อผู้เล่นเชื่อมต่อกับเซิร์ฟเวอร์
- ตัวระบุที่จะถูกผูก เอาไว้กับ ตัวระบุหลัก ของผู้ใช้
Returns
- success:
boolean
- สถานะการเรียกใช้
- response:
table<{ [key]: any }>
- ข้อมูลผู้ใช้งาน หากการเรียกใช้สำเร็จ
- ข้อมูลข้อผิดพลาด หากการเรียกใช้ล้มเหลว
deleteUser
ลบข้อมูลผู้ใช้
- Usage
- Example
exports.azael_playpass:deleteUser(identifier)
local success, response = exports.azael_playpass:deleteUser('443334508020891658')
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print(json.encode(response, { indent = true }))
คุณสามารถระบุตัวระบุได้ทั้งแบบที่มีหรือไม่มีคำนำหน้า เช่น discord:443334508020891658
หรือ 443334508020891658
Arguments
- identifier:
string
- ตัวระบุหลัก ของผู้ใช้
Returns
- success:
boolean
- สถานะการเรียกใช้
- response:
table<{ [key]: any }>
- ข้อมูลผู้ใช้งาน หากการเรียกใช้สำเร็จ
- ข้อมูลข้อผิดพลาด หากการเรียกใช้ล้มเหลว
getBanInfo
รับข้อมูลแบนผู้ใช้
- Usage
- Example
exports.azael_playpass:getBanInfo(identifier|banRefId)
Ban Ref ID
local success, response = exports.azael_playpass:getBanInfo('66555-568s5-26075')
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print(json.encode(response, { indent = true }))
Identifier
local success, response = exports.azael_playpass:getBanInfo('443334508020891658')
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print(json.encode(response, { indent = true }))
คุณสามารถระบุตัวระบุได้ทั้งแบบที่มีหรือไม่มีคำนำหน้า เช่น discord:443334508020891658
หรือ 443334508020891658
Arguments
- identifier | banRefId:
string
- ตัวระบุหลัก ของผู้ใช้ หรือ รหัสอ้างอิงการถูกแบน
Returns
- success:
boolean
- สถานะการเรียกใช้
- response:
table<{ [key]: any }>
- ข้อมูลการถูกแบน หากการเรียกใช้สำเร็จ
- ข้อมูลข้อผิดพลาด หากการเรียกใช้ล้มเหลว
banUser
แบนผู้ใช้ ชั่วคราว หรือ ถาวร
- Usage
- Example
exports.azael_playpass:banUser(identifier, numDays|0=permanent, reason)
Permanent Ban (แบนถาวร)
local success, response = exports.azael_playpass:banUser('443334508020891658', 0, 'Banned for repeatedly stealing the last slice of pizza.')
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print(json.encode(response, { indent = true }))
Temporary Ban (แบนชั่วคราว)
local success, response = exports.azael_playpass:banUser('443334508020891658', 90, 'Banned for repeatedly stealing the last slice of pizza.')
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print(json.encode(response, { indent = true }))
คุณสามารถระบุตัวระบุได้ทั้งแบบที่มีหรือไม่มีคำนำหน้า เช่น discord:443334508020891658
หรือ 443334508020891658
Arguments
- identifier:
string
- ตัวระบุหลัก ของผู้ใช้
- numDays:
integer
- จำนวนวันที่ต้องการแบนผู้ใช้ หรือระบุ
0
เพื่อแบนผู้ใช้ถาวร
- จำนวนวันที่ต้องการแบนผู้ใช้ หรือระบุ
- reason:
string
- เหตุผลที่แบนผู้ใช้
Returns
- success:
boolean
- สถานะการเรียกใช้
- response:
table<{ [key]: any }>
- ข้อมูลการถูกแบน หากการเรียกใช้สำเร็จ
- ข้อมูลข้อผิดพลาด หากการเรียกใช้ล้มเหลว
unbanUser
ยกเลิกแบนผู้ใช้
- Usage
- Example
exports.azael_playpass:unbanUser(identifier)
local success, response = exports.azael_playpass:unbanUser('443334508020891658')
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print(json.encode(response, { indent = true }))
คุณสามารถระบุตัวระบุได้ทั้งแบบที่มีหรือไม่มีคำนำหน้า เช่น discord:443334508020891658
หรือ 443334508020891658
Arguments
- identifier:
string
- ตัวระบุหลัก ของผู้ใช้
Returns
- success:
boolean
- สถาน ะการเรียกใช้
- response:
table<{ [key]: any }>
- ข้อมูลการถูกแบน หากการเรียกใช้สำเร็จ
- ข้อมูลข้อผิดพลาด หากการเรียกใช้ล้มเหลว
setUserRole
กำหนดบทบาทผู้ใช้
- Usage
- Example
exports.azael_playpass:setUserRole(identifier, roleId)
local success, response = exports.azael_playpass:setUserRole('443334508020891658', 5)
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print(json.encode(response, { indent = true }))
คุณสามารถระบุตัวระบุได้ทั้งแบบที่มีหรือไม่มีคำนำหน้า เช่น discord:443334508020891658
หรือ 443334508020891658
Arguments
- identifier:
string
- ตัวระบุหลัก ของผู้ใช้
- roleId:
integer
- รหัสของบทบาท ที่ต้องการกำหนดให้ผู้ใช้
Returns
- success:
boolean
- สถานะการเรียกใช้
- response:
table<{ [key]: any }>
- ข้อมูลบทบาทผู้ใช้ หากการเรียกใช้สำเร็จ
- ข้อมูลข้อผิดพลาด หากการเรียกใช้ล้มเหลว
reactivateUser
ยกเลิกสถานะการถูกระงับของผู้ใช้ จากสาเหตุไม่เข้าร่วมเซิร์ฟเวอร์นานเกินที่กำหนดใน inactivePlayers
- Usage
- Example
exports.azael_playpass:reactivateUser(identifier)
local success, response = exports.azael_playpass:reactivateUser('443334508020891658')
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print(json.encode(response, { indent = true }))
คุณสามารถระบุตัวระบุได้ทั้งแบบที่มีหรือไม่มีคำนำหน้า เช่น discord:443334508020891658
หรือ 443334508020891658
Arguments
- identifier:
string
- ตัวระบุหลัก ของผู้ใช้
Returns
- success:
boolean
- สถานะการเรียกใช้
- response:
table<{ [key]: any }>
- ข้อมูลสถานะผู้ใช้ หากการเรียกใช้สำเร็จ
- ข้อมูลข้อผิดพลาด หากการเรียกใช้ล้มเหลว
setNewIdentifier
กำหนดตัวระบุใหม่ให้ผู้ใช้
- Usage
- Example
exports.azael_playpass:setNewIdentifier(identifier, newIdentifier)
local success, response = exports.azael_playpass:setNewIdentifier('443334508020891658', '845951838691393546')
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print(json.encode(response, { indent = true }))
คุณสามารถระบุตัวระบุได้ทั้งแบบที่มีหรือไม่มีคำนำหน้า เช่น discord:443334508020891658
หรือ 443334508020891658
Arguments
- identifier:
string
- ตัวระบุเก่า ของผู้ใช้
- newIdentifier:
string
- ตัวระบุใหม่ ของผู้ใช้
Returns
- success:
boolean
- สถานะการเรียกใช้
- response:
table<{ [key]: any }>
- ข้ อมูลตัวระบุผู้ใช้ หากการเรียกใช้สำเร็จ
- ข้อมูลข้อผิดพลาด หากการเรียกใช้ล้มเหลว
resetBindIdentifier
รีเซ็ตตัวระบุที่ผูกไว้ของผู้ใช้
- Usage
- Example
exports.azael_playpass:resetBindIdentifier(identifier)
local success, response = exports.azael_playpass:resetBindIdentifier('443334508020891658')
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print(json.encode(response, { indent = true }))
คุณสามารถระบุตัวระบุได้ทั้งแบบที่มีหรือไม่มีคำนำหน้า เช่น discord:443334508020891658
หรือ 443334508020891658
Arguments
- identifier:
string
- ตัวระบุหลัก ของผู้ใช้
Returns
- success:
boolean
- สถานะการเรียกใช้
- response:
table<{ [key]: any }>
- ข้อมูลตัวระบุผู้ใช้ หากการเรียกใช้สำเร็จ
- ข้อมูลข้อผิดพลาด หากการเรียกใช้ล้มเหลว
resetHwids
รีเซ็ต HWIDs ของผู้ใช้
- Usage
- Example
exports.azael_playpass:resetHwids(identifier)
local success, response = exports.azael_playpass:resetHwids('443334508020891658')
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print(json.encode(response, { indent = true }))
คุณสามารถระบุตัวระบุได้ทั้งแบบที่มีหรือไม่มีคำนำหน้า เช่น discord:443334508020891658
หรือ 443334508020891658
Arguments
- identifier:
string
- ตัวระบุหลัก ของผู้ใช้
Returns
- success:
boolean
- สถานะการเรียกใช้
- response:
table<{ [key]: any }>
- ข้อมูล HWIDs ผู้ใช้ หากการเรียกใช้สำเร็จ
- ข้อมูลข้อผิดพลาด หากการเรียกใช้ล้มเหลว
getPoints
รับข้อมูลคิวพอยท์ผู้ใช้
- Usage
- Example
exports.azael_playpass:getPoints(identifier)
local success, response = exports.azael_playpass:getPoints('443334508020891658')
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print(json.encode(response, { indent = true }))
คุณสามารถระบุตัวระบุได้ทั้งแบบที่มีหรือไม่มีคำนำหน้า เช่น discord:443334508020891658
หรือ 443334508020891658
Arguments
- identifier:
string
- ตัวระบุหลัก ของผู้ใช้
Returns
- success:
boolean
- สถานะการเรียกใช้
- response:
table<{ [key]: any }>
- ข้อมูลคิวพอยท์ผู้ใช้ หากการเรียกใช้สำเร็จ
- ข้อมูลข้อผิดพลาด หากการเรียกใช้ล้มเหลว
addPoints
เพิ่มคิวพอยท์ผู้ใช้
- Usage
- Example
exports.azael_playpass:addPoints(identifier, numPoints, expirationDays|nil)
Permanent Q-Points (คิวพ้อยท์ถาวร ไม่มีวันหมดอายุ)
local success, response = exports.azael_playpass:addPoints('443334508020891658', 1000)
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print(json.encode(response, { indent = true }))
Temporary Q-Points (คิวพ้อยท์ชั่วคราว มีวันหมดอายุ)
local success, response = exports.azael_playpass:addPoints('443334508020891658', 1000, 30)
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print(json.encode(response, { indent = true }))
คุณสามารถระบุตัวระบุได้ทั้งแบบที่มีหรือไม่มีคำนำหน้า เช่น discord:443334508020891658
หรือ 443334508020891658
Arguments
- identifier:
string
- ตัวระบุหลัก ของผู้ใช้
- numPoints:
integer
- จำนวนคิวพ้อยท์ที่ต้องการเพิ่มให้ผู้ใ ช้
- expirationDays:
integer
|nil
- จำนวนวันที่คิวพ้อยท์จะหมดอายุ หรือ ไม่ระบุหากเป็นคิวพ้อยท์แบบถาวร (ไม่มีวันหมดอายุ)
Returns
- success:
boolean
- สถานะการเรียกใช้
- response:
table<{ [key]: any }>
- ข้อมูลคิวพอยท์ผู้ใช้ หากการเรียกใช้สำเร็จ
- ข้อมูลข้อผิดพลาด หากการเรียกใช้ล้มเหลว
setPermanentPoints
กำหนดคิวพ้อยท์ถาวรผู้ใช้
- Usage
- Example
exports.azael_playpass:setPermanentPoints(identifier, numPoints)
local success, response = exports.azael_playpass:setPermanentPoints('443334508020891658', 2000)
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print(json.encode(response, { indent = true }))
คุณสามารถระบุตัวระบุได้ทั้งแบบที่มีหรือไม่มีคำนำหน้า เช่น discord:443334508020891658
หรือ 443334508020891658
Arguments
- identifier:
string
- ตัวระบุหลัก ของผู้ใช้
- numPoints:
integer
- จำนวนคิวพ้อยท์ที่ต้องการกำหนดให้ผู้ใช้
Returns
- success:
boolean
- สถานะการเรียกใช้
- response:
table<{ [key]: any }>
- ข้อมูลคิวพอยท์ผู้ใช้ หากการเรียกใช้สำเร็จ
- ข้อมูลข้อผิดพลาด หากการเรียกใช้ล้มเหลว
deleteTemporaryPoints
ลบคิวพ้อยท์ชั่วคราวของผู้ใช้ (คิวพ้อยท์แบบมีวันหมดอายุ)
- Usage
- Example
exports.azael_playpass:deleteTemporaryPoints(identifier, numIndex)
local success, response = exports.azael_playpass:deleteTemporaryPoints('443334508020891658', 2)
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print(json.encode(response, { indent = true }))
คุณสามารถระบุตัวระบุได้ทั้งแบบที่มีหรือไม่มีคำนำหน้า เช่น discord:443334508020891658
หรือ 443334508020891658
Arguments
- identifier:
string
- ตัวระบุหลัก ของผู้ใช้
- numIndex:
integer
- หมายเลข Index ของข้อมูลคิวพ้อยท์ชั่วคราวที่ต้องการลบ
- 💡 แนะนำให้ใช้ รับข้อมูลคิวพอ ยท์ผู้ใช้ เพื่อรับหมายเลข Index ที่ต้องการลบข้อมูล
- หมายเลข Index ของข้อมูลคิวพ้อยท์ชั่วคราวที่ต้องการลบ
Returns
- success:
boolean
- สถานะการเรียกใช้
- response:
table<{ [key]: any }>
- ข้อมูลคิวพอยท์ผู้ใช้ หากการเรียกใช้สำเร็จ
- ข้อมูลข้อผิดพลาด หากการเรียกใช้ล้มเหลว
purgePoints
ลบคิวพ้อยท์ทั้งหมดของผู้ใช้
- Usage
- Example
exports.azael_playpass:purgePoints(identifier)
local success, response = exports.azael_playpass:purgePoints('443334508020891658')
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print(json.encode(response, { indent = true }))
คุณสามารถระบุตัวระบุได้ทั้งแบบที่มีหรือไม่มีคำนำหน้า เช่น discord:443334508020891658
หรือ 443334508020891658
Arguments
- identifier:
string
- ตัวระบุหลัก ของผู้ใช้
Returns
- success:
boolean
- สถานะการเรียกใช้
- response:
table<{ [key]: any }>
- ข้อมูลคิวพอยท์ผู้ใช้ หากการเรียกใช้สำเร็จ
- ข้อมูลข้อผิดพลาด หากการเรียกใช้ล้มเหลว
getAirtime
รับแอร์ไทม์คงเหลือผู้ใช้
- Usage
- Example
exports.azael_playpass:getAirtime(identifier)
local success, response = exports.azael_playpass:getAirtime('443334508020891658')
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print(json.encode(response, { indent = true }))
คุณสามารถระบุตัวระบุได้ทั้งแบบที่มีหรือไม่ มีคำนำหน้า เช่น discord:443334508020891658
หรือ 443334508020891658
Arguments
- identifier:
string
- ตัวระบุหลัก ของผู้ใช้
Returns
- success:
boolean
- สถานะการเรียกใช้
- response:
table<{ [key]: any }>
- ข้อมูลแอร์ไทม์ผู้ใช้ หากการเรียกใช้สำเร็จ
- ข้อมูลข้อผิดพลาด หากการเรียกใช้ล้มเหลว
setAirtime
กำหนดแอร์ไทม์ผู้ใช้
- Usage
- Example
exports.azael_playpass:setAirtime(identifier, numSeconds)
local success, response = exports.azael_playpass:setAirtime('443334508020891658', 18144000)
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print(json.encode(response, { indent = true }))
คุณสามารถระบุตัวระบุได้ทั้งแบบที่มีหรือไม่มีคำนำหน้า เช่น discord:443334508020891658
หรือ 443334508020891658
Arguments
- identifier:
string
- ตัวระบุหลัก ของผู้ใช้
- numSeconds:
integer
- จำนวนแอร์ไทม์ที่ต้องการกำหนดให้ผู้ใช้ โดยมีหน่วยเป็น วินาที
3600
วินาที = 1 ชั่วโมง86400
วินาที = 1 วัน604800
วินาที = 7 วัน18144000
วินาที = 30 วัน
- จำนวนแอร์ไทม์ที่ต้องการกำหนดให้ผู้ใช้ โดยมีหน่วยเป็น วินาที
Returns
- success:
boolean
- สถานะการเรียกใช้
- response:
table<{ [key]: any }>
- ข้อมูลแอร์ไทม์ผู้ใช้ หากการเรียกใช้สำเร็จ
- ข้อมูลข้อผิดพลาด หากการเรียกใช้ล้มเหลว
addAirtime
เพิ่มแอร์ไทม์ผู้ใช้
- Usage
- Example
exports.azael_playpass:addAirtime(identifier, numSeconds)
local success, response = exports.azael_playpass:addAirtime('443334508020891658', 604800)
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print(json.encode(response, { indent = true }))
คุณสามารถระบุตัวระบุได้ทั้งแบบที่มีหรือไม่มีคำนำหน้า เช่น discord:443334508020891658
หรือ 443334508020891658
Arguments
- identifier:
string
- ตัวระบุหลัก ของผู้ใช้
- numSeconds:
integer
- จำนวนแอร์ไทม์ที่ต้องการเพิ่มให้ผู้ใช้ โดยมีหน่วยเป็น วินาที
3600
วินาที = 1 ชั่วโมง86400
วินาที = 1 วัน604800
วินาที = 7 วัน18144000
วินาที = 30 วัน
- จำนวนแอร์ไทม์ที่ต้องการเพิ่มให้ผู้ใช้ โดยมีหน่วยเป็น วินาที
Returns
- success:
boolean
- สถานะการเรียกใช้
- response:
table<{ [key]: any }>
- ข้อมูลแอร์ไทม์ผู้ใช้ หากการเรียกใช้สำเร็จ
- ข้อมูลข้อผิดพลาด หากการเรียกใช้ล้มเหลว
removeAirtime
ลบแอร์ไทม์ผู้ใช้
- Usage
- Example
exports.azael_playpass:removeAirtime(identifier, numSeconds)
local success, response = exports.azael_playpass:removeAirtime('443334508020891658', 86400)
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print(json.encode(response, { indent = true }))
คุณสามารถระบุตัวระบุได้ทั้งแบบที่มีหรือไม่มีคำนำหน้า เช่น discord:443334508020891658
หรือ 443334508020891658
Arguments
- identifier:
string
- ตัวระบุหลัก ของผู้ใช้
- numSeconds:
integer
- จำนวนแอร์ไทม์ที่ต้องการเพิ่มให้ผู้ใช้ โดยมีหน่วยเป็น วินาที
3600
วินาที = 1 ชั่วโมง86400
วินาที = 1 วัน604800
วินาที = 7 วัน18144000
วินาที = 30 วัน
- จำนวนแอร์ไทม์ที่ต้องการเพิ่มให้ผู้ใช้ โดยมีหน่วยเป็น วินาที
Returns
- success:
boolean
- สถานะการเรียกใช้
- response:
table<{ [key]: any }>
- ข้อมูลแอร์ไทม์ผู้ใช้ หากการเรียกใช้สำเร็จ
- ข้อมูลข้อผิดพลาด หากการเรียกใช้ล้มเหลว
getQueueInfo
รับข้อมูลระบบคิวรอเข้าร่วมเซิร์ฟเวอร์
- Usage
- Example
exports.azael_playpass:getQueueInfo()
local success, response = exports.azael_playpass:getQueueInfo()
if not success then
return print('Error type:', response.type, 'Error message:', response.message)
end
print(json.encode(response, { indent = true }))
คุณสามารถระบุตัวระบุได้ทั้งแบบที่มีหรือไม่มีคำนำหน้า เช่น discord:443334508020891658
หรือ 443334508020891658
Returns
- success:
boolean
- สถานะการเรียกใช้
- response:
table<{ [key]: any }>
- ข้อมูลเกี่ยวกับระบบคิว หากการเรียกใช้สำเร็จ
- ข้อมูลข้อผิดพลาด หากการเรียกใช้ล้มเหลว
hasInactiveRecord
ผู้ใช้เคยถูกระงับจากสาเหตุไม่เข้าร่วมเซิร์ฟเวอร์นานเกินที่กำหนดใน inactivePlayers หรือไม่?
- Usage
- Example
exports.azael_playpass:hasInactiveRecord(identifier)
local wasInactive, rejoinData = exports.azael_playpass:hasInactiveRecord('443334508020891658')
if wasInactive then
print(json.encode(rejoinData, { indent = true }))
end
คุณสามารถระบุตัวระบุได้ทั้งแบบที่มีหรือไม่มีคำนำหน้า เช่น discord:443334508020891658
หรือ 443334508020891658
Arguments
- identifier:
string
- ตัวระบุหลัก ของผู้ใช้
Returns
- wasInactive:
boolean
- สถานะเคยถูกระงับ
- rejoinData:
table<{ timestamp: integer, secondsAgo: integer }>
|nil
- ข้อมูลการเข้าร่วมเซิร์ฟเวอร์หลังถูกยกเลิกสถานะจาก reactivateUser หรือใช้คำสั่ง ยกเลิกระงับผู้ใช้ (ไม่เล่นนานเกินกำหนด)
- timestamp:
integer
- เวลาที่เข้าร่วมกับเซิร์ฟเวอร์หรือถูกยกเลิกสถานะครั้งล่าสุด (Unix time)
- secondsAgo:
integer
- เข้าร่วมกับเซิร์ฟเวอร์หรือถูกยกเลิกสถานะมาแล้วกี่วินาที
- timestamp:
- ข้อมูลการเข้าร่วมเซิร์ฟเวอร์หลังถูกยกเลิกสถานะจาก reactivateUser หรือใช้คำสั่ง ยกเลิกระงับผู้ใช้ (ไม่เล่นนานเกินกำหนด)