FindMetaTable
Örnek
Oyuncu meta tablosuna, bir oyuncunun hasta olup olmadığını kontrol etmek için çok basit bir fonksiyon ekler.
local meta = FindMetaTable("Player")
function meta:IsSick()
return true
end
-- Bir süre sonra...
local ply = Entity(1)
if ( ply:IsSick() ) then
ply:ChatPrint( "Get well soon, " .. ply:Nick() .. "!" )
ply:ChatPrint( "I just don't understand how you're always sick..." )
end
Çıktı:
Get well soon, Player1!
I just don't understand how you're always sick...
Tüm sunucular · GmodTR Launcher · Rehber · GMod Wiki · GmodTR nedir? · Sunucu ekle · Discord