Ограничение скорости

Lenny Scripts

Активный
Автор темы
179
35
Версия SA-MP
  1. 0.3.7-R3
Можно на Луа/Cleo/Asi/SF, нужно для комфортной работы на такси и в других орг. Главное чтобы работал. Не нужно, чтобы он сам ехал, просто чтобы не привышал скорость.
 

krim

Известный
304
132
Можно на Луа/Cleo/Asi/SF, нужно для комфортной работы на такси и в других орг. Главное чтобы работал. Не нужно, чтобы он сам ехал, просто чтобы не привышал скорость.
Lua:
function main()
    repeat wait(0) until isSampAvailable()
    while true do wait(0)
        if isCharInAnyCar(PLAYER_PED) then
            if getCarSpeed(storeCarCharIsInNoSave(PLAYER_PED)) > твоя скорость  then
                setCarForwardSpeed(storeCarCharIsInNoSave(PLAYER_PED), твоя скорость)
            end
        end
    end
end
 

Lenny Scripts

Активный
Автор темы
179
35
Lua:
function main()
    repeat wait(0) until isSampAvailable()
    while true do wait(0)
        if isCharInAnyCar(PLAYER_PED) then
            if getCarSpeed(storeCarCharIsInNoSave(PLAYER_PED)) > твоя скорость  then
                setCarForwardSpeed(storeCarCharIsInNoSave(PLAYER_PED), твоя скорость)
            end
        end
    end
end
а есть какой нибудь чтоб в игре менять?
 

krim

Известный
304
132
а есть какой нибудь чтоб в игре менять?
Lua:
function main()
    repeat wait(0) until isSampAvailable()
    sampRegisterChatCommand('ss', function(speed)
        if tonumber(speed) == nil then bool = false return sampAddChatMessage('Выключаю', -1) end
        bool,ss = true,tonumber(speed)
    end)
    while true do wait(0)
        if bool then
            if isCharInAnyCar(PLAYER_PED) then
                if getCarSpeed(storeCarCharIsInNoSave(PLAYER_PED)) > ss then
                    setCarForwardSpeed(storeCarCharIsInNoSave(PLAYER_PED), ss)
                end
            end
        end
    end
end
активация /ss (speed)
если скорость не указана ограничение снимается