WiFi

Simple example how to integrate network with ox_lib zones

Example

client.lua
    local poly = lib.zones.poly({
        points = {
            vec(413.8, -1026.1, 29),
            vec(411.6, -1023.1, 29),
            vec(412.2, -1018.0, 29),
            vec(417.2, -1016.3, 29),
            vec(422.3, -1020.0, 29),
            vec(426.8, -1015.9, 29),
            vec(431.8, -1013.0, 29),
            vec(437.3, -1018.4, 29),
            vec(432.4, -1027.2, 29),
            vec(424.7, -1023.5, 29),
            vec(420.0, -1030.2, 29),
            vec(409.8, -1028.4, 29),
        },
        thickness = 2,
        debug = true,
        onEnter = function(self)
            exports.fd_laptop:addNetwork({
                ssid = "testing_network",
                label = "Testing Network",
                password = "123456"
            })
        end,
        onExit = function(self)
            exports.fd_laptop:removeNetwork('testing_network')
        end
    })