Skip to content
Merged
Changes from 1 commit
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
11 changes: 8 additions & 3 deletions addons/sourcemod/scripting/Shop_ZRSkins.sp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public Plugin myinfo =
name = "[Shop] ZR Skins",
author = "AlexTheRegent, .Rushaway",
description = "Buy ZR skins in the shop",
version = "1.2.0",
version = "1.2.1",
url = ""
};

Expand Down Expand Up @@ -129,6 +129,11 @@ void PopulateCategory(CategoryId category, const char[] source)
PrecacheModel(path);
Comment thread
Rushaway marked this conversation as resolved.
Outdated
}

if ( !IsModelPrecached(path) ) {
LogError("Model \"%s\" could not be precached, skipping item \"%s\"", path, name);
continue;
}

ItemId existingItemId = Shop_GetItemId(category, name);
if (existingItemId != INVALID_ITEM && Shop_IsItemExists(existingItemId)) {
Shop_UnregisterItem(existingItemId);
Comment thread
Rushaway marked this conversation as resolved.
Outdated
Expand Down Expand Up @@ -278,7 +283,7 @@ public Action Timer_ChangeSkin(Handle timer, any userid)

void SetSkinSafe(int client, const char[] skin)
{
if ( skin[0] != 0 ) {
if ( skin[0] != 0 && IsModelPrecached(skin) ) {
SetEntityModel(client, skin);
}
Comment thread
Rushaway marked this conversation as resolved.
}
Expand Down Expand Up @@ -525,4 +530,4 @@ stock int GetEdictsCount()
}

return iCount;
}
}
Loading