diff --git a/SDK/include/values.hpp b/SDK/include/values.hpp index d61659b2a..ff26f480e 100644 --- a/SDK/include/values.hpp +++ b/SDK/include/values.hpp @@ -59,6 +59,10 @@ constexpr float MIN_WORLD_BOUNDS = -20000.0f; constexpr int MAX_TEXTDRAW_STR_LENGTH = 800; constexpr int MAX_VEHICLE_CARRIAGES = 3; constexpr int MAX_GAMETEXT_STYLES = 16; +constexpr int MIN_CUSTOM_SKIN_ID = 20001; +constexpr int MAX_CUSTOM_SKIN_ID = 30000; +constexpr int MIN_CUSTOM_OBJECT_ID = -30000; +constexpr int MAX_CUSTOM_OBJECT_ID = -1000; enum Key { diff --git a/Server/Components/CustomModels/models.cpp b/Server/Components/CustomModels/models.cpp index 925410f54..23694c9ae 100644 --- a/Server/Components/CustomModels/models.cpp +++ b/Server/Components/CustomModels/models.cpp @@ -589,9 +589,9 @@ class CustomModelsComponent final : public ICustomModelsComponent, public Player return false; } - if (type == ModelType::Skin && !(id >= 20000 && id <= 30000)) + if (type == ModelType::Skin && !(id >= MIN_CUSTOM_SKIN_ID && id <= MAX_CUSTOM_SKIN_ID)) return false; - else if (type == ModelType::Object && !(id >= -30000 && id <= -1000)) + else if (type == ModelType::Object && !(id >= MIN_CUSTOM_OBJECT_ID && id <= MAX_CUSTOM_OBJECT_ID)) return false; else if (baseModels.find(id) != baseModels.end()) { @@ -648,7 +648,7 @@ class CustomModelsComponent final : public ICustomModelsComponent, public Player { // Check if model is default one (base). // If so, there's no custom model to be returned. - if (baseModelIdOrInput >= 0 && baseModelIdOrInput <= 20000) + if (baseModelIdOrInput >= 0 && baseModelIdOrInput < MIN_CUSTOM_SKIN_ID) return false; // Check if input is valid custom model.