-- 生成 Config 里固定的 Ped
local Config = {
Ped = `s_m_y_swat_01`,
}
lib.requestModel(Config.Ped)
local ped = CreatePed(0, Config.Ped, 1, 2, 3, 4, true, true)
-- 判断玩家当前车辆是否为出租车
local ped = GetPlayerPed(GetPlayerFromServerId(1))
-- ox_lib 可以用 cache.ped 代替 GetPlayerPed(GetPlayerFromServerId(1)), 获取本地玩家 Ped
-- ox_lib 可以用 cache.vehicle 代替 GetVehiclePedIsIn(ped, false), 获取本地玩家当前驾驶车辆
if GetVehiclePedIsIn(ped, false) == `taxi` then
print('player 1 is in taxi')
end