Hey guys, I’m trying to make it so that people can only spawn an entity I’ve coded once when on the server.
I use FPP, which deletes their entities after 2 minutes from disconnecting.
I’m trying to make it so that when they join, if their count of the entity is nil, set it to zero.
Then, if they try to spawn the entity through my derma menu, it checks if they have spawned any, and then let’s them spawn it or not.
I’ve been able to do this just fine using networked integers, but the way I’m doing this isn’t really going to work.
As you can see, ply is LocalPlayer, or rather the player that spawned the entity.
Here’s the problem: ply is userdata that is different each time they connect. So, if they leave, then come back before the 2 minute deletion period, they can spawn another entity because they aren’t the same ply as the original that spawned it.
I was trying to incorporate STEAM ID to track how many entities the person has spawned. Does anyone know how to do this?
This doesn’t work: