Статус
В этой теме нельзя размещать новые ответы.

ГОХА | GoxaShow

В АРМИИ С 12.12,ЗАКАЗЫ НЕ ДЕЛАЮ,ТУПЫЕ ВОПРОСЫ-НАХУ
Автор темы
Проверенный
1,866
1,866
А если админ в фамах, которые прописаны в скрипте не состоит? То все, хуй пососешь.

(Лучше отследи, где этот 3д текст появляется и так уже пали админов)
смотри, это не название семей,а сами теги семей,типо уровень семьи
Не легче сделать проверку айди админа
если его нету в /id
то это админ и он за тобой следит
я еще хз,как это реализовать
 

chapo

🫡 В армии с 17.10.2023. В ЛС НЕ ОТВЕЧАЮ
Друг
8,771
11,214
Не легче сделать проверку айди админа
если его нету в /id
то это админ и он за тобой следит
Может я не шарю, но если админа нет в /id, то это не значит, что он за тобой следит.
 
  • Нравится
Реакции: MrCreepTon

ГОХА | GoxaShow

В АРМИИ С 12.12,ЗАКАЗЫ НЕ ДЕЛАЮ,ТУПЫЕ ВОПРОСЫ-НАХУ
Автор темы
Проверенный
1,866
1,866
я наверное долбаеб,но немного дописав, у меня он в людных местах все равно триггерится, вот код
Lua:
local sampev   = require 'lib.samp.events'
local active = true
local font = renderCreateFont("Arial", 10, 12)
local sms = true
local checkid = false
local idtrue = false

function main()
    while not isSampAvailable() do wait(100) end
    sampRegisterChatCommand("specadm", function() active = not active sampAddChatMessage(active and "[SpectateAdmin] activated. " or "[SpectateAdmin] off", -1)
    end)
    sampAddChatMessage("[SpectateAdmin] Запущен.", 0x6B025E)
    while true do wait(0)
        if active then
            for i=0, 2048 do
                if sampIs3dTextDefined(i) then
                local text, color, posX, posY, posZ, distance, ignoreWalls, playerId, vehicleId = sampGet3dTextInfoById(i)
                    if text:find("Family") or text:find("Empire") or text:find("Squad") or text:find("Dynasty") or text:find("Corporation") or text:find("Crew") or text:find("Brotherhood") then
                        admid = playerId
                        local _, myid = sampGetPlayerIdByCharHandle(PLAYER_PED)
                        if admid ~= myid then
                            local admres, admped = sampGetCharHandleBySampPlayerId(admid)
                            if admped then
                                admdoes = doesCharExist(admped)
                                if not admdoes then
                                    local admname = sampGetPlayerNickname(admid)
                                    checkid = true
                                    sampSendChat("/id "..admid.."")
                                    if idtrue then
                                        if sms then
                                            sampAddChatMessage("[SpectateAdmin] За тобой следит долбаеб: ["..admid.."] "..admname.."",-1)
                                            sms = false
                                            smsreset()
                                        end
                                        renderDrawBoxWithBorder(39, 270, 200, 90, 0xFF600B0B, 5, 0xFFFF0000)
                                        renderFontDrawText(font, "За тобой следит долбаеб:", 49, 285, 0xFFFFFFFF, 0x90000000)
                                        renderFontDrawText(font, "["..admid.."] "..admname.."", 49, 320, 0xFFFFFFFF, 0x90000000)
                                        
                                    end
                                end   
                            end
                        end
                    end
                end
            end
        end
    end 
end


function smsreset()
    lua_thread.create(function ()
            wait(5000)
            sms = true
    end)
end

function idreset()
    lua_thread.create(function ()
            wait(10000)
            checkid = false
            idtrue = false
    end)
end

function sampev.onServerMessage(color, text)
    if text:find("Игрок не найден") or text:find("Игрок не в сети") then
        if checkid then
            idtrue = true
            idreset()
            return false
        end
    end
    if text:find("Уровень") then
        if checkid then
            return false
        end
    end
end
 

AnWu

Guardian of Order
Всефорумный модератор
4,686
5,166
я наверное долбаеб,но немного дописав, у меня он в людных местах все равно триггерится, вот код
Lua:
local sampev   = require 'lib.samp.events'
local active = true
local font = renderCreateFont("Arial", 10, 12)
local sms = true
local checkid = false
local idtrue = false

