Advertisement
Silverlan

Untitled

Oct 26th, 2012
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.35 KB | None | 0 0
  1. function ENT:PlaySceneCustom(...)
  2.     local scene = ...
  3.     local targets = {select(2,...)}
  4.     local ent = ents.Create("logic_choreographed_scene")
  5.     ent:SetKeyValue("SceneFile",scene)
  6.     for _,tgt in ipairs(targets) do
  7.         ent:SetKeyValue("target" .. _,type(tgt) == "string" && tgt || tgt:GetName())
  8.     end
  9.     ent:Spawn()
  10.     ent:Activate()
  11.     ent:Fire("Start","",0)
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement