查看: 444|回复: 0
收起左侧

[文字教程] 禁用在空中的车辆控制

[复制链接]
admin 发表于 2022-12-19 10:21:54 | 显示全部楼层 |阅读模式
使用方法:插入任何客户端脚本或者单独建立脚本!
-- CLIENT --
Citizen.CreateThread(function()
    while true do
        local idle = 1000
        local veh = GetVehiclePedIsIn(PlayerPedId(),false)
        if DoesEntityExist(veh) and not IsEntityDead(veh) then
            idle = 5
            local model = GetEntityModel(veh)
            if not IsThisModelABoat(model) and not IsThisModelAHeli(model) and not IsThisModelAPlane(model) and not IsThisModelABicycle(model) and not IsThisModelABike(model) and not IsThisModelAQuadbike(model) and IsEntityInAir(veh) then
                idle = 5
                DisableControlAction(0,59)
                DisableControlAction(0,60)
                --DisableControlAction(0,73)
            end
        end
    Citizen.Wait(idle)
    end
end)


回复 论坛版权

使用道具 举报

ahome_bigavatar:guest
ahome_bigavatar:welcomelogin
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|首页 ( 冀ICP备2021005225号-1 ) |网站地图

GMT+8, 2024-5-17 06:55 , Processed in 0.233958 second(s), 25 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表