Facepunch / garrysmod-requests

Feature requests for Garry's Mod
84 stars 24 forks source link

Add function to force remove the entity on the client #2362

Open zohart75 opened 5 months ago

zohart75 commented 5 months ago

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).

mgetJane commented 5 months ago

what do you mean

zohart75 commented 5 months ago

what do you mean

Just read the description

garryspins commented 5 months ago

I'd like more clarification too

zohart75 commented 5 months ago

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.

BullyHunter32 commented 5 months ago

Could maybe try something like

local ent = ents.Create(...)
-- https://wiki.facepunch.com/gmod/Entity:SetPreventTransmit
ent:Spawn()
garryspins commented 5 months ago

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

zohart75 commented 4 months ago

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