🕵️Custom Actions
Phrases
phrases = {
"hey give me some money",
-- Make as much phrases for this action you want.
},
Here you can add which phrases you want to execute the event
Actions
actionType = "event",
eventType = "client",
eventName = "17mov_SpeechRecognition:TestPhrase",
arguments = {
arg1 = "17movement.net",
},
Here action type has 3 types 1. Event 2. Command 3. Custom Function
For Event
actionType = "event",
eventType = "client", -- or "server"
eventName = "17mov_SpeechRecognition:TestPhrase",
arguments = {
arg1 = "17movement.net", -- optional
},
For Command
actionType = "executeCommand",
commandString = "e flip",
For Custom Function
actionType = "custom",
actionFunction = function()
-- Add here ur custom code
end,
Custom Function Example
actionType = "custom",
actionFunction = function()
if IsPlayerFreeAiming(PlayerId()) then
local found, targetPed = GetEntityPlayerIsFreeAimingAt(PlayerId())
print(targetPed)
if found then
local dict, anim = "missminuteman_1ig_2", "handsup_base"
while not HasAnimDictLoaded(dict) do
RequestAnimDict(dict)
Citizen.Wait(10)
end
print("PLAYING")
TaskPlayAnim(targetPed, dict, anim, 8.0, -8.0, -1, 1, 0, false, false, false)
Citizen.Wait(5000)
ClearPedTasks(targetPed)
end
end
end,
Last updated