entities.GetByUserID
Get the entity by its userid.
Syntax
userdata entities.GetByUserID(int:userid)
Parameters
userid UserID of the entity.
Return value
The function returns the userdata of an entity by its userid.
Example
for i = 1, globals.MaxClients(), 1 do
local Player = entities.GetByUserID(i);
end