Code:
you=players[enet_ent_creator(enet_ent_globpointer(players[cl_id]))];



I assume that players[] is an array where the local pointer of each player is stored. The index is the client id of the player.

If my assumption is correct, it should be like this (code snippet running in the enemies function):

Code:
// get the pointer to the player
you = players[enet_get_clientid()];
// calc distance between enemy and player
distance = vec_dist(you.x, my.x);



ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version