Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Need help?

    Create a topic in the appropriate section
    Don't write everything in the chat!
  • Take a look at the marketplace

    There you can buy
    everything related to game servers
  • Don't want a ban?

    Please read our rules
    Don't disturb the order!
  • Sell or buy?

    Use services of the guarantor
    We will make your deal safe
  • 0
Bazileck

Аттачмент рюкзака !!!

Всем привет, подскажите пожалуйста!!! С недавнего времени перестал корректно работать аттачмент (везде где есть слот под рюкзак), если я вешаю рюкзак например на мотоцикл или на другой предмет где есть слот под рюкзак то в рюкзак ничего положить нельзя, а если рюкзак навесить сразу с содержимым оно исчезает после рестарта !!!

Пожалуйста, Войдите или Зарегистрируйтесь, чтобы увидеть это: Вложение.

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0
modded class /* Класс рюкзака или например весь класс Clothing */
{
    override bool CanReceiveItemIntoCargo(EntityAI item)
    {
        EntityAI parent = GetHierarchyParent();

        if (parent && GetInventory().IsAttachment()) {

            if (parent.IsInherited( /* Класс разрешенного родителя */ )) {
                return true;
            }
        }
        return super.CanReceiveItemIntoCargo(item);
    }

    override bool CanLoadItemIntoCargo(EntityAI item)
    {
        EntityAI parent = GetHierarchyParent();
    
        if (parent && GetInventory().IsAttachment()) {
            if (parent.IsInherited( /* Класс разрешенного родителя */ ) {
                return true;
            }
        }
        return super.CanLoadItemIntoCargo(item);
    }
}

если например подставить в место коментариев Clothing и Clothing но это будет означать, что любая одежда в атачменте у любой одежды сможет хранить предметы
но в твоем случае нужно подставить в первое место Clothing и в класс родителей подствить CarScript

 

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

By using this site, you automaticly agree to our Guidelines and Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.