【发布时间】:2020-08-24 17:22:22
【问题描述】:
我正在为一个 garrysmod 服务器编写脚本,我完全不知道这个,我以前记得,但现在我不记得了。
我正在使用这段代码,
if ent:IsVehicle() then
if ent:GetModel() ~= { "models/mafia2/shubert_taxi.mdl", "models/mafia2/parry_bus.mdl", "models/mafia2/smith_200_p_pha.mdl" } then
client:Freeze(true)
self.Owner:setAction("Chopping", time, function()
ent:Remove()
nut.item.spawn("carparts", self:GetPos() + Vector(math.Rand(1,20), math.Rand(1,20),20), nil, Angle(0, 0, 0 ))
client:Freeze(false)
self.Owner:notify("You've chopped a car.")
end)
end
最初它是if ent:GetModel() ~= "models/mafia2/shubert_taxi.mdl",效果很好,但是我想限制 3 个单独的模型。有人知道怎么做吗?
【问题讨论】:
标签: lua garrys-mod