Add Corner

On this page, I'll give you snippets on how to add corner to `Illegal Corners`.

Config (shared/cfg.lua)

If you want to add new corner for item sell, you must add it to the config. I will explain how to add new corner way.

Add New Corner

  • Open the config file. (rm_illegalcorners/shared/cfg.lua)

  • Find this lines:

cfg['corners'] = {
    {
        ['corner_name'] = 'Drugs Corner',
        ['corner_position'] = vector3(201.62, -1020.74, 29.0),
        ['corner_items'] = {
            {
                item = 'meth_baggy',
                label = 'Meth Baggy (5g)',
                perPrice = {
                    min = 1,
                    max = 10,
                },
                qty = {
                    min = 1,
                    max = 15,
                },
            },
            {
                item = 'weed_baggy',
                label = 'Weed Baggy (5g)',
                perPrice = {
                    min = 5,
                    max = 20,
                },
                qty = {
                    min = 3,
                    max = 8,
                },
            },
            {
                item = 'lsdtab',
                label = 'LSD Tab',
                perPrice = {
                    min = 1,
                    max = 10,
                },
                qty = {
                    min = 1,
                    max = 15,
                },
            },
            {
                item = 'cocaine_baggy',
                label = 'Cocaine Baggy (5g)',
                perPrice = {
                    min = 5,
                    max = 20,
                },
                qty = {
                    min = 3,
                    max = 8,
                },
            },
        },
    },
}
  • Add your corner like this:

cfg['corners'] = {
    {
        ['corner_name'] = 'Drugs Corner',
        ['corner_position'] = vector3(201.62, -1020.74, 29.0),
        ['corner_items'] = {
            {
                item = 'meth_baggy',
                label = 'Meth Baggy (5g)',
                perPrice = {
                    min = 1,
                    max = 10,
                },
                qty = {
                    min = 1,
                    max = 15,
                },
            },
            {
                item = 'weed_baggy',
                label = 'Weed Baggy (5g)',
                perPrice = {
                    min = 5,
                    max = 20,
                },
                qty = {
                    min = 3,
                    max = 8,
                },
            },
            {
                item = 'lsdtab',
                label = 'LSD Tab',
                perPrice = {
                    min = 1,
                    max = 10,
                },
                qty = {
                    min = 1,
                    max = 15,
                },
            },
            {
                item = 'cocaine_baggy',
                label = 'Cocaine Baggy (5g)',
                perPrice = {
                    min = 5,
                    max = 20,
                },
                qty = {
                    min = 3,
                    max = 8,
                },
            },
        },
    },
    {
        ['corner_name'] = 'New Corner',
        ['corner_position'] = vector3(100.0, 200.0, 300.0),
        ['corner_items'] = {
            {
                item = 'example_item_1',
                label = 'Example Baggy (1g)',
                perPrice = {
                    min = 1,
                    max = 10,
                },
                qty = {
                    min = 1,
                    max = 15,
                },
            },
            {
                item = 'example_item_2',
                label = 'Example Baggy (2g)',
                perPrice = {
                    min = 5,
                    max = 20,
                },
                qty = {
                    min = 3,
                    max = 8,
                },
            },
        },
    },
}
  • Restart script, go to your new corner. Type /takecorner to chat or console. Your new corner will be active.

Last updated