Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
samyycX committed May 27, 2023
1 parent 6dcfe3a commit 1b0249f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
21 changes: 14 additions & 7 deletions addons/sourcemod/scripting/weapons.sp
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,21 @@ public Action CommandWeaponSkins(int client, int args)
{
if (args > 0) {

char searchSkinName[32];
GetCmdArgString(searchSkinName, sizeof(searchSkinName));

Menu resultMenu = SearchSkins(client, searchSkinName);
menuPlayerSearchTemp[client] = resultMenu;
resultMenu.Display(client, menuTime);

if (g_bEnableSearch)
{
char searchSkinName[32];
GetCmdArgString(searchSkinName, sizeof(searchSkinName));

Menu resultMenu = SearchSkins(client, searchSkinName);
menuPlayerSearchTemp[client] = resultMenu;
resultMenu.Display(client, menuTime);
}
else
{
PrintToChat(client, " %s \x02%T", g_ChatPrefix, "SearchDisabled");
}
return Plugin_Handled;

}

CreateMainMenu(client).Display(client, menuTime);
Expand Down
4 changes: 4 additions & 0 deletions addons/sourcemod/translations/chi/weapons.phrases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@
{
"chi" "名称标签已禁用"
}
"SearchDisabled"
{
"chi" "搜索功能已禁用"
}
"SearchApplyAll"
{
"chi" "应用所有皮肤"
Expand Down
4 changes: 4 additions & 0 deletions addons/sourcemod/translations/weapons.phrases.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@
{
"en" "Use: !nametag <tag>"
}
"SearchDisabled"
{
"en" "Skin search is disabled at the moment."
}
"SearchApplyAll"
{
"en" "Apply to all"
Expand Down

0 comments on commit 1b0249f

Please sign in to comment.