• สินค้าทั้งหมด
  • Studio
  • คู่มือการใช้งาน
  • เพิ่มศัตรูใหม่
  • ฟังก์ชันภายใน
  • แก้ปัญหาศัตรูหาย
  • Client Exports
  • Server Exports
Docs > Dungeon > ฟังก์ชันภายใน

RotateToCoords()#

หมุน Ped ให้หันหน้าไปยังตำแหน่งที่กำหนด

Parameters#

  • ped (entity): Ped ที่ต้องการหมุน
  • coords (vector3): ตำแหน่งเป้าหมาย

ตัวอย่าง#

RotateToCoords(ped, coords)

PlayInternalAnimation()#

เล่นอนิเมชันภายในของระบบ Dungeon

Parameters#

  • ped (entity): Ped ที่ต้องการให้เล่นอนิเมชัน
  • animType (string): ประเภทอนิเมชัน เช่น basic, protego, ultimate
  • speed (number): ความเร็วของอนิเมชัน ยิ่งค่าสูงยิ่งเร็ว
  • metadata (table): ข้อมูลเพิ่มเติมของอนิเมชัน ไม่จำเป็นต้องส่งค่า

ตัวอย่าง#

PlayInternalAnimation(PlayerPedId(), "basic", 6, {index = 1})
-- basic จะมี index 1-6

PlayInternalAnimation(PlayerPedId(), "protego", 10)
PlayInternalAnimation(PlayerPedId(), "ultimate", 2)

PlayNonLoopedPtfxsAtCoord()#

เล่น Particle Effect แบบ Non-looped หลายรายการพร้อมกัน ณ ตำแหน่งที่กำหนด

Parameters#

  • effects (table): รายการ Effect ที่ต้องการเล่น
  • coords (vector3): ตำแหน่งที่ต้องการให้ Effect แสดง

ตัวอย่าง#

local effects = {
    { dict = "core", name = "sp_foundry_sparks", scale = 2.0 },
    { dict = "core", name = "veh_sub_crush", scale = 2.0 },
}

PlayNonLoopedPtfxsAtCoord(effects, vector3(123, 456, 78))

IsPlayerInRadius()#

ตรวจสอบว่า Ped อยู่ในระยะที่กำหนดหรือไม่

Parameters#

  • ped (entity): Ped ที่ต้องการตรวจสอบ
  • coords (vector3): จุดศูนย์กลาง
  • size (number): ระยะตรวจสอบ

ตัวอย่าง#

local isInRadius = IsPlayerInRadius(ped, coords, size)
On this page
  • RotateToCoords()
  • PlayInternalAnimation()
  • PlayNonLoopedPtfxsAtCoord()
  • IsPlayerInRadius()