Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

script chat not work, everyone script its work #2

Open
CzlowiekNinja2021 opened this issue Jan 2, 2024 · 0 comments
Open

script chat not work, everyone script its work #2

CzlowiekNinja2021 opened this issue Jan 2, 2024 · 0 comments

Comments

@CzlowiekNinja2021
Copy link

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant