This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
An example of reading player actions / inputs | |
]] | |
registerForEvent('onInit', function() | |
Observe('PlayerPuppet', 'OnAction', function(action) | |
local actionName = Game.NameToString(action:GetName(action)) | |
local actionType = action:GetType(action).value -- gameinputActionType | |
local actionValue = action:GetValue(action) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local GameUI = require('GameUI') -- https://github.com/psiberx/cp2077-cet-kit/blob/main/GameUI.lua | |
local WhereAmI = { | |
visible = false, | |
districtId = nil, | |
districtLabels = nil, | |
districtCaption = nil, | |
factionLabels = nil, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
Place a map pin at the player's current position: [shared credits with @b0kkr] | |
]] | |
registerHotkey('PlaceCustomMapPin', 'Place a map pin at player\'s position', function() | |
local mappinData = NewObject('gamemappinsMappinData') | |
mappinData.mappinType = TweakDBID.new('Mappins.DefaultStaticMappin') | |
mappinData.variant = Enum.new('gamedataMappinVariant', 'FastTravelVariant') | |
mappinData.visibleThroughWalls = true | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
After the fix is applied you need to reequip clothing item with Dead-Eye installed | |
]] | |
registerForEvent('onInit', function() | |
local deadEyeTweakDbId = TweakDBID.new('Items.PowerfulFabricEnhancer08') | |
local deadEyeOnAttach = TweakDB:GetFlat(TweakDBID.new(deadEyeTweakDbId, '.OnAttach')) | |
-- Check if Dead-Eye is broken | |
if #deadEyeOnAttach == 0 then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- With instant summon mode enabled you can control the position of the spawn (it spawns in front of the player) | |
-- Otherwise the game can spawn a vehicle right in the spot of another one (collision fun yee) | |
-- You cannot spawn the same vehicle twice (same TweakDBID) with Vehicle System | |
-- The list of the summonable vehicles | |
local targetVehicles = { | |
'Vehicle.v_standard2_archer_hella_police', | |
'Vehicle.v_standard2_villefort_cortes_police', | |
'Vehicle.v_standard3_chevalier_emperor_police', | |
'Vehicle.v_standard2_archer_hella_player', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return [ | |
{ streetName = "101 - New Pacific Highway", districtName = "Badlands", subDistrictName = "", streetPath = "Badlands.Street101NewPacificHighway", districtPath = "Districts.Badlands", subDistrictPath = "", }, | |
{ streetName = "Armstrong Way", districtName = "Badlands", subDistrictName = "", streetPath = "Badlands.ArmstrongWay", districtPath = "Districts.Badlands", subDistrictPath = "", }, | |
{ streetName = "Arroyo", districtName = "Badlands", subDistrictName = "", streetPath = "Badlands.Arroyo", districtPath = "Districts.Badlands", subDistrictPath = "", }, | |
{ streetName = "Bridge", districtName = "Badlands", subDistrictName = "", streetPath = "Badlands.BridgeSt", districtPath = "Districts.Badlands", subDistrictPath = "", }, | |
{ streetName = "Clements", districtName = "Badlands", subDistrictName = "", streetPath = "Badlands.ClementsSt", districtPath = "Districts.Badlands", subDistrictPath = "", }, | |
{ streetName = "Coachwhip Lane", districtName = "Badlands", subDistrictName = "", streetPath = "Badlands.Coac |