Witajcie !
Jak zrobi? zapis tuningu i uszkodze? w tym kodzie ?
[lua]
function(id, cost, name)
if (getPlayerMoney (source) >= tonumber(cost)) then
outputChatBox ("Kupiles woz " .. name, source, 255, 0, 0, false)
outputChatBox ("ID pojazdu: " .. id, source, 255, 0, 0, false)
outputChatBox ("Koszt: " .. cost, source, 255, 0, 0, false)
takePlayerMoney (source, tonumber (cost))
setAccountData (getPlayerAccount (source), "funmodev2-car", tonumber(id))
setAccountData (getPlayerAccount (source), "funmodev2-paintjob", 3)
setAccountData (getPlayerAccount (source), "funmodev2-carupg", 0)
else
outputChatBox ("Nie posiadasz tyle kasy!", source, 255, 0, 0, false)
end
end)
addEvent ("carSpawn", true)
addEvent ("carDestroy", true)
function carSpawn ()
if not (isGuestAccount (getPlayerAccount (source))) and not (isPedInVehicle(source)) then
if (getElementData (source, "hisCar")) and (getElementData (source, "hisCar") ~= nil) and (getElementType(getElementData (source, "hisCar")) == "vehicle") then
setElementVelocity (getElementData (source, "hisCar"), 0,0,0)
local x,y,z = getElementPosition (source)
setVehicleRotation (getElementData (source, "hisCar"), 0, 0, 0)
setElementPosition (getElementData (source, "hisCar"), x+2,y,z +1)
... |