112 lines
		
	
	
		
			No EOL
		
	
	
		
			4.4 KiB
		
	
	
	
		
			Lua
		
	
	
	
	
	
			
		
		
	
	
			112 lines
		
	
	
		
			No EOL
		
	
	
		
			4.4 KiB
		
	
	
	
		
			Lua
		
	
	
	
	
	
Config = {}
 | 
						|
 | 
						|
Config.Language = "German"
 | 
						|
 | 
						|
Config.VehicleMenuResetSettingsCommand = "vehiclemenureset" -- command for reset vehicle menu settings
 | 
						|
 | 
						|
Config.VehicleMenuOpenViaBind = true -- this will enable vehicle menu show via bind
 | 
						|
 | 
						|
Config.VehicleMenuOpenViaBindKey = "O" -- vehicle menu show key, only work if you enable Config.VehicleMenuOpenViaBind
 | 
						|
 | 
						|
Config.VehicleMenuOpenViaCommand = true -- this will enable vehicle menu show via commad 
 | 
						|
 | 
						|
Config.VehicleMenuOpenViaCommandName = "vehiclemenu" -- vehicle menu show command, only work if you enable Config.VehicleMenuOpenViaCommand
 | 
						|
 | 
						|
Config.VehicleMenuOpenViaEvent = false -- this will enable vehicle menu show via event for show vehicle menu TriggerEvent("rtx_vehiclemenu:ShowVehicleMenu", true) for hide vehicle menu TriggerEvent("rtx_vehiclemenu:ShowVehicleMenu", false) 
 | 
						|
 | 
						|
Config.VehicleMenuOpenViaEventName = "rtx_vehiclemenu:ShowVehicleMenu" -- vehicle menu show event, only work if you enable Config.VehicleMenuOpenViaEvent
 | 
						|
 | 
						|
Config.VehicleMenuForEveryVehicle = true -- if you enable this, vehicle menu will work on every vehicles, if its disabled, it will work only in vehicle menu which is writed in Config.VehicleMenuVehicles. 
 | 
						|
 | 
						|
Config.VehicleMenuVehicleBlacklist = false -- if you enable this, vehicle menu will work not for vehicles which is in blacklisted config, you need put vehicles in Config.VehicleMenuBlacklistedVehicles. 
 | 
						|
 | 
						|
Config.VehicleMenuForOnlySpecifiedTypeOfVehicle = false --- if you enable this, vehicle menu will work only for specified vehicle (Vehicle Class) you need enable class in Config.VehicleMenuVehiclesClasses
 | 
						|
 | 
						|
Config.VehicleMenuEnableVehicleDriveWhenPlayerIsInMenu = true -- enable this if you want to be able to still drive the vehicle while you are in the menu
 | 
						|
 | 
						|
Config.VehicleMenuEnableVehicleDriveWhenPlayerIsInMenuDisableCamera = true --turn this on if you want to disable camera movement when the player has the menu open
 | 
						|
 | 
						|
Config.DefaultVehicleMenuSettings = {color = "#ff66ff", scale = 1.0, position = {top = 50, left = 70}} --scale for default settings min is 0.5, max is 1.5 
 | 
						|
 | 
						|
Config.VehicleMenuWaterDuration = 5000 -- duration of vehicle water
 | 
						|
 | 
						|
Config.VehicleMenuDisableExtrasMenu = false -- enable this feature if you don't want the player to be able to switch extras
 | 
						|
 | 
						|
Config.VehicleMenuDisableSeatsChangeMenu = false -- enable this feature if you don't want the player to be able to switch seats
 | 
						|
 | 
						|
Config.VehicleMenuVehicles = {
 | 
						|
	{
 | 
						|
		vehiclename = "bullet", -- vehicle name
 | 
						|
	},
 | 
						|
	{
 | 
						|
		vehiclename = "infernus", -- vehicle name
 | 
						|
	},	
 | 
						|
}
 | 
						|
 | 
						|
Config.VehicleMenuBlacklistedVehicles = {
 | 
						|
	{
 | 
						|
		vehiclename = "rhino", -- vehicle name
 | 
						|
	},
 | 
						|
	{
 | 
						|
		vehiclename = "thruster", -- vehicle name
 | 
						|
	},	
 | 
						|
}
 | 
						|
 | 
						|
Config.VehicleMenuVehiclesClasses = {
 | 
						|
	[0] = true,
 | 
						|
	[1] = true,
 | 
						|
	[2] = true,
 | 
						|
	[3] = true,
 | 
						|
	[4] = true,
 | 
						|
	[5] = true,
 | 
						|
	[6] = true,
 | 
						|
	[7] = true,
 | 
						|
	[8] = true,
 | 
						|
	[9] = true,
 | 
						|
	[10] = true,
 | 
						|
	[11] = true,
 | 
						|
	[12] = true,
 | 
						|
	[13] = false,
 | 
						|
	[14] = false,
 | 
						|
	[15] = false,
 | 
						|
	[16] = false,
 | 
						|
	[17] = true,
 | 
						|
	[18] = true,
 | 
						|
	[19] = true,
 | 
						|
	[20] = true,
 | 
						|
	[21] = true,
 | 
						|
	[22] = true,
 | 
						|
}
 | 
						|
 | 
						|
function Notify(text)
 | 
						|
	exports["rtx_notify"]:Notify("Vehicle", text, 5000, "info") -- if you get error in this line its because you dont use our notify system buy it here https://rtx.tebex.io/package/5402098 or you can use some other notify system just replace this notify line with your notify system
 | 
						|
	--exports["mythic_notify"]:SendAlert("inform", text, 5000)
 | 
						|
end
 | 
						|
 | 
						|
function VehicleBindAction(vehicle)
 | 
						|
	-- here you can insert your own action what happens when the player presses the bind button in the vehicle menu. (for close menu use CloseVehicleMenu function)
 | 
						|
	CloseVehicleMenu()
 | 
						|
	TriggerEvent("rtx_radio:ShowRadio", true)
 | 
						|
end
 | 
						|
 | 
						|
function VehicleLockAction(vehicle)
 | 
						|
	-- here you can insert your own vehicle lock function if you use your own lock system.
 | 
						|
	if GetVehicleDoorLockStatus(vehicle) == 1 then
 | 
						|
		SetVehicleDoorsLocked(vehicle, 2)
 | 
						|
		Notify(Language[Config.Language]["vehiclelocked"])
 | 
						|
	else
 | 
						|
		SetVehicleDoorsLocked(vehicle, 1)
 | 
						|
		Notify(Language[Config.Language]["vehicleunlocked"])
 | 
						|
	end
 | 
						|
end
 | 
						|
 | 
						|
function VehicleEngineAction(vehicle)
 | 
						|
	-- here you can insert your own vehicle engine function.
 | 
						|
	if GetIsVehicleEngineRunning(vehicle) then
 | 
						|
		SetVehicleEngineOn(vehicle, false, true, true)
 | 
						|
		Notify(Language[Config.Language]["engineonoff"])
 | 
						|
	else
 | 
						|
		SetVehicleEngineOn(vehicle, true, true, true)
 | 
						|
		Notify(Language[Config.Language]["engineon"])
 | 
						|
	end
 | 
						|
end |