Skip to content

Commit 4d45ce7

Browse files
authored
freeroam: fix warning when using /color with negative number (#308)
1 parent 4ca8077 commit 4d45ce7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

[gameplay]/freeroam/fr_client.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1674,7 +1674,8 @@ function setColorCommand(cmd, ...)
16741674
end
16751675

16761676
for i = 1, 12 do
1677-
colors[i] = args[i] and tonumber(args[i]) or colors[i]
1677+
local color = tonumber(args[i]) or -1
1678+
colors[i] = color >= 0 and color or colors[i]
16781679
end
16791680
server.setVehicleColor(vehicle, unpack(colors))
16801681
end

0 commit comments

Comments
 (0)