Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions [gameplay]/freeroam/fr_client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down