garrysmod-requests icon indicating copy to clipboard operation
garrysmod-requests copied to clipboard

Add function to force remove the entity on the client

Open zohart75 opened this issue 10 months ago • 7 comments

Details

We can make the entity to stop transmitting but the entity still exists on the client. It definitely needs function (not necessary, but very useful) to remove it on all the clients (or, perhaps, just client).

zohart75 avatar Apr 13 '24 22:04 zohart75

what do you mean

mgetJane avatar Apr 19 '24 15:04 mgetJane

what do you mean

Just read the description

zohart75 avatar Apr 19 '24 17:04 zohart75

I'd like more clarification too

garryspins avatar Apr 20 '24 09:04 garryspins

Uh.

You can make the shared entity using ents.Create.

After that, you can use ENTITY:UpdateTransmitState to stop the entity from transmitting to the clients. But the problem is that if you made an entity and it stopped transmitting, then it still exists on already connected clients.

That would be great if we could remove entity that exists on the client and isnt transmitting or make it remove automatically.

zohart75 avatar Apr 20 '24 09:04 zohart75

Could maybe try something like

local ent = ents.Create(...)
-- https://wiki.facepunch.com/gmod/Entity:SetPreventTransmit
ent:Spawn()

BullyHunter32 avatar Apr 20 '24 14:04 BullyHunter32

And then when it gets transmitted next it.... what

garryspins avatar Apr 20 '24 16:04 garryspins

It's still relevant. It would be desirable to get an answer from Rubat.

zohart75 avatar May 28 '24 23:05 zohart75