Git Product home page Git Product logo

esx_jb_radars's People

Contributors

arnaudlier avatar elpumpo avatar royalko avatar tanguyortegat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

esx_jb_radars's Issues

Factures

Bonsoir, j'ai un problème avec les factures je ne les reçois pas voici l'erreur

[ERROR] [MySQL] An error happens on MySQL for query "INSERT INTO billing (identifier, sender, target_type, target, label, amount) VALUES (@Identifier, @sender, @target_type, @target, @Label, @amount) {@target_type=society;@amount=1500;@sender=Radar fixe;@target=society_police;@Label=📸:plaque XKY 125 , 120 km/h a la place de 80.0;@Identifier=steam:110000135c08c7e}": Incorrect string value: '\xF0\x9F\x93\xB8:p...' for column zap423737-5.billing.label at row 1

Merci de vos réponse.

Issue

image
It don't work for me, only props is showing. It dont issue anything or show anything else. What could cause this?

probleme de notification

Bonsoir
Est-ce normal que après configuration je n'ai plus aucune notifs de radar ni de paiement
(aucune erreur dans les consoles)

ESX = nil

TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
local jobplates = {}

AddEventHandler('onMySQLReady', function ()
  MySQL.Async.fetchAll(
	"SELECT name FROM jobs", {},	function(result)
		
	  for k,v in pairs(result) do
	  local job = string.upper(string.sub(v.name, 0, 4))
		jobplates[job] = true
	  end
	end
  )
end)

RegisterServerEvent('esx_jb_radars:PayFine')
AddEventHandler('esx_jb_radars:PayFine', function(source, plate, kmhSpeed, maxSpeed, amount, vehicleModel, radarStreet)
	local platePrefix = string.upper(string.sub(plate, 0, 4))
	local _source = source
	local xPlayer = ESX.GetPlayerFromId(_source)
	local color = Config.orange
	local title = "Radars"
	local speed = kmhSpeed - maxSpeed
	local firstjob = string.upper(string.sub(xPlayer.job.name, 0, 4))
	
	MySQL.Async.fetchAll('SELECT * FROM owned_vehicles WHERE @plate = plate', {
		['@plate'] = plate
	}, 	function (result)
		if result[1] ~= nil then
			title = 'Vehicule inconnu'
			local identifier = result[1].owner
			MySQL.Async.execute('INSERT INTO billing (identifier, sender, target_type, target, label, amount) VALUES (@identifier, @sender, @target_type, @target, @label, @amount)',
			{
				['@identifier']  = identifier,
				['@sender']      = "Radar fixe",
				['@target_type'] = 'society',
				['@target']      = 'society_police',
				['@label']       = ("plaque %s,flashé à %skm/h~n~au lieu de %skm/h"):format(plate, kmhSpeed, maxSpeed),
				['@amount']      = amount
			}, function(rowsChanged)
			TriggerClientEvent('esx:showNotification', _source, "Votre véhicule "..plate.." a été flashé à ~r~"..kmhSpeed.."km/h~s~ au lieu de ~g~"..maxSpeed.."km/h~s~")			
			end)

		elseif jobplates[platePrefix] then
			title = 'Vehicule société'
			if firstjob == platePrefix then
				MySQL.Async.execute('INSERT INTO billing (identifier, sender, target_type, target, label, amount) VALUES (@identifier, @sender, @target_type, @target, @label, @amount)',
				{
					['@identifier']  = xPlayer.identifier,
					['@sender']      = "Radar fixe",
					['@target_type'] = 'society',
					['@target']      = 'society_police',
					['@label']       = "plaque société "..plate..", "..kmhSpeed.."km/h ~n~ au lieu de "..maxSpeed,
					['@amount']      = amount
				}, function(rowsChanged)
					TriggerClientEvent('esx:showNotification', _source, "Votre véhiculede société "..plate.."  a été flashé à "..kmhSpeed.."km/h au lieu de "..maxSpeed.."km/h~s~" )
				end)
			end
		else
			title = 'Vehicule inconnu'
		end
		if speed <= 50 then
			color = Config.green
		elseif speed <= 100 then
			color = Config.orange
		elseif speed > 100 then
			color = Config.red
		end
		sendToDiscord('Central:Excès de vitesse',title,'Modele : '..vehicleModel..'\nPlaque : '..plate..'\nVitesse : '..kmhSpeed.. '\nVitesse max : '..maxSpeed..'\nRadar : '..radarStreet  ,color)
	end)
end)

