Skip to Content

👮 qb-警察の仕事

導入

  • このリソースは警察の機能とやり取りを管理します
  • 警察が設置する物品qb-ラジアルメニュー.md交通コーンやスパイクストリップなど
  • 警察の隠し場所、ガレージ、武器庫
  • 選手のカフ機能
  • 血液DNA滴や指紋を含む証拠システム
  • 警察が選手を追跡するためのアンクレットトラッカー

構成

一般的な

Config = {} Config.LicenseRank = 2 -- minimum rank need to grant weapon licenses to players Config.HandCuffItem = 'handcuffs' -- item name to check for when cuffing Config.PoliceHelicopter = "POLMAV" -- helicopter model name to spawn

場所

Config.Locations = { ["duty"] = { -- locations to clock on/off duty [1] = vector3(440.085, -974.924, 30.689), [2] = vector3(-449.811, 6012.909, 31.815), }, ["vehicle"] = { -- locations to withdraw vehicles [1] = vector4(448.159, -1017.41, 28.562, 90.654), [2] = vector4(471.13, -1024.05, 28.17, 274.5), [3] = vector4(-455.39, 6002.02, 31.34, 87.93), }, ["stash"] = { -- locations to access stash [1] = vector3(453.075, -980.124, 30.889), }, ["impound"] = { -- locations to access the police impound [1] = vector4(436.68, -1007.42, 27.32, 180.0), [2] = vector4(-436.14, 5982.63, 31.34, 136.0), }, ["helicopter"] = { -- locations to withdraw helicopters [1] = vector4(449.168, -981.325, 43.691, 87.234), [2] = vector4(-475.43, 5988.353, 31.716, 31.34), }, ["armory"] = { -- locations to open the armory [1] = vector3(462.23, -981.12, 30.68), }, ["trash"] = { -- locations to add items to the trash [1] = vector3(439.0907, -976.746, 30.776), }, ["fingerprint"] = { -- locations to access fingerprint scanner [1] = vector3(460.9667, -989.180, 24.92), }, ["evidence"] = { -- locations to access evidence lockers [1] = vector3(442.1722, -996.067, 30.689), [2] = vector3(451.7031, -973.232, 30.689), [3] = vector3(455.1456, -985.462, 30.689), }, ["stations"] = { -- locations for map blips and labels [1] = { label = "Police Station", coords = vector4(428.23, -984.28, 29.76, 3.5) }, [2] = { label = "Prison", coords = vector4(1845.903, 2585.873, 45.672, 272.249) }, [3] = { label = "Police Station Paleto", coords = vector4(-451.55, 6014.25, 31.716, 223.81) }, }, }

武器庫

Config.Items = { label = "Police Armory", -- label that the right-side inventory shows slots = 30, -- how many slots total for the armory items = { [1] = { name = "weapon_pistol", -- item name price = 0, -- how much the item costs amount = 1, -- how many are available in stock info = { -- item info serie = "", -- placeholder for serial number, don't edit attachments = { { component = "COMPONENT_AT_PI_FLSH", -- attachment name label = "Flashlight" -- attachment label }, } }, type = "weapon", -- item type slot = 1, -- slot item shows in inventory authorizedJobGrades = {0, 1, 2, 3, 4} -- grades allowed to purchase } } }

車両

Config.WhitelistedVehicles = {} -- list of vehicles not locked by rank Config.AuthorizedVehicles = { -- Grade 0 [0] = { ["police"] = "Police Car 1", -- vehicle model and label for menu ["police2"] = "Police Car 2", ["police3"] = "Police Car 3", ["police4"] = "Police Car 4", ["policeb"] = "Police Car 5", ["policet"] = "Police Car 6", ["sheriff"] = "Sheriff Car 1", ["sheriff2"] = "Sheriff Car 2", } }

車両設定

Config.VehicleSettings = { ["car1"] = { -- Model name ["extras"] = { ["1"] = true, -- enable/disable the vehicle extra on spawn ["2"] = true, ["3"] = true, ["4"] = true, ["5"] = true, ["6"] = true, ["7"] = true, ["8"] = true, ["9"] = true, ["10"] = true, ["11"] = true, ["12"] = true, ["13"] = true, }, ["livery"] = 1, -- the livery number to be applied on spawn } }

車のトランクのアイテム

Config.CarItems = { -- items to add to the trunk when spawning a police vehicle [1] = { name = "heavyarmor", -- item name amount = 2, -- item amount info = {}, -- item info type = "item", -- type of item slot = 1, -- inventory slot item shows in }, [2] = { name = "empty_evidence_bag", amount = 10, info = {}, type = "item", slot = 2, }, [3] = { name = "police_stormram", amount = 1, info = {}, type = "item", slot = 3, }, }

オブジェクト

Config.MaxSpikes = 5 -- maximum amount of spikes that can be spawned at once Config.Objects = { -- availabe items for police to spawn ["cone"] = { -- https://gta-objects.xyz/ model = `prop_roadcone02a`, -- object hash freeze = false -- enable/disable freezing the object in place }, ["barrier"] = { model = `prop_barrier_work06a`, freeze = true }, ["roadsign"] = { model = `prop_snow_sign_road_06g`, freeze = true }, ["tent"] = { model = `prop_gazebo_03`, freeze = true }, ["light"] = { model = `prop_worklight_03b`, freeze = true }, }

防犯カメラ

Config.SecurityCameras = { hideradar = false, -- enable/disable hiding the minimap while viewing cam cameras = { [1] = { label = "Pacific Bank CAM#1", -- camera label coords = vector3(257.45, 210.07, 109.08), -- location of the camera r = {x = -25.0, y = 0.0, z = 28.05}, -- camera rotation canRotate = false, -- enable/disable rotating the cam while viewing isOnline = true -- enable/disable the camera } } }

警察のレーダー

Config.Radars = { -- locations of radars that check for flagged plates vector4(-623.44421386719, -823.08361816406, 25.25704574585, 145.0), vector4(-652.44421386719, -854.08361816406, 24.55704574585, 325.0), vector4(1623.0114746094, 1068.9924316406, 80.903594970703, 84.0), vector4(-2604.8994140625, 2996.3391113281, 27.528566360474, 175.0), vector4(2136.65234375, -591.81469726563, 94.272926330566, 318.0), vector4(2117.5764160156, -558.51013183594, 95.683128356934, 158.0), vector4(406.89505004883, -969.06286621094, 29.436267852783, 33.0), vector4(657.315, -218.819, 44.06, 320.0), vector4(2118.287, 6040.027, 50.928, 172.0), vector4(-106.304, -1127.5530, 30.778, 230.0), vector4(-823.3688, -1146.980, 8.0, 300.0), }

証拠

Config.AmmoLabels = { -- the type of ammo and it's label when dropped ["AMMO_PISTOL"] = "9x19mm parabellum bullet", ["AMMO_SMG"] = "9x19mm parabellum bullet", ["AMMO_RIFLE"] = "7.62x39mm bullet", ["AMMO_MG"] = "7.92x57mm mauser bullet", ["AMMO_SHOTGUN"] = "12-gauge bullet", ["AMMO_SNIPER"] = "Large caliber bullet", }

証拠システム

  • playerが射撃しているときに弾丸の薬莢がランダムにドロップする確率
  • playerが手袋を着用していない場合に指紋が残る確率
  • 特定のアクションを実行するとプレイヤーのステータスが設定されます

構成

  • qb-policejob/client/evidence.lua で見つかりました
local StatusList = { -- set a players status using an event ['fight'] = Lang:t('evidence.red_hands'), ['widepupils'] = Lang:t('evidence.wide_pupils'), ['redeyes'] = Lang:t('evidence.red_eyes'), ['weedsmell'] = Lang:t('evidence.weed_smell'), ['gunpowder'] = Lang:t('evidence.gunpowder'), ['chemicals'] = Lang:t('evidence.chemicals'), ['heavybreath'] = Lang:t('evidence.heavy_breathing'), ['sweat'] = Lang:t('evidence.sweat'), ['handbleed'] = Lang:t('evidence.handbleed'), ['confused'] = Lang:t('evidence.confused'), ['alcohol'] = Lang:t('evidence.alcohol'), ["heavyalcohol"] = Lang:t('evidence.heavy_alcohol'), ["agitated"] = Lang:t('evidence.agitated') } local WhitelistedWeapons = { -- weapons to ignore `weapon_unarmed`, `weapon_snowball`, `weapon_stungun`, `weapon_petrolcan`, `weapon_hazardcan`, `weapon_fireextinguisher` }

使用例

[!WARNING] サンプルコードはサーバー側で実行されます

ステータスの設定

RegisterCommand('setstatus', function(source, args) local status = args[1] -- the status type to set local time = args[2] -- the status duration TriggerClientEvent('evidence:client:SetStatus', source, status, time) end)

血滴を追加する

RegisterCommand('addblooddrop', function(source, args) local ped = GetPlayerPed(source) local coords = GetEntityCoords(ped) local bloodId = args[1] -- blood id or index of table, can be whatever local Player = QBCore.Functions.GetPlayer(source) if not Player then return end local citizenid = Player.PlayerData.citizenid local bloodtype = Player.PlayerData.metadata['bloodtype'] TriggerClientEvent('evidence:client:AddBlooddrop', source, bloodId, citizenid, bloodtype, coords) end)

指紋認証の追加

RegisterCommand('addfingerprint', function(source, args) local ped = GetPlayerPed(source) local coords = GetEntityCoords(ped) local fingerId = args[1] -- fingerprint id or index of table, can be whatever local Player = QBCore.Functions.GetPlayer(source) if not Player then return end local fingerprint = Player.PlayerData.metadata['fingerprint'] TriggerClientEvent('evidence:client:AddFingerPrint', source, fingerId, fingerprint, coords) end)

コマンド

/911p [message] - sends an alert to the police

このコマンドは、ジョブ「警察」を持つすべてのプレイヤーにアラートを送信します。アラートには指定された内容が含まれます。messageそして、あなたの現在位置の警察の player マップにマークが追加されます。

権限レベル:ユーザー

  • メッセージ- (必須) アラートとともに送信するメッセージ

/spikestrip - Place a spike strip

地面にスパイクストリップオブジェクトを設置します。使用するには、player が「警察」の職務に就き、勤務中である必要があります。

権限レベル:ユーザー

/grantlicense [id] [license] - give a player a license

指定されたplayerを返すid与えられたライセンスlicense タイプ。

このコマンドは、設定された最低グレード以上の「警察」ジョブを持つプレイヤーのみが使用できます。Config.LicenseRank(デフォルトはグレード2以上)。

権限レベル:ユーザー

  • id- (必須) playerのID
  • ライセンス- (必須) ライセンスの種類 (例: 「武器」または「ドライバー」)

/revokelicense [id] [license] - remove a player’s license

指定されたライセンスを削除しますlicense指定されたplayerから入力するid

このコマンドは、設定された最低グレード以上の「警察」ジョブを持つプレイヤーのみが使用できます。Config.LicenseRank(デフォルトはグレード2以上)。

権限レベル:ユーザー

  • id- (必須) playerのID
  • ライセンス- (必須) ライセンスの種類 (例: 「武器」または「ドライバー」)

/pobject [type] - allows officer to spawn an object

「警察」の任務を持つplayerがオブジェクトを生成することを許可する

権限レベル:ユーザー

  • タイプ- (必須) オブジェクトの種類。使用可能なタイプ: _ 円錐- 交通コーン _ バリア- 道路封鎖障壁 _ 道路標識- 道路標識 _ テント- 犯罪現場用のガゼボ _ ライト- 作業灯 _ 消去- オブジェクトを削除する

/cuff - cuff the nearest player

このコマンドは、最も近い player をハード カフします (移動を防止します)。

「警察」の職業のプレイヤーのみが使用できます

権限レベル:ユーザー

/sc - soft cuff the nearest player

このコマンドは、最も近い player をソフト カフします (移動を許可します)。

「警察」の職業のプレイヤーのみが使用できます

権限レベル:ユーザー

/escort - escort the nearest player

このコマンドは最も近い player を護衛します。

「警察」の職業のプレイヤーのみが使用できます

権限レベル:ユーザー

/callsign [name] - allows officer to set a callsign

「警察」のジョブを持つplayerがコールサインを設定できます。コールサインは、マップ上のplayerのブリップ名として表示されます。

権限レベル:ユーザー

  • 名前- (必須) 使用するコールサイン

/jail - sends nearest player to jail

このコマンドは、最も近いplayerを刑務所に送ります。メニューが開き、警官が刑務所の所要時間を設定できるようになります。

「警察」の職業のプレイヤーのみが使用できます

権限レベル:ユーザー

/unjail [id] - unjail a player

与えられたplayerを解放するid

「警察」の職業のプレイヤーのみが使用できます

権限レベル:ユーザー

  • id- (必須) playerのID

/clearcasings - clears bullet casings in the area

現在の位置から 10.0 単位以内にあるすべての弾丸の薬莢を消去します。

「警察」の職業のプレイヤーのみが使用できます

権限レベル:ユーザー

/clearblood - clears blood drops in the area

現在の位置の 10.0 単位にある血液滴をすべて消去します。

「警察」の職業のプレイヤーのみが使用できます

権限レベル:ユーザー

/seizecash - seize cash from the nearest player

最寄りの player から現金を押収します。

「警察」の職業のプレイヤーのみが使用できます

権限レベル:ユーザー

/cam [id] - allows officer to see cam footage from selected spots

「警察」ジョブを持つplayerがセキュリティカメラを監視できるようにします。セキュリティカメラの位置はqb-policejobの設定ファイルで設定できます。Config.SecurityCameras

権限レベル:ユーザー

  • id- (必須) カメラのID

/flagplate [plate] [reason] - allows speed cameras to find a plate flagged

設定で設定できるスピードカメラがナンバープレートの標識を検出できるようにします。Config.Radars

権限レベル:ユーザー

  • - (必須)フラグを立てるプレート
  • 理由- (必須) フラグの理由

/unflagplate [plate] - removes the flag from the plate

プレート上の旗を削除して、カメラがプレートを捉えないようにします。

権限レベル:ユーザー

  • - (必須)プレートの旗を消す

/plateinfo [plate] - shows the info of the plate

プレートがフラグ付けされているかどうかを示し、フラグ付けされている場合はその理由を示します。

権限レベル:ユーザー

  • - (必須)確認するプレート

/depot [price] - allows officer to impound vehicle for a price

‘警察’の職務を持つplayerが、指定された期間内にvehicleを押収物として送ることを許可します。price

権限レベル:ユーザー

  • 価格- (必須) vehicle をデポから削除するための価格設定

/impound - impounds a vehicle without a price

価格なしでvehicleを押収

「警察」のジョブを持つplayerでのみ使用できます

権限レベル:ユーザー

/paytow [id] - pays the tow driver $500

与えられたplayerを支払うid500ドル。支払われるplayerは「牽引」の任務を担う必要があります。

権限レベル:ユーザー

  • id- (必須) 支払われるplayerのID

/paylawyer [id] - pays a lawyer $500

与えられたplayerを支払うid500ドル。報酬を受け取るplayerは「弁護士」の職業に就いている必要があります。

権限レベル:ユーザー

  • id- (必須) 支払われるplayerのID

/anklet - adds a tracking device to the closest player

最も近い player に追跡デバイスを追加します。

「警察」の職業のプレイヤーのみが使用できます

権限レベル:ユーザー

/ankletlocation [cid] - shows the location of the player

指定されたplayerの位置を表示しますcid

「警察」の職業のプレイヤーのみが使用できます

権限レベル:ユーザー

  • シド- (必須) チェック対象の player の市民 ID

/takedrivinglicense - takes the players drivers license

最も近いplayerの運転免許証を取得します

「警察」の職業のプレイヤーのみが使用できます

権限レベル:ユーザー

/takedna [id] - takes the players dna

与えられたplayerのDNAを取得しますid空の証拠バッグが必要です。

権限レベル:ユーザー

  • id- (必須) playerのID

アイテム

  • 手錠 - 使用時にplayerを手錠します
Last updated on