Witam chcialbym zrobic tak aby pobieralo hajs z banku zamiast z gotowki w skrypcie na mk
s.lua
[lua]
elements = {}
elements["positions"] = {
["EZ 1"]={
marker = {1249.42, -1824.18, 13.41},
cuboid = {1249.42, -1824.18, 13.41, 5},
text = "Monta? wzmocnie?"
}
}
local napis=createElement("text")
setElementData(napis, "name", "Dost?pne ulepszenian(brak mo?liwo??i demonta?u)nnUlepszenie silnika - 50kknUlepszenie silnika - 99kknNitro sta?e - 90kk")
setElementPosition(napis, 1249.42, -1824.18, 13.5)
for i,v in pairs(elements["positions"]) do
v.cuboid = ColShape.Sphere(unpack(v.cuboid))
v.marker = Marker(v.marker[1], v.marker[2], v.marker[3]-0.90, "cylinder", 3, 32, 64, 128, 50)
end
addEvent("mk1", true)
addEventHandler("mk1", getRootElement(), function()
local hajs = getPlayerMoney(source)
local ccar = getPedOccupiedVehicle(source)
local cena = 50000000
if getElementData(ccar, "vehicle:ownedPlayer") == getElementData(client, "player:sid") then
if hajs < cena then triggerClientEvent(client, "onClientAddNotification", client, "Nie sta? Ci? aby zakupi? to ulepszenie!", "error") return end
local id = getElementData(ccar, "vehicle:id")
if not id then triggerClientEvent(client, "onClientAddNotification", client, "To nie jest pojazd prywatny!", "error... |