require 'lib.sampfuncs'
require 'lib.moonloader'
local memory = require "memory"
function main()
repeat wait(0) until isSampAvailable()
wait(2000)
sampRegisterChatCommand('svc', vehcolor)
while true do
wait(0)
end
end
function vehcolor(params)
local vid, c1, c2 = string.match(params, "(%d+)%s(%d+)%s(%d+)")
local result, veh = sampGetCarHandleBySampVehicleId(vid)
if c2 ~= nil then
changeCarColour(veh, c1, c2)
sampAddChatMessage('Тачка Перекрашена!', 0xFFFFFF)
else
sampAddChatMessage('Введите: /svc vehId Color1 Color2', 0xFFFFFF)
end
end