• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua attempt to index global 'surface' (a nil value)

Neppy

New Member
Joined
Mar 25, 2022
Messages
2
Reaction score
0
Lua:
450:    surface.CreateFont( 'TheShitFont', {
        font = "Trebuchet24",
        size = ( h + w ) * .011,
        weight = 300,
        blursize = 0,
        scanlines = 0,
        antialias = false,
        underline = false,
        italic = false,
        strikeout = false,
        symbol = false,
        rotary = false,
        shadow = true,
        additive = false,
        outline = false,

    } )

    local COLOR_WHITE = Color( 255, 255, 255 )
    local COLOR_BLACK = Color( 0, 0, 0 )

    net.Receive( 'jail_send_ply',function()

        to_jail = net.ReadBool()
        time = net.ReadUInt( 16 )

        if not to_ban then hook.Remove( 'HUDPaint', 'Jail.DrawInfoPanel' ) return end

        hook.Add( 'HUDPaint', 'Jail.DrawInfoPanel', function()

            if not LocalPlayer():IsJail() then return end
            local time = timer.Exists( 'jailtime' ) and math.floor( timer.TimeLeft( 'jailtime' ) ) or 0
            draw.SimpleTextOutlined( '.......: '.. ply:sam_get_nwvar('jailreason') ,  'TheShitFont', w / 2, 0, COLOR_WHITE, TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 1, COLOR_BLACK )
            draw.SimpleTextOutlined( '........: '.. time , 'TheShitFont', w / 3, 0, COLOR_WHITE, TEXT_ALIGN_CENTER, TEXT_ALIGN_TOP, 2, COLOR_BLACK )

        end)
end)

1648240275276.png
 
Back
Top