Electus LogoElectus Documentation

Electus Trap Phone Available Files

Browse the Electus Trap Phone source files and configuration by folder.

config/config.lua
Config = Config or {}

Config.Debug = false
Config.Locale = "en"

Config.Framework = "auto"
Config.Inventory = "auto"
Config.Target = "auto"

---@type TrapPhoneAdminConfig
Config.Admin = {
	Command = "trapphoneadmin",
}

---@type TrapPhonePhoneConfig
Config.Phone = {
	Item = "trap_phone",
	EnableCommand = true,
	OpenCommand = "trapphone",
	OpenKey = "F4",
	OpenKeyMapper = "keyboard",
	ShowReputation = true,
	UiTimeFormat = "24h",
	Prop = {
		Enabled = true,
		Model = "ch_prop_ch_phone_ing_02a",
		Bone = 28422,
		Position = vector3(0.0, 0.0, 0.0),
		Rotation = vector3(0.0, 0.0, 0.0),
	},
	Animation = {
		Enabled = true,
		Dict = "cellphone@",
		Name = "cellphone_text_read_base",
		BlendIn = 3.0,
		BlendOut = -1.0,
		Duration = -1,
		Flag = 49,
		PlaybackRate = 0.0,
	},
	CallAnimation = {
		Enabled = true,
		Dict = "cellphone@",
		Name = "cellphone_call_listen_base",
		BlendIn = 3.0,
		BlendOut = -1.0,
		Duration = -1,
		Flag = 49,
		PlaybackRate = 0.0,
	},
}

---@type TrapPhoneUniquePhoneConfig
Config.UniquePhone = {
	Enabled = true,
	IdentifierMetadata = "trapPhoneId",
	NumberMetadata = "phoneNumber",
}

---@type TrapPhoneNumberConfig
Config.Number = {
	Prefix = "555",
	Digits = 4,
}

---@type TrapPhoneCallConfig
Config.Calls = {
	Enabled = true,
	VoiceResource = "pma-voice",
	ChannelBase = 87000,
	ChannelRange = 999,
	History = {
		Enabled = true,
		MaxEntries = 50,
		RetentionDays = 30,
		VoicemailEnabled = true,
		MaxVoicemailLength = 240,
	},
	LBPhone = {
		Enabled = true,
		Resource = "lb-phone",
		RequirePhone = false,
	},
}

---@type TrapPhoneReputationConfig
Config.Reputation = {
	Starting = 0,
	DefaultContractReward = 20,
	DefaultFailedDealPenalty = 10,
}

---@type TrapPhoneOffersConfig
Config.Offers = {
	MaxActive = 2,
	OnMyWayTimeoutMinutes = 10,
	FinishedDealMessageRetentionHours = 24,
}

---@type TrapPhoneMeetingSpotsConfig
Config.MeetingSpots = {
	MaxCustom = 10,
	Seller = {
		Id = "seller_location",
		Label = "My Location",
		Description = "Buyer comes to your current position",
	},
}

---@type TrapPhoneBuyerRuntimeConfig
Config.Buyer = {
	DefaultPedModel = "a_m_y_soucent_02",
	DefaultVehicleModel = "emperor",
	DriveSpeed = 18.0,
	DrivingStyle = 786603,
	SpawnDistance = 120.0,
	SpawnRetrySeconds = 8,
	DriveStuckSeconds = 45,
	DriveTimeoutSeconds = 180,
	CleanupDistance = 50.0,
	ParkingSideOffset = 3.2,
	ParkingTriggerDistance = 22.0,
	TargetDistance = 2.0,
	SightDistance = 18.0,
	ApproachDistance = 1.65,
	ServerSaleDistance = 30.0,
	AngryChance = 35,
	Trust = {
		Enabled = true,
		Min = 0,
		Max = 100,
		Default = 0,
		ShowInUi = true,
		FastDeliverySeconds = 300,
		FairCounterMaxPriceMultiplier = 1.0,
		Changes = {
			GoodDeal = 4,
			FastDelivery = 3,
			FairCounter = 2,
			FailedDeal = -8,
			ExpiredDeal = -3,
		},
		Levels = {
			{
				Id = "new",
				Min = 0,
				PriceMultiplier = 1.0,
				AmountBonus = 0,
				AngryChanceReduction = 0,
			},
			{
				Id = "known",
				Min = 25,
				PriceMultiplier = 1.05,
				AmountBonus = 1,
				AngryChanceReduction = 5,
			},
			{
				Id = "trusted",
				Min = 50,
				PriceMultiplier = 1.1,
				AmountBonus = 2,
				AngryChanceReduction = 10,
			},
			{
				Id = "partner",
				Min = 75,
				PriceMultiplier = 1.15,
				AmountBonus = 3,
				AngryChanceReduction = 15,
			},
		},
	},
}

---@type TrapPhoneDealWitnessConfig
Config.DealWitness = {
	ScanDistance = 12.0,
	Fov = 80.0,
	MaxWitnesses = 4,
	PoliceRisk = 20,
}

---@type TrapPhoneGangsConfig
Config.Gangs = {
	Enabled = true,
	Resource = "electus_gangs",
	OnlySellInDrugZones = false,
	DrugZoneType = "drug_dealing",
	SaleXp = 15,
	SaleRep = 1,
	NotifyOwnerChance = 25,
	Alert = {
		Label = "Trap phone sale",
		Message = "Someone is selling drugs in your territory.",
	},
	Capture = {
		Enabled = true,
		-- Add this type to electus_gangs Config.capturing.captureProgressTypes.
		Type = "drugCapture",
		Progress = 1,
		ProgressPerItem = 0,
	},
}

Config.DrugItems = {
	weed = "weed",
	coke = "coke",
}