File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
lua/entities/gmod_wire_egp/lib/egplib Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -587,7 +587,6 @@ if (SERVER) then
587587 end
588588 if not targets then
589589 targets = ents .FindByClass (" gmod_wire_egp" )
590- table .Add ( targets , ents .FindByClass (" gmod_wire_egp_hud" ) )
591590 table .Add ( targets , ents .FindByClass (" gmod_wire_egp_emitter" ) )
592591
593592 if (# targets == 0 ) then return false , " There are no EGP screens on the map." end
@@ -660,6 +659,19 @@ if (SERVER) then
660659 return true , # targets
661660 end
662661 end
662+
663+ local function initspawn (ply )
664+ timer .Simple (10 ,function ()
665+ if (ply and ply :IsValid ()) then
666+ local bool , msg = EGP :SendDataStream ( ply )
667+ if (bool == true ) then
668+ ply :ChatPrint (" [EGP] " .. tostring (msg ) .. " EGP Screens found on the server. Sending objects now..." )
669+ end
670+ end
671+ end )
672+ end
673+
674+ hook .Add (" PlayerInitialSpawn" ," EGP_SpawnFunc" ,initspawn )
663675else
664676 function EGP :ReceiveDataStream ( decoded )
665677 local Ent = decoded .Ent
You can’t perform that action at this time.
0 commit comments