Помогите исправить скрипт

Qlliman

Участник
Автор темы
38
1
вот есть у меня скрипт который удаляет текстдравы, это sampTextdrawDelete(a). А как их вернуть обратно?
код если кому надо
Lua:
script_name('Film Maker')
local sampev = require 'lib.samp.events'
local tds = {}


act = false

function main()
    while not isSampAvailable() do wait(100) end
    wait(5000)
    sampAddChatMessage("[Film Maker] {FFFFFF}Скрипт был успешно загружен. Автор: {FFA500}Carl Grasso", 0xFFA500)
    sampAddChatMessage("[Film Maker] {FFFFFF}Активация скрипта - /act", 0xFFA500)
    sampRegisterChatCommand('act', function ()
        act = not act
        
        if act then
            sampSetChatDisplayMode(0)
            displayHud(false)
            for a = 0, 1000000000000    do --cycle trough all textdeaw id
                if sampTextdrawIsExists(a) then
                    sampTextdrawDelete(a)
                end
            end
        else
            sampSetChatDisplayMode(2)
            displayHud(true)
        end

        sampAddChatMessage(act and '{FFA500}['..thisScript().name..']{FFFFFF} Интерфейс и ники отключены' or '{FFA500}['..thisScript().name..']{FFFFFF} Интерфейс и ники включены', -1)
    end)

    wait(-1)
end

local gangId  = {}

function sampev.onCreateGangZone(zoneId, squareStart, squareEnd, color)
    table.insert(gangId,zoneId)
    if act then
        for i = 1, #gangId do
            if zoneId == gangId[i] then
                table.remove(tds,id)
                return false
            end
        end
    end
end