Hello i created script but not work how i can fix this i mean: when i use /color RED so setVehicleColor(255, 0, 0)
Amount = {
"RED" = "255,0,0",
"BLUE" = "1,1,1,
"PINK" = "2,2,2,
"BLACK" = "0,0,0",
}
function clr (player,command,color)
local vehicle = getPedOccupiedVehicle(player)
if color then
setVehicleColor(vehicle, Amount[#color])
end
end
addCommandHandler("color", clr)