• Из-за обновления GTA 5 (был добавлен новый патч) может временно не работать вход в RAGE Multiplayer.

    ERROR: Your game version is not supported by RAGE Multiplayer.

    Данная ошибка говорит о том, что GTA V обновилась до новой версии (GTA Online тоже). Вам необходимо обновить саму игру в главном меню вашего приложения (Steam / Epic Games / Rockstar Games).
    Если после этого RAGE:MP все равно не работает - вам нужно дождаться выхода патча для самого мультиплеера (обычно это занимает от нескольких часов до нескольких дней).

    Новости и апдейты Rockstar Games - https://www.rockstargames.com/ru/newswire/
    Статус всех служб для Rockstar Games Launcher и поддерживаемых игр: https://support.rockstargames.com/ru/servicestatus


    Grand Theft Auto 5 (+ GTA Online) последний раз были обновлены:

Мануал Фикс подарков

Alquaonte

Начинающий специалист
Автор темы
29 Окт 2020
5
2
67
Порадуйте игроков своего сервера подарками!
Скрины
Фикс делал сам (данный фикс никак не связан с фиксом от jjigolem).
В Inventory.cs ищем строку
C#:
case ItemType.Present:
После чего заменяем данный case с закомментированным кодом на следующий код:
C#:
            case ItemType.Present:
                        /* Подарок */
                        player.Health = (player.Health + 10 > 100) ? 100 : player.Health + 10;
                        //Notify.Send(player, NotifyType.Success, NotifyPosition.BottomCenter, $"Вы открыли подарок, в нём были:", 3000);
                        Commands.RPChat("me", player, $"открыл(а) подарок");
                        Random Rand0 = new Random();
                        int present = Rand0.Next(1, 7);
                        switch (present)
                        {
                            case 1:
                                nInventory.Add(player, new nItem(ItemType.HealthKit, 1, 100.ToString()));
                                Notify.Send(player, NotifyType.Success, NotifyPosition.BottomCenter, $"Вы открыли подарок, в нём был аптечка", 3000);
                                break;
                            case 2:
                                if (Main.Players[player].Licenses[6])
                                {
                                    int amount = 30000;
                                    GameLog.Money($"player({Main.Players[player].UUID})", $"player({Main.Players[player].UUID})", amount, "admin");
                                    MoneySystem.Wallet.Change(player, amount);
                                    GameLog.Admin($"{player.Name}", $"giveMoney({amount})", $"{player.Name}");
                                    Notify.Send(player, NotifyType.Success, NotifyPosition.BottomCenter, $"Вы открыли подарок, в нём были деньги: 30000$", 3000);
                                }
                                else
                                {
                                    Main.Players[player].Licenses[6] = true;
                                    Notify.Send(player, NotifyType.Success, NotifyPosition.BottomCenter, $"Вы открыли подарок, в нём была лицензия на оружие", 3000);
                                }
                                break;
                            case 3:
                                nInventory.Add(player, new nItem(ItemType.BodyArmor, 1, 100.ToString()));
                                Notify.Send(player, NotifyType.Success, NotifyPosition.BottomCenter, $"Вы открыли подарок, в нём был бронежилет", 3000);
                                break;
                            case 4:
                                nInventory.Add(player, new nItem(ItemType.Bat, 1, 999999999.ToString()));
                                Notify.Send(player, NotifyType.Success, NotifyPosition.BottomCenter, $"Вы открыли подарок, в нём была бита", 3000);
                                break;
                            case 5:
                                nInventory.Add(player, new nItem(ItemType.Musket, 1, 999999999.ToString()));
                                Notify.Send(player, NotifyType.Success, NotifyPosition.BottomCenter, $"Вы открыли подарок, в нём был мушкет", 3000);
                                break;
                            case 6:
                                Main.Accounts[player].RedBucks += 10;
                                Trigger.ClientEvent(player, "starset", Main.Accounts[player].RedBucks);
                                Notify.Send(player, NotifyType.Success, NotifyPosition.BottomCenter, $"Вы открыли подарок, в нём было 10DP", 3000);
                                break;
                        }
                        break;

Если возникают вопросы пишете в дискорде: Aiden#3005
 

Harland David Sanders

Куратор портала
Команда форума
Куратор портала
VIP
high coder
media
10 Сен 2020
3,058
2,443
219
Подарок от Голема. :p
 

JJIGolem

Гуру
high coder
19 Окт 2020
211
270
142
Это не мой
 

Harland David Sanders

Куратор портала
Команда форума
Куратор портала
VIP
high coder
media
10 Сен 2020
3,058
2,443
219
//ищем
case ItemType.Present:

