thanks for your input. i haven been thinking about this now. i still have some problems understanding.

imagine i create the entity client2 = ent_create(...) at the client2, now the function of this entity runs at the server only the function given by proc_local runs at all clients. fine then i could move the entity on all clients according to the incoming data from the server.

now i have the problem that i need a bounding box for mouse clicks for each entity. that box i just copied with clickentity2.x = client2.x and so on. now how do i for example set this clickentity to match client2 on each client since i dont have different pointers for it.
how would you solve that?

shorevietam suggested setting numbers to the entity and iterating on the server then sending back and creating pointers but i think this is much more work than my initial idea.

also as far as i understood if i use client2 = ent_create(...) at the client, only! the pointer client2 is valid at the client. if i use the pointer client2 at the server its empty, isnt it?

well i dont really see the point in creating the entities with ent_create apart from the advantage that all players see it right away when created and i dont have to handle this with invisble flags.