mirror of
https://github.com/metrostroi-repo/MetrostroiAddon.git
synced 2026-05-02 00:42:29 +00:00
init
This commit is contained in:
20
lua/entities/gmod_track_clock_time/init.lua
Normal file
20
lua/entities/gmod_track_clock_time/init.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
AddCSLuaFile("cl_init.lua")
|
||||
AddCSLuaFile("shared.lua")
|
||||
include("shared.lua")
|
||||
function ENT:KeyValue(key, value)
|
||||
self.VMF = self.VMF or {}
|
||||
self.VMF[key] = value
|
||||
end
|
||||
function ENT:Initialize()
|
||||
self:EntIndex()
|
||||
self.VMF = self.VMF or {}
|
||||
self.Type = (tonumber(self.VMF.Type) or 0)
|
||||
self.Light = (tonumber(self.VMF.Light) or 0)
|
||||
if self.Type == 0 then
|
||||
self:SetModel("models/metrostroi/clock_time_moscow.mdl")
|
||||
else
|
||||
self:SetModel("models/metrostroi/clock_time_type2.mdl")
|
||||
end
|
||||
self:SetNW2Bool("Type",self.Type > 0)
|
||||
self:SetNW2Int("Light",self.Light+1)
|
||||
end
|
||||
Reference in New Issue
Block a user