ลืมรหัสผ่าน
ดู: 518|ตอบกลับ: 2

เวลาผู้เล่น Spawn จะให้รอประมาน 3 วิ ถึงจะเดินได้ทำไงคับ

[คัดลอกลิงก์]
************************************
โพสต์ 2021-11-20 18:16:30 | ดูโพสต์ทั้งหมด
ใช้ Timer ครับ นี้ตัวอย่าง
  1. // The event callback (OnPlayerSpawn) - we will start a timer here
  2. public OnPlayerSpawn(playerid)
  3. {
  4.     // Anti-Spawnkill (5 seconds)

  5.     // Set their health very high so they can't be killed
  6.     SetPlayerHealth(playerid, 999999);

  7.     // Notify them
  8.     SendClientMessage(playerid, -1, "You are protected against spawn-killing for 5 seconds.");

  9.     // Start a 5 second timer to end the anti-spawnkill
  10.     SetTimerEx("EndAntiSpawnKill", 5000, false, "i", playerid); //5000 = 5 Second
  11. }

  12. // Forward (make public) the function so the server can 'see' it
  13. forward EndAntiSpawnKill(playerid);

  14. // The timer function - the code to be executed when the timer is called goes here
  15. public EndAntiSpawnKill(playerid)
  16. {
  17.     // 5 seconds has passed, so let's set their health back to 100
  18.     SetPlayerHealth(playerid, 100);

  19.     // Let's notify them also
  20.     SendClientMessage(playerid, -1, "You are no longer protected against spawn-killing.");
  21.     return 1;
  22. }
คัดลอกไปที่คลิปบอร์ด

แสดงความคิดเห็น

ขอบคุณมากๆคับผม  โพสต์ 2021-11-22 18:32
ขออภัย! คุณไม่ได้รับสิทธิ์ในการดำเนินการในส่วนนี้ กรุณาเลือกอย่างใดอย่างหนึ่ง ลงชื่อเข้าใช้ | สมัครสมาชิก

รายละเอียดเครดิต

ปิด

เว็บมาสเตอร์แนะนำก่อนหน้า /1 ต่อไป

รูปแบบข้อความล้วน|Mobile|รายชื่อผู้ถูกระงับบัญชี| Samp-TH GTAOnline Thailand



เว็บสอนเปิดเซิฟเวอร์ GTA SAMP ONLINE, แจกสคริปต์ GTA, ขายสคริปต์ GTA, ซื้อสคริปต์ GTA SAMP, รวมระบบ GTA SAMP, รวมเซิฟ GTA ONLINE SAMP, SAMP-TH.NET, เกมจีทีเอ, GTA SAN, หาเซิฟ GTA เล่น, โปรโมทเซิฟ GTA ONLINE, วิธีเล่น GTA ONLINE, จีทีเอ ออนไลน์, หาเซิฟ GTA, เซิฟ GTA 0.3.7, เซิฟ GTA 0.3e RC5, ระบบเซิฟ GTA, สคริปต์ GTA, GTA ออนไลน์, เว็บโหลด GTA, SAMP-TH, GTA-TH, โคโล GTA, หาเซิฟ GTA ONLINE, COLO-GTA, โคโลจีทีเอ, เช่าโคโล GTA, เซิฟ GTA ออนไลน์

Copyright © 2001-2013 Comsenz Inc.   All Rights Reserved.

Powered by Discuz! X3.4

ตอบกระทู้ ขึ้นไปด้านบน ไปที่หน้ารายการกระทู้