Skip to content

script chat not work, everyone script its work #2

@CzlowiekNinja2021

Description

@CzlowiekNinja2021

N0rmie, I have a problem with the script, the secured triggering in the chat script does not work, in other scripts it works normally

RegisterNUICallback('chatResult', function(data, cb)
  chatInputActive = false
  SetNuiFocus(false)

  if not data.canceled then
    local id = PlayerId()

    --deprecated
    local r, g, b = 0, 0x99, 255

    if data.message:sub(1, 1) == '/' then
      ExecuteCommand(data.message:sub(2))
    else
		TriggerServerEvent('_dsadsadsadsadsadsa1', data.message) - work
		secured_TriggerServerEvent('_dsadsadsadsadsadsa', data.message) - not work
    end
  end

  cb('ok')
end)
RegisterNetEvent("_dsadsadsadsadsadsa1", function(message)
	print("1",message)
end)

secured_RegisterServerEvent("_dsadsadsadsadsadsa", function(message)
	print("2", message)
end)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions