# CONFIGURATION FILE

```lua
Config = {}

Config.Debug = false 

function Config.DebugPrint(...)
    if Config.Debug then
        print('[JANIEL-MOTEL DEBUG]:', ...)
    end
end

Config.MotelNPC = {
    coords = vector4(1500.34, 3570.39, 35.36, 27.45),
    model = "a_m_m_business_01",
    label = "Motel Menu"
}

Config.Target = "qb" -- "qb" veya "ox-target" veya "drawtext"
Config.DrawText = true -- DrawText enable/disable
Config.DrawTextDistance = 2.0 -- DrawText show distance

Config.Management = {
    job = 'motel',
    grades = {
        [0] = {
            name = 'cleaner',
            label = 'Cleaner',
            payment = 50
        },
        [1] = {
            name = 'employee',
            label = 'Employee',
            payment = 75
        },
        [2] = {
            name = 'receptionist',
            label = 'Receptionist',
            payment = 100
        },
        [3] = {
            name = 'manager',
            label = 'Manager',
            payment = 150,
            isboss = true
        },
        [4] = {
            name = 'owner',
            label = 'Owner',
            payment = 200,
            isboss = true
        }
    },
    society = 'society_motel'
}

Config.Furniture = {
    stash = 1880532265,
    wardrobe = 697352466
}

Config.Language = 'en'

Config.Text = {
    locked_door = "[E] Door Locked",
    unlocked_door = "[E] Door Open",
    no_access = "No Acces"
}



function Config.Locale(key, ...)
    local lang = Config.Lang[Config.Language]
    if not lang then
        return 'Missing Language: ' .. Config.Language
    end
    
    local text = lang[key]
    if not text then
        return 'Missing Text: ' .. key
    end
    
    if ... then
        return string.format(text, ...)
    end
    
    return text
end

Config.Motels = {
    ['sandy_motel'] = {
        name = 'Sandy Motel',
        location = vector3(1500.34, 3570.39, 35.36),
        rooms = {
            ['101'] = {
                doors = {
                    front = {
                        coords = vector3(1511.894165, 3567.307617, 35.550411),
                        heading = 30.000001907349,
                        doorid = "janimotel1",
                        locked = true
                    },
                    back = {
                        coords = vector3(1509.189209, 3579.105957, 34.483829),
                        heading = 29.951805114746,
                        doorid = "janimotels1",
                        locked = true
                    }
                },
                price = {
                    hourly = 150,
                    daily = 750
                }
            },
            ['102'] = {
                doors = {
                    front = {
                        coords = vector3(1520.793579, 3572.439453, 35.550411),
                        heading = 30.000001907349,
                        doorid = "janimotel2",
                        locked = true
                    },
                    back = {
                        coords = vector3(1511.928467, 3580.681396, 34.483829),
                        heading = 30.045764923096,
                        doorid = "janimotels2",
                        locked = true
                    }
                },
                price = {
                    hourly = 150,
                    daily = 750
                }
            },
            ['103'] = {
                doors = {
                    front = {
                        coords = vector3(1521.555298, 3572.885498, 35.550411),
                        heading = 30.000001907349,
                        doorid = "janimotel3",
                        locked = true
                    },
                    back = {
                        coords = vector3(1518.850342, 3584.683838, 34.483829),
                        heading = 29.910284042358,
                        doorid = "janimotels3",
                        locked = true
                    }
                },
                price = {
                    hourly = 150,
                    daily = 750
                }
            },
            ['104'] = {
                doors = {
                    front = {
                        coords = vector3(1528.224487, 3580.153564, 34.382339),
                        heading = 26,91,
                        doorid = "janimotel4",
                        locked = true
                    },
                    back = {
                        coords = vector3(1521.589600, 3586.259277, 34.483829),
                        heading = 26,91,
                        doorid = "janimotels4",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['105'] = {
                doors = {
                    front = {
                        coords = vector3(1536.101807, 3581.283936, 35.550411),
                        heading = 30.000001907349,
                        doorid = "janimotel5",
                        locked = true
                    },
                    back = {
                        coords = vector3(1536.101807, 3581.283936, 35.550411),
                        heading = 30.000001907349,
                        doorid = "janimotels5",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['106'] = {
                doors = {
                    front = {
                        coords = vector3(1545.001221, 3586.415771, 35.550411),
                        heading = 30.000001907349,
                        doorid = "janimotel6",
                        locked = true
                    },
                    back = {
                        coords = vector3(1536.136108, 3594.657715, 34.483829),
                        heading = 30.000001907349,
                        doorid = "janimotels6",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['107'] = {
                doors = {
                    front = {
                        coords = vector3(1545.762939, 3586.861816, 35.550411),
                        heading = 30.000005722046,
                        doorid = "janimotel7",
                        locked = true
                    },
                    back = {
                        coords = vector3(1543.057983, 3598.660156, 34.483829),
                        heading = 30.000005722046,
                        doorid = "janimotels7",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['108'] = {
                doors = {
                    front = {
                        coords = vector3(1554.662354, 3591.993652, 35.550411),
                        heading = 30.000001907349,
                        doorid = "janimotel8",
                        locked = true
                    },
                    back = {
                        coords = vector3(1545.797241, 3600.235596, 34.483829),
                        heading = 30.000001907349,
                        doorid = "janimotels8",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['109'] = {
                doors = {
                    front = {
                        coords = vector3(1557.629395, 3593.712891, 35.550411),
                        heading = 30.000001907349,
                        doorid = "janimotel9",
                        locked = true
                    },
                    back = {
                        coords = vector3(1554.924438, 3605.511230, 34.483829),
                        heading = 30.000001907349,
                        doorid = "janimotels9",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['110'] = {
                doors = {
                    front = {
                        coords = vector3(1566.528809, 3598.844727, 35.550411),
                        heading = 30.000001907349,
                        doorid = "janimotel10",
                        locked = true
                    },
                    back = {
                        coords = vector3(1557.663696, 3607.086670, 34.483829),
                        heading = 30.000001907349,
                        doorid = "janimotels10",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['201'] = {
                doors = {
                    front = {
                        coords = vector3(1511.894165, 3567.307617, 38.852840),
                        heading = 30.000001907349,
                        doorid = "janimotel11",
                        locked = true
                    },
                    back = {
                        coords = vector3(1557.663696, 3607.086670, 37.786259),
                        heading = 30.000001907349,
                        doorid = "janimotels11",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['202'] = {
                doors = {
                    front = {
                        coords = vector3(1520.793579, 3572.439453, 38.852840),
                        heading = 30.000001907349,
                        doorid = "janimotel12",
                        locked = true
                    },
                    back = {
                        coords = vector3(1554.924438, 3605.511230, 37.786259),
                        heading = 30.000001907349,
                        doorid = "janimotels12",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['203'] = {
                doors = {
                    front = {
                        coords = vector3(1521.555298, 3572.885498, 38.852840),
                        heading = 30.000001907349,
                        doorid = "janimotel13",
                        locked = true
                    },
                    back = {
                        coords = vector3(1545.797241, 3600.235596, 37.786259),
                        heading = 30.000001907349,
                        doorid = "janimotels13",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['204'] = {
                doors = {
                    front = {
                        coords = vector3(1530.454712, 3578.017334, 38.852840),
                        heading = 30.000001907349,
                        doorid = "janimotel14",
                        locked = true
                    },
                    back = {
                        coords = vector3(1543.057983, 3598.660156, 37.786259),
                        heading = 30.000001907349,
                        doorid = "janimotels14",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['205'] = {
                doors = {
                    front = {
                        coords = vector3(1536.101807, 3581.283936, 38.852840),
                        heading = 30.000001907349,
                        doorid = "janimotel15",
                        locked = true
                    },
                    back = {
                        coords = vector3(1536.136108, 3594.657715, 37.786259),
                        heading = 30.000001907349,
                        doorid = "janimotels15",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['206'] = {
                doors = {
                    front = {
                        coords = vector3(1545.001221, 3586.415771, 38.852840),
                        heading = 30.000001907349,
                        doorid = "janimotel16",
                        locked = true
                    },
                    back = {
                        coords = vector3(1533.396851, 3593.082275, 37.786259),
                        heading = 30.000001907349,
                        doorid = "janimotels16",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['207'] = {
                doors = {
                    front = {
                        coords = vector3(1545.762939, 3586.861816, 38.852840),
                        heading = 30.000001907349,
                        doorid = "janimotel17",
                        locked = true
                    },
                    back = {
                        coords = vector3(1521.589600, 3586.259277, 37.786259),
                        heading = 30.000001907349,
                        doorid = "janimotels17",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['208'] = {
                doors = {
                    front = {
                        coords = vector3(1554.662354, 3591.993652, 38.852840),
                        heading = 30.000001907349,
                        doorid = "janimotel18",
                        locked = true
                    },
                    back = {
                        coords = vector3(1518.850342, 3584.683838, 37.786259),
                        heading = 30.000001907349,
                        doorid = "janimotels18",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['209'] = {
                doors = {
                    front = {
                        coords = vector3(1557.629395, 3593.712891, 38.852840),
                        heading = 30.000001907349,
                        doorid = "janimotel19",
                        locked = true
                    },
                    back = {
                        coords = vector3(1511.928467, 3580.681396, 37.786259),
                        heading = 30.000001907349,
                        doorid = "janimotels19",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['210'] = {
                doors = {
                    front = {
                        coords = vector3(1566.528809, 3598.844727, 38.852840),
                        heading = 30.000001907349,
                        doorid = "janimotel20",
                        locked = true
                    },
                    back = {
                        coords = vector3(1509.189209, 3579.105957, 37.786259),
                        heading = 30.000001907349,
                        doorid = "janimotels20",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['111'] = {
                doors = {
                    front = {
                        coords = vector3(1573.255493, 3615.597168, 35.550411),
                        heading = 30.000001907349,
                        doorid = "janimotel21",
                        locked = true
                    },
                    back = {
                        coords = vector3(1613.034180, 3569.827393, 34.483829),
                        heading = 30.000001907349,
                        doorid = "janimotels21",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['112'] = {
                doors = {
                    front = {
                        coords = vector3(1578.387329, 3606.697754, 35.550411),
                        heading = 30.000001907349,
                        doorid = "janimotel22",
                        locked = true
                    },
                    back = {
                        coords = vector3(1611.458862, 3572.566650, 34.483829),
                        heading = 30.000001907349,
                        doorid = "janimotels22",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['113'] = {
                doors = {
                    front = {
                        coords = vector3(1578.833374, 3605.936035, 35.550411),
                        heading = 30.000001907349,
                        doorid = "janimotel23",
                        locked = true
                    },
                    back = {
                        coords = vector3(1606.183105, 3581.694092, 34.483829),
                        heading = 30.000001907349,
                        doorid = "janimotels23",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['114'] = {
                doors = {
                    front = {
                        coords = vector3(1583.965210, 3597.036621, 35.550411),
                        heading = 30.000001907349,
                        doorid = "janimotel24",
                        locked = true
                    },
                    back = {
                        coords = vector3(1604.607788, 3584.433350, 34.483829),
                        heading = 30.000001907349,
                        doorid = "janimotels24",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['115'] = {
                doors = {
                    front = {
                        coords = vector3(1587.231812, 3591.389648, 35.550411),
                        heading = 30.000001907349,
                        doorid = "janimotel25",
                        locked = true
                    },
                    back = {
                        coords = vector3(1600.605225, 3591.355225, 34.483829),
                        heading = 30.000001907349,
                        doorid = "janimotels25",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['116'] = {
                doors = {
                    front = {
                        coords = vector3(1592.363647, 3582.490234, 35.550411),
                        heading = 30.000001907349,
                        doorid = "janimotel26",
                        locked = true
                    },
                    back = {
                        coords = vector3(1599.029907, 3594.094482, 34.483829),
                        heading = 30.000001907349,
                        doorid = "janimotels26",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['117'] = {
                doors = {
                    front = {
                        coords = vector3(1592.809692, 3581.728516, 35.550411),
                        heading = 30.000001907349,
                        doorid = "janimotel27",
                        locked = true
                    },
                    back = {
                        coords = vector3(1592.206787, 3605.901611, 34.483829),
                        heading = 30.000001907349,
                        doorid = "janimotels27",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['118'] = {
                doors = {
                    front = {
                        coords = vector3(1597.941528, 3572.829102, 35.550411),
                        heading = 30.000001907349,
                        doorid = "janimotel28",
                        locked = true
                    },
                    back = {
                        coords = vector3(1590.631470, 3608.640869, 34.483829),
                        heading = 30.000001907349,
                        doorid = "janimotels28",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['119'] = {
                doors = {
                    front = {
                        coords = vector3(1599.660767, 3569.861816, 35.550411),
                        heading = 30.000001907349,
                        doorid = "janimotel29",
                        locked = true
                    },
                    back = {
                        coords = vector3(1586.628906, 3615.562744, 34.483829),
                        heading = 30.000001907349,
                        doorid = "janimotels29",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['120 '] = {
                doors = {
                    front = {
                        coords = vector3(1604.792603, 3560.962402, 35.550411),
                        heading = 30.000001907349,
                        doorid = "janimotel30",
                        locked = true
                    },
                    back = {
                        coords = vector3(1585.053589, 3618.302002, 34.483829),
                        heading = 30.000001907349,
                        doorid = "janimotels30",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['220'] = {
                doors = {
                    front = {
                        coords = vector3(1604.792603, 3560.962402, 38.852840),
                        heading = 30.000001907349,
                        doorid = "janimotel31",
                        locked = true
                    },
                    back = {
                        coords = vector3(1585.053589, 3618.302002, 37.786259),
                        heading = 30.000001907349,
                        doorid = "janimotels31",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['219'] = {
                doors = {
                    front = {
                        coords = vector3(1599.660767, 3569.861816, 38.852840),
                        heading = 30.000001907349,
                        doorid = "janimotel32",
                        locked = true
                    },
                    back = {
                        coords = vector3(1611.458862, 3572.566650, 37.786259),
                        heading = 30.000001907349,
                        doorid = "janimotels32",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['218'] = {
                doors = {
                    front = {
                        coords = vector3(1597.941528, 3572.829102, 38.852840),
                        heading = 30.000001907349,
                        doorid = "janimotel33",
                        locked = true
                    },
                    back = {
                        coords = vector3(1606.183105, 3581.694092, 37.786259),
                        heading = 30.000001907349,
                        doorid = "janimotels33",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['217'] = {
                doors = {
                    front = {
                        coords = vector3(1592.809692, 3581.728516, 38.852840),
                        heading = 30.000001907349,
                        doorid = "janimotel34",
                        locked = true
                    },
                    back = {
                        coords = vector3(1690.517700, 3667.646484, 35.550411),
                        heading = 30.000001907349,
                        doorid = "janimotels34",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['216'] = {
                doors = {
                    front = {
                        coords = vector3(1592.363647, 3582.490234, 38.852840),
                        heading = 30.000001907349,
                        doorid = "janimotel35",
                        locked = true
                    },
                    back = {
                        coords = vector3(1600.605225, 3591.355225, 37.786259),
                        heading = 30.000001907349,
                        doorid = "janimotels35",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['215'] = {
                doors = {
                    front = {
                        coords = vector3(1587.231812, 3591.389648, 38.852840),
                        heading = 30.000001907349,
                        doorid = "janimotel36",
                        locked = true
                    },
                    back = {
                        coords = vector3(1599.029907, 3594.094482, 37.786259),
                        heading = 30.000001907349,
                        doorid = "janimotels36",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['214'] = {
                doors = {
                    front = {
                        coords = vector3(1583.965210, 3597.036621, 38.852840),
                        heading = 30.000001907349,
                        doorid = "janimotel37",
                        locked = true
                    },
                    back = {
                        coords = vector3(1592.206787, 3605.901611, 37.786259),
                        heading = 30.000001907349,
                        doorid = "janimotels37",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['213'] = {
                doors = {
                    front = {
                        coords = vector3(1578.833374, 3605.936035, 38.852840),
                        heading = 30.000001907349,
                        doorid = "janimotel38",
                        locked = true
                    },
                    back = {
                        coords = vector3(1590.631470, 3608.640869, 37.786259),
                        heading = 30.000001907349,
                        doorid = "janimotels38",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['212'] = {
                doors = {
                    front = {
                        coords = vector3(1578.387329, 3606.697754, 38.852840),
                        heading = 30.000001907349,
                        doorid = "janimotel39",
                        locked = true
                    },
                    back = {
                        coords = vector3(1586.628906, 3615.562744, 37.786259),
                        heading = 30.000001907349,
                        doorid = "janimotels39",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            },
            ['211'] = {
                doors = {
                    front = {
                        coords = vector3(1573.255493, 3615.597168, 38.852840),
                        heading = 300.0,
                        doorid = "janimotel40",
                        locked = true
                    },
                    back = {
                        coords = vector3(1585.053589, 3618.302002, 37.786259),
                        heading = 300.0,
                        doorid = "janimotels40",
                        locked = true
                    }
                },
                price = { hourly = 150, daily = 750 }
            }
        }
    }
}

-- String split fonksiyonu
local function stringSplit(inputstr, sep)
    if sep == nil then sep = "%s" end
    local t = {}
    for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
        table.insert(t, str)
    end
    return t
end

function Config.SendNotify(key, ...)
    local lang = Config.Lang[Config.Language]
    if not lang then return end

    local message = lang[key]
    if not message then return end

    if ... then
        message = string.format(message, ...)
    end

    QBCore.Functions.Notify(message)
end

Config.Notify = {
    door_locked = 'The door has been locked',
    door_unlocked = 'The door has been unlocked',
    not_enough_money = 'You do not have enough money',
    already_rented = 'You already have a rented room!',
    rent_success = 'Room successfully rented',
    auto_renew_success = 'Auto-renewal has been activated',
    auto_renew_disabled = 'Auto-renewal has been disabled',
    auto_renew_no_money = 'You do not have enough balance for auto-renewal!',
    room_extended = 'Rental period extended by %s days',
    room_not_found = 'Room not found',
    auto_renewed = 'Your motel room has been automatically extended for 1 day',
    player_not_found = 'Player not found',
    room_cancelled = 'Your motel room has been cancelled due to insufficient balance!',
    no_access = 'You do not have access to this room!',
    stash_opened = 'Stash opened',
    wardrobe_opened = 'Wardrobe opened',
    extend_success = 'Extension successful\nNew End Date: %s',
    extend_failed = 'Extension failed!',
    no_permission = 'You do not have permission for this action',
    invalid_amount = 'Invalid amount',
    insufficient_balance = 'Insufficient balance',
    withdraw_success = 'Withdrawal successful',
    deposit_success = 'Deposit successful',
    no_lock_permission = 'You do not have permission to lock this door!',
    getting_rooms_error = 'An error occurred while retrieving rooms'
}




```
