function setChipVehicle(player, vehicle, handlings, name, money)
if isElement(vehicle) then
if getPlayerMoney(player) >= tonumber(money) then
if type(handlings) == "string" then
local strArray = {}
for token in string.gmatch(handlings, "[^%s]+") do
table.insert(strArray,token)
end
local i = 2
outputChatBox("#1E90FF[Механик] #FFFFFFВы успешно установили чип '"..name.."' за "..money.." р.", player, 255, 255, 255, true)
takePlayerMoney(player, money)
setElementData(vehicle, "stageNum1", 0)
setElementData(vehicle, "stageNum2", 0)
setElementData(vehicle, "stageNum3", 0)
for k,v in pairs(handlingNamesTable) do
setVehicleHandling(vehicle, v, strArray[i])
if v == "modelFlags" or v == "handlingFlags" then
setVehicleHandling(vehicle, v, tonumber("0x"..strArray[i]))
elseif v == "driveType" then
if strArray[i] == "4" then
setVehicleHandling(vehicle, v, "awd")
end
end
i = i + 1
end
elseif type(handlings) == "table" then
for k,v in pairs(handlings) do
end
end
else
outputChatBox("#1E90FF[Механик] #FFFFFFУ вас недостаточно средств!", player, 255, 255, 255, true)
end
end
end
addEvent("setChipVehicle",true)
addEventHandler("setChipVehicle",root,setChipVehicle)
ругается на строку setVehicleHandling(vehicle, v, strArray). Помогите пожалуйста