Пример #1
0
    public void Cmd_UCE_Admin_SummonMonster(string adminTargetName, int adminValue)
    {
        if (player.UCE_adminLevel <= 0 || adminValue <= 0)
        {
            return;
        }

        Monster monster = _NetworkManagerMMO.cachedMonsters().Find(x => x.name.ToLower() == adminTargetName.ToLower());

        if (monster)
        {
            for (int j = 1; j <= adminValue; ++j)
            {
                GameObject go = Instantiate(monster.gameObject, player.transform.position, player.transform.rotation);
                NetworkServer.Spawn(go);
            }
        }
    }