File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change 215
215
addCommandHandler (' setskin' , setSkinCommand )
216
216
addCommandHandler (' ss' , setSkinCommand )
217
217
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
-
225
218
---- -----------------------
226
219
--- Set animation window
227
220
---- -----------------------
@@ -1805,8 +1798,9 @@ function setPaintjobCommand(cmd, paint)
1805
1798
1806
1799
paint = paint and tonumber (paint )
1807
1800
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!" )
1810
1804
return
1811
1805
end
1812
1806
@@ -1938,7 +1932,7 @@ wndWeather = {
1938
1932
1939
1933
function setWeatherCommand (cmd , weather )
1940
1934
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
1942
1936
errMsg (" Invalid weather ID!" )
1943
1937
return
1944
1938
end
Original file line number Diff line number Diff line change @@ -48,6 +48,13 @@ function isPlayerTerminated(player)
48
48
return (math.floor (x ) == 132 and math.floor (y ) == - 68 ) or (math.abs (x ) < 2 and math.abs (y ) < 2 and z < 1 )
49
49
end
50
50
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
+
51
58
function table .find (t , ...)
52
59
local args = { ... }
53
60
if # args == 0 then
You can’t perform that action at this time.
0 commit comments