Example with ped
local id = exports['weInteract']:addInteractionPoint({
ped = 'a_m_m_soucent_03', -- Ped model (optional)
scenario = 'WORLD_HUMAN_COP_IDLES', -- Scenario the ped will perform (optional)
heading = 0.0, -- Heading/orientation of the ped (optional)
coords = vec3(0.0, 0.0, 0.0), -- Coordinates for the interaction point (Z is raised by 1.0 above the ped's Z)
dist = 3.0, -- Triggerable distance and when the interaction appears
key = 'E', -- Key to trigger the interaction
message = 'GARAGE', -- Message displayed next to the key
icon = 'warehouse', -- Icon displayed next to the message (optional)
onPress = function() print('open Garage') end -- Action triggered when the key is pressed
})

Last updated