Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local entitytable = {}
- net.Receive("fly_over_HideEntity",function (len,ply)
- if not plyaccess(ply) then return end
- local val = net.ReadString()
- if (#entitytable == 0) then
- table.insert(entitytable,{id = ent})
- else
- entitytable[1] = {id = ent}
- end
- local json = util.TableToJSON(entitytable)
- file.Write("cinematicintro/entities.txt",json)
- end)
- net.Receive("fly_over_ShowEntity",function (len,ply)
- -- didnt rly touch dis
- if not plyaccess(ply) then return end
- local ent = net.ReadString()
- local readfile = file.Read("cinematicintro/entities.txt","DATA")
- local words = string.Explode(",",readfile)
- else -- if doesnt exist
- file.Write( "cinematicintro/entities.txt", ent ) -- write file in folder.
- end)
- local function fly_over_dir()
- if !(file.IsDir( "cinematicintro", "DATA" )) then
- file.CreateDir( "cinematicintro", "DATA" )
- end
- end
- hook.Add( "InitPostEntity", "fly_over_dir", fly_over_dir )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement