Skip to content

Commit 4ca8077

Browse files
authored
freeroam: fix /addclothes error (#307)
1 parent 7f4d931 commit 4ca8077

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

[gameplay]/freeroam/fr_client.lua

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -502,15 +502,11 @@ wndClothes = {
502502

503503
function addClothesCommand(cmd, type, model, texture)
504504
type = type and tonumber(type)
505-
506-
if string.len(type) > 30 or string.len(model) > 30 or string.len(texture) > 30 then
507-
errMsg("Invalid clothes input!")
505+
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
506+
errMsg("Invalid clothes input! Usage: /"..cmd.." [type] [model] [texture]")
508507
return
509508
end
510-
511-
if type and model and texture then
512-
server.addPedClothes(localPlayer, texture, model, type)
513-
end
509+
server.addPedClothes(localPlayer, texture, model, type)
514510
end
515511
addCommandHandler('addclothes', addClothesCommand)
516512
addCommandHandler('ac', addClothesCommand)

0 commit comments

Comments
 (0)