Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: nrpg_paintjobs
1. nrpg_paintjobs
Witam potrzebuje pomocy by dodac wiecej paintjob?w ni? 12. Mam dodanych ich wiecej i w meta.xml r?wnie? ale wciaz gdy chce nadac paintjoba to pisze abym wybral paintjoba od 1-12 a mam ich 16...
Kt?re mam zmienic w skrypcie?

c.lua :
[lua]local vehiclesWithPaintjob = {}

addEventHandler("onClientElementStreamIn", root, function()
if getElementType(source) == "vehicle" then
local paintJob = getElementData(source, "vehicle:paintjob")

if paintJob ~= 0 then
addVehiclePaintjob(source, paintJob)
end
end
end)

function switchPaintJob(el_data_key, new_data)
if (getElementType(source) == "vehicle") then
if (el_data_key == "vehicle:paintjob") then
if new_data ~= false then
for i,v in ipairs(getElementsByType("vehicle")) do
if v == source then
addVehiclePaintjob(v, tonumber(new_data))
end
end
end
end
end
end
addEventHandler("onClientElementDataChange", root, switchPaintJob)

addEventHandler("onClientElementStreamOut", root, function()
if getElementType(source) == "vehicle" then
if getElementData(source, "vehicle:id") then
if getElementData(source, "vehicle:paintjob") then
removeVehiclePaintjob(source)
end
end
end
end)

addEventHandler("onClientElementDestroy", root, function()
if getElementType(source) == "vehicle" then
if getElementData(source...