Набор в фаму

Dezmondli

Активный
Автор темы
405
78
Я видел скрипт который наборит в фаму тоесть ты отошёл в АФК а всё кто возле тебя пробегали получают запрос в фаму
 

IzGоI

Участник
74
45
Я видел скрипт который наборит в фаму тоесть ты отошёл в АФК а всё кто возле тебя пробегали получают запрос в фаму

👋 Тут есть /rfam. То есть приглашает всех окружающих тебя людей в семью.

Думаю я смог тебе помочь
 
  • Нравится
Реакции: Dezmondli

McLore

Известный
559
279
Код:
function main()
    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end
    sampRegisterChatCommand("iall",function()
        checkplayes = {}
        if arg and arg:find("^%d+$") and tonumber(arg) > 0 and tonumber(arg) < 26 then
            for k,v in pairs(getAllChars()) do
                local x,y,z = getCharCoordinates(v)
                local positionX, positionY, positionZ = getCharCoordinates(PLAYER_PED)
                local dist = getDistanceBetweenCoords3d(positionX, positionY, positionZ,x,y,z)
                if dist <= tonumber(arg) and v ~= 1 then
                    res, id = sampGetPlayerIdByCharHandle(v)
                    if res then
                        name = sampGetPlayerNickname(id)
                        table.insert(checkplayes,name)
                    end
                end
            end
            if #checkplayes < 1 then
                sampAddChatMessage("Рядом с вами нету людей!",-1)
            else
                for k, v in pairs(checkplayes) do
                    sampSendChat("/faminvite "..v)
                end
            end
        else
            sampAddChatMessage("Используйте /iall [Radius 1-25]",-1)
        end
    end)
    wait(-1)
end
Попробуй
 

Taisheika

Участник
36
3
Код:
function main()
    if not isSampfuncsLoaded() or not isSampLoaded() then return end
    while not isSampAvailable() do wait(100) end
    sampRegisterChatCommand("iall",function()
        checkplayes = {}
        if arg and arg:find("^%d+$") and tonumber(arg) > 0 and tonumber(arg) < 26 then
            for k,v in pairs(getAllChars()) do
                local x,y,z = getCharCoordinates(v)
                local positionX, positionY, positionZ = getCharCoordinates(PLAYER_PED)
                local dist = getDistanceBetweenCoords3d(positionX, positionY, positionZ,x,y,z)
                if dist <= tonumber(arg) and v ~= 1 then
                    res, id = sampGetPlayerIdByCharHandle(v)
                    if res then
                        name = sampGetPlayerNickname(id)
                        table.insert(checkplayes,name)
                    end
                end
            end
            if #checkplayes < 1 then
                sampAddChatMessage("Рядом с вами нету людей!",-1)
            else
                for k, v in pairs(checkplayes) do
                    sampSendChat("/faminvite "..v)
                end
            end
        else
            sampAddChatMessage("Используйте /iall [Radius 1-25]",-1)
        end
    end)
    wait(-1)
end
Попробуй
Великий скриптер, а можешь сделать, чтобы принимал с випкой :)