Что изменить в скрипте чтобы была автоактивация без команд

Carl_Navela

Участник
Автор темы
28
6
Скажите что ту изменить чтобы была автоактивация и не было команд
Код:
script_name('AntiParachute')
script_author('ronnyscripts')
local act = true

function main()
    repeat wait(0) until isSampAvailable()
    repeat wait(0) until sampIsLocalPlayerSpawned()
    sampAddChatMessage('[АнтиПарашют]{ffffff} от ронискриптс загружен! Скрипт активирован! Выключить: /antipar',0xcd0000)
    sampRegisterChatCommand('antipar',function()
        act = not act
        sampAddChatMessage('[АнтиПарашют]{ffffff} '..(act and 'оле оле оле скрипт активирован!!!!!!!!' or 'нахуя ты оффнул скрипт чмо лох гитлер'),0xcd0000)
    end)
    while true do
        wait(0)
        if act then
            if getCurrentCharWeapon(PLAYER_PED) == 46 then
                removeWeaponFromChar(PLAYER_PED, 46)
            end
        end
    end
end
 
Решение
Lua:
local p = true
local gid = 46

function main()
    while true do
        wait(0)
        if p and getCurrentCharWeapon(PLAYER_PED) == gid then
            removeWeaponFromChar(PLAYER_PED, gid)
        end
    end
end
P.S если в переменной gid изменить число на другой ид оружия можно сделать анти биту и т.д

Carl_Navela

Участник
Автор темы
28
6
так же?
Код:
script_name('AntiParachute')
script_author('Navela')
local act = true

function main()
    repeat wait(0) until isSampAvailable()
    repeat wait(0) until sampIsLocalPlayerSpawned()
        act = true
    end)
    while true do
        wait(0)
        if act then
            if getCurrentCharWeapon(PLAYER_PED) == 46 then
                removeWeaponFromChar(PLAYER_PED, 46)
            end
        end
    end
end
 

ervinbek

Известный
236
64
так же?
Код:
script_name('AntiParachute')
script_author('Navela')
local act = true

function main()
    repeat wait(0) until isSampAvailable()
    repeat wait(0) until sampIsLocalPlayerSpawned()
        act = true
    end)
    while true do
        wait(0)
        if act then
            if getCurrentCharWeapon(PLAYER_PED) == 46 then
                removeWeaponFromChar(PLAYER_PED, 46)
            end
        end
    end
end
Работает?
 

Gorskin

I shit on you
Проверенный
1,237
1,002
Lua:
local p = true
local gid = 46

function main()
    while true do
        wait(0)
        if p and getCurrentCharWeapon(PLAYER_PED) == gid then
            removeWeaponFromChar(PLAYER_PED, gid)
        end
    end
end
P.S если в переменной gid изменить число на другой ид оружия можно сделать анти биту и т.д
 
  • Нравится
Реакции: Carl_Navela

Carl_Navela

Участник
Автор темы
28
6
Lua:
local p = true
local gid = 46

function main()
    while true do
        wait(0)
        if p and getCurrentCharWeapon(PLAYER_PED) == gid then
            removeWeaponFromChar(PLAYER_PED, gid)
        end
    end
end
P.S если в переменной gid изменить число на другой ид оружия можно сделать анти биту и т.д
Спасибо