Jump to content

Ajuda com mensagem DX


Recommended Posts

Alguém me ajuda com este erro?

https://prnt.sc/tzlgx1
Aqui está aonde eu exportei a função do resource Scripts_Dxmessages

function(id)
	local vehicle = getVehicleByID(id)
	if isElement(vehicle) then
		local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(source)), id), -1)
		if type(data) == "table" and #data ~= 0 then
			destroyVehicle(vehicle)
			exports.Scripts_Dxmessages:outputDx ("#c1c1c1O seu veiculo #00FF66"..(customCarNames[data[1]["Model"]] or getVehicleNameFromModel(data[1]["Model"])).." #c1c1c1foi removido.", source, 38, 122, 216, true)
		else
			exports.Scripts_Dxmessages:outputDx ("#c1c1c1Selecione um veiculo.", source, 38, 122, 216, true)
		end
	else
		exports.Scripts_Dxmessages:outputDx ("#c1c1c1O seu veiculo não foi spawnado.", source, 38, 122, 216, true)
	end
end)

O erro está se referindo aqui:

function outputDx(player, text, type)
	if (player and text and type) then
		triggerClientEvent(player, 'Server:CallNotifications', resourceRoot, text, type);
	end
end

 

Edited by gabrielcosta
Link to comment
13 hours ago, gabrielcosta said:

Alguém me ajuda com este erro?

https://prnt.sc/tzlgx1
Aqui está aonde eu exportei a função do resource Scripts_Dxmessages


function(id)
	local vehicle = getVehicleByID(id)
	if isElement(vehicle) then
		local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ? AND ID = ?", getAccountName(getPlayerAccount(source)), id), -1)
		if type(data) == "table" and #data ~= 0 then
			destroyVehicle(vehicle)
			exports.Scripts_Dxmessages:outputDx ("#c1c1c1O seu veiculo #00FF66"..(customCarNames[data[1]["Model"]] or getVehicleNameFromModel(data[1]["Model"])).." #c1c1c1foi removido.", source, 38, 122, 216, true)
		else
			exports.Scripts_Dxmessages:outputDx ("#c1c1c1Selecione um veiculo.", source, 38, 122, 216, true)
		end
	else
		exports.Scripts_Dxmessages:outputDx ("#c1c1c1O seu veiculo não foi spawnado.", source, 38, 122, 216, true)
	end
end)

O erro está se referindo aqui:


function outputDx(player, text, type)
	if (player and text and type) then
		triggerClientEvent(player, 'Server:CallNotifications', resourceRoot, text, type);
	end
end

 

outputDx(player, text, type)

 

use: exports.Scripts_Dxmessages:outputDx (source,"texto", "tipo")

 

tipos existentes: "info", "success", "error", "warning" (se seu script for o msm que o meu kk)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...