Diff
checker
テキスト
テキスト
画像
ドキュメント
Excel
フォルダ
Legal
Enterprise
デスクトップ
料金
ログイン
Diffchecker デスクトップのダウンロード
テキスト比較
2 つのテキスト ファイルの違いを見つける
ツール
履歴
ライブエディター
未変更行を折りたたむ
折り返しなし
レイアウト
分割
統合
比較精度
スマート
単語
文字
シンタックスハイライト
構文を選択
無視
テキスト変換
最初の差分へ移動
入力を編集
Diffchecker Desktop
Diffcheckerを実行する最も安全な方法。Diffchecker Desktopアプリを入手:あなたの差分はコンピューターから出ることはありません!
Desktopを入手
Untitled diff
作成日
7 年前
差分は期限切れになりません
クリア
エクスポート
共有
説明
94 削除
行
合計
削除
文字
合計
削除
この機能を引き続き使用するには、アップグレードしてください
Diff
checker
Pro
価格を見る
156 行
すべてコピー
71 追加
行
合計
追加
文字
合計
追加
この機能を引き続き使用するには、アップグレードしてください
Diff
checker
Pro
価格を見る
136 行
すべてコピー
コピー
コピー済み
コピー
コピー済み
-- Created by Deziel0495 and IllusiveTea --
-------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------Simple Holster Animation-----------------------------------------------------
-- NOTICE
----------------------------------------------------------SCRIPT BY: Nathan G.-------------------------------------------------------
-- This script is licensed under "No License". https://choosealicense.com/no-license/
-------------------------------------------------------------------------------------------------------------------------------------
-- You are allowed to: Download, Use and Edit the Script.
-- You are not allowed to: Copy, re-release, re-distribute it without our written permission.
コピー
コピー済み
コピー
コピー済み
--- DO NOT EDIT THIS
local default_weapon = GetHashKey(data.weapon)
local active = false
local ped = nil -- Cache the ped
local currentPedData = nil
local holstered = true
local holstered = true
コピー
コピー済み
コピー
コピー済み
-- RESTRICTED PEDS --
-- I've only listed peds that have a remote speaker mic, but any ped listed here will do the animations.
local skins = {
local skins = {
コピー
コピー済み
コピー
コピー済み
"s_m_y_cop_01",
"mp_m_freemode
_01",
"s_f_y_cop_01",
"
mp
_f_
freemode
_01",
"s_m_y_hwaycop_01",
"s_m_y_sheriff_01",
"s_f_y_sheriff_01",
"s_m_y_ranger
_01",
"
s
_f_
y_ranger
_01",
}
}
コピー
コピー済み
コピー
コピー済み
-- Add/remove weapon hashes here to be added for holster checks.
local weapons = {
local weapons = {
コピー
コピー済み
コピー
コピー済み
"WEAPON_PISTOL",
"WEAPON_COMBATPISTOL",
"WEAPON_COMBATPISTOL",
}
}
コピー
コピー済み
コピー
コピー済み
--
RADIO ANIMATIONS --
--
anims
Citizen.CreateThread(function()
Citizen.CreateThread(function()
while true do
while true do
コピー
コピー済み
コピー
コピー済み
Citizen.Wait( 0 )
local ped = PlayerPedId()
if DoesEntityExist( ped ) and not IsEntityDead( ped ) and CheckSkin(ped) then
if not IsPauseMenuActive() then
loadAnimDict( "random@arrests" )
if IsControlJustReleased( 0, 19 ) then -- INPUT_CHARACTER_WHEEL (LEFT ALT)
TriggerServerEvent('InteractSound_SV:PlayOnSource', 'off', 0.1)
ClearPedTasks(ped)
SetEnableHandcuffs(ped, false)
else
if IsControlJustPressed( 0, 19 ) and CheckSkin(ped) and not IsPlayerFreeAiming(PlayerId()) then -- INPUT_CHARACTER_WHEEL (LEFT ALT)
TriggerServerEvent('InteractSound_SV:PlayOnSource', 'on', 0.1)
TaskPlayAnim(ped, "random@arrests", "generic_radio_enter", 8.0, 2.0, -1, 50, 2.0, 0, 0, 0 )
SetEnableHandcuffs(ped, true)
elseif IsControlJustPressed( 0, 19 ) and CheckSkin(ped) and IsPlayerFreeAiming(PlayerId()) then -- INPUT_CHARACTER_WHEEL (LEFT ALT)
TriggerServerEvent('InteractSound_SV:PlayOnSource', 'on', 0.1)
TaskPlayAnim(ped, "random@arrests", "radio_chatter", 8.0, 2.0, -1, 50, 2.0, 0, 0, 0 )
SetEnableHandcuffs(ped, true)
end
if IsEntityPlayingAnim(GetPlayerPed(PlayerId()), "random@arrests", "generic_radio_enter", 3) then
DisableActions(ped)
elseif IsEntityPlayingAnim(GetPlayerPed(PlayerId()), "random@arrests", "radio_chatter", 3) then
DisableActions(ped)
end
end
end
end
end
end )
-- HOLD WEAPON HOLSTER ANIMATION --
Citizen.CreateThread( function()
while true do
Citizen.Wait( 0 )
local ped = PlayerPedId()
if DoesEntityExist( ped ) and not IsEntityDead( ped ) and not IsPedInAnyVehicle(PlayerPedId(), true) and CheckSkin(ped) then
DisableControlAction( 0, 20, true ) -- INPUT_MULTIPLAYER_INFO (Z)
if not IsPauseMenuActive() then
loadAnimDict( "reaction@intimidation@cop@unarmed" )
if IsDisabledControlJustReleased( 0, 20 ) then -- INPUT_MULTIPLAYER_INFO (Z)
ClearPedTasks(ped)
SetEnableHandcuffs(ped, false)
SetCurrentPedWeapon(ped, GetHashKey("WEAPON_UNARMED"), true)
else
if IsDisabledControlJustPressed( 0, 20 ) and CheckSkin(ped) then -- INPUT_MULTIPLAYER_INFO (Z)
SetEnableHandcuffs(ped, true)
SetCurrentPedWeapon(ped, GetHashKey("WEAPON_UNARMED"), true)
TaskPlayAnim(ped, "reaction@intimidation@cop@unarmed", "intro", 8.0, 2.0, -1, 50, 2.0, 0, 0, 0 )
end
if IsEntityPlayingAnim(GetPlayerPed(PlayerId()), "reaction@intimidation@cop@unarmed", "intro", 3) then
DisableActions(ped)
end
end
end
end
end
end )
-- HOLSTER/UNHOLSTER PISTOL --
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
Citizen.Wait(0)
local ped = PlayerPedId()
local ped = PlayerPedId()
if DoesEntityExist( ped ) and not IsEntityDead( ped ) and not IsPedInAnyVehicle(PlayerPedId(), true) and CheckSkin(ped) then
if DoesEntityExist( ped ) and not IsEntityDead( ped ) and not IsPedInAnyVehicle(PlayerPedId(), true) and CheckSkin(ped) then
loadAnimDict( "rcmjosh4" )
loadAnimDict( "rcmjosh4" )
loadAnimDict( "weapons@pistol@" )
loadAnimDict( "weapons@pistol@" )
if CheckWeapon(ped) then
if CheckWeapon(ped) then
if holstered then
if holstered then
TaskPlayAnim(ped, "rcmjosh4", "josh_leadout_cop2", 8.0, 2.0, -1, 48, 10, 0, 0, 0 )
TaskPlayAnim(ped, "rcmjosh4", "josh_leadout_cop2", 8.0, 2.0, -1, 48, 10, 0, 0, 0 )
Citizen.Wait(600)
Citizen.Wait(600)
ClearPedTasks(ped)
ClearPedTasks(ped)
holstered = false
holstered = false
end
end
コピー
コピー済み
コピー
コピー済み
SetPedComponentVariation(ped, 9, 0, 0, 0)
elseif not CheckWeapon(ped) then
elseif not CheckWeapon(ped) then
if not holstered then
if not holstered then
TaskPlayAnim(ped, "weapons@pistol@", "aim_2_holster", 8.0, 2.0, -1, 48, 10, 0, 0, 0 )
TaskPlayAnim(ped, "weapons@pistol@", "aim_2_holster", 8.0, 2.0, -1, 48, 10, 0, 0, 0 )
Citizen.Wait(500)
Citizen.Wait(500)
ClearPedTasks(ped)
ClearPedTasks(ped)
holstered = true
holstered = true
end
end
コピー
コピー済み
コピー
コピー済み
SetPedComponentVariation(ped, 9, 1, 0, 0)
end
end
end
end
end
end
end)
end)
コピー
コピー済み
コピー
コピー済み
-- DO NOT REMOVE THESE! --
-- functions
function table_invert(t)
local s={}
for k,v in pairs(t) do
s[v]=k
end
return s
end
function CheckSkin(ped)
function CheckSkin(ped)
for i = 1, #skins do
for i = 1, #skins do
if GetHashKey(skins[i]) == GetEntityModel(ped) then
if GetHashKey(skins[i]) == GetEntityModel(ped) then
return true
return true
end
end
end
end
return false
return false
end
end
function CheckWeapon(ped)
function CheckWeapon(ped)
for i = 1, #weapons do
for i = 1, #weapons do
if GetHashKey(weapons[i]) == GetSelectedPedWeapon(ped) then
if GetHashKey(weapons[i]) == GetSelectedPedWeapon(ped) then
return true
return true
end
end
end
end
return false
return false
end
end
function DisableActions(ped)
function DisableActions(ped)
コピー
コピー済み
コピー
コピー済み
DisableControlAction(1, 140, true)
DisableControlAction(1, 37, true)
DisableControlAction(1, 141, true)
DisablePlayerFiring(ped, true)
DisableControlAction(1, 142, true)
DisableControlAction(1, 37, true)
-- Disables INPUT_SELECT_WEAPON (TAB)
DisablePlayerFiring(ped, true)
-- Disable weapon firing
end
end
function loadAnimDict( dict )
function loadAnimDict( dict )
while ( not HasAnimDictLoaded( dict ) ) do
while ( not HasAnimDictLoaded( dict ) ) do
RequestAnimDict( dict )
RequestAnimDict( dict )
Citizen.Wait( 0 )
Citizen.Wait( 0 )
end
end
end
end
コピー
コピー済み
コピー
コピー済み
Citizen.CreateThread(function()
while true do
ped = GetPlayerPed(-1)
local ped_hash = GetEntityModel(ped)
local enable = false
for ped, data in pairs(data.peds) do
if GetHashKey(ped) == ped_hash then
enable = true
if data.enabled ~= nil then
enable = data.enabled
end
currentPedData = data
break
end
end
active = enable
Citizen.Wait(5000)
end
end)
local last_weapon = nil
Citizen.CreateThread(function()
while true do
if active then
current_weapon = GetSelectedPedWeapon(ped)
if current_weapon ~= last_weapon then
for component, holsters in pairs(currentPedData.components) do
local holsterDrawable = GetPedDrawableVariation(ped, component)
local holsterTexture = GetPedTextureVariation(ped, component)
local emptyHolster = holsters[holsterDrawable]
if emptyHolster and current_weapon == default_weapon then
SetPedComponentVariation(ped, component, emptyHolster, holsterTexture, 0)
break
end
local filledHolster = table_invert(holsters)[holsterDrawable]
if filledHolster and current_weapon ~= default_weapon and last_weapon == default_weapon then
SetPedComponentVariation(ped, component, filledHolster, holsterTexture, 0)
break
end
end
end
last_weapon = current_weapon
end
Citizen.Wait(200)
end
end)
保存された差分
原文
ファイルを開く
-- Created by Deziel0495 and IllusiveTea -- -- NOTICE -- This script is licensed under "No License". https://choosealicense.com/no-license/ -- You are allowed to: Download, Use and Edit the Script. -- You are not allowed to: Copy, re-release, re-distribute it without our written permission. --- DO NOT EDIT THIS local holstered = true -- RESTRICTED PEDS -- -- I've only listed peds that have a remote speaker mic, but any ped listed here will do the animations. local skins = { "s_m_y_cop_01", "s_f_y_cop_01", "s_m_y_hwaycop_01", "s_m_y_sheriff_01", "s_f_y_sheriff_01", "s_m_y_ranger_01", "s_f_y_ranger_01", } -- Add/remove weapon hashes here to be added for holster checks. local weapons = { "WEAPON_PISTOL", "WEAPON_COMBATPISTOL", } -- RADIO ANIMATIONS -- Citizen.CreateThread(function() while true do Citizen.Wait( 0 ) local ped = PlayerPedId() if DoesEntityExist( ped ) and not IsEntityDead( ped ) and CheckSkin(ped) then if not IsPauseMenuActive() then loadAnimDict( "random@arrests" ) if IsControlJustReleased( 0, 19 ) then -- INPUT_CHARACTER_WHEEL (LEFT ALT) TriggerServerEvent('InteractSound_SV:PlayOnSource', 'off', 0.1) ClearPedTasks(ped) SetEnableHandcuffs(ped, false) else if IsControlJustPressed( 0, 19 ) and CheckSkin(ped) and not IsPlayerFreeAiming(PlayerId()) then -- INPUT_CHARACTER_WHEEL (LEFT ALT) TriggerServerEvent('InteractSound_SV:PlayOnSource', 'on', 0.1) TaskPlayAnim(ped, "random@arrests", "generic_radio_enter", 8.0, 2.0, -1, 50, 2.0, 0, 0, 0 ) SetEnableHandcuffs(ped, true) elseif IsControlJustPressed( 0, 19 ) and CheckSkin(ped) and IsPlayerFreeAiming(PlayerId()) then -- INPUT_CHARACTER_WHEEL (LEFT ALT) TriggerServerEvent('InteractSound_SV:PlayOnSource', 'on', 0.1) TaskPlayAnim(ped, "random@arrests", "radio_chatter", 8.0, 2.0, -1, 50, 2.0, 0, 0, 0 ) SetEnableHandcuffs(ped, true) end if IsEntityPlayingAnim(GetPlayerPed(PlayerId()), "random@arrests", "generic_radio_enter", 3) then DisableActions(ped) elseif IsEntityPlayingAnim(GetPlayerPed(PlayerId()), "random@arrests", "radio_chatter", 3) then DisableActions(ped) end end end end end end ) -- HOLD WEAPON HOLSTER ANIMATION -- Citizen.CreateThread( function() while true do Citizen.Wait( 0 ) local ped = PlayerPedId() if DoesEntityExist( ped ) and not IsEntityDead( ped ) and not IsPedInAnyVehicle(PlayerPedId(), true) and CheckSkin(ped) then DisableControlAction( 0, 20, true ) -- INPUT_MULTIPLAYER_INFO (Z) if not IsPauseMenuActive() then loadAnimDict( "reaction@intimidation@cop@unarmed" ) if IsDisabledControlJustReleased( 0, 20 ) then -- INPUT_MULTIPLAYER_INFO (Z) ClearPedTasks(ped) SetEnableHandcuffs(ped, false) SetCurrentPedWeapon(ped, GetHashKey("WEAPON_UNARMED"), true) else if IsDisabledControlJustPressed( 0, 20 ) and CheckSkin(ped) then -- INPUT_MULTIPLAYER_INFO (Z) SetEnableHandcuffs(ped, true) SetCurrentPedWeapon(ped, GetHashKey("WEAPON_UNARMED"), true) TaskPlayAnim(ped, "reaction@intimidation@cop@unarmed", "intro", 8.0, 2.0, -1, 50, 2.0, 0, 0, 0 ) end if IsEntityPlayingAnim(GetPlayerPed(PlayerId()), "reaction@intimidation@cop@unarmed", "intro", 3) then DisableActions(ped) end end end end end end ) -- HOLSTER/UNHOLSTER PISTOL -- Citizen.CreateThread(function() while true do Citizen.Wait(0) local ped = PlayerPedId() if DoesEntityExist( ped ) and not IsEntityDead( ped ) and not IsPedInAnyVehicle(PlayerPedId(), true) and CheckSkin(ped) then loadAnimDict( "rcmjosh4" ) loadAnimDict( "weapons@pistol@" ) if CheckWeapon(ped) then if holstered then TaskPlayAnim(ped, "rcmjosh4", "josh_leadout_cop2", 8.0, 2.0, -1, 48, 10, 0, 0, 0 ) Citizen.Wait(600) ClearPedTasks(ped) holstered = false end SetPedComponentVariation(ped, 9, 0, 0, 0) elseif not CheckWeapon(ped) then if not holstered then TaskPlayAnim(ped, "weapons@pistol@", "aim_2_holster", 8.0, 2.0, -1, 48, 10, 0, 0, 0 ) Citizen.Wait(500) ClearPedTasks(ped) holstered = true end SetPedComponentVariation(ped, 9, 1, 0, 0) end end end end) -- DO NOT REMOVE THESE! -- function CheckSkin(ped) for i = 1, #skins do if GetHashKey(skins[i]) == GetEntityModel(ped) then return true end end return false end function CheckWeapon(ped) for i = 1, #weapons do if GetHashKey(weapons[i]) == GetSelectedPedWeapon(ped) then return true end end return false end function DisableActions(ped) DisableControlAction(1, 140, true) DisableControlAction(1, 141, true) DisableControlAction(1, 142, true) DisableControlAction(1, 37, true) -- Disables INPUT_SELECT_WEAPON (TAB) DisablePlayerFiring(ped, true) -- Disable weapon firing end function loadAnimDict( dict ) while ( not HasAnimDictLoaded( dict ) ) do RequestAnimDict( dict ) Citizen.Wait( 0 ) end end
変更されたテキスト
ファイルを開く
------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------Simple Holster Animation----------------------------------------------------- ----------------------------------------------------------SCRIPT BY: Nathan G.------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------- local default_weapon = GetHashKey(data.weapon) local active = false local ped = nil -- Cache the ped local currentPedData = nil local holstered = true local skins = { "mp_m_freemode_01", "mp_f_freemode_01", } local weapons = { "WEAPON_COMBATPISTOL", } -- anims Citizen.CreateThread(function() while true do Citizen.Wait(0) local ped = PlayerPedId() if DoesEntityExist( ped ) and not IsEntityDead( ped ) and not IsPedInAnyVehicle(PlayerPedId(), true) and CheckSkin(ped) then loadAnimDict( "rcmjosh4" ) loadAnimDict( "weapons@pistol@" ) if CheckWeapon(ped) then if holstered then TaskPlayAnim(ped, "rcmjosh4", "josh_leadout_cop2", 8.0, 2.0, -1, 48, 10, 0, 0, 0 ) Citizen.Wait(600) ClearPedTasks(ped) holstered = false end elseif not CheckWeapon(ped) then if not holstered then TaskPlayAnim(ped, "weapons@pistol@", "aim_2_holster", 8.0, 2.0, -1, 48, 10, 0, 0, 0 ) Citizen.Wait(500) ClearPedTasks(ped) holstered = true end end end end end) -- functions function table_invert(t) local s={} for k,v in pairs(t) do s[v]=k end return s end function CheckSkin(ped) for i = 1, #skins do if GetHashKey(skins[i]) == GetEntityModel(ped) then return true end end return false end function CheckWeapon(ped) for i = 1, #weapons do if GetHashKey(weapons[i]) == GetSelectedPedWeapon(ped) then return true end end return false end function DisableActions(ped) DisableControlAction(1, 37, true) DisablePlayerFiring(ped, true) end function loadAnimDict( dict ) while ( not HasAnimDictLoaded( dict ) ) do RequestAnimDict( dict ) Citizen.Wait( 0 ) end end Citizen.CreateThread(function() while true do ped = GetPlayerPed(-1) local ped_hash = GetEntityModel(ped) local enable = false for ped, data in pairs(data.peds) do if GetHashKey(ped) == ped_hash then enable = true if data.enabled ~= nil then enable = data.enabled end currentPedData = data break end end active = enable Citizen.Wait(5000) end end) local last_weapon = nil Citizen.CreateThread(function() while true do if active then current_weapon = GetSelectedPedWeapon(ped) if current_weapon ~= last_weapon then for component, holsters in pairs(currentPedData.components) do local holsterDrawable = GetPedDrawableVariation(ped, component) local holsterTexture = GetPedTextureVariation(ped, component) local emptyHolster = holsters[holsterDrawable] if emptyHolster and current_weapon == default_weapon then SetPedComponentVariation(ped, component, emptyHolster, holsterTexture, 0) break end local filledHolster = table_invert(holsters)[holsterDrawable] if filledHolster and current_weapon ~= default_weapon and last_weapon == default_weapon then SetPedComponentVariation(ped, component, filledHolster, holsterTexture, 0) break end end end last_weapon = current_weapon end Citizen.Wait(200) end end)
違いを見つける