From 9fd7ae481f317379fcecf9b6dede060f5b4196b6 Mon Sep 17 00:00:00 2001 From: IIYAMA Date: Sat, 13 Jul 2024 13:02:44 +0200 Subject: [PATCH] Some small freeroam security adjustments --- [gameplay]/freeroam/fr_client.lua | 4 ++-- [gameplay]/freeroam/fr_server.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[gameplay]/freeroam/fr_client.lua b/[gameplay]/freeroam/fr_client.lua index 70a91d3ad..7661a93f4 100644 --- a/[gameplay]/freeroam/fr_client.lua +++ b/[gameplay]/freeroam/fr_client.lua @@ -198,9 +198,9 @@ function setSkinCommand(cmd, skin) return end - skin = skin and math.floor(tonumber(skin)) + skin = tonumber(skin) - if skin then + if skin and skin == math.floor(skin) then server.setMySkin(skin) fadeCamera(true) closeWindow(wndSpawnMap) diff --git a/[gameplay]/freeroam/fr_server.lua b/[gameplay]/freeroam/fr_server.lua index 15a6ddf45..653772fbf 100644 --- a/[gameplay]/freeroam/fr_server.lua +++ b/[gameplay]/freeroam/fr_server.lua @@ -417,7 +417,7 @@ end -- [END] Remote Player Call Functions -- ---------------------------------------- -_setPlayerGravity = setPedGravity +local _setPlayerGravity = setPedGravity function setPedGravity(player, grav) if grav < getOption('gravity.min') then errMsg(('Minimum allowed gravity is %.5f'):format(getOption('gravity.min')), player)