local IsEnabled = false
ESX.RegisterUsableItem('coyotte', function(source)
	local _source = source
	if not IsEnabled then
		IsEnabled  = true
		TriggerClientEvent('esx_jb_radars:ShowRadarBlip', _source)
		TriggerClientEvent('esx:showNotification',_source, "Ton coyotte est activé.")
	else
		TriggerClientEvent('esx_jb_radars:RemoveRadarBlip', _source)
		TriggerClientEvent('esx:showNotification', _source, "Ton coyotte est désactivé.")
		IsEnabled = false
	end
end)

RegisterServerEvent('esx:onRemoveInventoryItem')
AddEventHandler('esx:onRemoveInventoryItem', function(source, item, count)
	if item.name ~= nil and item.name == 'coyotte' and item.count == 0 then
		IsEnabled = false
		TriggerClientEvent('esx_jb_radars:RemoveRadarBlip', source)
		TriggerClientEvent('esx:showNotification', source, "Ton coyotte est désactivé.")
	end
end)

function sendToDiscord(name,message,text,color)
	local DiscordWebHook = Config.webhook
	-- Modify here your discordWebHook username = name, content = message,embeds = embeds

	local embeds = {
		{
			["title"]=message,
			["description"]=text,
			["type"]="rich",
			["color"] =color,
			["footer"]=  {
			["text"]= os.date("%d/%m/%Y %H:%M:%S"),
		   },
		}
	}
	if message == nil or message == '' then return FALSE end
	PerformHttpRequest(DiscordWebHook, function(err, text, headers) end, 'POST', json.encode({ username = name,embeds = embeds}), { ['Content-Type'] = 'application/json' })
end

function dump(o, nb)
  if nb == nil then
    nb = 0
  end
   if type(o) == 'table' then
      local s = ''
      for i = 1, nb + 1, 1 do
        s = s .. "    "
      end
      s = '{\n'
      for k,v in pairs(o) do
         if type(k) ~= 'number' then k = '"'..k..'"' end
          for i = 1, nb, 1 do
            s = s .. "    "
          end
         s = s .. '['..k..'] = ' .. dump(v, nb + 1) .. ',\n'
      end
      for i = 1, nb, 1 do
        s = s .. "    "
      end
      return s .. '}'
   else
      return tostring(o)
   end
end 

erreur

 @esx_jb_radars/esx_jb_radars_sv.lua:76: in main chunk)
``` j'ai cette erreur a chaque reboot ce qui m'oblige a restart le script pour le faire fonctionner

not radar voice

does not skip the warning by radar voice and I have everything properly installed

Erreur MySQL

Salut, voilà je rencontre un petit soucis, j'ai mis la ressource correctement mais j'ai une erreur MySQL dans la console serveur
esx_radar

J'ai pourtant bien esx_billing, les radars sont bien en jeu mais j'ai l'impression qu'il ne peux pas insérer la bdd

Merci pour ton aide

J'arrive pas a faire marcher le script

Bonjour,
Le soucis que j'ai, est que j'ai un serveur five M et quand je met le script esx_js_radars et que je le start dans le serveur.cfg, c'est que quand je démarre le serveur et que je vais dessus et bah il n'y a aucun radars. est ce qu'il faut un autre script avec ou pas comment bien le configure.
Moi je le place dans serveur-data, ressources, et dans [esx].
Svp besoin d'aide
Merci

pas trops compris

salut , tu pourrais m'expliquer comment changer le montant des amendes car elles sont trop eleve :')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.