addEvent("sil2", true)
addEventHandler("sil2", getRootElement(), function()
local hajs = getPlayerMoney(source)
local ccar = getPedOccupiedVehicle(source)
local cena = 40000000
local id = getElementData(ccar, "vehicle:id")
if not id then triggerClientEvent(client, "onClientAddNotification", client, "To nie jest pojazd prywatny!", "error") return end
if getElementData(ccar, "vehicle:ownedPlayer") == getElementData(client, "player:uid") then
if hajs < cena then triggerClientEvent(client, "onClientAddNotification", client, "Nie sta? Ci? aby zakupi? to ulepszenie!") return end
local qr = exports['tiyl-db']:dbGet("SELECT * FROM tiyl_pojazdy WHERE id=? AND pojemnosc=?",getElementData(ccar, "vehicle:id"), "9")
if #qr == 1 then triggerClientEvent(client, "onClientAddNotification", client, "Posiadasz ju? to ulepszenie!") return end
takePlayerMoney(client, cena)
exports["tiyl-pojazdy"]:onSaveVehicle(ccar)
exports["tiyl-db"]:dbSet("UPDATE tiyl_pojazdy SET parking=1,tp_to_parking=? WHERE id=?","Dodatkowy tuning - pojemnosc 2.8", id)
exports["tiyl-db"]:dbSet("UPDATE tiyl_pojazdy SET pojemnosc=9 WHERE id=?", id)
triggerClientEvent(client, "onClientAddNotification", client, "Pomy?lnie zamontowano 'pojemnosc 2.8. Pojazd wyl?dowa? w przecho")
destroyElement(ccar)
else
triggerClientEvent(client, "onClientAddNotification", client, "To nie jest Tw?j pojazd!")
end
end)
[ Dodano: 2018-06-19, 11:04 ]
addEvent("sil2", true)
addEventHandler("sil2", getRootElement(), function()
local hajs = getPlayerMoney(source)
local ccar = getPedOccupiedVehicle(source)
local cena = 40000000
local id = getElementData(ccar, "vehicle:id")
if not id then triggerClientEvent(client, "onClientAddNotification", client, "To nie jest pojazd prywatny!", "error") return end
if getElementData(ccar, "vehicle:ownedPlayer") == getElementData(client, "player:uid") then
if hajs < cena then triggerClientEvent(client, "onClientAddNotification", client, "Nie sta? Ci? aby zakupi? to ulepszenie!") return end
local qr = exports['tiyl-db']:dbGet("SELECT * FROM tiyl_pojazdy WHERE id=? AND pojemnosc=?",getElementData(ccar, "vehicle:id"), "9")
if #qr == 1 then triggerClientEvent(client, "onClientAddNotification", client, "Posiadasz ju? to ulepszenie!") return end
takePlayerMoney(client, cena)
exports["tiyl-pojazdy"]:onSaveVehicle(ccar)
exports["tiyl-db"]:dbSet("UPDATE tiyl_pojazdy SET parking=1,tp_to_parking=? WHERE id=?","Dodatkowy tuning - pojemnosc 2.8", id)
exports["tiyl-db"]:dbSet("UPDATE tiyl_pojazdy SET pojemnosc=9 WHERE id=?", id)
triggerClientEvent(client, "onClientAddNotification", client, "Pomy?lnie zamontowano 'pojemnosc 2.8. Pojazd wyl?dowa? w przecho")
destroyElement(ccar)
else
triggerClientEvent(client, "onClientAddNotification", client, "To nie jest Tw?j pojazd!")
end
end)
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach