Viority Development
DiscordShop
  • 🏠Home
    • Welcome
    • FAQ
    • Common issues
  • Tutorials
    • βš™οΈProduct
      • How to get the Security Token?
      • How to create new locales?
      • getSharedObject Deprecated
  • 🀝Support
    • Support Policy
    • πŸ‡ΊπŸ‡ΈTicket Rules (EN)
    • πŸ‡©πŸ‡ͺTicket Rules (GER)
  • Products
    • πŸ”’Viority Script Lock
      • How to use
      • JavaScript example
      • Lua example
    • πŸ“‹Viority Advanced Menu
      • πŸ‘€Config Preview
      • Event Command
      • NotifyBoard
      • OpenMenu Event
      • CloseMenu Event
      • UpdateChallengeProgress
      • UpdateAchievementProgress
      • CheckAchievementProgress
      • CheckCurrentLevel
    • 🚘Viority Garage V2
      • πŸ‘€Config Preview
      • OpenGarage Event
      • CloseGarage Event
      • VehicleParkIn
      • VehicleParkIn DV
    • πŸš—Viority Cardealer
      • πŸ‘€Config Preview
      • Vehicle Color Fix
      • OpenCardealer Event
      • CloseCardealer Event
      • UpdateLeasingStatus
      • CheckPlate
      • CheckPlateBlacklist
      • GeneratePlate
    • β›½Viority Gasoline
      • πŸ‘€Config Preview
      • OpenGasoline Event
      • CloseGasoline Event
      • RefillFuelStock
      • GetFuel
      • SetFuel
    • πŸ’³Viority Billingmenu
      • πŸ‘€Config Preview
      • OpenBillingMenu Event
      • CloseBillingMenu Event
    • πŸ’Viority Marry
      • Page
      • πŸ‘€Config Preview
      • StartAnimation Event
      • StopAnimation Event
    • πŸ“ŠViority HUD
      • πŸ‘€Config Preview
        • PMA-Voice Example
        • Saltychat Example
      • Announce Command
      • TriggerNotifySystem
      • UpdateWantedStars
      • UpdateTransactionData
      • UpdateCurrentMission
      • GetWantedStars
    • πŸ•Viority Playtime Rewards
      • πŸ‘€Config Preview
      • ClosePlaytimeReward
      • OpenPlaytimeReward
      • CheckCurrentLevel
    • 🀝Viority Interaction
      • πŸ‘€Config Preview
      • ESX Interaction Integration
      • How to use
    • πŸ†”Viority SupportID
      • πŸ‘€Config Preview
      • getNearestPlayerID
      • getPlayerID
    • πŸ“Viority Register
      • πŸ‘€Config Preview
      • getAllPromocodes
      • getPlayerPromocode
    • 🏒Viority Fraction Request
      • πŸ‘€Config Preview
    • 🌐Viority LifeInvader
      • πŸ‘€Config Preview
    • πŸ””Viority LifeInvader Notify
      • πŸ‘€Config Preview
      • Notify
    • πŸͺ™Viority Trading
      • πŸ‘€Config Preview
      • OpenTradingMenu Event
      • CloseTradingMenu Event
  • πŸ“ŒDiscord Server
Powered by GitBook
On this page
  1. Products
  2. Viority Interaction

ESX Interaction Integration

πŸ”§ This tutorial shows how to add the Interaction to ESX

This es_extended integration optional. Please follow all steps carefully!

1. Modify the ESX Framework

1.1 Go to the es_extended folder. 1.2 Open the File client > functions.lua. 1.3 Replace the function ESX.ShowHelpNotification.

ShowHelpNotification
function ESX.ShowHelpNotification(msg, thisFrame, beep, duration)
	local thisFrame = thisFrame or false;

	AddTextEntry('esxHelpNotification', msg)

	if thisFrame then
		exports['viority_interaction']:Interaction("E", msg, true, true, "#2A7EE2");
	else
		if beep == nil then beep = true end
		BeginTextCommandDisplayHelp('esxHelpNotification')
		EndTextCommandDisplayHelp(0, false, beep, duration or -1)
	end
end

1.4 Adjust the Color Code in the export, if you want.

Now we have added the interaction to the ShowHelpNotification, but only if parameter thisFrame is true, in case of false the normal one will continue to be used.

Example ShowHelpNotify
-- Create a citizen thread
Citizen.CreateThread(function()
    while true do -- Start the Loop
	            ESX.ShowHelpNotification( -- Trigger the Interaction
            "PRESS {y1}E{y2} TO INTERACT", -- This is the interaction text
            true,  -- THIS PARAM MUST BE TRUE!!!
            false, 
            1000
        );
        Citizen.Wait(0); -- Loop in every Frame
    end;
end);
PreviousConfig PreviewNextHow to use

Last updated 5 months ago

🀝