From 55b13bdd149b0aca64c0bb9994742fdd855188f5 Mon Sep 17 00:00:00 2001 From: Nawaf Alqarni <30420446+xLive@users.noreply.github.com> Date: Sun, 4 Apr 2021 19:32:36 +0300 Subject: [PATCH] freeroam: fix /addclothes error --- [gameplay]/freeroam/fr_client.lua | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/[gameplay]/freeroam/fr_client.lua b/[gameplay]/freeroam/fr_client.lua index 351389ee8..dd5e75461 100644 --- a/[gameplay]/freeroam/fr_client.lua +++ b/[gameplay]/freeroam/fr_client.lua @@ -502,15 +502,11 @@ wndClothes = { function addClothesCommand(cmd, type, model, texture) type = type and tonumber(type) - - if string.len(type) > 30 or string.len(model) > 30 or string.len(texture) > 30 then - errMsg("Invalid clothes input!") + if (not type or string.len(type) > 30) or (not model or string.len(model) > 30) or (not texture or string.len(texture) > 30) then + errMsg("Invalid clothes input! Usage: /"..cmd.." [type] [model] [texture]") return end - - if type and model and texture then - server.addPedClothes(localPlayer, texture, model, type) - end + server.addPedClothes(localPlayer, texture, model, type) end addCommandHandler('addclothes', addClothesCommand) addCommandHandler('ac', addClothesCommand)