Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Garry's Mod Starfall v
« Previous 1 2 3 4 5 … 18 Next »
Find by Class
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linear Mode
Find by Class
30-04-2022, 11:13 PM, (This post was last modified: 30-04-2022, 11:13 PM by 4N0NYM.)
#1
4N0NYM Offline
absens
****
Posts: 561
Threads: 211
Joined: Dec 2014
Find by Class
So i encountered a very interesting thing:

If someone spawns a Ship Core on another Galaxy (i.e. i am in Universe space and someone spawns a Ship Core on Shakuras) and you track it via Server find.byClass and then net broadcast it to Client it gets turned into a NULL Entity

--@shared 

if SERVER then
    timer.create("U",2,0,function()
        SC  = find.byClass("ship_core")
        for i=1,#SC do
            printConsole(SC[i],"Server")
        end
        net.start()
        net.writeTable(SC)
        net.broadcast()
    end)
else
    hook("net","net",function()
        Table = net.readTable()
        for i=1,#Table do
            printConsole(Table[i],"Client")
        end
    end)
end


Output : 

Entity [533][ship_core] Server
Entity [764][ship_core] Server

Entity [533][ship_core] Client
[NULL ENTITY] Client
Find
Reply
« Next Oldest | Next Newest »


Messages In This Thread
Find by Class - by 4N0NYM - 30-04-2022, 11:13 PM
RE: Find by Class - by 57e11a - 01-05-2022, 02:11 AM
RE: Find by Class - by 4N0NYM - 01-05-2022, 08:49 AM
RE: Find by Class - by Person8880 - 01-05-2022, 02:11 PM

  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.