Witam, posiadam problem z systemem pojemno?ci w pojazdach. Mianowicie zapisuj? si? one w bazie danych, lecz na serwerze do pojazd?w nie dodaj? si? ?aden handling.
Mo?e tutaj kto? b?dzie w stanie odszuka? b??d w skrypcie/skryptach.
Poni?ej wrzucam kody:
pojemnosc.lua
[code]function getVehicleHandlingProperty ( element, property )
if isElement ( element ) and getElementType ( element ) == "vehicle" and type ( property ) == "string" then
local handlingTable = getVehicleHandling ( element )
local value = handlingTable[property]
if value then
return value
end
end
return false
end
function lalal(vehicle)
local pojemnosc = getElementData(vehicle,"vehicle:pojemnosc")
local engineacc = getVehicleHandlingProperty(vehicle,"engineAcceleration")
local maxspeed = getVehicleHandlingProperty(vehicle,"maxVelocity")
if getElementData(vehicle, "vehicle:pojemnosc") == 1 then
setElementData(vehicle, "vehicle:pojemnosc", 1.2)
setVehicleHandling(vehicle, "maxVelocity", velocity+3)
setVehicleHandling(vehicle, "engineAcceleration", acceleration+1)
elseif getElementData(vehicle, "vehicle:pojemnosc") == 2 then
setElementData(vehicle, "vehicle:pojemnosc", 1.4)
setVehicleHandling(vehicle, "maxVelocity", velocity+3.5)
setVehicleHandling(vehicle, "engineAcceleration", acceleration+1.25)
elseif getElementData(vehicle, "vehicle:p... |