Added ID check on ClientService.GetClientByName

This commit is contained in:
hydrant
2018-10-20 17:19:05 +02:00
parent 534a6bec71
commit 36b3a56401

View File

@@ -24,6 +24,13 @@ namespace reallife_gamemode.Server.Services
name = name.ToLower();
List<Client> playerList = NAPI.Pools.GetAllPlayers();
if(int.TryParse(name, out int id))
{
toReturn = playerList.Find(p => p.Handle.Value == id);
return toReturn;
}
toReturn = playerList.Find(p => p.Name.ToLower() == name);
if(toReturn == null)