Update server.lua

This commit is contained in:
Miho931 2025-06-09 17:55:06 +02:00
parent 1983435d8f
commit b5e2d36590

View file

@ -5,10 +5,10 @@ RegisterServerEvent('mh_garage:setMods')
AddEventHandler('mh_garage:setMods', function(mods) AddEventHandler('mh_garage:setMods', function(mods)
print(mods.plate) print(mods.plate)
if test_vari[mods.plate] == true then if test_vari[mods.plate] == true then
Print("Fahrzeug hat bereits ein Eintrag") print("Fahrzeug hat bereits ein Eintrag")
else else
MySQL.query("SELECT mods FROM player_vehicles WHERE plate = ?", {mods.plate}, function(rs) MySQL.query("SELECT mods FROM player_vehicles WHERE plate = ?", {mods.plate}, function(rs)
if rs[1].mods == nil then if next(rs[1].mods) == nil then
MySQL.query("UPDATE player_vehicles SET mods = ? WHERE plate = ?", {mods.plate}) MySQL.query("UPDATE player_vehicles SET mods = ? WHERE plate = ?", {mods.plate})
test_vari[mods.plate] = true test_vari[mods.plate] = true
else else