Skip to content

Commit c93c637

Browse files
author
Dutchman101
committed
Addendum to cd9154a
1 parent d302ff2 commit c93c637

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

[gameplay]/freeroam/fr_client.lua

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,6 @@ end
215215
addCommandHandler('setskin', setSkinCommand)
216216
addCommandHandler('ss', setSkinCommand)
217217

218-
function isPlayerMoving(p)
219-
if isElement(p) and getElementType(p) == "player" then
220-
return Vector3(getElementVelocity(p)).length ~= 0
221-
end
222-
return false
223-
end
224-
225218
---------------------------
226219
--- Set animation window
227220
---------------------------
@@ -1805,8 +1798,9 @@ function setPaintjobCommand(cmd, paint)
18051798

18061799
paint = paint and tonumber(paint)
18071800

1808-
if not paint then return end
1809-
if string.len(paint) > 5 then errMsg("Invalid paintjob ID!")
1801+
if not paint then errMsg("Enter paintjob ID please!") return end
1802+
if paint > 3 or string.len(paint) > 1 then
1803+
errMsg("Invalid paintjob ID!")
18101804
return
18111805
end
18121806

@@ -1938,7 +1932,7 @@ wndWeather = {
19381932

19391933
function setWeatherCommand(cmd, weather)
19401934
weather = weather and tonumber(weather)
1941-
if weather and string.len(weather) > 266 then
1935+
if not weather or weather > 255 or string.len(weather) > 3 then
19421936
errMsg("Invalid weather ID!")
19431937
return
19441938
end

[gameplay]/freeroam/util.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ function isPlayerTerminated(player)
4848
return (math.floor(x) == 132 and math.floor(y) == -68) or (math.abs(x) < 2 and math.abs(y) < 2 and z < 1)
4949
end
5050

51+
function isPlayerMoving(p)
52+
if isElement(p) and getElementType(p) == "player" then
53+
return Vector3(getElementVelocity(p)).length ~= 0
54+
end
55+
return false
56+
end
57+
5158
function table.find(t, ...)
5259
local args = { ... }
5360
if #args == 0 then

0 commit comments

Comments
 (0)