Files
wnsrc/lua/entities/prop_vj_flag.lua

42 lines
1.7 KiB
Lua
Raw Normal View History

2024-08-04 22:55:00 +03:00
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
/*--------------------------------------------------
*** Copyright (c) 2012-2023 by DrVrej, All rights reserved. ***
No parts of this code or any of its contents may be reproduced, copied, modified or adapted,
without the prior written consent of the author, unless otherwise indicated for stand-alone materials.
--------------------------------------------------*/
AddCSLuaFile()
if (!file.Exists("autorun/vj_base_autorun.lua","LUA")) then return end
ENT.Base = "prop_vj_animatable"
ENT.Type = "anim"
ENT.PrintName = "Flag"
ENT.Author = "DrVrej"
ENT.Contact = "http://steamcommunity.com/groups/vrejgaming"
ENT.Purpose = "Used for flags."
ENT.Instructions = "Don't change anything."
ENT.Category = "VJ Base"
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if !SERVER then return end
function ENT:CustomOnInitialize()
self:SetModel("models/vj_props/armenian_flag01.mdl")
self:PhysicsInit(SOLID_VPHYSICS)
self:SetMoveType(MOVETYPE_VPHYSICS)
self:ResetSequence("Idle")
self.WaveSound = VJ_CreateSound(self, "vj_misc/flag_loop.wav", 60)
end
---------------------------------------------------------------------------------------------------------------------------------------------
function ENT:OnRemove()
VJ_STOPSOUND(self.WaveSound)
end