function main()
    while not isSampAvailable() do wait(100) end
    sampRegisterChatCommand("specadm", function() active = not active sampAddChatMessage(active and "[SpectateAdmin] activated. " or "[SpectateAdmin] off", -1)
    end)
    sampAddChatMessage("[SpectateAdmin] Запущен.", 0x6B025E)
    while true do wait(0)
        if active then
            for i=0, 2048 do
                if sampIs3dTextDefined(i) then
                local text, color, posX, posY, posZ, distance, ignoreWalls, playerId, vehicleId = sampGet3dTextInfoById(i)
                    if text:find("Family") or text:find("Empire") or text:find("Squad") or text:find("Dynasty") or text:find("Corporation") or text:find("Crew") or text:find("Brotherhood") then
                        admid = playerId
                        local _, myid = sampGetPlayerIdByCharHandle(PLAYER_PED)
                        if admid ~= myid then
                            local admres, admped = sampGetCharHandleBySampPlayerId(admid)
                            if admped then
                                admdoes = doesCharExist(admped)
                                if not admdoes then
                                    local admname = sampGetPlayerNickname(admid)
                                    checkid = true
                                    sampSendChat("/id "..admid.."")
                                    if idtrue then
                                        if sms then
                                            sampAddChatMessage("[SpectateAdmin] За тобой следит долбаеб: ["..admid.."] "..admname.."",-1)
                                            sms = false
                                            smsreset()
                                        end
                                        renderDrawBoxWithBorder(39, 270, 200, 90, 0xFF600B0B, 5, 0xFFFF0000)
                                        renderFontDrawText(font, "За тобой следит долбаеб:", 49, 285, 0xFFFFFFFF, 0x90000000)
                                        renderFontDrawText(font, "["..admid.."] "..admname.."", 49, 320, 0xFFFFFFFF, 0x90000000)
                                       
                                    end
                                end  
                            end
                        end
                    end
                end
            end
        end
    end
end


function smsreset()
    lua_thread.create(function ()
            wait(5000)
            sms = true
    end)
end

function idreset()
    lua_thread.create(function ()
            wait(10000)
            checkid = false
            idtrue = false
    end)
end

function sampev.onServerMessage(color, text)
    if text:find("Игрок не найден") or text:find("Игрок не в сети") then
        if checkid then
            idtrue = true
            idreset()
            return false
        end
    end
    if text:find("Уровень") then
        if checkid then
            return false
        end
    end
end
прост админ следит за кем то из игроков рядом
 

ГОХА | GoxaShow

В АРМИИ С 12.12,ЗАКАЗЫ НЕ ДЕЛАЮ,ТУПЫЕ ВОПРОСЫ-НАХУ
Автор темы
Проверенный
1,866
1,866
прост админ следит за кем то из игроков рядом
да,возможно это и так работает
решил немного подругому сделать, но все равно хуйня,я вообще не ебу,как эту залупу оптимизировать((
Lua:
local sampev   = require 'lib.samp.events'
local active = true
local font = renderCreateFont("Arial", 10, 12)
local sms = true
local checkid = false
local idtrue = false
local trueid = 0

function main()
    while not isSampAvailable() do wait(100) end
    sampRegisterChatCommand("specadm", function() active = not active sampAddChatMessage(active and "[SpectateAdmin] activated. " or "[SpectateAdmin] off", -1)
    end)
    sampAddChatMessage("[SpectateAdmin] Запущен.", 0x6B025E)
    while true do wait(0)
        if active then
            for i=0, 2048 do
                if sampIs3dTextDefined(i) then
                local text, color, posX, posY, posZ, distance, ignoreWalls, playerId, vehicleId = sampGet3dTextInfoById(i)
                    if text:find("Family") or text:find("Empire") or text:find("Squad") or text:find("Dynasty") or text:find("Corporation") or text:find("Crew") or text:find("Brotherhood") then
                        admid = playerId
                        local _, myid = sampGetPlayerIdByCharHandle(PLAYER_PED)
                        if admid ~= myid then
                            if sampIsPlayerConnected(admid) and sampGetPlayerScore(admid) > 20 then
                                local admres, admped = sampGetCharHandleBySampPlayerId(admid)
                                if admped then
                                    admdoes = doesCharExist(admped)
                                    if not admdoes then
                                        checkid = true
                                        sampSendChat("/id "..admid.."")
                                        if idtrue then
                                            local admname = sampGetPlayerNickname(trueid)
                                            if sms then
                                                sampAddChatMessage("[SpectateAdmin] За тобой следит долбаеб: ["..trueid.."] "..admname.."",-1)
                                                sms = false
                                                smsreset()
                                            end
                                            renderDrawBoxWithBorder(39, 270, 200, 90, 0x9F600B0B, 5, 0xFFFF0000)
                                            renderFontDrawText(font, "За тобой следит долбаеб:", 49, 285, 0xFFFFFFFF, 0x90000000)
                                            renderFontDrawText(font, "["..trueid.."] "..admname.."", 49, 320, 0xFFFFFFFF, 0x90000000)
                                        
                                        end
                                    end
                                end   
                            end
                        end
                    end
                end
            end
        else
            local sms = true
            local checkid = false
            local idtrue = false
        end
    end 
end


function smsreset()
    lua_thread.create(function ()
            wait(5000)
            sms = true
    end)
end

function idreset()
    lua_thread.create(function ()
            wait(10000)
            checkid = false
            idtrue = false
    end)
end


function sampev.onServerMessage(color, text)
    if text:find("Игрок не найден") or text:find("Игрок не в сети") then
        if checkid then
            idtrue = true
            trueid = admid
            checkid = false
            return false
        end
    end
    if text:find("Уровень") then
        if checkid then
            return false
        end
    end
end
 
Последнее редактирование:

redcode

🤔
Друг
144
1,258
прост админ следит за кем то из игроков рядом
+
решил немного подругому сделать, но все равно хуйня,я вообще не ебу,как эту залупу оптимизировать
Мне кажется, что лучше сделать так:
Lua:
local ev = require 'lib.samp.events'
local font = renderCreateFont("Arial", 10, 12)
local isAdm = false
local admin = -1

local function update()
    while true do
        local tadmin = -1 -- надо!
        for i=0, 2048 do
            if sampIs3dTextDefined(i) then
                local text, color, posX, posY, posZ, distance, ignoreWalls, playerId, vehicleId = sampGet3dTextInfoById(i)
                if text:find("Family") or text:find("Empire") or text:find("Squad") or text:find("Dynasty") or text:find("Corporation") or text:find("Crew") or text:find("Brotherhood") then
                    local admid = playerId
                    local _, myid = sampGetPlayerIdByCharHandle(PLAYER_PED)
                    if admid ~= myid then
                        local admres, admped = sampGetCharHandleBySampPlayerId(admid)
                        if admped then
                            local admdoes = doesCharExist(admped)
                            if not admdoes then
                                sampSendChat("/id "..admid)
                                isAdm = nil
                                while isAdm == nil do wait(10) end
                                if isAdm == true then
                                    tadmin = admid
                                end
                            end
                        end
                    end
                end
            end
        end
        admin = tadmin
        wait(1500)
    end
end

function main()
    while not isSampAvailable() do wait(100) end
    lua_thread.create(update)
    while true do
        if admin >= 0 then
            if sampIsPlayerConnected(id) then -- надо!
                renderDrawBoxWithBorder(39, 270, 200, 90, 0xFF600B0B, 5, 0xFFFF0000)
                renderFontDrawText(font, "За тобой следит:", 49, 285, 0xFFFFFFFF, 0x90000000)
                renderFontDrawText(font, "["..admin.."] "..sampGetPlayerNickname(admin), 49, 320, 0xFFFFFFFF, 0x90000000)
            else
                admin = -1;
            end
        end
        wait(0)
    end
end

function ev.onServerMessage(color, text)
    if isAdm == nil then
        if text:find("Игрок не в сети!") then
            isAdm = true
            return false
        elseif text:find("| Уровень: ") then
            isAdm = false
            return false
        end
    end
end
 
  • Нравится
Реакции: ГОХА | GoxaShow

ГОХА | GoxaShow

В АРМИИ С 12.12,ЗАКАЗЫ НЕ ДЕЛАЮ,ТУПЫЕ ВОПРОСЫ-НАХУ
Автор темы
Проверенный
1,866
1,866
+

Мне кажется, что лучше сделать так:
Lua:
local ev = require 'lib.samp.events'
local font = renderCreateFont("Arial", 10, 12)
local isAdm = false
local admin = -1

local function update()
    while true do
        local tadmin = -1 -- надо!
        for i=0, 2048 do
            if sampIs3dTextDefined(i) then
                local text, color, posX, posY, posZ, distance, ignoreWalls, playerId, vehicleId = sampGet3dTextInfoById(i)
                if text:find("Family") or text:find("Empire") or text:find("Squad") or text:find("Dynasty") or text:find("Corporation") or text:find("Crew") or text:find("Brotherhood") then
                    local admid = playerId
                    local _, myid = sampGetPlayerIdByCharHandle(PLAYER_PED)
                    if admid ~= myid then
                        local admres, admped = sampGetCharHandleBySampPlayerId(admid)
                        if admped then
                            local admdoes = doesCharExist(admped)
                            if not admdoes then
                                sampSendChat("/id "..admid)
                                isAdm = nil
                                while isAdm == nil do wait(10) end
                                if isAdm == true then
                                    tadmin = admid
                                end
                            end
                        end
                    end
                end
            end
        end
        admin = tadmin
        wait(1500)
    end
end

function main()
    while not isSampAvailable() do wait(100) end
    lua_thread.create(update)
    while true do
        if admin >= 0 then
            if sampIsPlayerConnected(id) then -- надо!
                renderDrawBoxWithBorder(39, 270, 200, 90, 0xFF600B0B, 5, 0xFFFF0000)
                renderFontDrawText(font, "За тобой следит:", 49, 285, 0xFFFFFFFF, 0x90000000)
                renderFontDrawText(font, "["..admin.."] "..sampGetPlayerNickname(admin), 49, 320, 0xFFFFFFFF, 0x90000000)
            else
                admin = -1;
            end
        end
        wait(0)
    end
end

function ev.onServerMessage(color, text)
    if isAdm == nil then
        if text:find("Игрок не в сети!") then
            isAdm = true
            return false
        elseif text:find("| Уровень: ") then
            isAdm = false
            return false
        end
    end
end
да,вроде работает,в шапке поставил твою версию с выключением на команду, авторство указал)😉
 

фaрик

Известный
163
25
Пруфанешь работоспособность? Мб у меня что-то пошло не так, но скрипт был включен, админ за мной следил, слапнул, а после заспавнил, скрипт строчку в чат о слежке мне не выдал. Вот, смотрите
rabotaetrazve.png
 
  • Нравится
Реакции: d3rzh1vin
Статус
В этой теме нельзя размещать новые ответы.