• สินค้าทั้งหมด
  • Studio
  • คู่มือการใช้งาน
  • Client Exports
  • Server Exports
Docs > Team Deathmatch > Client Exports

mrft_teamdeathmatch:IsRegistered()#

ตรวจสอบว่าผู้เล่นลงทะเบียนกิจกรรม Team Deathmatch แล้วหรือไม่

ตัวอย่าง#

local retval = exports.mrft_teamdeathmatch:IsRegistered()

if retval then
   -- ผู้เล่นลงทะเบียน Team Deathmatch
end

mrft_teamdeathmatch:IsPlaying()#

ตรวจสอบว่าผู้เล่นกำลังอยู่ในกิจกรรม Team Deathmatch หรือไม่

ไม่จำเป็นต้องเรียก IsRegistered() ก่อน

ตัวอย่าง#

local retval = exports.mrft_teamdeathmatch:IsPlaying()

if retval then
   -- ผู้เล่นกำลังเล่น Team Deathmatch
end

mrft_teamdeathmatch:GetCurrentStage()#

ดึง Stage ปัจจุบันของกิจกรรม

Return#

  • number: Stage ปัจจุบันของกิจกรรม ค่าอยู่ในช่วง 1 ถึง 4

ตัวอย่าง#

local retval = exports.mrft_teamdeathmatch:GetCurrentStage()
if retval then
   print("Current Stage is " .. retval)
end

mrft_teamdeathmatch:WallEdit()#

เปิดโหมดสร้างหรือแก้ไขบาเรียของกิจกรรม

Export นี้ไม่มีการตรวจสอบ Group ภายใน ควรเรียกใช้จากโค้ดที่ควบคุมสิทธิ์ไว้แล้ว

ตัวอย่าง#

exports.mrft_teamdeathmatch:WallEdit()

mrft_teamdeathmatch:RemoveAllWeapons()#

ลบอาวุธกิจกรรมทั้งหมด หรือเลือกลบเฉพาะแผนที่ที่กำหนด

Parameters#

  • type (string): ประเภทการลบ ใช้ "global" เพื่อลบทั้งหมด หรือ "map" เพื่อลบเฉพาะแผนที่
  • mapId (number): ID แผนที่จาก config.mapSettings ต้องส่งเมื่อ type เป็น "map"

ตัวอย่าง#

exports.mrft_teamdeathmatch:RemoveAllWeapons("global")
exports.mrft_teamdeathmatch:RemoveAllWeapons("map", 1)

mrft_teamdeathmatch:DisableRegister()#

ปิดการลงทะเบียนด้วย Keybinding

ตัวอย่าง#

exports.mrft_teamdeathmatch:DisableRegister()

mrft_teamdeathmatch:EnableRegister()#

เปิดการลงทะเบียนด้วย Keybinding

ตัวอย่าง#

exports.mrft_teamdeathmatch:EnableRegister()

mrft_teamdeathmatch:ReloadHealthBar()#

รีโหลด Health Bar เฉพาะรูปแบบที่ 1

ตัวอย่าง#

exports.mrft_teamdeathmatch:ReloadHealthBar()
On this page
  • mrftteamdeathmatch:IsRegistered()
  • mrftteamdeathmatch:IsPlaying()
  • mrftteamdeathmatch:GetCurrentStage()
  • Return
  • mrftteamdeathmatch:WallEdit()
  • mrftteamdeathmatch:RemoveAllWeapons()
  • mrftteamdeathmatch:DisableRegister()
  • mrftteamdeathmatch:EnableRegister()
  • mrftteamdeathmatch:ReloadHealthBar()