C#:
//и вставляем внутри

                        player.Health = (player.Health + 10 > 100) ? 100 : player.Health + 10;

                        Notify.Send(player, NotifyType.Success, NotifyPosition.BottomCenter, $"Вы открыли подарок, в нём были:", 3000);


                        Tuple<int, int> types = nInventory.PresentsTypes[Convert.ToInt32(item.Data)];

                        if (types.Item1 <= 2)

                        {

                            Main.Players[player].EXP += nInventory.TypesCounts[types.Item1];

                            if (Main.Players[player].EXP >= 3 + Main.Players[player].LVL * 3)

                            {

                                Main.Players[player].EXP = Main.Players[player].EXP - (3 + Main.Players[player].LVL * 3);

                                Main.Players[player].LVL += 1;

                            }


                            Notify.Send(player, NotifyType.Info, NotifyPosition.BottomCenter, $"{nInventory.TypesCounts[types.Item1]} EXP", 3000);


                            MoneySystem.Wallet.Change(player, nInventory.TypesCounts[types.Item2]);


                            Notify.Send(player, NotifyType.Info, NotifyPosition.BottomCenter, $"$ {nInventory.TypesCounts[types.Item2]}", 3000);

                        }

                        else

                        {

                            MoneySystem.Wallet.Change(player, nInventory.TypesCounts[types.Item1]);


                            Notify.Send(player, NotifyType.Info, NotifyPosition.BottomCenter, $"$ {nInventory.TypesCounts[types.Item1]}", 3000);


                            Main.Players[player].EXP += nInventory.TypesCounts[types.Item2];

                            if (Main.Players[player].EXP >= 3 + Main.Players[player].LVL * 3)

                            {

                                Main.Players[player].EXP = Main.Players[player].EXP - (3 + Main.Players[player].LVL * 3);

                                Main.Players[player].LVL += 1;

                            }


                            Notify.Send(player, NotifyType.Info, NotifyPosition.BottomCenter, $"{nInventory.TypesCounts[types.Item2]} EXP", 3000);

                        }


                        Commands.RPChat("me", player, $"открыл(а) подарок {types.Item1} + {types.Item2}");


//====================

//ищем
case ItemType.Present:

C#:
//ищем

public static List<ItemType> AlcoItems = new List<ItemType>()

//и после этого списка добавляем новые


        public static readonly List<Tuple<int, int>> PresentsTypes = new List<Tuple<int, int>>()

        {

            new Tuple<int, int>(0, 5),

            new Tuple<int, int>(1, 4),

            new Tuple<int, int>(2, 3),

            new Tuple<int, int>(5, 0),

            new Tuple<int, int>(4, 1),

            new Tuple<int, int>(3, 2),

        };

        public static readonly List<int> TypesCounts = new List<int>()

        {

            10, 25, 50, 1000, 5000, 10000

        };
 
  • Like
Реакции: Agressor

JJIGolem

Гуру
high coder
19 Окт 2020
211
270
142
//ищем
case ItemType.Present:

C#:
//и вставляем внутри

                        player.Health = (player.Health + 10 > 100) ? 100 : player.Health + 10;

                        Notify.Send(player, NotifyType.Success, NotifyPosition.BottomCenter, $"Вы открыли подарок, в нём были:", 3000);


                        Tuple<int, int> types = nInventory.PresentsTypes[Convert.ToInt32(item.Data)];

                        if (types.Item1 <= 2)

                        {

                            Main.Players[player].EXP += nInventory.TypesCounts[types.Item1];

                            if (Main.Players[player].EXP >= 3 + Main.Players[player].LVL * 3)

                            {

                                Main.Players[player].EXP = Main.Players[player].EXP - (3 + Main.Players[player].LVL * 3);

                                Main.Players[player].LVL += 1;

                            }


                            Notify.Send(player, NotifyType.Info, NotifyPosition.BottomCenter, $"{nInventory.TypesCounts[types.Item1]} EXP", 3000);


                            MoneySystem.Wallet.Change(player, nInventory.TypesCounts[types.Item2]);


                            Notify.Send(player, NotifyType.Info, NotifyPosition.BottomCenter, $"$ {nInventory.TypesCounts[types.Item2]}", 3000);

                        }

                        else

                        {

                            MoneySystem.Wallet.Change(player, nInventory.TypesCounts[types.Item1]);


                            Notify.Send(player, NotifyType.Info, NotifyPosition.BottomCenter, $"$ {nInventory.TypesCounts[types.Item1]}", 3000);


                            Main.Players[player].EXP += nInventory.TypesCounts[types.Item2];

                            if (Main.Players[player].EXP >= 3 + Main.Players[player].LVL * 3)

                            {

                                Main.Players[player].EXP = Main.Players[player].EXP - (3 + Main.Players[player].LVL * 3);

                                Main.Players[player].LVL += 1;

                            }


                            Notify.Send(player, NotifyType.Info, NotifyPosition.BottomCenter, $"{nInventory.TypesCounts[types.Item2]} EXP", 3000);

                        }


                        Commands.RPChat("me", player, $"открыл(а) подарок {types.Item1} + {types.Item2}");


//====================

//ищем
case ItemType.Present:

C#:
//ищем

public static List<ItemType> AlcoItems = new List<ItemType>()

//и после этого списка добавляем новые


        public static readonly List<Tuple<int, int>> PresentsTypes = new List<Tuple<int, int>>()

        {

            new Tuple<int, int>(0, 5),

            new Tuple<int, int>(1, 4),

            new Tuple<int, int>(2, 3),

            new Tuple<int, int>(5, 0),

            new Tuple<int, int>(4, 1),

            new Tuple<int, int>(3, 2),

        };

        public static readonly List<int> TypesCounts = new List<int>()

        {

            10, 25, 50, 1000, 5000, 10000

        };
чей это код?)
 

JJIGolem

Гуру
high coder
19 Окт 2020
211
270
142
ну вот зачем было это выкладывать? Раз чел уже выложил свой вариант, лично в паблик.
 

Etader

Специалист
15 Сен 2020
130
23
82
1 так а когда приходят подарки?
2 чуток не понятно с кодом -нету примыканий куда лепить - методом тыка лень
 
Последнее редактирование:
  • Like
Реакции: levansy