0

So I bought this script and I cant seem to find any support on it...So Imma need some help here. For reference this script plays a "Typing" Gif above someones head when they type

RegisterCommand("chatbox", function(source, args, rawCommand)
    chatbox = tonumber(args[1])
    if chatbox == 1 then
        TriggerClientEvent('chatbox:ToggleDisplay', -1, source, 1, "chatbox")
    elseif chatbox == 2 then
        TriggerClientEvent('chatbox:ToggleDisplay', -1, source, 3, "chatbox")
    elseif chatbox == 3 then
        TriggerClientEvent('chatbox:ToggleDisplay', -1, source, 2, "chatbox")
    end
end, false)

This is the code that gives me the ClientEvent Error.

if chatInputActivating then
  if not IsControlPressed(0, 245) then
      ExecuteCommand("chatbox 1") -- chatbox 1-3 which one you wanna use
    SetNuiFocus(true)

    chatInputActivating = false
  end
end

This here is the code that activates this when typing in chat (this is placed in the cl_chat.lua in resources/gameplay/chat/)

cylence
  • 15
  • 8
  • and in which file is the TriggerClientEvent stuff? why not ask the guy who sold you that script? – Piglet Jan 13 '22 at 18:23
  • @Piglet is in the client.lua. as well as. The script was purchased on a website that has an invalid discord link and no way to contact them, and it was only 5 bucks so oh well ya know. But honestly...Im no huge coder but I see ABSOLUTELY nothing wrong with it. Its where it needs to be. Maybe needs a `while true do` loop? – cylence Jan 14 '22 at 00:50
  • I don't know the file structure of FiveM but according to the docs TriggerClientEvent is a server function. I don't know if client.lua is a server file that handles clients or if it is a client file :) – Piglet Jan 14 '22 at 08:25

0 Answers0